From python-checkins at python.org Wed Jul 1 00:10:55 2009 From: python-checkins at python.org (guido.van.rossum) Date: Tue, 30 Jun 2009 22:10:55 -0000 Subject: [Python-checkins] r73709 - peps/trunk/pep-0376.txt Message-ID: Author: guido.van.rossum Date: Wed Jul 1 00:10:55 2009 New Revision: 73709 Log: Minor fixes of typos and grammar in the first third of the file. Modified: peps/trunk/pep-0376.txt Modified: peps/trunk/pep-0376.txt ============================================================================== --- peps/trunk/pep-0376.txt (original) +++ peps/trunk/pep-0376.txt Wed Jul 1 00:10:55 2009 @@ -60,12 +60,12 @@ How distributions are installed ------------------------------- -Right now, when a distribution is installed in Python, every element it -contains is installed in various directories. +Right now, when a distribution is installed in Python, the elements it +contains are installed in various directories. The pure Python code, for instance, is installed in the `purelib` directory -which is located in the Python installation at ``lib\python2.6\site-packages`` -for example under Unix-like systems or Mac OS X, and in ``Lib/site-packages`` +which is located in the Python installation at ``lib/python2.6/site-packages`` +for example under Unix-like systems or Mac OS X, and in ``Lib\site-packages`` under Windows. This is done with the Distutils `install` command, which calls various subcommands. @@ -174,12 +174,13 @@ The egg-info directory name is created using a new function called ``egginfo_dirname(name, version)`` added to ``pkgutil``. ``name`` is -converted to a standard distribution name any runs of non-alphanumeric -characters are replaced with a single '-'. ``version`` is converted +converted to a standard distribution name by replacing any runs of +non-alphanumeric characters with a single '-'. ``version`` is converted to a standard version string. Spaces become dots, and all other -non-alphanumeric characters become dashes, with runs of multiple dashes -condensed to a single dash. Both attributes are then converted into their -filename-escaped form. Any '-' characters are currently replaced with '_'. +non-alphanumeric characters (except dots) become dashes, with runs of +multiple dashes condensed to a single dash. Both attributes are then +converted into their filename-escaped form, i.e. any '-' characters are +replaced with '_'. Examples:: @@ -198,10 +199,10 @@ A `RECORD` file will be added inside the `.egg-info` directory at installation time. The `RECORD` file will hold the list of installed files. These correspond to the files listed by the `record` option of the `install` command, and will -be generated by default. This will allow uninstallation, as explained later in this -PEP. The `install` command will also provide an option to prevent the `RECORD` -file from being written and this option should be used when creating system -packages. +be generated by default. This will allow uninstallation, as explained later in +this PEP. The `install` command will also provide an option to prevent the +`RECORD` file from being written and this option should be used when creating +system packages. Third-party installation tools also should not overwrite or delete files that are not in a RECORD file without prompting or warning. @@ -217,7 +218,7 @@ - field delimiter : `,` - quoting char : `"`. -- line terminator : ``os.linesep`` (so ``\r\n`` or ``\r``) +- line terminator : ``os.linesep`` (so ``\r\n`` or ``\n``) Each record is composed of three elements. @@ -226,7 +227,7 @@ - if the installed file is located in the directory where the `.egg-info` directory of the package is located, it will be a '/'-separated relative path, no matter what the target system is. This makes this information - cross-compatible and allows simple installation to be relocatable. + cross-compatible and allows simple installations to be relocatable. - if the installed file is located elsewhere in the system, a '/'-separated absolute path is used. From python-checkins at python.org Wed Jul 1 00:14:34 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 30 Jun 2009 22:14:34 -0000 Subject: [Python-checkins] r73710 - python/trunk/Lib/tempfile.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 00:14:33 2009 New Revision: 73710 Log: provide a dummy __exit__ on windows Modified: python/trunk/Lib/tempfile.py Modified: python/trunk/Lib/tempfile.py ============================================================================== --- python/trunk/Lib/tempfile.py (original) +++ python/trunk/Lib/tempfile.py Wed Jul 1 00:14:33 2009 @@ -411,6 +411,9 @@ result = self.file.__exit__(exc, value, tb) self.close() return result + else: + def __exit__(self, exc, value, tb): + pass def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="", From python-checkins at python.org Wed Jul 1 00:27:26 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 30 Jun 2009 22:27:26 -0000 Subject: [Python-checkins] r73711 - in python/branches/py3k: Lib/tempfile.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 00:27:25 2009 New Revision: 73711 Log: Merged revisions 73710 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73710 | benjamin.peterson | 2009-06-30 17:14:33 -0500 (Tue, 30 Jun 2009) | 1 line provide a dummy __exit__ on windows ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/tempfile.py Modified: python/branches/py3k/Lib/tempfile.py ============================================================================== --- python/branches/py3k/Lib/tempfile.py (original) +++ python/branches/py3k/Lib/tempfile.py Wed Jul 1 00:27:25 2009 @@ -408,6 +408,9 @@ result = self.file.__exit__(exc, value, tb) self.close() return result + else: + def __exit__(self, exc, value, tb): + pass def NamedTemporaryFile(mode='w+b', buffering=-1, encoding=None, From python-checkins at python.org Wed Jul 1 00:51:06 2009 From: python-checkins at python.org (ezio.melotti) Date: Tue, 30 Jun 2009 22:51:06 -0000 Subject: [Python-checkins] r73712 - in python/trunk/Doc/library: macostools.rst unittest.rst Message-ID: Author: ezio.melotti Date: Wed Jul 1 00:51:06 2009 New Revision: 73712 Log: Fixed defaultTestCase -> defaultTestResult Modified: python/trunk/Doc/library/macostools.rst python/trunk/Doc/library/unittest.rst Modified: python/trunk/Doc/library/macostools.rst ============================================================================== --- python/trunk/Doc/library/macostools.rst (original) +++ python/trunk/Doc/library/macostools.rst Wed Jul 1 00:51:06 2009 @@ -59,8 +59,8 @@ have incompatible behaviour in some cases. -:mod:`findertools` --- The :program:`finder`'s Apple Events interface -===================================================================== +:mod:`findertools` --- The :program:`finder`\'s Apple Events interface +====================================================================== .. module:: findertools :platform: Mac Modified: python/trunk/Doc/library/unittest.rst ============================================================================== --- python/trunk/Doc/library/unittest.rst (original) +++ python/trunk/Doc/library/unittest.rst Wed Jul 1 00:51:06 2009 @@ -651,8 +651,8 @@ Run the test, collecting the result into the test result object passed as *result*. If *result* is omitted or :const:`None`, a temporary result - object is created (by calling the :meth:`defaultTestCase` method) and - used; this result object is not returned to :meth:`run`'s caller. + object is created (by calling the :meth:`defaultTestResult` method) and + used. The result object is not returned to :meth:`run`'s caller. The same effect may be had by simply calling the :class:`TestCase` instance. From python-checkins at python.org Wed Jul 1 00:56:16 2009 From: python-checkins at python.org (ezio.melotti) Date: Tue, 30 Jun 2009 22:56:16 -0000 Subject: [Python-checkins] r73713 - python/trunk/Doc/library/macostools.rst Message-ID: Author: ezio.melotti Date: Wed Jul 1 00:56:16 2009 New Revision: 73713 Log: Fixed a backslash that was not supposed to be there Modified: python/trunk/Doc/library/macostools.rst Modified: python/trunk/Doc/library/macostools.rst ============================================================================== --- python/trunk/Doc/library/macostools.rst (original) +++ python/trunk/Doc/library/macostools.rst Wed Jul 1 00:56:16 2009 @@ -59,7 +59,7 @@ have incompatible behaviour in some cases. -:mod:`findertools` --- The :program:`finder`\'s Apple Events interface +:mod:`findertools` --- The :program:`finder`'s Apple Events interface ====================================================================== .. module:: findertools From python-checkins at python.org Wed Jul 1 00:57:11 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 30 Jun 2009 22:57:11 -0000 Subject: [Python-checkins] r73714 - in python/trunk/Lib: ctypes/test/test_anon.py ctypes/test/test_array_in_pointer.py ctypes/test/test_arrays.py ctypes/test/test_as_parameter.py ctypes/test/test_bitfields.py ctypes/test/test_buffers.py ctypes/test/test_byteswap.py ctypes/test/test_callbacks.py ctypes/test/test_cast.py ctypes/test/test_cfuncs.py ctypes/test/test_checkretval.py ctypes/test/test_errno.py ctypes/test/test_find.py ctypes/test/test_frombuffer.py ctypes/test/test_funcptr.py ctypes/test/test_functions.py ctypes/test/test_incomplete.py ctypes/test/test_init.py ctypes/test/test_internals.py ctypes/test/test_keeprefs.py ctypes/test/test_libc.py ctypes/test/test_loading.py ctypes/test/test_macholib.py ctypes/test/test_memfunctions.py ctypes/test/test_numbers.py ctypes/test/test_parameters.py ctypes/test/test_pep3118.py ctypes/test/test_pickling.py ctypes/test/test_pointers.py ctypes/test/test_prototypes.py ctypes/test/test_python_api.py ctypes/test/test_random_things.py ctypes/test/test_refcounts.py ctypes/test/test_repr.py ctypes/test/test_returnfuncptrs.py ctypes/test/test_simplesubclasses.py ctypes/test/test_sizes.py ctypes/test/test_slicing.py ctypes/test/test_stringptr.py ctypes/test/test_strings.py ctypes/test/test_struct_fields.py ctypes/test/test_structures.py ctypes/test/test_unaligned_structures.py ctypes/test/test_unicode.py ctypes/test/test_values.py ctypes/test/test_varsize_struct.py ctypes/test/test_win32.py distutils/tests/test_archive_util.py distutils/tests/test_bdist_rpm.py distutils/tests/test_bdist_wininst.py distutils/tests/test_build_clib.py distutils/tests/test_build_ext.py distutils/tests/test_build_py.py distutils/tests/test_build_scripts.py distutils/tests/test_clean.py distutils/tests/test_cmd.py distutils/tests/test_config.py distutils/tests/test_config_cmd.py distutils/tests/test_dist.py distutils/tests/test_install.py distutils/tests/test_install_data.py distutils/tests/test_install_lib.py distutils/tests/test_install_scripts.py distutils/tests/test_msvc9compiler.py distutils/tests/test_register.py distutils/tests/test_sysconfig.py distutils/tests/test_upload.py distutils/tests/test_util.py email/test/test_email.py email/test/test_email_renamed.py json/tests/test_decode.py json/tests/test_speedups.py lib-tk/test/test_tkinter/test_text.py lib-tk/test/test_ttk/test_extensions.py lib-tk/test/test_ttk/test_functions.py lib-tk/test/test_ttk/test_style.py lib-tk/test/test_ttk/test_widgets.py test/mapping_tests.py test/pickletester.py test/test_StringIO.py test/test___all__.py test/test___future__.py test/test_abc.py test/test_abstract_numbers.py test/test_array.py test/test_ast.py test/test_augassign.py test/test_bigmem.py test/test_binascii.py test/test_binop.py test/test_bisect.py test/test_bool.py test/test_bsddb.py test/test_bufio.py test/test_builtin.py test/test_bytes.py test/test_capi.py test/test_cfgparser.py test/test_cgi.py test/test_cmath.py test/test_cmd_line_script.py test/test_codecs.py test/test_codeop.py test/test_coercion.py test/test_collections.py test/test_commands.py test/test_compile.py test/test_compiler.py test/test_complex.py test/test_contains.py test/test_contextlib.py test/test_cookielib.py test/test_copy.py test/test_copy_reg.py test/test_csv.py test/test_datetime.py test/test_dbm.py test/test_decimal.py test/test_defaultdict.py test/test_deque.py test/test_descr.py test/test_dict.py test/test_dircache.py test/test_docxmlrpc.py test/test_dummy_thread.py test/test_epoll.py test/test_errno.py test/test_exceptions.py test/test_file.py test/test_file2k.py test/test_filecmp.py test/test_fileinput.py test/test_fileio.py test/test_float.py test/test_fnmatch.py test/test_ftplib.py test/test_funcattrs.py test/test_functools.py test/test_future4.py test/test_gdbm.py test/test_genericpath.py test/test_getargs2.py test/test_getopt.py test/test_gettext.py test/test_grammar.py test/test_grp.py test/test_gzip.py test/test_hash.py test/test_hashlib.py test/test_heapq.py test/test_hmac.py test/test_hotshot.py test/test_httplib.py test/test_httpservers.py test/test_imp.py test/test_import.py test/test_importhooks.py test/test_index.py test/test_inspect.py test/test_int.py test/test_io.py test/test_ioctl.py test/test_iter.py test/test_itertools.py test/test_kqueue.py test/test_largefile.py test/test_list.py test/test_logging.py test/test_long.py test/test_macpath.py test/test_mailbox.py test/test_marshal.py test/test_math.py test/test_memoryio.py test/test_memoryview.py test/test_mhlib.py test/test_mimetools.py test/test_mimetypes.py test/test_minidom.py test/test_mmap.py test/test_module.py test/test_modulefinder.py test/test_multibytecodec.py test/test_mutex.py test/test_netrc.py test/test_new.py test/test_normalization.py test/test_old_mailbox.py test/test_opcodes.py test/test_operator.py test/test_optparse.py test/test_os.py test/test_ossaudiodev.py test/test_peepholer.py test/test_pep247.py test/test_pep277.py test/test_pep352.py test/test_pkg.py test/test_pkgimport.py test/test_platform.py test/test_poplib.py test/test_posix.py test/test_posixpath.py test/test_pprint.py test/test_property.py test/test_pwd.py test/test_py3kwarn.py test/test_pyclbr.py test/test_pydoc.py test/test_queue.py test/test_quopri.py test/test_random.py test/test_re.py test/test_repr.py test/test_rfc822.py test/test_richcmp.py test/test_robotparser.py test/test_runpy.py test/test_scope.py test/test_set.py test/test_sets.py test/test_sha.py test/test_shutil.py test/test_signal.py test/test_site.py test/test_slice.py test/test_socket.py test/test_str.py test/test_string.py test/test_stringprep.py test/test_strop.py test/test_strptime.py test/test_struct.py test/test_structseq.py test/test_subprocess.py test/test_support.py test/test_symtable.py test/test_sys.py test/test_tarfile.py test/test_tempfile.py test/test_threading.py test/test_threading_local.py test/test_time.py test/test_timeout.py test/test_traceback.py test/test_tuple.py test/test_unary.py test/test_unicode.py test/test_unicode_file.py test/test_unicodedata.py test/test_urllib.py test/test_urllib2.py test/test_urllib2_localnet.py test/test_urllib2net.py test/test_urllibnet.py test/test_userdict.py test/test_userstring.py test/test_uuid.py test/test_warnings.py test/test_weakref.py test/test_wsgiref.py test/test_xdrlib.py test/test_xmlrpc.py test/test_xrange.py test/test_zipfile.py test/test_zipimport.py test/test_zipimport_support.py test/test_zlib.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 00:57:08 2009 New Revision: 73714 Log: convert usage of fail* to assert* Modified: python/trunk/Lib/ctypes/test/test_anon.py python/trunk/Lib/ctypes/test/test_array_in_pointer.py python/trunk/Lib/ctypes/test/test_arrays.py python/trunk/Lib/ctypes/test/test_as_parameter.py python/trunk/Lib/ctypes/test/test_bitfields.py python/trunk/Lib/ctypes/test/test_buffers.py python/trunk/Lib/ctypes/test/test_byteswap.py python/trunk/Lib/ctypes/test/test_callbacks.py python/trunk/Lib/ctypes/test/test_cast.py python/trunk/Lib/ctypes/test/test_cfuncs.py python/trunk/Lib/ctypes/test/test_checkretval.py python/trunk/Lib/ctypes/test/test_errno.py python/trunk/Lib/ctypes/test/test_find.py python/trunk/Lib/ctypes/test/test_frombuffer.py python/trunk/Lib/ctypes/test/test_funcptr.py python/trunk/Lib/ctypes/test/test_functions.py python/trunk/Lib/ctypes/test/test_incomplete.py python/trunk/Lib/ctypes/test/test_init.py python/trunk/Lib/ctypes/test/test_internals.py python/trunk/Lib/ctypes/test/test_keeprefs.py python/trunk/Lib/ctypes/test/test_libc.py python/trunk/Lib/ctypes/test/test_loading.py python/trunk/Lib/ctypes/test/test_macholib.py python/trunk/Lib/ctypes/test/test_memfunctions.py python/trunk/Lib/ctypes/test/test_numbers.py python/trunk/Lib/ctypes/test/test_parameters.py python/trunk/Lib/ctypes/test/test_pep3118.py python/trunk/Lib/ctypes/test/test_pickling.py python/trunk/Lib/ctypes/test/test_pointers.py python/trunk/Lib/ctypes/test/test_prototypes.py python/trunk/Lib/ctypes/test/test_python_api.py python/trunk/Lib/ctypes/test/test_random_things.py python/trunk/Lib/ctypes/test/test_refcounts.py python/trunk/Lib/ctypes/test/test_repr.py python/trunk/Lib/ctypes/test/test_returnfuncptrs.py python/trunk/Lib/ctypes/test/test_simplesubclasses.py python/trunk/Lib/ctypes/test/test_sizes.py python/trunk/Lib/ctypes/test/test_slicing.py python/trunk/Lib/ctypes/test/test_stringptr.py python/trunk/Lib/ctypes/test/test_strings.py python/trunk/Lib/ctypes/test/test_struct_fields.py python/trunk/Lib/ctypes/test/test_structures.py python/trunk/Lib/ctypes/test/test_unaligned_structures.py python/trunk/Lib/ctypes/test/test_unicode.py python/trunk/Lib/ctypes/test/test_values.py python/trunk/Lib/ctypes/test/test_varsize_struct.py python/trunk/Lib/ctypes/test/test_win32.py python/trunk/Lib/distutils/tests/test_archive_util.py python/trunk/Lib/distutils/tests/test_bdist_rpm.py python/trunk/Lib/distutils/tests/test_bdist_wininst.py python/trunk/Lib/distutils/tests/test_build_clib.py python/trunk/Lib/distutils/tests/test_build_ext.py python/trunk/Lib/distutils/tests/test_build_py.py python/trunk/Lib/distutils/tests/test_build_scripts.py python/trunk/Lib/distutils/tests/test_clean.py python/trunk/Lib/distutils/tests/test_cmd.py python/trunk/Lib/distutils/tests/test_config.py python/trunk/Lib/distutils/tests/test_config_cmd.py python/trunk/Lib/distutils/tests/test_dist.py python/trunk/Lib/distutils/tests/test_install.py python/trunk/Lib/distutils/tests/test_install_data.py python/trunk/Lib/distutils/tests/test_install_lib.py python/trunk/Lib/distutils/tests/test_install_scripts.py python/trunk/Lib/distutils/tests/test_msvc9compiler.py python/trunk/Lib/distutils/tests/test_register.py python/trunk/Lib/distutils/tests/test_sysconfig.py python/trunk/Lib/distutils/tests/test_upload.py python/trunk/Lib/distutils/tests/test_util.py python/trunk/Lib/email/test/test_email.py python/trunk/Lib/email/test/test_email_renamed.py python/trunk/Lib/json/tests/test_decode.py python/trunk/Lib/json/tests/test_speedups.py python/trunk/Lib/lib-tk/test/test_tkinter/test_text.py python/trunk/Lib/lib-tk/test/test_ttk/test_extensions.py python/trunk/Lib/lib-tk/test/test_ttk/test_functions.py python/trunk/Lib/lib-tk/test/test_ttk/test_style.py python/trunk/Lib/lib-tk/test/test_ttk/test_widgets.py python/trunk/Lib/test/mapping_tests.py python/trunk/Lib/test/pickletester.py python/trunk/Lib/test/test_StringIO.py python/trunk/Lib/test/test___all__.py python/trunk/Lib/test/test___future__.py python/trunk/Lib/test/test_abc.py python/trunk/Lib/test/test_abstract_numbers.py python/trunk/Lib/test/test_array.py python/trunk/Lib/test/test_ast.py python/trunk/Lib/test/test_augassign.py python/trunk/Lib/test/test_bigmem.py python/trunk/Lib/test/test_binascii.py python/trunk/Lib/test/test_binop.py python/trunk/Lib/test/test_bisect.py python/trunk/Lib/test/test_bool.py python/trunk/Lib/test/test_bsddb.py python/trunk/Lib/test/test_bufio.py python/trunk/Lib/test/test_builtin.py python/trunk/Lib/test/test_bytes.py python/trunk/Lib/test/test_capi.py python/trunk/Lib/test/test_cfgparser.py python/trunk/Lib/test/test_cgi.py python/trunk/Lib/test/test_cmath.py python/trunk/Lib/test/test_cmd_line_script.py python/trunk/Lib/test/test_codecs.py python/trunk/Lib/test/test_codeop.py python/trunk/Lib/test/test_coercion.py python/trunk/Lib/test/test_collections.py python/trunk/Lib/test/test_commands.py python/trunk/Lib/test/test_compile.py python/trunk/Lib/test/test_compiler.py python/trunk/Lib/test/test_complex.py python/trunk/Lib/test/test_contains.py python/trunk/Lib/test/test_contextlib.py python/trunk/Lib/test/test_cookielib.py python/trunk/Lib/test/test_copy.py python/trunk/Lib/test/test_copy_reg.py python/trunk/Lib/test/test_csv.py python/trunk/Lib/test/test_datetime.py python/trunk/Lib/test/test_dbm.py python/trunk/Lib/test/test_decimal.py python/trunk/Lib/test/test_defaultdict.py python/trunk/Lib/test/test_deque.py python/trunk/Lib/test/test_descr.py python/trunk/Lib/test/test_dict.py python/trunk/Lib/test/test_dircache.py python/trunk/Lib/test/test_docxmlrpc.py python/trunk/Lib/test/test_dummy_thread.py python/trunk/Lib/test/test_epoll.py python/trunk/Lib/test/test_errno.py python/trunk/Lib/test/test_exceptions.py python/trunk/Lib/test/test_file.py python/trunk/Lib/test/test_file2k.py python/trunk/Lib/test/test_filecmp.py python/trunk/Lib/test/test_fileinput.py python/trunk/Lib/test/test_fileio.py python/trunk/Lib/test/test_float.py python/trunk/Lib/test/test_fnmatch.py python/trunk/Lib/test/test_ftplib.py python/trunk/Lib/test/test_funcattrs.py python/trunk/Lib/test/test_functools.py python/trunk/Lib/test/test_future4.py python/trunk/Lib/test/test_gdbm.py python/trunk/Lib/test/test_genericpath.py python/trunk/Lib/test/test_getargs2.py python/trunk/Lib/test/test_getopt.py python/trunk/Lib/test/test_gettext.py python/trunk/Lib/test/test_grammar.py python/trunk/Lib/test/test_grp.py python/trunk/Lib/test/test_gzip.py python/trunk/Lib/test/test_hash.py python/trunk/Lib/test/test_hashlib.py python/trunk/Lib/test/test_heapq.py python/trunk/Lib/test/test_hmac.py python/trunk/Lib/test/test_hotshot.py python/trunk/Lib/test/test_httplib.py python/trunk/Lib/test/test_httpservers.py python/trunk/Lib/test/test_imp.py python/trunk/Lib/test/test_import.py python/trunk/Lib/test/test_importhooks.py python/trunk/Lib/test/test_index.py python/trunk/Lib/test/test_inspect.py python/trunk/Lib/test/test_int.py python/trunk/Lib/test/test_io.py python/trunk/Lib/test/test_ioctl.py python/trunk/Lib/test/test_iter.py python/trunk/Lib/test/test_itertools.py python/trunk/Lib/test/test_kqueue.py python/trunk/Lib/test/test_largefile.py python/trunk/Lib/test/test_list.py python/trunk/Lib/test/test_logging.py python/trunk/Lib/test/test_long.py python/trunk/Lib/test/test_macpath.py python/trunk/Lib/test/test_mailbox.py python/trunk/Lib/test/test_marshal.py python/trunk/Lib/test/test_math.py python/trunk/Lib/test/test_memoryio.py python/trunk/Lib/test/test_memoryview.py python/trunk/Lib/test/test_mhlib.py python/trunk/Lib/test/test_mimetools.py python/trunk/Lib/test/test_mimetypes.py python/trunk/Lib/test/test_minidom.py python/trunk/Lib/test/test_mmap.py python/trunk/Lib/test/test_module.py python/trunk/Lib/test/test_modulefinder.py python/trunk/Lib/test/test_multibytecodec.py python/trunk/Lib/test/test_mutex.py python/trunk/Lib/test/test_netrc.py python/trunk/Lib/test/test_new.py python/trunk/Lib/test/test_normalization.py python/trunk/Lib/test/test_old_mailbox.py python/trunk/Lib/test/test_opcodes.py python/trunk/Lib/test/test_operator.py python/trunk/Lib/test/test_optparse.py python/trunk/Lib/test/test_os.py python/trunk/Lib/test/test_ossaudiodev.py python/trunk/Lib/test/test_peepholer.py python/trunk/Lib/test/test_pep247.py python/trunk/Lib/test/test_pep277.py python/trunk/Lib/test/test_pep352.py python/trunk/Lib/test/test_pkg.py python/trunk/Lib/test/test_pkgimport.py python/trunk/Lib/test/test_platform.py python/trunk/Lib/test/test_poplib.py python/trunk/Lib/test/test_posix.py python/trunk/Lib/test/test_posixpath.py python/trunk/Lib/test/test_pprint.py python/trunk/Lib/test/test_property.py python/trunk/Lib/test/test_pwd.py python/trunk/Lib/test/test_py3kwarn.py python/trunk/Lib/test/test_pyclbr.py python/trunk/Lib/test/test_pydoc.py python/trunk/Lib/test/test_queue.py python/trunk/Lib/test/test_quopri.py python/trunk/Lib/test/test_random.py python/trunk/Lib/test/test_re.py python/trunk/Lib/test/test_repr.py python/trunk/Lib/test/test_rfc822.py python/trunk/Lib/test/test_richcmp.py python/trunk/Lib/test/test_robotparser.py python/trunk/Lib/test/test_runpy.py python/trunk/Lib/test/test_scope.py python/trunk/Lib/test/test_set.py python/trunk/Lib/test/test_sets.py python/trunk/Lib/test/test_sha.py python/trunk/Lib/test/test_shutil.py python/trunk/Lib/test/test_signal.py python/trunk/Lib/test/test_site.py python/trunk/Lib/test/test_slice.py python/trunk/Lib/test/test_socket.py python/trunk/Lib/test/test_str.py python/trunk/Lib/test/test_string.py python/trunk/Lib/test/test_stringprep.py python/trunk/Lib/test/test_strop.py python/trunk/Lib/test/test_strptime.py python/trunk/Lib/test/test_struct.py python/trunk/Lib/test/test_structseq.py python/trunk/Lib/test/test_subprocess.py python/trunk/Lib/test/test_support.py python/trunk/Lib/test/test_symtable.py python/trunk/Lib/test/test_sys.py python/trunk/Lib/test/test_tarfile.py python/trunk/Lib/test/test_tempfile.py python/trunk/Lib/test/test_threading.py python/trunk/Lib/test/test_threading_local.py python/trunk/Lib/test/test_time.py python/trunk/Lib/test/test_timeout.py python/trunk/Lib/test/test_traceback.py python/trunk/Lib/test/test_tuple.py python/trunk/Lib/test/test_unary.py python/trunk/Lib/test/test_unicode.py python/trunk/Lib/test/test_unicode_file.py python/trunk/Lib/test/test_unicodedata.py python/trunk/Lib/test/test_urllib.py python/trunk/Lib/test/test_urllib2.py python/trunk/Lib/test/test_urllib2_localnet.py python/trunk/Lib/test/test_urllib2net.py python/trunk/Lib/test/test_urllibnet.py python/trunk/Lib/test/test_userdict.py python/trunk/Lib/test/test_userstring.py python/trunk/Lib/test/test_uuid.py python/trunk/Lib/test/test_warnings.py python/trunk/Lib/test/test_weakref.py python/trunk/Lib/test/test_wsgiref.py python/trunk/Lib/test/test_xdrlib.py python/trunk/Lib/test/test_xmlrpc.py python/trunk/Lib/test/test_xrange.py python/trunk/Lib/test/test_zipfile.py python/trunk/Lib/test/test_zipimport.py python/trunk/Lib/test/test_zipimport_support.py python/trunk/Lib/test/test_zlib.py Modified: python/trunk/Lib/ctypes/test/test_anon.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_anon.py (original) +++ python/trunk/Lib/ctypes/test/test_anon.py Wed Jul 1 00:57:08 2009 @@ -14,22 +14,22 @@ ("y", c_int)] _anonymous_ = ["_"] - self.failUnlessEqual(Y.a.offset, sizeof(c_int)) - self.failUnlessEqual(Y.b.offset, sizeof(c_int)) + self.assertEqual(Y.a.offset, sizeof(c_int)) + self.assertEqual(Y.b.offset, sizeof(c_int)) - self.failUnlessEqual(ANON.a.offset, 0) - self.failUnlessEqual(ANON.b.offset, 0) + self.assertEqual(ANON.a.offset, 0) + self.assertEqual(ANON.b.offset, 0) def test_anon_nonseq(self): # TypeError: _anonymous_ must be a sequence - self.failUnlessRaises(TypeError, + self.assertRaises(TypeError, lambda: type(Structure)("Name", (Structure,), {"_fields_": [], "_anonymous_": 42})) def test_anon_nonmember(self): # AttributeError: type object 'Name' has no attribute 'x' - self.failUnlessRaises(AttributeError, + self.assertRaises(AttributeError, lambda: type(Structure)("Name", (Structure,), {"_fields_": [], @@ -50,11 +50,11 @@ ("y", c_int)] _anonymous_ = ["_"] - self.failUnlessEqual(Y.x.offset, 0) - self.failUnlessEqual(Y.a.offset, sizeof(c_int)) - self.failUnlessEqual(Y.b.offset, sizeof(c_int)) - self.failUnlessEqual(Y._.offset, sizeof(c_int)) - self.failUnlessEqual(Y.y.offset, sizeof(c_int) * 2) + self.assertEqual(Y.x.offset, 0) + self.assertEqual(Y.a.offset, sizeof(c_int)) + self.assertEqual(Y.b.offset, sizeof(c_int)) + self.assertEqual(Y._.offset, sizeof(c_int)) + self.assertEqual(Y.y.offset, sizeof(c_int) * 2) if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_array_in_pointer.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_array_in_pointer.py (original) +++ python/trunk/Lib/ctypes/test/test_array_in_pointer.py Wed Jul 1 00:57:08 2009 @@ -26,7 +26,7 @@ c.pvalues = val_array # memory contains 4 NUL bytes now, that's correct - self.failUnlessEqual("00-00-00-00", dump(val_array)) + self.assertEqual("00-00-00-00", dump(val_array)) # set the values of the array through the pointer: for i in range(4): @@ -35,7 +35,7 @@ values = [c.pvalues[i].val for i in range(4)] # These are the expected results: here s the bug! - self.failUnlessEqual( + self.assertEqual( (values, dump(val_array)), ([1, 2, 3, 4], "01-02-03-04") ) @@ -45,7 +45,7 @@ val_array = (Value * 4)() # memory contains 4 NUL bytes now, that's correct - self.failUnlessEqual("00-00-00-00", dump(val_array)) + self.assertEqual("00-00-00-00", dump(val_array)) ptr = cast(val_array, POINTER(Value)) # set the values of the array through the pointer: @@ -55,7 +55,7 @@ values = [ptr[i].val for i in range(4)] # These are the expected results: here s the bug! - self.failUnlessEqual( + self.assertEqual( (values, dump(val_array)), ([1, 2, 3, 4], "01-02-03-04") ) Modified: python/trunk/Lib/ctypes/test/test_arrays.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_arrays.py (original) +++ python/trunk/Lib/ctypes/test/test_arrays.py Wed Jul 1 00:57:08 2009 @@ -19,23 +19,23 @@ ia = int_array(*init) # length of instance ok? - self.failUnlessEqual(len(ia), alen) + self.assertEqual(len(ia), alen) # slot values ok? values = [ia[i] for i in range(len(init))] - self.failUnlessEqual(values, init) + self.assertEqual(values, init) # change the items from operator import setitem new_values = range(42, 42+alen) [setitem(ia, n, new_values[n]) for n in range(alen)] values = [ia[i] for i in range(len(init))] - self.failUnlessEqual(values, new_values) + self.assertEqual(values, new_values) # are the items initialized to 0? ia = int_array() values = [ia[i] for i in range(len(init))] - self.failUnlessEqual(values, [0] * len(init)) + self.assertEqual(values, [0] * len(init)) # Too many in itializers should be caught self.assertRaises(IndexError, int_array, *range(alen*2)) @@ -48,14 +48,14 @@ # CharArray("abc") self.assertRaises(TypeError, CharArray, "abc") - self.failUnlessEqual(ca[0], "a") - self.failUnlessEqual(ca[1], "b") - self.failUnlessEqual(ca[2], "c") - self.failUnlessEqual(ca[-3], "a") - self.failUnlessEqual(ca[-2], "b") - self.failUnlessEqual(ca[-1], "c") + self.assertEqual(ca[0], "a") + self.assertEqual(ca[1], "b") + self.assertEqual(ca[2], "c") + self.assertEqual(ca[-3], "a") + self.assertEqual(ca[-2], "b") + self.assertEqual(ca[-1], "c") - self.failUnlessEqual(len(ca), 3) + self.assertEqual(len(ca), 3) # slicing is now supported, but not extended slicing (3-argument)! from operator import getslice, delitem @@ -72,34 +72,34 @@ na = numarray() values = [na[i] for i in range(alen)] - self.failUnlessEqual(values, [0] * alen) + self.assertEqual(values, [0] * alen) na = numarray(*[c_int()] * alen) values = [na[i] for i in range(alen)] - self.failUnlessEqual(values, [0]*alen) + self.assertEqual(values, [0]*alen) na = numarray(1, 2, 3, 4, 5) values = [i for i in na] - self.failUnlessEqual(values, [1, 2, 3, 4, 5]) + self.assertEqual(values, [1, 2, 3, 4, 5]) na = numarray(*map(c_int, (1, 2, 3, 4, 5))) values = [i for i in na] - self.failUnlessEqual(values, [1, 2, 3, 4, 5]) + self.assertEqual(values, [1, 2, 3, 4, 5]) def test_classcache(self): - self.failUnless(not ARRAY(c_int, 3) is ARRAY(c_int, 4)) - self.failUnless(ARRAY(c_int, 3) is ARRAY(c_int, 3)) + self.assertTrue(not ARRAY(c_int, 3) is ARRAY(c_int, 4)) + self.assertTrue(ARRAY(c_int, 3) is ARRAY(c_int, 3)) def test_from_address(self): # Failed with 0.9.8, reported by JUrner p = create_string_buffer("foo") sz = (c_char * 3).from_address(addressof(p)) - self.failUnlessEqual(sz[:], "foo") - self.failUnlessEqual(sz[::], "foo") - self.failUnlessEqual(sz[::-1], "oof") - self.failUnlessEqual(sz[::3], "f") - self.failUnlessEqual(sz[1:4:2], "o") - self.failUnlessEqual(sz.value, "foo") + self.assertEqual(sz[:], "foo") + self.assertEqual(sz[::], "foo") + self.assertEqual(sz[::-1], "oof") + self.assertEqual(sz[::3], "f") + self.assertEqual(sz[1:4:2], "o") + self.assertEqual(sz.value, "foo") try: create_unicode_buffer @@ -109,12 +109,12 @@ def test_from_addressW(self): p = create_unicode_buffer("foo") sz = (c_wchar * 3).from_address(addressof(p)) - self.failUnlessEqual(sz[:], "foo") - self.failUnlessEqual(sz[::], "foo") - self.failUnlessEqual(sz[::-1], "oof") - self.failUnlessEqual(sz[::3], "f") - self.failUnlessEqual(sz[1:4:2], "o") - self.failUnlessEqual(sz.value, "foo") + self.assertEqual(sz[:], "foo") + self.assertEqual(sz[::], "foo") + self.assertEqual(sz[::-1], "oof") + self.assertEqual(sz[::3], "f") + self.assertEqual(sz[1:4:2], "o") + self.assertEqual(sz.value, "foo") def test_cache(self): # Array types are cached internally in the _ctypes extension, @@ -128,7 +128,7 @@ # Create a new array type based on it: t1 = my_int * 1 t2 = my_int * 1 - self.failUnless(t1 is t2) + self.assertTrue(t1 is t2) if __name__ == '__main__': unittest.main() Modified: python/trunk/Lib/ctypes/test/test_as_parameter.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_as_parameter.py (original) +++ python/trunk/Lib/ctypes/test/test_as_parameter.py Wed Jul 1 00:57:08 2009 @@ -25,8 +25,8 @@ f = dll._testfunc_i_bhilfd f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double] result = f(self.wrap(1), self.wrap(u"x"), self.wrap(3), self.wrap(4), self.wrap(5.0), self.wrap(6.0)) - self.failUnlessEqual(result, 139) - self.failUnless(type(result), int) + self.assertEqual(result, 139) + self.assertTrue(type(result), int) def test_pointers(self): f = dll._testfunc_p_p @@ -39,18 +39,18 @@ v = c_int(42) - self.failUnlessEqual(pointer(v).contents.value, 42) + self.assertEqual(pointer(v).contents.value, 42) result = f(self.wrap(pointer(v))) - self.failUnlessEqual(type(result), POINTER(c_int)) - self.failUnlessEqual(result.contents.value, 42) + self.assertEqual(type(result), POINTER(c_int)) + self.assertEqual(result.contents.value, 42) # This on works... result = f(self.wrap(pointer(v))) - self.failUnlessEqual(result.contents.value, v.value) + self.assertEqual(result.contents.value, v.value) p = pointer(c_int(99)) result = f(self.wrap(p)) - self.failUnlessEqual(result.contents.value, 99) + self.assertEqual(result.contents.value, 99) def test_shorts(self): f = dll._testfunc_callback_i_if @@ -67,7 +67,7 @@ cb = CallBack(callback) f(self.wrap(2**18), self.wrap(cb)) - self.failUnlessEqual(args, expected) + self.assertEqual(args, expected) ################################################################ @@ -84,17 +84,17 @@ cb = MyCallback(callback) result = f(self.wrap(-10), self.wrap(cb)) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) # test with prototype f.argtypes = [c_int, MyCallback] cb = MyCallback(callback) result = f(self.wrap(-10), self.wrap(cb)) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) result = f(self.wrap(-10), self.wrap(cb)) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) AnotherCallback = CALLBACK_FUNCTYPE(c_int, c_int, c_int, c_int, c_int) @@ -116,12 +116,12 @@ def callback(value): #print "called back with", value - self.failUnlessEqual(type(value), int) + self.assertEqual(type(value), int) return value cb = MyCallback(callback) result = f(self.wrap(-10), self.wrap(cb)) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) def test_longlong_callbacks(self): @@ -133,12 +133,12 @@ f.argtypes = [c_longlong, MyCallback] def callback(value): - self.failUnless(isinstance(value, (int, long))) + self.assertTrue(isinstance(value, (int, long))) return value & 0x7FFFFFFF cb = MyCallback(callback) - self.failUnlessEqual(13577625587, int(f(self.wrap(1000000000000), self.wrap(cb)))) + self.assertEqual(13577625587, int(f(self.wrap(1000000000000), self.wrap(cb)))) def test_byval(self): # without prototype @@ -148,7 +148,7 @@ result = dll._testfunc_byval(ptin, byref(ptout)) got = result, ptout.x, ptout.y expected = 3, 1, 2 - self.failUnlessEqual(got, expected) + self.assertEqual(got, expected) # with prototype ptin = POINT(101, 102) @@ -158,7 +158,7 @@ result = dll._testfunc_byval(self.wrap(ptin), byref(ptout)) got = result, ptout.x, ptout.y expected = 203, 101, 102 - self.failUnlessEqual(got, expected) + self.assertEqual(got, expected) def test_struct_return_2H(self): class S2H(Structure): @@ -168,7 +168,7 @@ dll.ret_2h_func.argtypes = [S2H] inp = S2H(99, 88) s2h = dll.ret_2h_func(self.wrap(inp)) - self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3)) + self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) def test_struct_return_8H(self): class S8I(Structure): @@ -184,7 +184,7 @@ dll.ret_8i_func.argtypes = [S8I] inp = S8I(9, 8, 7, 6, 5, 4, 3, 2) s8i = dll.ret_8i_func(self.wrap(inp)) - self.failUnlessEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), + self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modified: python/trunk/Lib/ctypes/test/test_bitfields.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_bitfields.py (original) +++ python/trunk/Lib/ctypes/test/test_bitfields.py Wed Jul 1 00:57:08 2009 @@ -37,14 +37,14 @@ for name in "ABCDEFGHI": b = BITS() setattr(b, name, i) - self.failUnlessEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) + self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) def test_shorts(self): for i in range(256): for name in "MNOPQRS": b = BITS() setattr(b, name, i) - self.failUnlessEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) + self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) signed_int_types = (c_byte, c_short, c_int, c_long, c_longlong) unsigned_int_types = (c_ubyte, c_ushort, c_uint, c_ulong, c_ulonglong) @@ -58,10 +58,10 @@ ("b", c_longlong, 62), ("c", c_longlong, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_longlong)) + self.assertEqual(sizeof(X), sizeof(c_longlong)) x = X() x.a, x.b, x.c = -1, 7, -1 - self.failUnlessEqual((x.a, x.b, x.c), (-1, 7, -1)) + self.assertEqual((x.a, x.b, x.c), (-1, 7, -1)) def test_ulonglong(self): class X(Structure): @@ -69,11 +69,11 @@ ("b", c_ulonglong, 62), ("c", c_ulonglong, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_longlong)) + self.assertEqual(sizeof(X), sizeof(c_longlong)) x = X() - self.failUnlessEqual((x.a, x.b, x.c), (0, 0, 0)) + self.assertEqual((x.a, x.b, x.c), (0, 0, 0)) x.a, x.b, x.c = 7, 7, 7 - self.failUnlessEqual((x.a, x.b, x.c), (1, 7, 1)) + self.assertEqual((x.a, x.b, x.c), (1, 7, 1)) def test_signed(self): for c_typ in signed_int_types: @@ -82,14 +82,14 @@ ("a", c_typ, 3), ("b", c_typ, 3), ("c", c_typ, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_typ)*2) + self.assertEqual(sizeof(X), sizeof(c_typ)*2) x = X() - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) x.a = -1 - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, -1, 0, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, -1, 0, 0)) x.a, x.b = 0, -1 - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, -1, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, -1, 0)) def test_unsigned(self): @@ -98,14 +98,14 @@ _fields_ = [("a", c_typ, 3), ("b", c_typ, 3), ("c", c_typ, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_typ)) + self.assertEqual(sizeof(X), sizeof(c_typ)) x = X() - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) x.a = -1 - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 7, 0, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 7, 0, 0)) x.a, x.b = 0, -1 - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 7, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 7, 0)) def fail_fields(self, *fields): @@ -115,17 +115,17 @@ def test_nonint_types(self): # bit fields are not allowed on non-integer types. result = self.fail_fields(("a", c_char_p, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type c_char_p')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_char_p')) result = self.fail_fields(("a", c_void_p, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type c_void_p')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_void_p')) if c_int != c_long: result = self.fail_fields(("a", POINTER(c_int), 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type LP_c_int')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type LP_c_int')) result = self.fail_fields(("a", c_char, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type c_char')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_char')) try: c_wchar @@ -133,59 +133,59 @@ pass else: result = self.fail_fields(("a", c_wchar, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type c_wchar')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_wchar')) class Dummy(Structure): _fields_ = [] result = self.fail_fields(("a", Dummy, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type Dummy')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type Dummy')) def test_single_bitfield_size(self): for c_typ in int_types: result = self.fail_fields(("a", c_typ, -1)) - self.failUnlessEqual(result, (ValueError, 'number of bits invalid for bit field')) + self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) result = self.fail_fields(("a", c_typ, 0)) - self.failUnlessEqual(result, (ValueError, 'number of bits invalid for bit field')) + self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) class X(Structure): _fields_ = [("a", c_typ, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_typ)) + self.assertEqual(sizeof(X), sizeof(c_typ)) class X(Structure): _fields_ = [("a", c_typ, sizeof(c_typ)*8)] - self.failUnlessEqual(sizeof(X), sizeof(c_typ)) + self.assertEqual(sizeof(X), sizeof(c_typ)) result = self.fail_fields(("a", c_typ, sizeof(c_typ)*8 + 1)) - self.failUnlessEqual(result, (ValueError, 'number of bits invalid for bit field')) + self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) def test_multi_bitfields_size(self): class X(Structure): _fields_ = [("a", c_short, 1), ("b", c_short, 14), ("c", c_short, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_short)) + self.assertEqual(sizeof(X), sizeof(c_short)) class X(Structure): _fields_ = [("a", c_short, 1), ("a1", c_short), ("b", c_short, 14), ("c", c_short, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_short)*3) - self.failUnlessEqual(X.a.offset, 0) - self.failUnlessEqual(X.a1.offset, sizeof(c_short)) - self.failUnlessEqual(X.b.offset, sizeof(c_short)*2) - self.failUnlessEqual(X.c.offset, sizeof(c_short)*2) + self.assertEqual(sizeof(X), sizeof(c_short)*3) + self.assertEqual(X.a.offset, 0) + self.assertEqual(X.a1.offset, sizeof(c_short)) + self.assertEqual(X.b.offset, sizeof(c_short)*2) + self.assertEqual(X.c.offset, sizeof(c_short)*2) class X(Structure): _fields_ = [("a", c_short, 3), ("b", c_short, 14), ("c", c_short, 14)] - self.failUnlessEqual(sizeof(X), sizeof(c_short)*3) - self.failUnlessEqual(X.a.offset, sizeof(c_short)*0) - self.failUnlessEqual(X.b.offset, sizeof(c_short)*1) - self.failUnlessEqual(X.c.offset, sizeof(c_short)*2) + self.assertEqual(sizeof(X), sizeof(c_short)*3) + self.assertEqual(X.a.offset, sizeof(c_short)*0) + self.assertEqual(X.b.offset, sizeof(c_short)*1) + self.assertEqual(X.c.offset, sizeof(c_short)*2) def get_except(self, func, *args, **kw): @@ -199,21 +199,21 @@ _fields_ = [("a", c_byte, 4), ("b", c_int, 4)] if os.name in ("nt", "ce"): - self.failUnlessEqual(sizeof(X), sizeof(c_int)*2) + self.assertEqual(sizeof(X), sizeof(c_int)*2) else: - self.failUnlessEqual(sizeof(X), sizeof(c_int)) + self.assertEqual(sizeof(X), sizeof(c_int)) def test_mixed_2(self): class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_int, 32)] - self.failUnlessEqual(sizeof(X), sizeof(c_int)*2) + self.assertEqual(sizeof(X), sizeof(c_int)*2) def test_mixed_3(self): class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_ubyte, 4)] - self.failUnlessEqual(sizeof(X), sizeof(c_byte)) + self.assertEqual(sizeof(X), sizeof(c_byte)) def test_mixed_4(self): class X(Structure): @@ -227,9 +227,9 @@ # does (unless GCC is run with '-mms-bitfields' which # produces code compatible with MSVC). if os.name in ("nt", "ce"): - self.failUnlessEqual(sizeof(X), sizeof(c_int) * 4) + self.assertEqual(sizeof(X), sizeof(c_int) * 4) else: - self.failUnlessEqual(sizeof(X), sizeof(c_int) * 2) + self.assertEqual(sizeof(X), sizeof(c_int) * 2) def test_anon_bitfields(self): # anonymous bit-fields gave a strange error message Modified: python/trunk/Lib/ctypes/test/test_buffers.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_buffers.py (original) +++ python/trunk/Lib/ctypes/test/test_buffers.py Wed Jul 1 00:57:08 2009 @@ -5,32 +5,32 @@ def test_buffer(self): b = create_string_buffer(32) - self.failUnlessEqual(len(b), 32) - self.failUnlessEqual(sizeof(b), 32 * sizeof(c_char)) - self.failUnless(type(b[0]) is str) + self.assertEqual(len(b), 32) + self.assertEqual(sizeof(b), 32 * sizeof(c_char)) + self.assertTrue(type(b[0]) is str) b = create_string_buffer("abc") - self.failUnlessEqual(len(b), 4) # trailing nul char - self.failUnlessEqual(sizeof(b), 4 * sizeof(c_char)) - self.failUnless(type(b[0]) is str) - self.failUnlessEqual(b[0], "a") - self.failUnlessEqual(b[:], "abc\0") - self.failUnlessEqual(b[::], "abc\0") - self.failUnlessEqual(b[::-1], "\0cba") - self.failUnlessEqual(b[::2], "ac") - self.failUnlessEqual(b[::5], "a") + self.assertEqual(len(b), 4) # trailing nul char + self.assertEqual(sizeof(b), 4 * sizeof(c_char)) + self.assertTrue(type(b[0]) is str) + self.assertEqual(b[0], "a") + self.assertEqual(b[:], "abc\0") + self.assertEqual(b[::], "abc\0") + self.assertEqual(b[::-1], "\0cba") + self.assertEqual(b[::2], "ac") + self.assertEqual(b[::5], "a") def test_string_conversion(self): b = create_string_buffer(u"abc") - self.failUnlessEqual(len(b), 4) # trailing nul char - self.failUnlessEqual(sizeof(b), 4 * sizeof(c_char)) - self.failUnless(type(b[0]) is str) - self.failUnlessEqual(b[0], "a") - self.failUnlessEqual(b[:], "abc\0") - self.failUnlessEqual(b[::], "abc\0") - self.failUnlessEqual(b[::-1], "\0cba") - self.failUnlessEqual(b[::2], "ac") - self.failUnlessEqual(b[::5], "a") + self.assertEqual(len(b), 4) # trailing nul char + self.assertEqual(sizeof(b), 4 * sizeof(c_char)) + self.assertTrue(type(b[0]) is str) + self.assertEqual(b[0], "a") + self.assertEqual(b[:], "abc\0") + self.assertEqual(b[::], "abc\0") + self.assertEqual(b[::-1], "\0cba") + self.assertEqual(b[::2], "ac") + self.assertEqual(b[::5], "a") try: c_wchar @@ -39,32 +39,32 @@ else: def test_unicode_buffer(self): b = create_unicode_buffer(32) - self.failUnlessEqual(len(b), 32) - self.failUnlessEqual(sizeof(b), 32 * sizeof(c_wchar)) - self.failUnless(type(b[0]) is unicode) + self.assertEqual(len(b), 32) + self.assertEqual(sizeof(b), 32 * sizeof(c_wchar)) + self.assertTrue(type(b[0]) is unicode) b = create_unicode_buffer(u"abc") - self.failUnlessEqual(len(b), 4) # trailing nul char - self.failUnlessEqual(sizeof(b), 4 * sizeof(c_wchar)) - self.failUnless(type(b[0]) is unicode) - self.failUnlessEqual(b[0], u"a") - self.failUnlessEqual(b[:], "abc\0") - self.failUnlessEqual(b[::], "abc\0") - self.failUnlessEqual(b[::-1], "\0cba") - self.failUnlessEqual(b[::2], "ac") - self.failUnlessEqual(b[::5], "a") + self.assertEqual(len(b), 4) # trailing nul char + self.assertEqual(sizeof(b), 4 * sizeof(c_wchar)) + self.assertTrue(type(b[0]) is unicode) + self.assertEqual(b[0], u"a") + self.assertEqual(b[:], "abc\0") + self.assertEqual(b[::], "abc\0") + self.assertEqual(b[::-1], "\0cba") + self.assertEqual(b[::2], "ac") + self.assertEqual(b[::5], "a") def test_unicode_conversion(self): b = create_unicode_buffer("abc") - self.failUnlessEqual(len(b), 4) # trailing nul char - self.failUnlessEqual(sizeof(b), 4 * sizeof(c_wchar)) - self.failUnless(type(b[0]) is unicode) - self.failUnlessEqual(b[0], u"a") - self.failUnlessEqual(b[:], "abc\0") - self.failUnlessEqual(b[::], "abc\0") - self.failUnlessEqual(b[::-1], "\0cba") - self.failUnlessEqual(b[::2], "ac") - self.failUnlessEqual(b[::5], "a") + self.assertEqual(len(b), 4) # trailing nul char + self.assertEqual(sizeof(b), 4 * sizeof(c_wchar)) + self.assertTrue(type(b[0]) is unicode) + self.assertEqual(b[0], u"a") + self.assertEqual(b[:], "abc\0") + self.assertEqual(b[::], "abc\0") + self.assertEqual(b[::-1], "\0cba") + self.assertEqual(b[::2], "ac") + self.assertEqual(b[::5], "a") if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_byteswap.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_byteswap.py (original) +++ python/trunk/Lib/ctypes/test/test_byteswap.py Wed Jul 1 00:57:08 2009 @@ -23,131 +23,131 @@ def test_endian_short(self): if sys.byteorder == "little": - self.failUnless(c_short.__ctype_le__ is c_short) - self.failUnless(c_short.__ctype_be__.__ctype_le__ is c_short) + self.assertTrue(c_short.__ctype_le__ is c_short) + self.assertTrue(c_short.__ctype_be__.__ctype_le__ is c_short) else: - self.failUnless(c_short.__ctype_be__ is c_short) - self.failUnless(c_short.__ctype_le__.__ctype_be__ is c_short) + self.assertTrue(c_short.__ctype_be__ is c_short) + self.assertTrue(c_short.__ctype_le__.__ctype_be__ is c_short) s = c_short.__ctype_be__(0x1234) - self.failUnlessEqual(bin(struct.pack(">h", 0x1234)), "1234") - self.failUnlessEqual(bin(s), "1234") - self.failUnlessEqual(s.value, 0x1234) + self.assertEqual(bin(struct.pack(">h", 0x1234)), "1234") + self.assertEqual(bin(s), "1234") + self.assertEqual(s.value, 0x1234) s = c_short.__ctype_le__(0x1234) - self.failUnlessEqual(bin(struct.pack("h", 0x1234)), "1234") - self.failUnlessEqual(bin(s), "1234") - self.failUnlessEqual(s.value, 0x1234) + self.assertEqual(bin(struct.pack(">h", 0x1234)), "1234") + self.assertEqual(bin(s), "1234") + self.assertEqual(s.value, 0x1234) s = c_ushort.__ctype_le__(0x1234) - self.failUnlessEqual(bin(struct.pack("i", 0x12345678)), "12345678") - self.failUnlessEqual(bin(s), "12345678") - self.failUnlessEqual(s.value, 0x12345678) + self.assertEqual(bin(struct.pack(">i", 0x12345678)), "12345678") + self.assertEqual(bin(s), "12345678") + self.assertEqual(s.value, 0x12345678) s = c_int.__ctype_le__(0x12345678) - self.failUnlessEqual(bin(struct.pack("I", 0x12345678)), "12345678") - self.failUnlessEqual(bin(s), "12345678") - self.failUnlessEqual(s.value, 0x12345678) + self.assertEqual(bin(struct.pack(">I", 0x12345678)), "12345678") + self.assertEqual(bin(s), "12345678") + self.assertEqual(s.value, 0x12345678) s = c_uint.__ctype_le__(0x12345678) - self.failUnlessEqual(bin(struct.pack("q", 0x1234567890ABCDEF)), "1234567890ABCDEF") - self.failUnlessEqual(bin(s), "1234567890ABCDEF") - self.failUnlessEqual(s.value, 0x1234567890ABCDEF) + self.assertEqual(bin(struct.pack(">q", 0x1234567890ABCDEF)), "1234567890ABCDEF") + self.assertEqual(bin(s), "1234567890ABCDEF") + self.assertEqual(s.value, 0x1234567890ABCDEF) s = c_longlong.__ctype_le__(0x1234567890ABCDEF) - self.failUnlessEqual(bin(struct.pack("Q", 0x1234567890ABCDEF)), "1234567890ABCDEF") - self.failUnlessEqual(bin(s), "1234567890ABCDEF") - self.failUnlessEqual(s.value, 0x1234567890ABCDEF) + self.assertEqual(bin(struct.pack(">Q", 0x1234567890ABCDEF)), "1234567890ABCDEF") + self.assertEqual(bin(s), "1234567890ABCDEF") + self.assertEqual(s.value, 0x1234567890ABCDEF) s = c_ulonglong.__ctype_le__(0x1234567890ABCDEF) - self.failUnlessEqual(bin(struct.pack("f", math.pi)), bin(s)) + self.assertAlmostEqual(s.value, math.pi, 6) + self.assertEqual(bin(struct.pack(">f", math.pi)), bin(s)) def test_endian_double(self): if sys.byteorder == "little": - self.failUnless(c_double.__ctype_le__ is c_double) - self.failUnless(c_double.__ctype_be__.__ctype_le__ is c_double) + self.assertTrue(c_double.__ctype_le__ is c_double) + self.assertTrue(c_double.__ctype_be__.__ctype_le__ is c_double) else: - self.failUnless(c_double.__ctype_be__ is c_double) - self.failUnless(c_double.__ctype_le__.__ctype_be__ is c_double) + self.assertTrue(c_double.__ctype_be__ is c_double) + self.assertTrue(c_double.__ctype_le__.__ctype_be__ is c_double) s = c_double(math.pi) - self.failUnlessEqual(s.value, math.pi) - self.failUnlessEqual(bin(struct.pack("d", math.pi)), bin(s)) + self.assertEqual(s.value, math.pi) + self.assertEqual(bin(struct.pack("d", math.pi)), bin(s)) s = c_double.__ctype_le__(math.pi) - self.failUnlessEqual(s.value, math.pi) - self.failUnlessEqual(bin(struct.pack("d", math.pi)), bin(s)) + self.assertEqual(s.value, math.pi) + self.assertEqual(bin(struct.pack(">d", math.pi)), bin(s)) def test_endian_other(self): - self.failUnless(c_byte.__ctype_le__ is c_byte) - self.failUnless(c_byte.__ctype_be__ is c_byte) + self.assertTrue(c_byte.__ctype_le__ is c_byte) + self.assertTrue(c_byte.__ctype_be__ is c_byte) - self.failUnless(c_ubyte.__ctype_le__ is c_ubyte) - self.failUnless(c_ubyte.__ctype_be__ is c_ubyte) + self.assertTrue(c_ubyte.__ctype_le__ is c_ubyte) + self.assertTrue(c_ubyte.__ctype_be__ is c_ubyte) - self.failUnless(c_char.__ctype_le__ is c_char) - self.failUnless(c_char.__ctype_be__ is c_char) + self.assertTrue(c_char.__ctype_le__ is c_char) + self.assertTrue(c_char.__ctype_be__ is c_char) def test_struct_fields_1(self): if sys.byteorder == "little": @@ -219,7 +219,7 @@ s1 = S(0x12, 0x1234, 0x12345678, 3.14) s2 = struct.pack(fmt, 0x12, 0x1234, 0x12345678, 3.14) - self.failUnlessEqual(bin(s1), bin(s2)) + self.assertEqual(bin(s1), bin(s2)) def test_unaligned_nonnative_struct_fields(self): if sys.byteorder == "little": @@ -247,7 +247,7 @@ s1.i = 0x12345678 s1.d = 3.14 s2 = struct.pack(fmt, 0x12, 0x1234, 0x12345678, 3.14) - self.failUnlessEqual(bin(s1), bin(s2)) + self.assertEqual(bin(s1), bin(s2)) def test_unaligned_native_struct_fields(self): if sys.byteorder == "little": @@ -274,7 +274,7 @@ s1.i = 0x12345678 s1.d = 3.14 s2 = struct.pack(fmt, 0x12, 0x1234, 0x12345678, 3.14) - self.failUnlessEqual(bin(s1), bin(s2)) + self.assertEqual(bin(s1), bin(s2)) if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_callbacks.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_callbacks.py (original) +++ python/trunk/Lib/ctypes/test/test_callbacks.py Wed Jul 1 00:57:08 2009 @@ -17,18 +17,18 @@ PROTO = self.functype.im_func(typ, typ) result = PROTO(self.callback)(arg) if typ == c_float: - self.failUnlessAlmostEqual(result, arg, places=5) + self.assertAlmostEqual(result, arg, places=5) else: - self.failUnlessEqual(self.got_args, (arg,)) - self.failUnlessEqual(result, arg) + self.assertEqual(self.got_args, (arg,)) + self.assertEqual(result, arg) PROTO = self.functype.im_func(typ, c_byte, typ) result = PROTO(self.callback)(-3, arg) if typ == c_float: - self.failUnlessAlmostEqual(result, arg, places=5) + self.assertAlmostEqual(result, arg, places=5) else: - self.failUnlessEqual(self.got_args, (-3, arg)) - self.failUnlessEqual(result, arg) + self.assertEqual(self.got_args, (-3, arg)) + self.assertEqual(result, arg) ################ @@ -103,7 +103,7 @@ # ...but this call doesn't leak any more. Where is the refcount? self.check_type(py_object, o) after = grc(o) - self.failUnlessEqual((after, o), (before, o)) + self.assertEqual((after, o), (before, o)) def test_unsupported_restype_1(self): # Only "fundamental" result types are supported for callback @@ -148,7 +148,7 @@ result = integrate(0.0, 1.0, CALLBACK(func), 10) diff = abs(result - 1./3.) - self.failUnless(diff < 0.01, "%s not less than 0.01" % diff) + self.assertTrue(diff < 0.01, "%s not less than 0.01" % diff) ################################################################ Modified: python/trunk/Lib/ctypes/test/test_cast.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_cast.py (original) +++ python/trunk/Lib/ctypes/test/test_cast.py Wed Jul 1 00:57:08 2009 @@ -9,15 +9,15 @@ # casting an array to a pointer works. ptr = cast(array, POINTER(c_int)) - self.failUnlessEqual([ptr[i] for i in range(3)], [42, 17, 2]) + self.assertEqual([ptr[i] for i in range(3)], [42, 17, 2]) if 2*sizeof(c_short) == sizeof(c_int): ptr = cast(array, POINTER(c_short)) if sys.byteorder == "little": - self.failUnlessEqual([ptr[i] for i in range(6)], + self.assertEqual([ptr[i] for i in range(6)], [42, 0, 17, 0, 2, 0]) else: - self.failUnlessEqual([ptr[i] for i in range(6)], + self.assertEqual([ptr[i] for i in range(6)], [0, 42, 0, 17, 0, 2]) def test_address2pointer(self): @@ -25,54 +25,54 @@ address = addressof(array) ptr = cast(c_void_p(address), POINTER(c_int)) - self.failUnlessEqual([ptr[i] for i in range(3)], [42, 17, 2]) + self.assertEqual([ptr[i] for i in range(3)], [42, 17, 2]) ptr = cast(address, POINTER(c_int)) - self.failUnlessEqual([ptr[i] for i in range(3)], [42, 17, 2]) + self.assertEqual([ptr[i] for i in range(3)], [42, 17, 2]) def test_p2a_objects(self): array = (c_char_p * 5)() - self.failUnlessEqual(array._objects, None) + self.assertEqual(array._objects, None) array[0] = "foo bar" - self.failUnlessEqual(array._objects, {'0': "foo bar"}) + self.assertEqual(array._objects, {'0': "foo bar"}) p = cast(array, POINTER(c_char_p)) # array and p share a common _objects attribute - self.failUnless(p._objects is array._objects) - self.failUnlessEqual(array._objects, {'0': "foo bar", id(array): array}) + self.assertTrue(p._objects is array._objects) + self.assertEqual(array._objects, {'0': "foo bar", id(array): array}) p[0] = "spam spam" - self.failUnlessEqual(p._objects, {'0': "spam spam", id(array): array}) - self.failUnless(array._objects is p._objects) + self.assertEqual(p._objects, {'0': "spam spam", id(array): array}) + self.assertTrue(array._objects is p._objects) p[1] = "foo bar" - self.failUnlessEqual(p._objects, {'1': 'foo bar', '0': "spam spam", id(array): array}) - self.failUnless(array._objects is p._objects) + self.assertEqual(p._objects, {'1': 'foo bar', '0': "spam spam", id(array): array}) + self.assertTrue(array._objects is p._objects) def test_other(self): p = cast((c_int * 4)(1, 2, 3, 4), POINTER(c_int)) - self.failUnlessEqual(p[:4], [1,2, 3, 4]) - self.failUnlessEqual(p[:4:], [1, 2, 3, 4]) - self.failUnlessEqual(p[3:-1:-1], [4, 3, 2, 1]) - self.failUnlessEqual(p[:4:3], [1, 4]) + self.assertEqual(p[:4], [1,2, 3, 4]) + self.assertEqual(p[:4:], [1, 2, 3, 4]) + self.assertEqual(p[3:-1:-1], [4, 3, 2, 1]) + self.assertEqual(p[:4:3], [1, 4]) c_int() - self.failUnlessEqual(p[:4], [1, 2, 3, 4]) - self.failUnlessEqual(p[:4:], [1, 2, 3, 4]) - self.failUnlessEqual(p[3:-1:-1], [4, 3, 2, 1]) - self.failUnlessEqual(p[:4:3], [1, 4]) + self.assertEqual(p[:4], [1, 2, 3, 4]) + self.assertEqual(p[:4:], [1, 2, 3, 4]) + self.assertEqual(p[3:-1:-1], [4, 3, 2, 1]) + self.assertEqual(p[:4:3], [1, 4]) p[2] = 96 - self.failUnlessEqual(p[:4], [1, 2, 96, 4]) - self.failUnlessEqual(p[:4:], [1, 2, 96, 4]) - self.failUnlessEqual(p[3:-1:-1], [4, 96, 2, 1]) - self.failUnlessEqual(p[:4:3], [1, 4]) + self.assertEqual(p[:4], [1, 2, 96, 4]) + self.assertEqual(p[:4:], [1, 2, 96, 4]) + self.assertEqual(p[3:-1:-1], [4, 96, 2, 1]) + self.assertEqual(p[:4:3], [1, 4]) c_int() - self.failUnlessEqual(p[:4], [1, 2, 96, 4]) - self.failUnlessEqual(p[:4:], [1, 2, 96, 4]) - self.failUnlessEqual(p[3:-1:-1], [4, 96, 2, 1]) - self.failUnlessEqual(p[:4:3], [1, 4]) + self.assertEqual(p[:4], [1, 2, 96, 4]) + self.assertEqual(p[:4:], [1, 2, 96, 4]) + self.assertEqual(p[3:-1:-1], [4, 96, 2, 1]) + self.assertEqual(p[:4:3], [1, 4]) def test_char_p(self): # This didn't work: bad argument to internal function s = c_char_p("hiho") - self.failUnlessEqual(cast(cast(s, c_void_p), c_char_p).value, + self.assertEqual(cast(cast(s, c_void_p), c_char_p).value, "hiho") try: @@ -82,7 +82,7 @@ else: def test_wchar_p(self): s = c_wchar_p("hiho") - self.failUnlessEqual(cast(cast(s, c_void_p), c_wchar_p).value, + self.assertEqual(cast(cast(s, c_void_p), c_wchar_p).value, "hiho") if __name__ == "__main__": Modified: python/trunk/Lib/ctypes/test/test_cfuncs.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_cfuncs.py (original) +++ python/trunk/Lib/ctypes/test/test_cfuncs.py Wed Jul 1 00:57:08 2009 @@ -17,176 +17,176 @@ def test_byte(self): self._dll.tf_b.restype = c_byte self._dll.tf_b.argtypes = (c_byte,) - self.failUnlessEqual(self._dll.tf_b(-126), -42) - self.failUnlessEqual(self.S(), -126) + self.assertEqual(self._dll.tf_b(-126), -42) + self.assertEqual(self.S(), -126) def test_byte_plus(self): self._dll.tf_bb.restype = c_byte self._dll.tf_bb.argtypes = (c_byte, c_byte) - self.failUnlessEqual(self._dll.tf_bb(0, -126), -42) - self.failUnlessEqual(self.S(), -126) + self.assertEqual(self._dll.tf_bb(0, -126), -42) + self.assertEqual(self.S(), -126) def test_ubyte(self): self._dll.tf_B.restype = c_ubyte self._dll.tf_B.argtypes = (c_ubyte,) - self.failUnlessEqual(self._dll.tf_B(255), 85) - self.failUnlessEqual(self.U(), 255) + self.assertEqual(self._dll.tf_B(255), 85) + self.assertEqual(self.U(), 255) def test_ubyte_plus(self): self._dll.tf_bB.restype = c_ubyte self._dll.tf_bB.argtypes = (c_byte, c_ubyte) - self.failUnlessEqual(self._dll.tf_bB(0, 255), 85) - self.failUnlessEqual(self.U(), 255) + self.assertEqual(self._dll.tf_bB(0, 255), 85) + self.assertEqual(self.U(), 255) def test_short(self): self._dll.tf_h.restype = c_short self._dll.tf_h.argtypes = (c_short,) - self.failUnlessEqual(self._dll.tf_h(-32766), -10922) - self.failUnlessEqual(self.S(), -32766) + self.assertEqual(self._dll.tf_h(-32766), -10922) + self.assertEqual(self.S(), -32766) def test_short_plus(self): self._dll.tf_bh.restype = c_short self._dll.tf_bh.argtypes = (c_byte, c_short) - self.failUnlessEqual(self._dll.tf_bh(0, -32766), -10922) - self.failUnlessEqual(self.S(), -32766) + self.assertEqual(self._dll.tf_bh(0, -32766), -10922) + self.assertEqual(self.S(), -32766) def test_ushort(self): self._dll.tf_H.restype = c_ushort self._dll.tf_H.argtypes = (c_ushort,) - self.failUnlessEqual(self._dll.tf_H(65535), 21845) - self.failUnlessEqual(self.U(), 65535) + self.assertEqual(self._dll.tf_H(65535), 21845) + self.assertEqual(self.U(), 65535) def test_ushort_plus(self): self._dll.tf_bH.restype = c_ushort self._dll.tf_bH.argtypes = (c_byte, c_ushort) - self.failUnlessEqual(self._dll.tf_bH(0, 65535), 21845) - self.failUnlessEqual(self.U(), 65535) + self.assertEqual(self._dll.tf_bH(0, 65535), 21845) + self.assertEqual(self.U(), 65535) def test_int(self): self._dll.tf_i.restype = c_int self._dll.tf_i.argtypes = (c_int,) - self.failUnlessEqual(self._dll.tf_i(-2147483646), -715827882) - self.failUnlessEqual(self.S(), -2147483646) + self.assertEqual(self._dll.tf_i(-2147483646), -715827882) + self.assertEqual(self.S(), -2147483646) def test_int_plus(self): self._dll.tf_bi.restype = c_int self._dll.tf_bi.argtypes = (c_byte, c_int) - self.failUnlessEqual(self._dll.tf_bi(0, -2147483646), -715827882) - self.failUnlessEqual(self.S(), -2147483646) + self.assertEqual(self._dll.tf_bi(0, -2147483646), -715827882) + self.assertEqual(self.S(), -2147483646) def test_uint(self): self._dll.tf_I.restype = c_uint self._dll.tf_I.argtypes = (c_uint,) - self.failUnlessEqual(self._dll.tf_I(4294967295), 1431655765) - self.failUnlessEqual(self.U(), 4294967295) + self.assertEqual(self._dll.tf_I(4294967295), 1431655765) + self.assertEqual(self.U(), 4294967295) def test_uint_plus(self): self._dll.tf_bI.restype = c_uint self._dll.tf_bI.argtypes = (c_byte, c_uint) - self.failUnlessEqual(self._dll.tf_bI(0, 4294967295), 1431655765) - self.failUnlessEqual(self.U(), 4294967295) + self.assertEqual(self._dll.tf_bI(0, 4294967295), 1431655765) + self.assertEqual(self.U(), 4294967295) def test_long(self): self._dll.tf_l.restype = c_long self._dll.tf_l.argtypes = (c_long,) - self.failUnlessEqual(self._dll.tf_l(-2147483646), -715827882) - self.failUnlessEqual(self.S(), -2147483646) + self.assertEqual(self._dll.tf_l(-2147483646), -715827882) + self.assertEqual(self.S(), -2147483646) def test_long_plus(self): self._dll.tf_bl.restype = c_long self._dll.tf_bl.argtypes = (c_byte, c_long) - self.failUnlessEqual(self._dll.tf_bl(0, -2147483646), -715827882) - self.failUnlessEqual(self.S(), -2147483646) + self.assertEqual(self._dll.tf_bl(0, -2147483646), -715827882) + self.assertEqual(self.S(), -2147483646) def test_ulong(self): self._dll.tf_L.restype = c_ulong self._dll.tf_L.argtypes = (c_ulong,) - self.failUnlessEqual(self._dll.tf_L(4294967295), 1431655765) - self.failUnlessEqual(self.U(), 4294967295) + self.assertEqual(self._dll.tf_L(4294967295), 1431655765) + self.assertEqual(self.U(), 4294967295) def test_ulong_plus(self): self._dll.tf_bL.restype = c_ulong self._dll.tf_bL.argtypes = (c_char, c_ulong) - self.failUnlessEqual(self._dll.tf_bL(' ', 4294967295), 1431655765) - self.failUnlessEqual(self.U(), 4294967295) + self.assertEqual(self._dll.tf_bL(' ', 4294967295), 1431655765) + self.assertEqual(self.U(), 4294967295) def test_longlong(self): self._dll.tf_q.restype = c_longlong self._dll.tf_q.argtypes = (c_longlong, ) - self.failUnlessEqual(self._dll.tf_q(-9223372036854775806), -3074457345618258602) - self.failUnlessEqual(self.S(), -9223372036854775806) + self.assertEqual(self._dll.tf_q(-9223372036854775806), -3074457345618258602) + self.assertEqual(self.S(), -9223372036854775806) def test_longlong_plus(self): self._dll.tf_bq.restype = c_longlong self._dll.tf_bq.argtypes = (c_byte, c_longlong) - self.failUnlessEqual(self._dll.tf_bq(0, -9223372036854775806), -3074457345618258602) - self.failUnlessEqual(self.S(), -9223372036854775806) + self.assertEqual(self._dll.tf_bq(0, -9223372036854775806), -3074457345618258602) + self.assertEqual(self.S(), -9223372036854775806) def test_ulonglong(self): self._dll.tf_Q.restype = c_ulonglong self._dll.tf_Q.argtypes = (c_ulonglong, ) - self.failUnlessEqual(self._dll.tf_Q(18446744073709551615), 6148914691236517205) - self.failUnlessEqual(self.U(), 18446744073709551615) + self.assertEqual(self._dll.tf_Q(18446744073709551615), 6148914691236517205) + self.assertEqual(self.U(), 18446744073709551615) def test_ulonglong_plus(self): self._dll.tf_bQ.restype = c_ulonglong self._dll.tf_bQ.argtypes = (c_byte, c_ulonglong) - self.failUnlessEqual(self._dll.tf_bQ(0, 18446744073709551615), 6148914691236517205) - self.failUnlessEqual(self.U(), 18446744073709551615) + self.assertEqual(self._dll.tf_bQ(0, 18446744073709551615), 6148914691236517205) + self.assertEqual(self.U(), 18446744073709551615) def test_float(self): self._dll.tf_f.restype = c_float self._dll.tf_f.argtypes = (c_float,) - self.failUnlessEqual(self._dll.tf_f(-42.), -14.) - self.failUnlessEqual(self.S(), -42) + self.assertEqual(self._dll.tf_f(-42.), -14.) + self.assertEqual(self.S(), -42) def test_float_plus(self): self._dll.tf_bf.restype = c_float self._dll.tf_bf.argtypes = (c_byte, c_float) - self.failUnlessEqual(self._dll.tf_bf(0, -42.), -14.) - self.failUnlessEqual(self.S(), -42) + self.assertEqual(self._dll.tf_bf(0, -42.), -14.) + self.assertEqual(self.S(), -42) def test_double(self): self._dll.tf_d.restype = c_double self._dll.tf_d.argtypes = (c_double,) - self.failUnlessEqual(self._dll.tf_d(42.), 14.) - self.failUnlessEqual(self.S(), 42) + self.assertEqual(self._dll.tf_d(42.), 14.) + self.assertEqual(self.S(), 42) def test_double_plus(self): self._dll.tf_bd.restype = c_double self._dll.tf_bd.argtypes = (c_byte, c_double) - self.failUnlessEqual(self._dll.tf_bd(0, 42.), 14.) - self.failUnlessEqual(self.S(), 42) + self.assertEqual(self._dll.tf_bd(0, 42.), 14.) + self.assertEqual(self.S(), 42) def test_longdouble(self): self._dll.tf_D.restype = c_longdouble self._dll.tf_D.argtypes = (c_longdouble,) - self.failUnlessEqual(self._dll.tf_D(42.), 14.) - self.failUnlessEqual(self.S(), 42) + self.assertEqual(self._dll.tf_D(42.), 14.) + self.assertEqual(self.S(), 42) def test_longdouble_plus(self): self._dll.tf_bD.restype = c_longdouble self._dll.tf_bD.argtypes = (c_byte, c_longdouble) - self.failUnlessEqual(self._dll.tf_bD(0, 42.), 14.) - self.failUnlessEqual(self.S(), 42) + self.assertEqual(self._dll.tf_bD(0, 42.), 14.) + self.assertEqual(self.S(), 42) def test_callwithresult(self): def process_result(result): return result * 2 self._dll.tf_i.restype = process_result self._dll.tf_i.argtypes = (c_int,) - self.failUnlessEqual(self._dll.tf_i(42), 28) - self.failUnlessEqual(self.S(), 42) - self.failUnlessEqual(self._dll.tf_i(-42), -28) - self.failUnlessEqual(self.S(), -42) + self.assertEqual(self._dll.tf_i(42), 28) + self.assertEqual(self.S(), 42) + self.assertEqual(self._dll.tf_i(-42), -28) + self.assertEqual(self.S(), -42) def test_void(self): self._dll.tv_i.restype = None self._dll.tv_i.argtypes = (c_int,) - self.failUnlessEqual(self._dll.tv_i(42), None) - self.failUnlessEqual(self.S(), 42) - self.failUnlessEqual(self._dll.tv_i(-42), None) - self.failUnlessEqual(self.S(), -42) + self.assertEqual(self._dll.tv_i(42), None) + self.assertEqual(self.S(), 42) + self.assertEqual(self._dll.tv_i(-42), None) + self.assertEqual(self.S(), -42) # The following repeates the above tests with stdcall functions (where # they are available) Modified: python/trunk/Lib/ctypes/test/test_checkretval.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_checkretval.py (original) +++ python/trunk/Lib/ctypes/test/test_checkretval.py Wed Jul 1 00:57:08 2009 @@ -14,16 +14,16 @@ import _ctypes_test dll = CDLL(_ctypes_test.__file__) - self.failUnlessEqual(42, dll._testfunc_p_p(42)) + self.assertEqual(42, dll._testfunc_p_p(42)) dll._testfunc_p_p.restype = CHECKED - self.failUnlessEqual("42", dll._testfunc_p_p(42)) + self.assertEqual("42", dll._testfunc_p_p(42)) dll._testfunc_p_p.restype = None - self.failUnlessEqual(None, dll._testfunc_p_p(42)) + self.assertEqual(None, dll._testfunc_p_p(42)) del dll._testfunc_p_p.restype - self.failUnlessEqual(42, dll._testfunc_p_p(42)) + self.assertEqual(42, dll._testfunc_p_p(42)) try: oledll @@ -31,7 +31,7 @@ pass else: def test_oledll(self): - self.failUnlessRaises(WindowsError, + self.assertRaises(WindowsError, oledll.oleaut32.CreateTypeLib2, 0, None, None) Modified: python/trunk/Lib/ctypes/test/test_errno.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_errno.py (original) +++ python/trunk/Lib/ctypes/test/test_errno.py Wed Jul 1 00:57:08 2009 @@ -15,11 +15,11 @@ libc_open.argtypes = c_char_p, c_int - self.failUnlessEqual(libc_open("", 0), -1) - self.failUnlessEqual(get_errno(), errno.ENOENT) + self.assertEqual(libc_open("", 0), -1) + self.assertEqual(get_errno(), errno.ENOENT) - self.failUnlessEqual(set_errno(32), errno.ENOENT) - self.failUnlessEqual(get_errno(), 32) + self.assertEqual(set_errno(32), errno.ENOENT) + self.assertEqual(get_errno(), 32) def _worker(): @@ -31,14 +31,14 @@ else: libc_open = libc.open libc_open.argtypes = c_char_p, c_int - self.failUnlessEqual(libc_open("", 0), -1) - self.failUnlessEqual(get_errno(), 0) + self.assertEqual(libc_open("", 0), -1) + self.assertEqual(get_errno(), 0) t = threading.Thread(target=_worker) t.start() t.join() - self.failUnlessEqual(get_errno(), 32) + self.assertEqual(get_errno(), 32) set_errno(0) if os.name == "nt": @@ -48,11 +48,11 @@ GetModuleHandle = dll.GetModuleHandleA GetModuleHandle.argtypes = [c_wchar_p] - self.failUnlessEqual(0, GetModuleHandle("foo")) - self.failUnlessEqual(get_last_error(), 126) + self.assertEqual(0, GetModuleHandle("foo")) + self.assertEqual(get_last_error(), 126) - self.failUnlessEqual(set_last_error(32), 126) - self.failUnlessEqual(get_last_error(), 32) + self.assertEqual(set_last_error(32), 126) + self.assertEqual(get_last_error(), 32) def _worker(): set_last_error(0) @@ -62,13 +62,13 @@ GetModuleHandle.argtypes = [c_wchar_p] GetModuleHandle("bar") - self.failUnlessEqual(get_last_error(), 0) + self.assertEqual(get_last_error(), 0) t = threading.Thread(target=_worker) t.start() t.join() - self.failUnlessEqual(get_last_error(), 32) + self.assertEqual(get_last_error(), 32) set_last_error(0) Modified: python/trunk/Lib/ctypes/test/test_find.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_find.py (original) +++ python/trunk/Lib/ctypes/test/test_find.py Wed Jul 1 00:57:08 2009 @@ -76,7 +76,7 @@ ## sqrt = libm.sqrt ## sqrt.argtypes = (c_double,) ## sqrt.restype = c_double -## self.failUnlessEqual(sqrt(2), math.sqrt(2)) +## self.assertEqual(sqrt(2), math.sqrt(2)) if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_frombuffer.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_frombuffer.py (original) +++ python/trunk/Lib/ctypes/test/test_frombuffer.py Wed Jul 1 00:57:08 2009 @@ -16,14 +16,14 @@ y = X.from_buffer(a) self.assertEqual(y.c_int, a[0]) - self.failIf(y.init_called) + self.assertFalse(y.init_called) self.assertEqual(x[:], a.tolist()) a[0], a[-1] = 200, -200 self.assertEqual(x[:], a.tolist()) - self.assert_(a in x._objects.values()) + self.assertTrue(a in x._objects.values()) self.assertRaises(ValueError, c_int.from_buffer, a, -1) @@ -49,7 +49,7 @@ y = X.from_buffer_copy(a) self.assertEqual(y.c_int, a[0]) - self.failIf(y.init_called) + self.assertFalse(y.init_called) self.assertEqual(x[:], range(16)) Modified: python/trunk/Lib/ctypes/test/test_funcptr.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_funcptr.py (original) +++ python/trunk/Lib/ctypes/test/test_funcptr.py Wed Jul 1 00:57:08 2009 @@ -18,10 +18,10 @@ return len(args) x = X(func) - self.failUnlessEqual(x.restype, c_int) - self.failUnlessEqual(x.argtypes, (c_int, c_int)) - self.failUnlessEqual(sizeof(x), sizeof(c_voidp)) - self.failUnlessEqual(sizeof(X), sizeof(c_voidp)) + self.assertEqual(x.restype, c_int) + self.assertEqual(x.argtypes, (c_int, c_int)) + self.assertEqual(sizeof(x), sizeof(c_voidp)) + self.assertEqual(sizeof(X), sizeof(c_voidp)) def test_first(self): StdCallback = WINFUNCTYPE(c_int, c_int, c_int) @@ -33,12 +33,12 @@ s = StdCallback(func) c = CdeclCallback(func) - self.failUnlessEqual(s(1, 2), 3) - self.failUnlessEqual(c(1, 2), 3) + self.assertEqual(s(1, 2), 3) + self.assertEqual(c(1, 2), 3) # The following no longer raises a TypeError - it is now # possible, as in C, to call cdecl functions with more parameters. #self.assertRaises(TypeError, c, 1, 2, 3) - self.failUnlessEqual(c(1, 2, 3, 4, 5, 6), 3) + self.assertEqual(c(1, 2, 3, 4, 5, 6), 3) if not WINFUNCTYPE is CFUNCTYPE and os.name != "ce": self.assertRaises(TypeError, s, 1, 2, 3) @@ -75,9 +75,9 @@ ## "lpfnWndProc", WNDPROC_2(wndproc)) # instead: - self.failUnless(WNDPROC is WNDPROC_2) + self.assertTrue(WNDPROC is WNDPROC_2) # 'wndclass.lpfnWndProc' leaks 94 references. Why? - self.failUnlessEqual(wndclass.lpfnWndProc(1, 2, 3, 4), 10) + self.assertEqual(wndclass.lpfnWndProc(1, 2, 3, 4), 10) f = wndclass.lpfnWndProc @@ -85,7 +85,7 @@ del wndclass del wndproc - self.failUnlessEqual(f(10, 11, 12, 13), 46) + self.assertEqual(f(10, 11, 12, 13), 46) def test_dllfunctions(self): @@ -97,8 +97,8 @@ strchr = lib.my_strchr strchr.restype = c_char_p strchr.argtypes = (c_char_p, c_char) - self.failUnlessEqual(strchr("abcdefghi", "b"), "bcdefghi") - self.failUnlessEqual(strchr("abcdefghi", "x"), None) + self.assertEqual(strchr("abcdefghi", "b"), "bcdefghi") + self.assertEqual(strchr("abcdefghi", "x"), None) strtok = lib.my_strtok @@ -118,10 +118,10 @@ ## b.value = s ## b = c_string(s) - self.failUnlessEqual(strtok(b, "\n"), "a") - self.failUnlessEqual(strtok(None, "\n"), "b") - self.failUnlessEqual(strtok(None, "\n"), "c") - self.failUnlessEqual(strtok(None, "\n"), None) + self.assertEqual(strtok(b, "\n"), "a") + self.assertEqual(strtok(None, "\n"), "b") + self.assertEqual(strtok(None, "\n"), "c") + self.assertEqual(strtok(None, "\n"), None) if __name__ == '__main__': unittest.main() Modified: python/trunk/Lib/ctypes/test/test_functions.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_functions.py (original) +++ python/trunk/Lib/ctypes/test/test_functions.py Wed Jul 1 00:57:08 2009 @@ -71,8 +71,8 @@ f = dll._testfunc_i_bhilfd f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double] result = f(1, u"x", 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 139) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, 139) + self.assertEqual(type(result), int) def test_wchar_result(self): try: @@ -83,38 +83,38 @@ f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_wchar result = f(0, 0, 0, 0, 0, 0) - self.failUnlessEqual(result, u'\x00') + self.assertEqual(result, u'\x00') def test_voidresult(self): f = dll._testfunc_v f.restype = None f.argtypes = [c_int, c_int, POINTER(c_int)] result = c_int() - self.failUnlessEqual(None, f(1, 2, byref(result))) - self.failUnlessEqual(result.value, 3) + self.assertEqual(None, f(1, 2, byref(result))) + self.assertEqual(result.value, 3) def test_intresult(self): f = dll._testfunc_i_bhilfd f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_int result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, 21) + self.assertEqual(type(result), int) result = f(-1, -2, -3, -4, -5.0, -6.0) - self.failUnlessEqual(result, -21) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, -21) + self.assertEqual(type(result), int) # If we declare the function to return a short, # is the high part split off? f.restype = c_short result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, 21) + self.assertEqual(type(result), int) result = f(1, 2, 3, 0x10004, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, 21) + self.assertEqual(type(result), int) # You cannot assing character format codes as restype any longer self.assertRaises(TypeError, setattr, f, "restype", "i") @@ -124,36 +124,36 @@ f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_float result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, 21) + self.assertEqual(type(result), float) result = f(-1, -2, -3, -4, -5.0, -6.0) - self.failUnlessEqual(result, -21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, -21) + self.assertEqual(type(result), float) def test_doubleresult(self): f = dll._testfunc_d_bhilfd f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_double result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, 21) + self.assertEqual(type(result), float) result = f(-1, -2, -3, -4, -5.0, -6.0) - self.failUnlessEqual(result, -21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, -21) + self.assertEqual(type(result), float) def test_longdoubleresult(self): f = dll._testfunc_D_bhilfD f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_longdouble] f.restype = c_longdouble result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, 21) + self.assertEqual(type(result), float) result = f(-1, -2, -3, -4, -5.0, -6.0) - self.failUnlessEqual(result, -21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, -21) + self.assertEqual(type(result), float) def test_longlongresult(self): try: @@ -164,23 +164,23 @@ f.restype = c_longlong f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) + self.assertEqual(result, 21) f = dll._testfunc_q_bhilfdq f.restype = c_longlong f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double, c_longlong] result = f(1, 2, 3, 4, 5.0, 6.0, 21) - self.failUnlessEqual(result, 42) + self.assertEqual(result, 42) def test_stringresult(self): f = dll._testfunc_p_p f.argtypes = None f.restype = c_char_p result = f("123") - self.failUnlessEqual(result, "123") + self.assertEqual(result, "123") result = f(None) - self.failUnlessEqual(result, None) + self.assertEqual(result, None) def test_pointers(self): f = dll._testfunc_p_p @@ -193,29 +193,29 @@ v = c_int(42) - self.failUnlessEqual(pointer(v).contents.value, 42) + self.assertEqual(pointer(v).contents.value, 42) result = f(pointer(v)) - self.failUnlessEqual(type(result), POINTER(c_int)) - self.failUnlessEqual(result.contents.value, 42) + self.assertEqual(type(result), POINTER(c_int)) + self.assertEqual(result.contents.value, 42) # This on works... result = f(pointer(v)) - self.failUnlessEqual(result.contents.value, v.value) + self.assertEqual(result.contents.value, v.value) p = pointer(c_int(99)) result = f(p) - self.failUnlessEqual(result.contents.value, 99) + self.assertEqual(result.contents.value, 99) arg = byref(v) result = f(arg) - self.failIfEqual(result.contents, v.value) + self.assertNotEqual(result.contents, v.value) self.assertRaises(ArgumentError, f, byref(c_short(22))) # It is dangerous, however, because you don't control the lifetime # of the pointer: result = f(byref(c_int(99))) - self.failIfEqual(result.contents, 99) + self.assertNotEqual(result.contents, 99) def test_errors(self): f = dll._testfunc_p_p @@ -242,7 +242,7 @@ cb = CallBack(callback) f(2**18, cb) - self.failUnlessEqual(args, expected) + self.assertEqual(args, expected) ################################################################ @@ -259,13 +259,13 @@ cb = MyCallback(callback) result = f(-10, cb) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) # test with prototype f.argtypes = [c_int, MyCallback] cb = MyCallback(callback) result = f(-10, cb) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) AnotherCallback = WINFUNCTYPE(c_int, c_int, c_int, c_int, c_int) @@ -288,12 +288,12 @@ def callback(value): #print "called back with", value - self.failUnlessEqual(type(value), int) + self.assertEqual(type(value), int) return value cb = MyCallback(callback) result = f(-10, cb) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) def test_longlong_callbacks(self): @@ -305,12 +305,12 @@ f.argtypes = [c_longlong, MyCallback] def callback(value): - self.failUnless(isinstance(value, (int, long))) + self.assertTrue(isinstance(value, (int, long))) return value & 0x7FFFFFFF cb = MyCallback(callback) - self.failUnlessEqual(13577625587, f(1000000000000, cb)) + self.assertEqual(13577625587, f(1000000000000, cb)) def test_errors(self): self.assertRaises(AttributeError, getattr, dll, "_xxx_yyy") @@ -325,7 +325,7 @@ result = dll._testfunc_byval(ptin, byref(ptout)) got = result, ptout.x, ptout.y expected = 3, 1, 2 - self.failUnlessEqual(got, expected) + self.assertEqual(got, expected) # with prototype ptin = POINT(101, 102) @@ -335,7 +335,7 @@ result = dll._testfunc_byval(ptin, byref(ptout)) got = result, ptout.x, ptout.y expected = 203, 101, 102 - self.failUnlessEqual(got, expected) + self.assertEqual(got, expected) def test_struct_return_2H(self): class S2H(Structure): @@ -345,7 +345,7 @@ dll.ret_2h_func.argtypes = [S2H] inp = S2H(99, 88) s2h = dll.ret_2h_func(inp) - self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3)) + self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) if sys.platform == "win32": def test_struct_return_2H_stdcall(self): @@ -356,7 +356,7 @@ windll.s_ret_2h_func.restype = S2H windll.s_ret_2h_func.argtypes = [S2H] s2h = windll.s_ret_2h_func(S2H(99, 88)) - self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3)) + self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) def test_struct_return_8H(self): class S8I(Structure): @@ -372,7 +372,7 @@ dll.ret_8i_func.argtypes = [S8I] inp = S8I(9, 8, 7, 6, 5, 4, 3, 2) s8i = dll.ret_8i_func(inp) - self.failUnlessEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), + self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) if sys.platform == "win32": @@ -390,7 +390,7 @@ windll.s_ret_8i_func.argtypes = [S8I] inp = S8I(9, 8, 7, 6, 5, 4, 3, 2) s8i = windll.s_ret_8i_func(inp) - self.failUnlessEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), + self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) def test_sf1651235(self): @@ -401,7 +401,7 @@ return 0 callback = proto(callback) - self.failUnlessRaises(ArgumentError, lambda: callback((1, 2, 3, 4), POINT())) + self.assertRaises(ArgumentError, lambda: callback((1, 2, 3, 4), POINT())) if __name__ == '__main__': unittest.main() Modified: python/trunk/Lib/ctypes/test/test_incomplete.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_incomplete.py (original) +++ python/trunk/Lib/ctypes/test/test_incomplete.py Wed Jul 1 00:57:08 2009 @@ -30,7 +30,7 @@ for i in range(8): result.append(p.name) p = p.next[0] - self.failUnlessEqual(result, ["foo", "bar"] * 4) + self.assertEqual(result, ["foo", "bar"] * 4) # to not leak references, we must clean _pointer_type_cache from ctypes import _pointer_type_cache Modified: python/trunk/Lib/ctypes/test/test_init.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_init.py (original) +++ python/trunk/Lib/ctypes/test/test_init.py Wed Jul 1 00:57:08 2009 @@ -24,17 +24,17 @@ # make sure the only accessing a nested structure # doesn't call the structure's __new__ and __init__ y = Y() - self.failUnlessEqual((y.x.a, y.x.b), (0, 0)) - self.failUnlessEqual(y.x.new_was_called, False) + self.assertEqual((y.x.a, y.x.b), (0, 0)) + self.assertEqual(y.x.new_was_called, False) # But explicitely creating an X structure calls __new__ and __init__, of course. x = X() - self.failUnlessEqual((x.a, x.b), (9, 12)) - self.failUnlessEqual(x.new_was_called, True) + self.assertEqual((x.a, x.b), (9, 12)) + self.assertEqual(x.new_was_called, True) y.x = x - self.failUnlessEqual((y.x.a, y.x.b), (9, 12)) - self.failUnlessEqual(y.x.new_was_called, False) + self.assertEqual((y.x.a, y.x.b), (9, 12)) + self.assertEqual(y.x.new_was_called, False) if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_internals.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_internals.py (original) +++ python/trunk/Lib/ctypes/test/test_internals.py Wed Jul 1 00:57:08 2009 @@ -18,22 +18,22 @@ """ class ObjectsTestCase(unittest.TestCase): - def failUnlessSame(self, a, b): - self.failUnlessEqual(id(a), id(b)) + def assertTrueSame(self, a, b): + self.assertEqual(id(a), id(b)) def test_ints(self): i = 42000123 - self.failUnlessEqual(3, grc(i)) + self.assertEqual(3, grc(i)) ci = c_int(i) - self.failUnlessEqual(3, grc(i)) - self.failUnlessEqual(ci._objects, None) + self.assertEqual(3, grc(i)) + self.assertEqual(ci._objects, None) def test_c_char_p(self): s = "Hello, World" - self.failUnlessEqual(3, grc(s)) + self.assertEqual(3, grc(s)) cs = c_char_p(s) - self.failUnlessEqual(4, grc(s)) - self.failUnlessSame(cs._objects, s) + self.assertEqual(4, grc(s)) + self.assertTrueSame(cs._objects, s) def test_simple_struct(self): class X(Structure): @@ -42,10 +42,10 @@ a = 421234 b = 421235 x = X() - self.failUnlessEqual(x._objects, None) + self.assertEqual(x._objects, None) x.a = a x.b = b - self.failUnlessEqual(x._objects, None) + self.assertEqual(x._objects, None) def test_embedded_structs(self): class X(Structure): @@ -55,13 +55,13 @@ _fields_ = [("x", X), ("y", X)] y = Y() - self.failUnlessEqual(y._objects, None) + self.assertEqual(y._objects, None) x1, x2 = X(), X() y.x, y.y = x1, x2 - self.failUnlessEqual(y._objects, {"0": {}, "1": {}}) + self.assertEqual(y._objects, {"0": {}, "1": {}}) x1.a, x2.b = 42, 93 - self.failUnlessEqual(y._objects, {"0": {}, "1": {}}) + self.assertEqual(y._objects, {"0": {}, "1": {}}) def test_xxx(self): class X(Structure): @@ -76,11 +76,11 @@ x = X() x.a = s1 x.b = s2 - self.failUnlessEqual(x._objects, {"0": s1, "1": s2}) + self.assertEqual(x._objects, {"0": s1, "1": s2}) y = Y() y.x = x - self.failUnlessEqual(y._objects, {"0": {"0": s1, "1": s2}}) + self.assertEqual(y._objects, {"0": {"0": s1, "1": s2}}) ## x = y.x ## del y ## print x._b_base_._objects @@ -91,7 +91,7 @@ A = c_int*4 a = A(11, 22, 33, 44) - self.failUnlessEqual(a._objects, None) + self.assertEqual(a._objects, None) x = X() x.data = a Modified: python/trunk/Lib/ctypes/test/test_keeprefs.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_keeprefs.py (original) +++ python/trunk/Lib/ctypes/test/test_keeprefs.py Wed Jul 1 00:57:08 2009 @@ -91,7 +91,7 @@ def test_p_cint(self): i = c_int(42) x = pointer(i) - self.failUnlessEqual(x._objects, {'1': i}) + self.assertEqual(x._objects, {'1': i}) class DeletePointerTestCase(unittest.TestCase): def X_test(self): Modified: python/trunk/Lib/ctypes/test/test_libc.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_libc.py (original) +++ python/trunk/Lib/ctypes/test/test_libc.py Wed Jul 1 00:57:08 2009 @@ -9,9 +9,9 @@ def test_sqrt(self): lib.my_sqrt.argtypes = c_double, lib.my_sqrt.restype = c_double - self.failUnlessEqual(lib.my_sqrt(4.0), 2.0) + self.assertEqual(lib.my_sqrt(4.0), 2.0) import math - self.failUnlessEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) + self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) def test_qsort(self): comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char)) @@ -23,7 +23,7 @@ chars = create_string_buffer("spam, spam, and spam") lib.my_qsort(chars, len(chars)-1, sizeof(c_char), comparefunc(sort)) - self.failUnlessEqual(chars.raw, " ,,aaaadmmmnpppsss\x00") + self.assertEqual(chars.raw, " ,,aaaadmmmnpppsss\x00") if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_loading.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_loading.py (original) +++ python/trunk/Lib/ctypes/test/test_loading.py Wed Jul 1 00:57:08 2009 @@ -43,7 +43,7 @@ if os.name in ("nt", "ce"): def test_load_library(self): - self.failIf(libc_name is None) + self.assertFalse(libc_name is None) if is_resource_enabled("printing"): print find_library("kernel32") print find_library("user32") @@ -70,9 +70,9 @@ a_name = addressof(func_name) f_ord_addr = c_void_p.from_address(a_ord).value f_name_addr = c_void_p.from_address(a_name).value - self.failUnlessEqual(hex(f_ord_addr), hex(f_name_addr)) + self.assertEqual(hex(f_ord_addr), hex(f_name_addr)) - self.failUnlessRaises(AttributeError, dll.__getitem__, 1234) + self.assertRaises(AttributeError, dll.__getitem__, 1234) if os.name == "nt": def test_1703286_A(self): @@ -94,13 +94,13 @@ 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)) + self.assertEqual(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) + self.assertTrue(proc) # This is the real test: call the function via 'call_function' - self.failUnlessEqual(0, call_function(proc, (None,))) + self.assertEqual(0, call_function(proc, (None,))) if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_macholib.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_macholib.py (original) +++ python/trunk/Lib/ctypes/test/test_macholib.py Wed Jul 1 00:57:08 2009 @@ -48,14 +48,14 @@ if sys.platform == "darwin": def test_find(self): - self.failUnlessEqual(find_lib('pthread'), + self.assertEqual(find_lib('pthread'), '/usr/lib/libSystem.B.dylib') result = find_lib('z') - self.failUnless(result.startswith('/usr/lib/libz.1')) - self.failUnless(result.endswith('.dylib')) + self.assertTrue(result.startswith('/usr/lib/libz.1')) + self.assertTrue(result.endswith('.dylib')) - self.failUnlessEqual(find_lib('IOKit'), + self.assertEqual(find_lib('IOKit'), '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit') if __name__ == "__main__": Modified: python/trunk/Lib/ctypes/test/test_memfunctions.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_memfunctions.py (original) +++ python/trunk/Lib/ctypes/test/test_memfunctions.py Wed Jul 1 00:57:08 2009 @@ -19,45 +19,45 @@ a = create_string_buffer(1000000) p = "Hello, World" result = memmove(a, p, len(p)) - self.failUnlessEqual(a.value, "Hello, World") + self.assertEqual(a.value, "Hello, World") - self.failUnlessEqual(string_at(result), "Hello, World") - self.failUnlessEqual(string_at(result, 5), "Hello") - self.failUnlessEqual(string_at(result, 16), "Hello, World\0\0\0\0") - self.failUnlessEqual(string_at(result, 0), "") + self.assertEqual(string_at(result), "Hello, World") + self.assertEqual(string_at(result, 5), "Hello") + self.assertEqual(string_at(result, 16), "Hello, World\0\0\0\0") + self.assertEqual(string_at(result, 0), "") def test_memset(self): a = create_string_buffer(1000000) result = memset(a, ord('x'), 16) - self.failUnlessEqual(a.value, "xxxxxxxxxxxxxxxx") + self.assertEqual(a.value, "xxxxxxxxxxxxxxxx") - self.failUnlessEqual(string_at(result), "xxxxxxxxxxxxxxxx") - self.failUnlessEqual(string_at(a), "xxxxxxxxxxxxxxxx") - self.failUnlessEqual(string_at(a, 20), "xxxxxxxxxxxxxxxx\0\0\0\0") + self.assertEqual(string_at(result), "xxxxxxxxxxxxxxxx") + self.assertEqual(string_at(a), "xxxxxxxxxxxxxxxx") + self.assertEqual(string_at(a, 20), "xxxxxxxxxxxxxxxx\0\0\0\0") def test_cast(self): a = (c_ubyte * 32)(*map(ord, "abcdef")) - self.failUnlessEqual(cast(a, c_char_p).value, "abcdef") - self.failUnlessEqual(cast(a, POINTER(c_byte))[:7], + self.assertEqual(cast(a, c_char_p).value, "abcdef") + self.assertEqual(cast(a, POINTER(c_byte))[:7], [97, 98, 99, 100, 101, 102, 0]) - self.failUnlessEqual(cast(a, POINTER(c_byte))[:7:], + self.assertEqual(cast(a, POINTER(c_byte))[:7:], [97, 98, 99, 100, 101, 102, 0]) - self.failUnlessEqual(cast(a, POINTER(c_byte))[6:-1:-1], + self.assertEqual(cast(a, POINTER(c_byte))[6:-1:-1], [0, 102, 101, 100, 99, 98, 97]) - self.failUnlessEqual(cast(a, POINTER(c_byte))[:7:2], + self.assertEqual(cast(a, POINTER(c_byte))[:7:2], [97, 99, 101, 0]) - self.failUnlessEqual(cast(a, POINTER(c_byte))[:7:7], + self.assertEqual(cast(a, POINTER(c_byte))[:7:7], [97]) def test_string_at(self): s = string_at("foo bar") # XXX The following may be wrong, depending on how Python # manages string instances - self.failUnlessEqual(2, sys.getrefcount(s)) - self.failUnless(s, "foo bar") + self.assertEqual(2, sys.getrefcount(s)) + self.assertTrue(s, "foo bar") - self.failUnlessEqual(string_at("foo bar", 8), "foo bar\0") - self.failUnlessEqual(string_at("foo bar", 3), "foo") + self.assertEqual(string_at("foo bar", 8), "foo bar\0") + self.assertEqual(string_at("foo bar", 3), "foo") try: create_unicode_buffer @@ -68,12 +68,12 @@ p = create_unicode_buffer("Hello, World") a = create_unicode_buffer(1000000) result = memmove(a, p, len(p) * sizeof(c_wchar)) - self.failUnlessEqual(a.value, "Hello, World") + self.assertEqual(a.value, "Hello, World") - self.failUnlessEqual(wstring_at(a), "Hello, World") - self.failUnlessEqual(wstring_at(a, 5), "Hello") - self.failUnlessEqual(wstring_at(a, 16), "Hello, World\0\0\0\0") - self.failUnlessEqual(wstring_at(a, 0), "") + self.assertEqual(wstring_at(a), "Hello, World") + self.assertEqual(wstring_at(a, 5), "Hello") + self.assertEqual(wstring_at(a, 16), "Hello, World\0\0\0\0") + self.assertEqual(wstring_at(a, 0), "") if __name__ == "__main__": unittest.main() 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 Wed Jul 1 00:57:08 2009 @@ -55,25 +55,25 @@ def test_default_init(self): # default values are set to zero for t in signed_types + unsigned_types + float_types: - self.failUnlessEqual(t().value, 0) + self.assertEqual(t().value, 0) def test_unsigned_values(self): # the value given to the constructor is available # as the 'value' attribute for t, (l, h) in zip(unsigned_types, unsigned_ranges): - self.failUnlessEqual(t(l).value, l) - self.failUnlessEqual(t(h).value, h) + self.assertEqual(t(l).value, l) + self.assertEqual(t(h).value, h) def test_signed_values(self): # see above for t, (l, h) in zip(signed_types, signed_ranges): - self.failUnlessEqual(t(l).value, l) - self.failUnlessEqual(t(h).value, h) + self.assertEqual(t(l).value, l) + self.assertEqual(t(h).value, h) def test_bool_values(self): from operator import truth for t, v in zip(bool_types, bool_values): - self.failUnlessEqual(t(v).value, truth(v)) + self.assertEqual(t(v).value, truth(v)) def test_typeerror(self): # Only numbers are allowed in the contructor, @@ -93,13 +93,13 @@ # the from_param class method attribute always # returns PyCArgObject instances for t in signed_types + unsigned_types + float_types: - self.failUnlessEqual(ArgType, type(t.from_param(0))) + self.assertEqual(ArgType, type(t.from_param(0))) def test_byref(self): # calling byref returns also a PyCArgObject instance for t in signed_types + unsigned_types + float_types + bool_types: parm = byref(t()) - self.failUnlessEqual(ArgType, type(parm)) + self.assertEqual(ArgType, type(parm)) def test_floats(self): @@ -110,10 +110,10 @@ return 2.0 f = FloatLike() for t in float_types: - self.failUnlessEqual(t(2.0).value, 2.0) - self.failUnlessEqual(t(2).value, 2.0) - self.failUnlessEqual(t(2L).value, 2.0) - self.failUnlessEqual(t(f).value, 2.0) + self.assertEqual(t(2.0).value, 2.0) + self.assertEqual(t(2).value, 2.0) + self.assertEqual(t(2L).value, 2.0) + self.assertEqual(t(f).value, 2.0) def test_integers(self): class FloatLike(object): @@ -129,7 +129,7 @@ for t in signed_types + unsigned_types: self.assertRaises(TypeError, t, 3.14) self.assertRaises(TypeError, t, f) - self.failUnlessEqual(t(i).value, 2) + self.assertEqual(t(i).value, 2) def test_sizes(self): for t in signed_types + unsigned_types + float_types + bool_types: @@ -138,9 +138,9 @@ except struct.error: continue # sizeof of the type... - self.failUnlessEqual(sizeof(t), size) + self.assertEqual(sizeof(t), size) # and sizeof of an instance - self.failUnlessEqual(sizeof(t()), size) + self.assertEqual(sizeof(t()), size) def test_alignments(self): for t in signed_types + unsigned_types + float_types: @@ -148,10 +148,10 @@ align = struct.calcsize("c%c" % code) - struct.calcsize(code) # alignment of the type... - self.failUnlessEqual((code, alignment(t)), + self.assertEqual((code, alignment(t)), (code, align)) # and alignment of an instance - self.failUnlessEqual((code, alignment(t())), + self.assertEqual((code, alignment(t())), (code, align)) def test_int_from_address(self): @@ -167,12 +167,12 @@ # v now is an integer at an 'external' memory location v = t.from_address(a.buffer_info()[0]) - self.failUnlessEqual(v.value, a[0]) - self.failUnlessEqual(type(v), t) + self.assertEqual(v.value, a[0]) + self.assertEqual(type(v), t) # changing the value at the memory location changes v's value also a[0] = 42 - self.failUnlessEqual(v.value, a[0]) + self.assertEqual(v.value, a[0]) def test_float_from_address(self): @@ -180,11 +180,11 @@ for t in float_types: a = array(t._type_, [3.14]) v = t.from_address(a.buffer_info()[0]) - self.failUnlessEqual(v.value, a[0]) - self.failUnless(type(v) is t) + self.assertEqual(v.value, a[0]) + self.assertTrue(type(v) is t) a[0] = 2.3456e17 - self.failUnlessEqual(v.value, a[0]) - self.failUnless(type(v) is t) + self.assertEqual(v.value, a[0]) + self.assertTrue(type(v) is t) def test_char_from_address(self): from ctypes import c_char @@ -192,11 +192,11 @@ a = array('c', 'x') v = c_char.from_address(a.buffer_info()[0]) - self.failUnlessEqual(v.value, a[0]) - self.failUnless(type(v) is c_char) + self.assertEqual(v.value, a[0]) + self.assertTrue(type(v) is c_char) a[0] = '?' - self.failUnlessEqual(v.value, a[0]) + self.assertEqual(v.value, a[0]) # array does not support c_bool / 't' # def test_bool_from_address(self): @@ -204,11 +204,11 @@ # from array import array # a = array(c_bool._type_, [True]) # v = t.from_address(a.buffer_info()[0]) - # self.failUnlessEqual(v.value, a[0]) - # self.failUnlessEqual(type(v) is t) + # self.assertEqual(v.value, a[0]) + # self.assertEqual(type(v) is t) # a[0] = False - # self.failUnlessEqual(v.value, a[0]) - # self.failUnlessEqual(type(v) is t) + # self.assertEqual(v.value, a[0]) + # self.assertEqual(type(v) is t) def test_init(self): # c_int() can be initialized from Python's int, and c_int. Modified: python/trunk/Lib/ctypes/test/test_parameters.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_parameters.py (original) +++ python/trunk/Lib/ctypes/test/test_parameters.py Wed Jul 1 00:57:08 2009 @@ -33,8 +33,8 @@ return value * 4 from_param = classmethod(from_param) - self.failUnlessEqual(CVOIDP.from_param("abc"), "abcabc") - self.failUnlessEqual(CCHARP.from_param("abc"), "abcabcabcabc") + self.assertEqual(CVOIDP.from_param("abc"), "abcabc") + self.assertEqual(CCHARP.from_param("abc"), "abcabcabcabc") try: from ctypes import c_wchar_p @@ -46,7 +46,7 @@ return value * 3 from_param = classmethod(from_param) - self.failUnlessEqual(CWCHARP.from_param("abc"), "abcabcabc") + self.assertEqual(CWCHARP.from_param("abc"), "abcabcabc") # XXX Replace by c_char_p tests def test_cstrings(self): @@ -55,10 +55,10 @@ # c_char_p.from_param on a Python String packs the string # into a cparam object s = "123" - self.failUnless(c_char_p.from_param(s)._obj is s) + self.assertTrue(c_char_p.from_param(s)._obj is s) # new in 0.9.1: convert (encode) unicode to ascii - self.failUnlessEqual(c_char_p.from_param(u"123")._obj, "123") + self.assertEqual(c_char_p.from_param(u"123")._obj, "123") self.assertRaises(UnicodeEncodeError, c_char_p.from_param, u"123\377") self.assertRaises(TypeError, c_char_p.from_param, 42) @@ -66,7 +66,7 @@ # calling c_char_p.from_param with a c_char_p instance # returns the argument itself: a = c_char_p("123") - self.failUnless(c_char_p.from_param(a) is a) + self.assertTrue(c_char_p.from_param(a) is a) def test_cw_strings(self): from ctypes import byref @@ -77,15 +77,15 @@ return s = u"123" if sys.platform == "win32": - self.failUnless(c_wchar_p.from_param(s)._obj is s) + self.assertTrue(c_wchar_p.from_param(s)._obj is s) self.assertRaises(TypeError, c_wchar_p.from_param, 42) # new in 0.9.1: convert (decode) ascii to unicode - self.failUnlessEqual(c_wchar_p.from_param("123")._obj, u"123") + self.assertEqual(c_wchar_p.from_param("123")._obj, u"123") self.assertRaises(UnicodeDecodeError, c_wchar_p.from_param, "123\377") pa = c_wchar_p.from_param(c_wchar_p(u"123")) - self.failUnlessEqual(type(pa), c_wchar_p) + self.assertEqual(type(pa), c_wchar_p) def test_int_pointers(self): from ctypes import c_short, c_uint, c_int, c_long, POINTER, pointer @@ -94,10 +94,10 @@ ## p = pointer(c_int(42)) ## x = LPINT.from_param(p) x = LPINT.from_param(pointer(c_int(42))) - self.failUnlessEqual(x.contents.value, 42) - self.failUnlessEqual(LPINT(c_int(42)).contents.value, 42) + self.assertEqual(x.contents.value, 42) + self.assertEqual(LPINT(c_int(42)).contents.value, 42) - self.failUnlessEqual(LPINT.from_param(None), 0) + self.assertEqual(LPINT.from_param(None), 0) if c_int != c_long: self.assertRaises(TypeError, LPINT.from_param, pointer(c_long(42))) @@ -133,8 +133,8 @@ from ctypes import c_short, c_uint, c_int, c_long, POINTER INTARRAY = c_int * 3 ia = INTARRAY() - self.failUnlessEqual(len(ia), 3) - self.failUnlessEqual([ia[i] for i in range(3)], [0, 0, 0]) + self.assertEqual(len(ia), 3) + self.assertEqual([ia[i] for i in range(3)], [0, 0, 0]) # Pointers are only compatible with arrays containing items of # the same type! @@ -161,8 +161,8 @@ return None func.argtypes = (Adapter(),) - self.failUnlessEqual(func(None), None) - self.failUnlessEqual(func(object()), None) + self.assertEqual(func(None), None) + self.assertEqual(func(object()), None) class Adapter(object): def from_param(cls, obj): @@ -171,7 +171,7 @@ func.argtypes = (Adapter(),) # don't know how to convert parameter 1 self.assertRaises(ArgumentError, func, object()) - self.failUnlessEqual(func(c_void_p(42)), 42) + self.assertEqual(func(c_void_p(42)), 42) class Adapter(object): def from_param(cls, obj): Modified: python/trunk/Lib/ctypes/test/test_pep3118.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_pep3118.py (original) +++ python/trunk/Lib/ctypes/test/test_pep3118.py Wed Jul 1 00:57:08 2009 @@ -45,20 +45,20 @@ ob = tp() v = memoryview(ob) try: - self.failUnlessEqual(normalize(v.format), normalize(fmt)) - self.failUnlessEqual(v.size, sizeof(ob)) - self.failUnlessEqual(v.itemsize, sizeof(itemtp)) - self.failUnlessEqual(v.shape, shape) + self.assertEqual(normalize(v.format), normalize(fmt)) + self.assertEqual(v.size, sizeof(ob)) + self.assertEqual(v.itemsize, sizeof(itemtp)) + self.assertEqual(v.shape, shape) # ctypes object always have a non-strided memory block - self.failUnlessEqual(v.strides, None) + self.assertEqual(v.strides, None) # they are always read/write - self.failIf(v.readonly) + self.assertFalse(v.readonly) if v.shape: n = 1 for dim in v.shape: n = n * dim - self.failUnlessEqual(v.itemsize * n, v.size) + self.assertEqual(v.itemsize * n, v.size) except: # so that we can see the failing type print(tp) @@ -69,20 +69,20 @@ ob = tp() v = memoryview(ob) try: - self.failUnlessEqual(v.format, fmt) - self.failUnlessEqual(v.size, sizeof(ob)) - self.failUnlessEqual(v.itemsize, sizeof(itemtp)) - self.failUnlessEqual(v.shape, shape) + self.assertEqual(v.format, fmt) + self.assertEqual(v.size, sizeof(ob)) + self.assertEqual(v.itemsize, sizeof(itemtp)) + self.assertEqual(v.shape, shape) # ctypes object always have a non-strided memory block - self.failUnlessEqual(v.strides, None) + self.assertEqual(v.strides, None) # they are always read/write - self.failIf(v.readonly) + self.assertFalse(v.readonly) if v.shape: n = 1 for dim in v.shape: n = n * dim - self.failUnlessEqual(v.itemsize * n, v.size) + self.assertEqual(v.itemsize * n, v.size) except: # so that we can see the failing type print(tp) Modified: python/trunk/Lib/ctypes/test/test_pickling.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_pickling.py (original) +++ python/trunk/Lib/ctypes/test/test_pickling.py Wed Jul 1 00:57:08 2009 @@ -27,8 +27,8 @@ c_double(3.14), ]: dst = self.loads(self.dumps(src)) - self.failUnlessEqual(src.__dict__, dst.__dict__) - self.failUnlessEqual(buffer(src)[:], + self.assertEqual(src.__dict__, dst.__dict__) + self.assertEqual(buffer(src)[:], buffer(dst)[:]) def test_struct(self): @@ -36,17 +36,17 @@ x = X() x.a = 42 - self.failUnlessEqual(X.init_called, 1) + self.assertEqual(X.init_called, 1) y = self.loads(self.dumps(x)) # loads must NOT call __init__ - self.failUnlessEqual(X.init_called, 1) + self.assertEqual(X.init_called, 1) # ctypes instances are identical when the instance __dict__ # and the memory buffer are identical - self.failUnlessEqual(y.__dict__, x.__dict__) - self.failUnlessEqual(buffer(y)[:], + self.assertEqual(y.__dict__, x.__dict__) + self.assertEqual(buffer(y)[:], buffer(x)[:]) def test_unpickable(self): Modified: python/trunk/Lib/ctypes/test/test_pointers.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_pointers.py (original) +++ python/trunk/Lib/ctypes/test/test_pointers.py Wed Jul 1 00:57:08 2009 @@ -17,7 +17,7 @@ POINTER(c_ulong)(c_ulong(22)) # Pointer can't set contents: has no _type_ - self.failUnlessRaises(TypeError, A, c_ulong(33)) + self.assertRaises(TypeError, A, c_ulong(33)) def test_pass_pointers(self): dll = CDLL(_ctypes_test.__file__) @@ -27,12 +27,12 @@ i = c_int(12345678) ## func.argtypes = (POINTER(c_int),) address = func(byref(i)) - self.failUnlessEqual(c_int.from_address(address).value, 12345678) + self.assertEqual(c_int.from_address(address).value, 12345678) func.restype = POINTER(c_int) res = func(pointer(i)) - self.failUnlessEqual(res.contents.value, 12345678) - self.failUnlessEqual(res[0], 12345678) + self.assertEqual(res.contents.value, 12345678) + self.assertEqual(res[0], 12345678) def test_change_pointers(self): dll = CDLL(_ctypes_test.__file__) @@ -43,18 +43,18 @@ func.argtypes = (POINTER(c_int),) res = func(pointer(i)) - self.failUnlessEqual(res[0], 87654) - self.failUnlessEqual(res.contents.value, 87654) + self.assertEqual(res[0], 87654) + self.assertEqual(res.contents.value, 87654) # C code: *res = 54345 res[0] = 54345 - self.failUnlessEqual(i.value, 54345) + self.assertEqual(i.value, 54345) # C code: # int x = 12321; # res = &x res.contents = c_int(12321) - self.failUnlessEqual(i.value, 54345) + self.assertEqual(i.value, 54345) def test_callbacks_with_pointers(self): # a function type receiving a pointer @@ -78,7 +78,7 @@ ## i = c_int(42) ## callback(byref(i)) -## self.failUnless(i.value == 84) +## self.assertTrue(i.value == 84) doit(callback) ## print self.result @@ -91,11 +91,11 @@ i = ct(42) p = pointer(i) ## print type(p.contents), ct - self.failUnless(type(p.contents) is ct) + self.assertTrue(type(p.contents) is ct) # p.contents is the same as p[0] ## print p.contents -## self.failUnless(p.contents == 42) -## self.failUnless(p[0] == 42) +## self.assertTrue(p.contents == 42) +## self.assertTrue(p[0] == 42) self.assertRaises(TypeError, delitem, p, 0) @@ -117,9 +117,9 @@ pt = pointer(Table(1, 2, 3)) - self.failUnlessEqual(pt.contents.a, 1) - self.failUnlessEqual(pt.contents.b, 2) - self.failUnlessEqual(pt.contents.c, 3) + self.assertEqual(pt.contents.a, 1) + self.assertEqual(pt.contents.b, 2) + self.assertEqual(pt.contents.c, 3) pt.contents.c = 33 @@ -130,8 +130,8 @@ p = pointer(c_int(42)) # Although a pointer can be indexed, it ha no length self.assertRaises(TypeError, len, p) - self.failUnlessEqual(p[0], 42) - self.failUnlessEqual(p.contents.value, 42) + self.assertEqual(p[0], 42) + self.assertEqual(p.contents.value, 42) def test_charpp(self): """Test that a character pointer-to-pointer is correctly passed""" @@ -156,20 +156,20 @@ pp = pointer(p) q = pointer(y) pp[0] = q # <== - self.failUnlessEqual(p[0], 6) + self.assertEqual(p[0], 6) def test_c_void_p(self): # http://sourceforge.net/tracker/?func=detail&aid=1518190&group_id=5470&atid=105470 if sizeof(c_void_p) == 4: - self.failUnlessEqual(c_void_p(0xFFFFFFFFL).value, + self.assertEqual(c_void_p(0xFFFFFFFFL).value, c_void_p(-1).value) - self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFFL).value, + self.assertEqual(c_void_p(0xFFFFFFFFFFFFFFFFL).value, c_void_p(-1).value) elif sizeof(c_void_p) == 8: - self.failUnlessEqual(c_void_p(0xFFFFFFFFL).value, + self.assertEqual(c_void_p(0xFFFFFFFFL).value, 0xFFFFFFFFL) - self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFFL).value, + self.assertEqual(c_void_p(0xFFFFFFFFFFFFFFFFL).value, c_void_p(-1).value) - self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFFFFFFFFFFL).value, + self.assertEqual(c_void_p(0xFFFFFFFFFFFFFFFFFFFFFFFFL).value, c_void_p(-1).value) self.assertRaises(TypeError, c_void_p, 3.14) # make sure floats are NOT accepted @@ -177,16 +177,16 @@ def test_pointers_bool(self): # NULL pointers have a boolean False value, non-NULL pointers True. - self.failUnlessEqual(bool(POINTER(c_int)()), False) - self.failUnlessEqual(bool(pointer(c_int())), True) + self.assertEqual(bool(POINTER(c_int)()), False) + self.assertEqual(bool(pointer(c_int())), True) - self.failUnlessEqual(bool(CFUNCTYPE(None)(0)), False) - self.failUnlessEqual(bool(CFUNCTYPE(None)(42)), True) + self.assertEqual(bool(CFUNCTYPE(None)(0)), False) + self.assertEqual(bool(CFUNCTYPE(None)(42)), True) # COM methods are boolean True: if sys.platform == "win32": mth = WINFUNCTYPE(None)(42, "name", (), None) - self.failUnlessEqual(bool(mth), True) + self.assertEqual(bool(mth), True) if __name__ == '__main__': unittest.main() Modified: python/trunk/Lib/ctypes/test/test_prototypes.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_prototypes.py (original) +++ python/trunk/Lib/ctypes/test/test_prototypes.py Wed Jul 1 00:57:08 2009 @@ -58,23 +58,23 @@ try: func() except TypeError, details: - self.failUnlessEqual(str(details), "required argument 'input' missing") + self.assertEqual(str(details), "required argument 'input' missing") else: self.fail("TypeError not raised") - self.failUnlessEqual(func(None), None) - self.failUnlessEqual(func(input=None), None) + self.assertEqual(func(None), None) + self.assertEqual(func(input=None), None) def test_int_pointer_arg(self): func = testdll._testfunc_p_p func.restype = c_long - self.failUnlessEqual(0, func(0)) + self.assertEqual(0, func(0)) ci = c_int(0) func.argtypes = POINTER(c_int), - self.failUnlessEqual(positive_address(addressof(ci)), + self.assertEqual(positive_address(addressof(ci)), positive_address(func(byref(ci)))) func.argtypes = c_char_p, @@ -91,45 +91,45 @@ func.restype = c_char_p func.argtypes = POINTER(c_char), - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func("123")) - self.failUnlessEqual(None, func(c_char_p(None))) - self.failUnlessEqual("123", func(c_char_p("123"))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func("123")) + self.assertEqual(None, func(c_char_p(None))) + self.assertEqual("123", func(c_char_p("123"))) - self.failUnlessEqual("123", func(c_buffer("123"))) + self.assertEqual("123", func(c_buffer("123"))) ca = c_char("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) def test_c_char_p_arg(self): func = testdll._testfunc_p_p func.restype = c_char_p func.argtypes = c_char_p, - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func("123")) - self.failUnlessEqual(None, func(c_char_p(None))) - self.failUnlessEqual("123", func(c_char_p("123"))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func("123")) + self.assertEqual(None, func(c_char_p(None))) + self.assertEqual("123", func(c_char_p("123"))) - self.failUnlessEqual("123", func(c_buffer("123"))) + self.assertEqual("123", func(c_buffer("123"))) ca = c_char("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) def test_c_void_p_arg(self): func = testdll._testfunc_p_p func.restype = c_char_p func.argtypes = c_void_p, - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func("123")) - self.failUnlessEqual("123", func(c_char_p("123"))) - self.failUnlessEqual(None, func(c_char_p(None))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func("123")) + self.assertEqual("123", func(c_char_p("123"))) + self.assertEqual(None, func(c_char_p(None))) - self.failUnlessEqual("123", func(c_buffer("123"))) + self.assertEqual("123", func(c_buffer("123"))) ca = c_char("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) func(byref(c_int())) func(pointer(c_int())) @@ -140,8 +140,8 @@ except NameError: pass else: - self.failUnlessEqual(None, func(c_wchar_p(None))) - self.failUnlessEqual(u"123", func(c_wchar_p(u"123"))) + self.assertEqual(None, func(c_wchar_p(None))) + self.assertEqual(u"123", func(c_wchar_p(u"123"))) def test_instance(self): func = testdll._testfunc_p_p @@ -151,10 +151,10 @@ _as_parameter_ = None func.argtypes = c_void_p, - self.failUnlessEqual(None, func(X())) + self.assertEqual(None, func(X())) func.argtypes = None - self.failUnlessEqual(None, func(X())) + self.assertEqual(None, func(X())) try: c_wchar @@ -174,15 +174,15 @@ func.restype = c_wchar_p func.argtypes = POINTER(c_wchar), - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual(u"123", func(u"123")) - self.failUnlessEqual(None, func(c_wchar_p(None))) - self.failUnlessEqual(u"123", func(c_wchar_p(u"123"))) + self.assertEqual(None, func(None)) + self.assertEqual(u"123", func(u"123")) + self.assertEqual(None, func(c_wchar_p(None))) + self.assertEqual(u"123", func(c_wchar_p(u"123"))) - self.failUnlessEqual(u"123", func(c_wbuffer(u"123"))) + self.assertEqual(u"123", func(c_wbuffer(u"123"))) ca = c_wchar("a") - self.failUnlessEqual(u"a", func(pointer(ca))[0]) - self.failUnlessEqual(u"a", func(byref(ca))[0]) + self.assertEqual(u"a", func(pointer(ca))[0]) + self.assertEqual(u"a", func(byref(ca))[0]) def test_c_wchar_p_arg(self): func = testdll._testfunc_p_p @@ -191,16 +191,16 @@ c_wchar_p.from_param(u"123") - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func(u"123")) - self.failUnlessEqual(None, func(c_wchar_p(None))) - self.failUnlessEqual("123", func(c_wchar_p("123"))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func(u"123")) + self.assertEqual(None, func(c_wchar_p(None))) + self.assertEqual("123", func(c_wchar_p("123"))) # XXX Currently, these raise TypeErrors, although they shouldn't: - self.failUnlessEqual("123", func(c_wbuffer("123"))) + self.assertEqual("123", func(c_wbuffer("123"))) ca = c_wchar("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) class ArrayTest(unittest.TestCase): def test(self): Modified: python/trunk/Lib/ctypes/test/test_python_api.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_python_api.py (original) +++ python/trunk/Lib/ctypes/test/test_python_api.py Wed Jul 1 00:57:08 2009 @@ -23,7 +23,7 @@ PyString_FromStringAndSize.restype = py_object PyString_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t - self.failUnlessEqual(PyString_FromStringAndSize("abcdefghi", 3), "abc") + self.assertEqual(PyString_FromStringAndSize("abcdefghi", 3), "abc") def test_PyString_FromString(self): pythonapi.PyString_FromString.restype = py_object @@ -32,10 +32,10 @@ s = "abc" refcnt = grc(s) pyob = pythonapi.PyString_FromString(s) - self.failUnlessEqual(grc(s), refcnt) - self.failUnlessEqual(s, pyob) + self.assertEqual(grc(s), refcnt) + self.assertEqual(s, pyob) del pyob - self.failUnlessEqual(grc(s), refcnt) + self.assertEqual(grc(s), refcnt) if is_resource_enabled("refcount"): # This test is unreliable, because it is possible that code in @@ -44,28 +44,28 @@ def test_PyInt_Long(self): ref42 = grc(42) pythonapi.PyInt_FromLong.restype = py_object - self.failUnlessEqual(pythonapi.PyInt_FromLong(42), 42) + self.assertEqual(pythonapi.PyInt_FromLong(42), 42) - self.failUnlessEqual(grc(42), ref42) + self.assertEqual(grc(42), ref42) pythonapi.PyInt_AsLong.argtypes = (py_object,) pythonapi.PyInt_AsLong.restype = c_long res = pythonapi.PyInt_AsLong(42) - self.failUnlessEqual(grc(res), ref42 + 1) + self.assertEqual(grc(res), ref42 + 1) del res - self.failUnlessEqual(grc(42), ref42) + self.assertEqual(grc(42), ref42) def test_PyObj_FromPtr(self): s = "abc def ghi jkl" ref = grc(s) # id(python-object) is the address pyobj = PyObj_FromPtr(id(s)) - self.failUnless(s is pyobj) + self.assertTrue(s is pyobj) - self.failUnlessEqual(grc(s), ref + 1) + self.assertEqual(grc(s), ref + 1) del pyobj - self.failUnlessEqual(grc(s), ref) + self.assertEqual(grc(s), ref) def test_PyOS_snprintf(self): PyOS_snprintf = pythonapi.PyOS_snprintf @@ -73,18 +73,18 @@ buf = c_buffer(256) PyOS_snprintf(buf, sizeof(buf), "Hello from %s", "ctypes") - self.failUnlessEqual(buf.value, "Hello from ctypes") + self.assertEqual(buf.value, "Hello from ctypes") PyOS_snprintf(buf, sizeof(buf), "Hello from %s", "ctypes", 1, 2, 3) - self.failUnlessEqual(buf.value, "Hello from ctypes") + self.assertEqual(buf.value, "Hello from ctypes") # not enough arguments - self.failUnlessRaises(TypeError, PyOS_snprintf, buf) + self.assertRaises(TypeError, PyOS_snprintf, buf) def test_pyobject_repr(self): - self.failUnlessEqual(repr(py_object()), "py_object()") - self.failUnlessEqual(repr(py_object(42)), "py_object(42)") - self.failUnlessEqual(repr(py_object(object)), "py_object(%r)" % object) + self.assertEqual(repr(py_object()), "py_object()") + self.assertEqual(repr(py_object(42)), "py_object(42)") + self.assertEqual(repr(py_object(object)), "py_object(%r)" % object) if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_random_things.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_random_things.py (original) +++ python/trunk/Lib/ctypes/test/test_random_things.py Wed Jul 1 00:57:08 2009 @@ -20,7 +20,7 @@ hdll = windll.kernel32.LoadLibraryA("kernel32") funcaddr = windll.kernel32.GetProcAddress(hdll, "GetModuleHandleA") - self.failUnlessEqual(call_function(funcaddr, (None,)), + self.assertEqual(call_function(funcaddr, (None,)), windll.kernel32.GetModuleHandleA(None)) class CallbackTracbackTestCase(unittest.TestCase): @@ -49,25 +49,25 @@ def test_ValueError(self): cb = CFUNCTYPE(c_int, c_int)(callback_func) out = self.capture_stderr(cb, 42) - self.failUnlessEqual(out.splitlines()[-1], + self.assertEqual(out.splitlines()[-1], "ValueError: 42") def test_IntegerDivisionError(self): cb = CFUNCTYPE(c_int, c_int)(callback_func) out = self.capture_stderr(cb, 0) - self.failUnlessEqual(out.splitlines()[-1][:19], + self.assertEqual(out.splitlines()[-1][:19], "ZeroDivisionError: ") def test_FloatDivisionError(self): cb = CFUNCTYPE(c_int, c_double)(callback_func) out = self.capture_stderr(cb, 0.0) - self.failUnlessEqual(out.splitlines()[-1][:19], + self.assertEqual(out.splitlines()[-1][:19], "ZeroDivisionError: ") def test_TypeErrorDivisionError(self): cb = CFUNCTYPE(c_int, c_char_p)(callback_func) out = self.capture_stderr(cb, "spam") - self.failUnlessEqual(out.splitlines()[-1], + self.assertEqual(out.splitlines()[-1], "TypeError: " "unsupported operand type(s) for /: 'int' and 'str'") Modified: python/trunk/Lib/ctypes/test/test_refcounts.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_refcounts.py (original) +++ python/trunk/Lib/ctypes/test/test_refcounts.py Wed Jul 1 00:57:08 2009 @@ -21,17 +21,17 @@ #print "called back with", value return value - self.failUnlessEqual(grc(callback), 2) + self.assertEqual(grc(callback), 2) cb = MyCallback(callback) - self.failUnless(grc(callback) > 2) + self.assertTrue(grc(callback) > 2) result = f(-10, cb) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) cb = None gc.collect() - self.failUnlessEqual(grc(callback), 2) + self.assertEqual(grc(callback), 2) def test_refcount(self): @@ -39,19 +39,19 @@ def func(*args): pass # this is the standard refcount for func - self.failUnlessEqual(grc(func), 2) + self.assertEqual(grc(func), 2) # the CFuncPtr instance holds atr least one refcount on func: f = OtherCallback(func) - self.failUnless(grc(func) > 2) + self.assertTrue(grc(func) > 2) # and may release it again del f - self.failUnless(grc(func) >= 2) + self.assertTrue(grc(func) >= 2) # but now it must be gone gc.collect() - self.failUnless(grc(func) == 2) + self.assertTrue(grc(func) == 2) class X(ctypes.Structure): _fields_ = [("a", OtherCallback)] @@ -59,27 +59,27 @@ x.a = OtherCallback(func) # the CFuncPtr instance holds atr least one refcount on func: - self.failUnless(grc(func) > 2) + self.assertTrue(grc(func) > 2) # and may release it again del x - self.failUnless(grc(func) >= 2) + self.assertTrue(grc(func) >= 2) # and now it must be gone again gc.collect() - self.failUnlessEqual(grc(func), 2) + self.assertEqual(grc(func), 2) f = OtherCallback(func) # the CFuncPtr instance holds atr least one refcount on func: - self.failUnless(grc(func) > 2) + self.assertTrue(grc(func) > 2) # create a cycle f.cycle = f del f gc.collect() - self.failUnlessEqual(grc(func), 2) + self.assertEqual(grc(func), 2) class AnotherLeak(unittest.TestCase): def test_callback(self): @@ -92,7 +92,7 @@ a = sys.getrefcount(ctypes.c_int) f(1, 2) - self.failUnlessEqual(sys.getrefcount(ctypes.c_int), a) + self.assertEqual(sys.getrefcount(ctypes.c_int), a) if __name__ == '__main__': unittest.main() Modified: python/trunk/Lib/ctypes/test/test_repr.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_repr.py (original) +++ python/trunk/Lib/ctypes/test/test_repr.py Wed Jul 1 00:57:08 2009 @@ -18,12 +18,12 @@ def test_numbers(self): for typ in subclasses: base = typ.__bases__[0] - self.failUnless(repr(base(42)).startswith(base.__name__)) - self.failUnlessEqual(": " "expected string or Unicode object, int found") else: - self.failUnlessEqual(msg, + self.assertEqual(msg, "(Phone) exceptions.TypeError: " "expected string or Unicode object, int found") cls, msg = self.get_except(Person, "Someone", ("a", "b", "c")) - self.failUnlessEqual(cls, RuntimeError) + self.assertEqual(cls, RuntimeError) if issubclass(Exception, object): - self.failUnlessEqual(msg, + self.assertEqual(msg, "(Phone) : too many initializers") else: - self.failUnlessEqual(msg, "(Phone) exceptions.TypeError: too many initializers") + self.assertEqual(msg, "(Phone) exceptions.TypeError: too many initializers") def get_except(self, func, *args): @@ -337,7 +337,7 @@ ## # same as 'class X(Structure): pass' ## # fails, since we need either a _fields_ or a _abstract_ attribute ## cls, msg = self.get_except(meta, "X", (Structure,), {}) -## self.failUnlessEqual((cls, msg), +## self.assertEqual((cls, msg), ## (AttributeError, "class must define a '_fields_' attribute")) def test_abstract_class(self): @@ -345,15 +345,15 @@ _abstract_ = "something" # try 'X()' cls, msg = self.get_except(eval, "X()", locals()) - self.failUnlessEqual((cls, msg), (TypeError, "abstract class")) + self.assertEqual((cls, msg), (TypeError, "abstract class")) def test_methods(self): ## class X(Structure): ## _fields_ = [] - self.failUnless("in_dll" in dir(type(Structure))) - self.failUnless("from_address" in dir(type(Structure))) - self.failUnless("in_dll" in dir(type(Structure))) + self.assertTrue("in_dll" in dir(type(Structure))) + self.assertTrue("from_address" in dir(type(Structure))) + self.assertTrue("in_dll" in dir(type(Structure))) class PointerMemberTestCase(unittest.TestCase): @@ -366,7 +366,7 @@ # We can assign arrays of the correct type s.array = (c_int * 3)(1, 2, 3) items = [s.array[i] for i in range(3)] - self.failUnlessEqual(items, [1, 2, 3]) + self.assertEqual(items, [1, 2, 3]) # The following are bugs, but are included here because the unittests # also describe the current behaviour. @@ -377,14 +377,14 @@ s.array[0] = 42 items = [s.array[i] for i in range(3)] - self.failUnlessEqual(items, [42, 2, 3]) + self.assertEqual(items, [42, 2, 3]) s.array[0] = 1 ## s.array[1] = 42 items = [s.array[i] for i in range(3)] - self.failUnlessEqual(items, [1, 2, 3]) + self.assertEqual(items, [1, 2, 3]) def test_none_to_pointer_fields(self): class S(Structure): @@ -394,7 +394,7 @@ s = S() s.x = 12345678 s.p = None - self.failUnlessEqual(s.x, 12345678) + self.assertEqual(s.x, 12345678) class TestRecursiveStructure(unittest.TestCase): def test_contains_itself(self): @@ -404,7 +404,7 @@ try: Recursive._fields_ = [("next", Recursive)] except AttributeError, details: - self.failUnless("Structure or union cannot contain itself" in + self.assertTrue("Structure or union cannot contain itself" in str(details)) else: self.fail("Structure or union cannot contain itself") @@ -421,7 +421,7 @@ try: Second._fields_ = [("first", First)] except AttributeError, details: - self.failUnless("_fields_ is final" in + self.assertTrue("_fields_ is final" in str(details)) else: self.fail("AttributeError not raised") Modified: python/trunk/Lib/ctypes/test/test_unaligned_structures.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_unaligned_structures.py (original) +++ python/trunk/Lib/ctypes/test/test_unaligned_structures.py Wed Jul 1 00:57:08 2009 @@ -28,18 +28,18 @@ def test_native(self): for typ in structures: ## print typ.value - self.failUnlessEqual(typ.value.offset, 1) + self.assertEqual(typ.value.offset, 1) o = typ() o.value = 4 - self.failUnlessEqual(o.value, 4) + self.assertEqual(o.value, 4) def test_swapped(self): for typ in byteswapped_structures: ## print >> sys.stderr, typ.value - self.failUnlessEqual(typ.value.offset, 1) + self.assertEqual(typ.value.offset, 1) o = typ() o.value = 4 - self.failUnlessEqual(o.value, 4) + self.assertEqual(o.value, 4) if __name__ == '__main__': unittest.main() Modified: python/trunk/Lib/ctypes/test/test_unicode.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_unicode.py (original) +++ python/trunk/Lib/ctypes/test/test_unicode.py Wed Jul 1 00:57:08 2009 @@ -23,55 +23,55 @@ def test_ascii_strict(self): ctypes.set_conversion_mode("ascii", "strict") # no conversions take place with unicode arguments - self.failUnlessEqual(wcslen(u"abc"), 3) - self.failUnlessEqual(wcslen(u"ab\u2070"), 3) + self.assertEqual(wcslen(u"abc"), 3) + self.assertEqual(wcslen(u"ab\u2070"), 3) # string args are converted - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessRaises(ctypes.ArgumentError, wcslen, "ab?") + self.assertEqual(wcslen("abc"), 3) + self.assertRaises(ctypes.ArgumentError, wcslen, "ab?") def test_ascii_replace(self): ctypes.set_conversion_mode("ascii", "replace") - self.failUnlessEqual(wcslen(u"abc"), 3) - self.failUnlessEqual(wcslen(u"ab\u2070"), 3) - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("ab?"), 3) + self.assertEqual(wcslen(u"abc"), 3) + self.assertEqual(wcslen(u"ab\u2070"), 3) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("ab?"), 3) def test_ascii_ignore(self): ctypes.set_conversion_mode("ascii", "ignore") - self.failUnlessEqual(wcslen(u"abc"), 3) - self.failUnlessEqual(wcslen(u"ab\u2070"), 3) + self.assertEqual(wcslen(u"abc"), 3) + self.assertEqual(wcslen(u"ab\u2070"), 3) # ignore error mode skips non-ascii characters - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("????"), 0) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("????"), 0) def test_latin1_strict(self): ctypes.set_conversion_mode("latin-1", "strict") - self.failUnlessEqual(wcslen(u"abc"), 3) - self.failUnlessEqual(wcslen(u"ab\u2070"), 3) - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("????"), 4) + self.assertEqual(wcslen(u"abc"), 3) + self.assertEqual(wcslen(u"ab\u2070"), 3) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("????"), 4) def test_buffers(self): ctypes.set_conversion_mode("ascii", "strict") buf = ctypes.create_unicode_buffer("abc") - self.failUnlessEqual(len(buf), 3+1) + self.assertEqual(len(buf), 3+1) ctypes.set_conversion_mode("ascii", "replace") buf = ctypes.create_unicode_buffer("ab???") - self.failUnlessEqual(buf[:], u"ab\uFFFD\uFFFD\uFFFD\0") - self.failUnlessEqual(buf[::], u"ab\uFFFD\uFFFD\uFFFD\0") - self.failUnlessEqual(buf[::-1], u"\0\uFFFD\uFFFD\uFFFDba") - self.failUnlessEqual(buf[::2], u"a\uFFFD\uFFFD") - self.failUnlessEqual(buf[6:5:-1], u"") + self.assertEqual(buf[:], u"ab\uFFFD\uFFFD\uFFFD\0") + self.assertEqual(buf[::], u"ab\uFFFD\uFFFD\uFFFD\0") + self.assertEqual(buf[::-1], u"\0\uFFFD\uFFFD\uFFFDba") + self.assertEqual(buf[::2], u"a\uFFFD\uFFFD") + self.assertEqual(buf[6:5:-1], u"") ctypes.set_conversion_mode("ascii", "ignore") buf = ctypes.create_unicode_buffer("ab???") # is that correct? not sure. But with 'ignore', you get what you pay for.. - self.failUnlessEqual(buf[:], u"ab\0\0\0\0") - self.failUnlessEqual(buf[::], u"ab\0\0\0\0") - self.failUnlessEqual(buf[::-1], u"\0\0\0\0ba") - self.failUnlessEqual(buf[::2], u"a\0\0") - self.failUnlessEqual(buf[6:5:-1], u"") + self.assertEqual(buf[:], u"ab\0\0\0\0") + self.assertEqual(buf[::], u"ab\0\0\0\0") + self.assertEqual(buf[::-1], u"\0\0\0\0ba") + self.assertEqual(buf[::2], u"a\0\0") + self.assertEqual(buf[6:5:-1], u"") import _ctypes_test func = ctypes.CDLL(_ctypes_test.__file__)._testfunc_p_p @@ -89,41 +89,41 @@ def test_ascii_replace(self): ctypes.set_conversion_mode("ascii", "strict") - self.failUnlessEqual(func("abc"), "abc") - self.failUnlessEqual(func(u"abc"), "abc") + self.assertEqual(func("abc"), "abc") + self.assertEqual(func(u"abc"), "abc") self.assertRaises(ctypes.ArgumentError, func, u"ab?") def test_ascii_ignore(self): ctypes.set_conversion_mode("ascii", "ignore") - self.failUnlessEqual(func("abc"), "abc") - self.failUnlessEqual(func(u"abc"), "abc") - self.failUnlessEqual(func(u"????"), "") + self.assertEqual(func("abc"), "abc") + self.assertEqual(func(u"abc"), "abc") + self.assertEqual(func(u"????"), "") def test_ascii_replace(self): ctypes.set_conversion_mode("ascii", "replace") - self.failUnlessEqual(func("abc"), "abc") - self.failUnlessEqual(func(u"abc"), "abc") - self.failUnlessEqual(func(u"????"), "????") + self.assertEqual(func("abc"), "abc") + self.assertEqual(func(u"abc"), "abc") + self.assertEqual(func(u"????"), "????") def test_buffers(self): ctypes.set_conversion_mode("ascii", "strict") buf = ctypes.create_string_buffer(u"abc") - self.failUnlessEqual(len(buf), 3+1) + self.assertEqual(len(buf), 3+1) ctypes.set_conversion_mode("ascii", "replace") buf = ctypes.create_string_buffer(u"ab???") - self.failUnlessEqual(buf[:], "ab???\0") - self.failUnlessEqual(buf[::], "ab???\0") - self.failUnlessEqual(buf[::-1], "\0???ba") - self.failUnlessEqual(buf[::2], "a??") - self.failUnlessEqual(buf[6:5:-1], "") + self.assertEqual(buf[:], "ab???\0") + self.assertEqual(buf[::], "ab???\0") + self.assertEqual(buf[::-1], "\0???ba") + self.assertEqual(buf[::2], "a??") + self.assertEqual(buf[6:5:-1], "") ctypes.set_conversion_mode("ascii", "ignore") buf = ctypes.create_string_buffer(u"ab???") # is that correct? not sure. But with 'ignore', you get what you pay for.. - self.failUnlessEqual(buf[:], "ab\0\0\0\0") - self.failUnlessEqual(buf[::], "ab\0\0\0\0") - self.failUnlessEqual(buf[::-1], "\0\0\0\0ba") + self.assertEqual(buf[:], "ab\0\0\0\0") + self.assertEqual(buf[::], "ab\0\0\0\0") + self.assertEqual(buf[::-1], "\0\0\0\0ba") if __name__ == '__main__': unittest.main() Modified: python/trunk/Lib/ctypes/test/test_values.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_values.py (original) +++ python/trunk/Lib/ctypes/test/test_values.py Wed Jul 1 00:57:08 2009 @@ -13,9 +13,9 @@ ctdll = CDLL(_ctypes_test.__file__) an_integer = c_int.in_dll(ctdll, "an_integer") x = an_integer.value - self.failUnlessEqual(x, ctdll.get_an_integer()) + self.assertEqual(x, ctdll.get_an_integer()) an_integer.value *= 2 - self.failUnlessEqual(x*2, ctdll.get_an_integer()) + self.assertEqual(x*2, ctdll.get_an_integer()) def test_undefined(self): ctdll = CDLL(_ctypes_test.__file__) @@ -34,11 +34,11 @@ # docstrings are also removed in the latter case. opt = c_int.in_dll(pydll, "Py_OptimizeFlag").value if __debug__: - self.failUnlessEqual(opt, 0) + self.assertEqual(opt, 0) elif ValuesTestCase.__doc__ is not None: - self.failUnlessEqual(opt, 1) + self.assertEqual(opt, 1) else: - self.failUnlessEqual(opt, 2) + self.assertEqual(opt, 2) def test_frozentable(self): # Python exports a PyImport_FrozenModules symbol. This is a @@ -70,7 +70,7 @@ expected = [("__hello__", 104), ("__phello__", -104), ("__phello__.spam", 104)] else: expected = [("__hello__", 100), ("__phello__", -100), ("__phello__.spam", 100)] - self.failUnlessEqual(items, expected) + self.assertEqual(items, expected) from ctypes import _pointer_type_cache del _pointer_type_cache[struct_frozen] Modified: python/trunk/Lib/ctypes/test/test_varsize_struct.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_varsize_struct.py (original) +++ python/trunk/Lib/ctypes/test/test_varsize_struct.py Wed Jul 1 00:57:08 2009 @@ -7,44 +7,44 @@ _fields_ = [("item", c_int), ("array", c_int * 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_int) * 2) + self.assertEqual(sizeof(X), sizeof(c_int) * 2) x = X() x.item = 42 x.array[0] = 100 - self.failUnlessEqual(sizeof(x), sizeof(c_int) * 2) + self.assertEqual(sizeof(x), sizeof(c_int) * 2) # make room for one additional item new_size = sizeof(X) + sizeof(c_int) * 1 resize(x, new_size) - self.failUnlessEqual(sizeof(x), new_size) - self.failUnlessEqual((x.item, x.array[0]), (42, 100)) + self.assertEqual(sizeof(x), new_size) + self.assertEqual((x.item, x.array[0]), (42, 100)) # make room for 10 additional items new_size = sizeof(X) + sizeof(c_int) * 9 resize(x, new_size) - self.failUnlessEqual(sizeof(x), new_size) - self.failUnlessEqual((x.item, x.array[0]), (42, 100)) + self.assertEqual(sizeof(x), new_size) + self.assertEqual((x.item, x.array[0]), (42, 100)) # make room for one additional item new_size = sizeof(X) + sizeof(c_int) * 1 resize(x, new_size) - self.failUnlessEqual(sizeof(x), new_size) - self.failUnlessEqual((x.item, x.array[0]), (42, 100)) + self.assertEqual(sizeof(x), new_size) + self.assertEqual((x.item, x.array[0]), (42, 100)) def test_array_invalid_length(self): # cannot create arrays with non-positive size - self.failUnlessRaises(ValueError, lambda: c_int * -1) - self.failUnlessRaises(ValueError, lambda: c_int * -3) + self.assertRaises(ValueError, lambda: c_int * -1) + self.assertRaises(ValueError, lambda: c_int * -3) def test_zerosized_array(self): array = (c_int * 0)() # accessing elements of zero-sized arrays raise IndexError - self.failUnlessRaises(IndexError, array.__setitem__, 0, None) - self.failUnlessRaises(IndexError, array.__getitem__, 0) - self.failUnlessRaises(IndexError, array.__setitem__, 1, None) - self.failUnlessRaises(IndexError, array.__getitem__, 1) - self.failUnlessRaises(IndexError, array.__setitem__, -1, None) - self.failUnlessRaises(IndexError, array.__getitem__, -1) + self.assertRaises(IndexError, array.__setitem__, 0, None) + self.assertRaises(IndexError, array.__getitem__, 0) + self.assertRaises(IndexError, array.__setitem__, 1, None) + self.assertRaises(IndexError, array.__getitem__, 1) + self.assertRaises(IndexError, array.__setitem__, -1, None) + self.assertRaises(IndexError, array.__getitem__, -1) if __name__ == "__main__": unittest.main() Modified: python/trunk/Lib/ctypes/test/test_win32.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_win32.py (original) +++ python/trunk/Lib/ctypes/test/test_win32.py Wed Jul 1 00:57:08 2009 @@ -18,7 +18,7 @@ self.assertRaises(ValueError, IsWindow) # This one should succeeed... - self.failUnlessEqual(0, IsWindow(0)) + self.assertEqual(0, IsWindow(0)) # ValueError: Procedure probably called with too many arguments (8 bytes in excess) self.assertRaises(ValueError, IsWindow, 0, 0, 0) @@ -49,13 +49,13 @@ class TestWintypes(unittest.TestCase): def test_HWND(self): from ctypes import wintypes - self.failUnlessEqual(sizeof(wintypes.HWND), sizeof(c_void_p)) + self.assertEqual(sizeof(wintypes.HWND), sizeof(c_void_p)) def test_PARAM(self): from ctypes import wintypes - self.failUnlessEqual(sizeof(wintypes.WPARAM), + self.assertEqual(sizeof(wintypes.WPARAM), sizeof(c_void_p)) - self.failUnlessEqual(sizeof(wintypes.LPARAM), + self.assertEqual(sizeof(wintypes.LPARAM), sizeof(c_void_p)) def test_COMError(self): @@ -84,7 +84,7 @@ pt = POINT(10, 10) rect = RECT(0, 0, 20, 20) - self.failUnlessEqual(1, dll.PointInRect(byref(rect), pt)) + self.assertEqual(1, dll.PointInRect(byref(rect), pt)) if __name__ == '__main__': unittest.main() Modified: python/trunk/Lib/distutils/tests/test_archive_util.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_archive_util.py (original) +++ python/trunk/Lib/distutils/tests/test_archive_util.py Wed Jul 1 00:57:08 2009 @@ -47,7 +47,7 @@ # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -58,7 +58,7 @@ finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) def _tarinfo(self, path): tar = tarfile.open(path) @@ -96,7 +96,7 @@ # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now create another tarball using `tar` tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') @@ -110,7 +110,7 @@ finally: os.chdir(old_dir) - self.assert_(os.path.exists(tarball2)) + self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) @@ -123,7 +123,7 @@ finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now for a dry_run base_name = os.path.join(tmpdir2, 'archive') @@ -134,7 +134,7 @@ finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) @unittest.skipUnless(find_executable('compress'), 'The compress program is required') @@ -151,7 +151,7 @@ finally: os.chdir(old_dir) tarball = base_name + '.tar.Z' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) # same test with dry_run @@ -165,7 +165,7 @@ dry_run=True) finally: os.chdir(old_dir) - self.assert_(not os.path.exists(tarball)) + self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') Modified: python/trunk/Lib/distutils/tests/test_bdist_rpm.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_bdist_rpm.py (original) +++ python/trunk/Lib/distutils/tests/test_bdist_rpm.py Wed Jul 1 00:57:08 2009 @@ -74,7 +74,7 @@ cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) def test_no_optimize_flag(self): @@ -114,7 +114,7 @@ cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) def test_suite(): Modified: python/trunk/Lib/distutils/tests/test_bdist_wininst.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_bdist_wininst.py (original) +++ python/trunk/Lib/distutils/tests/test_bdist_wininst.py Wed Jul 1 00:57:08 2009 @@ -21,7 +21,7 @@ # and make sure it finds it and returns its content # no matter what platform we have exe_file = cmd.get_exe_bytes() - self.assert_(len(exe_file) > 10) + self.assertTrue(len(exe_file) > 10) def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) Modified: python/trunk/Lib/distutils/tests/test_build_clib.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_clib.py (original) +++ python/trunk/Lib/distutils/tests/test_build_clib.py Wed Jul 1 00:57:08 2009 @@ -135,7 +135,7 @@ cmd.run() # let's check the result - self.assert_('libfoo.a' in os.listdir(build_temp)) + self.assertTrue('libfoo.a' in os.listdir(build_temp)) def test_suite(): return unittest.makeSuite(BuildCLibTestCase) Modified: python/trunk/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) +++ python/trunk/Lib/distutils/tests/test_build_ext.py Wed Jul 1 00:57:08 2009 @@ -73,15 +73,15 @@ import xx for attr in ('error', 'foo', 'new', 'roj'): - self.assert_(hasattr(xx, attr)) + self.assertTrue(hasattr(xx, attr)) self.assertEquals(xx.foo(2, 5), 7) self.assertEquals(xx.foo(13,15), 28) self.assertEquals(xx.new().demo(), None) doc = 'This is a template module just for instruction.' self.assertEquals(xx.__doc__, doc) - self.assert_(isinstance(xx.Null(), xx.Null)) - self.assert_(isinstance(xx.Str(), xx.Str)) + self.assertTrue(isinstance(xx.Null(), xx.Null)) + self.assertTrue(isinstance(xx.Str(), xx.Str)) def tearDown(self): # Get everything back to normal @@ -114,7 +114,7 @@ _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris - self.assert_(len(cmd.library_dirs) > 0) + self.assertTrue(len(cmd.library_dirs) > 0) def test_user_site(self): # site.USER_SITE was introduced in 2.6 @@ -128,7 +128,7 @@ # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 @@ -144,9 +144,9 @@ # see if include_dirs and library_dirs # were set - self.assert_(lib in cmd.library_dirs) - self.assert_(lib in cmd.rpath) - self.assert_(incl in cmd.include_dirs) + self.assertTrue(lib in cmd.library_dirs) + self.assertTrue(lib in cmd.rpath) + self.assertTrue(incl in cmd.include_dirs) def test_optional_extension(self): @@ -175,10 +175,10 @@ from distutils import sysconfig py_include = sysconfig.get_python_inc() - self.assert_(py_include in cmd.include_dirs) + self.assertTrue(py_include in cmd.include_dirs) plat_py_include = sysconfig.get_python_inc(plat_specific=1) - self.assert_(plat_py_include in cmd.include_dirs) + self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string @@ -192,7 +192,7 @@ cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assert_('my_lib_dir' in cmd.library_dirs) + self.assertTrue('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths @@ -257,13 +257,13 @@ 'some': 'bar'})] cmd.check_extensions_list(exts) ext = exts[0] - self.assert_(isinstance(ext, Extension)) + self.assertTrue(isinstance(ext, Extension)) # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') self.assertEquals(ext.libraries, 'foo') - self.assert_(not hasattr(ext, 'some')) + self.assertTrue(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', @@ -321,7 +321,7 @@ so_file = cmd.get_outputs()[0] finally: os.chdir(old_wd) - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) @@ -330,7 +330,7 @@ cmd.inplace = 0 cmd.run() so_file = cmd.get_outputs()[0] - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) 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 Wed Jul 1 00:57:08 2009 @@ -52,9 +52,9 @@ self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) - self.assert_("__init__.py" in files) - self.assert_("__init__.pyc" in files) - self.assert_("README.txt" in files) + self.assertTrue("__init__.py" in files) + self.assertTrue("__init__.pyc" in files) + self.assertTrue("README.txt" in files) def test_empty_package_dir (self): # See SF 1668596/1720897. Modified: python/trunk/Lib/distutils/tests/test_build_scripts.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_scripts.py (original) +++ python/trunk/Lib/distutils/tests/test_build_scripts.py Wed Jul 1 00:57:08 2009 @@ -16,12 +16,12 @@ def test_default_settings(self): cmd = self.get_build_scripts_cmd("/foo/bar", []) - self.assert_(not cmd.force) - self.assert_(cmd.build_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(cmd.build_dir is None) cmd.finalize_options() - self.assert_(cmd.force) + self.assertTrue(cmd.force) self.assertEqual(cmd.build_dir, "/foo/bar") def test_build(self): @@ -37,7 +37,7 @@ built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def get_build_scripts_cmd(self, target, scripts): import sys @@ -100,7 +100,7 @@ built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) Modified: python/trunk/Lib/distutils/tests/test_clean.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_clean.py (original) +++ python/trunk/Lib/distutils/tests/test_clean.py Wed Jul 1 00:57:08 2009 @@ -35,7 +35,7 @@ # make sure the files where removed for name, path in dirs: - self.assert_(not os.path.exists(path), + self.assertTrue(not os.path.exists(path), '%s was not removed' % path) # let's run the command again (should spit warnings but suceed) Modified: python/trunk/Lib/distutils/tests/test_cmd.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_cmd.py (original) +++ python/trunk/Lib/distutils/tests/test_cmd.py Wed Jul 1 00:57:08 2009 @@ -70,7 +70,7 @@ cmd.option2 = None cmd.ensure_string('option2', 'xxx') - self.assert_(hasattr(cmd, 'option2')) + self.assertTrue(hasattr(cmd, 'option2')) cmd.option3 = 1 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') Modified: python/trunk/Lib/distutils/tests/test_config.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_config.py (original) +++ python/trunk/Lib/distutils/tests/test_config.py Wed Jul 1 00:57:08 2009 @@ -105,9 +105,9 @@ def test_server_empty_registration(self): cmd = self._cmd(self.dist) rc = cmd._get_rc_file() - self.assert_(not os.path.exists(rc)) + self.assertTrue(not os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') - self.assert_(os.path.exists(rc)) + self.assertTrue(os.path.exists(rc)) content = open(rc).read() self.assertEquals(content, WANTED) Modified: python/trunk/Lib/distutils/tests/test_config_cmd.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_config_cmd.py (original) +++ python/trunk/Lib/distutils/tests/test_config_cmd.py Wed Jul 1 00:57:08 2009 @@ -73,14 +73,14 @@ self.write_file(f2, 'xxx') for f in (f1, f2): - self.assert_(os.path.exists(f)) + self.assertTrue(os.path.exists(f)) pkg_dir, dist = self.create_dist() cmd = config(dist) cmd._clean(f1, f2) for f in (f1, f2): - self.assert_(not os.path.exists(f)) + self.assertTrue(not os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) Modified: python/trunk/Lib/distutils/tests/test_dist.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_dist.py (original) +++ python/trunk/Lib/distutils/tests/test_dist.py Wed Jul 1 00:57:08 2009 @@ -73,7 +73,7 @@ self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") - self.assert_(isinstance(cmd, test_dist)) + self.assertTrue(isinstance(cmd, test_dist)) self.assertEqual(cmd.sample_option, "sometext") def test_command_packages_configfile(self): @@ -204,10 +204,10 @@ "version": "1.0"} dist = Distribution(attrs) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.0" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.0" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides(self): attrs = {"name": "package", @@ -219,9 +219,9 @@ self.assertEqual(dist.get_provides(), ["package", "package.sub"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides_illegal(self): self.assertRaises(ValueError, Distribution, @@ -239,11 +239,11 @@ self.assertEqual(dist.get_requires(), ["other", "another (==1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("Requires: other" in meta) - self.assert_("Requires: another (==1.0)" in meta) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("Requires: other" in meta) + self.assertTrue("Requires: another (==1.0)" in meta) + self.assertTrue("obsoletes:" not in meta.lower()) def test_requires_illegal(self): self.assertRaises(ValueError, Distribution, @@ -261,11 +261,11 @@ self.assertEqual(dist.get_obsoletes(), ["other", "another (<1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("Obsoletes: other" in meta) - self.assert_("Obsoletes: another (<1.0)" in meta) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("Obsoletes: other" in meta) + self.assertTrue("Obsoletes: another (<1.0)" in meta) def test_obsoletes_illegal(self): self.assertRaises(ValueError, Distribution, @@ -299,14 +299,14 @@ if sys.platform in ('linux', 'darwin'): self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files) + self.assertTrue(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files, + self.assertTrue(user_filename in files, '%r not found in %r' % (user_filename, files)) finally: os.remove(user_filename) @@ -332,7 +332,7 @@ output = [line for line in s.getvalue().split('\n') if line.strip() != ''] - self.assert_(len(output) > 0) + self.assertTrue(len(output) > 0) def test_suite(): suite = unittest.TestSuite() Modified: python/trunk/Lib/distutils/tests/test_install.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_install.py (original) +++ python/trunk/Lib/distutils/tests/test_install.py Wed Jul 1 00:57:08 2009 @@ -88,7 +88,7 @@ def _test_user_site(self): for key in ('nt_user', 'unix_user', 'os2_home'): - self.assert_(key in INSTALL_SCHEMES) + self.assertTrue(key in INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) @@ -96,24 +96,24 @@ # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 # user base and site shouldn't be created yet - self.assert_(not os.path.exists(self.user_base)) - self.assert_(not os.path.exists(self.user_site)) + self.assertTrue(not os.path.exists(self.user_base)) + self.assertTrue(not os.path.exists(self.user_site)) # let's run finalize cmd.ensure_finalized() # now they should - self.assert_(os.path.exists(self.user_base)) - self.assert_(os.path.exists(self.user_site)) + self.assertTrue(os.path.exists(self.user_base)) + self.assertTrue(os.path.exists(self.user_site)) - self.assert_('userbase' in cmd.config_vars) - self.assert_('usersite' in cmd.config_vars) + self.assertTrue('userbase' in cmd.config_vars) + self.assertTrue('usersite' in cmd.config_vars) def test_handle_extra_path(self): dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) Modified: python/trunk/Lib/distutils/tests/test_install_data.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_install_data.py (original) +++ python/trunk/Lib/distutils/tests/test_install_data.py Wed Jul 1 00:57:08 2009 @@ -35,9 +35,9 @@ # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) rtwo = os.path.split(two)[-1] - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) rone = os.path.split(one)[-1] - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # let's try with warn_dir one @@ -47,8 +47,8 @@ # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # now using root and empty dir @@ -65,8 +65,8 @@ # let's check the result self.assertEquals(len(cmd.get_outputs()), 4) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) def test_suite(): return unittest.makeSuite(InstallDataTestCase) Modified: python/trunk/Lib/distutils/tests/test_install_lib.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_install_lib.py (original) +++ python/trunk/Lib/distutils/tests/test_install_lib.py Wed Jul 1 00:57:08 2009 @@ -39,8 +39,8 @@ f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) def test_get_outputs(self): pkg_dir, dist = self.create_dist() @@ -57,7 +57,7 @@ cmd.distribution.script_name = 'setup.py' # get_output should return 4 elements - self.assert_(len(cmd.get_outputs()) >= 2) + self.assertTrue(len(cmd.get_outputs()) >= 2) def test_get_inputs(self): pkg_dir, dist = self.create_dist() Modified: python/trunk/Lib/distutils/tests/test_install_scripts.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_install_scripts.py (original) +++ python/trunk/Lib/distutils/tests/test_install_scripts.py Wed Jul 1 00:57:08 2009 @@ -23,15 +23,15 @@ skip_build=1, ) cmd = install_scripts(dist) - self.assert_(not cmd.force) - self.assert_(not cmd.skip_build) - self.assert_(cmd.build_dir is None) - self.assert_(cmd.install_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(not cmd.skip_build) + self.assertTrue(cmd.build_dir is None) + self.assertTrue(cmd.install_dir is None) cmd.finalize_options() - self.assert_(cmd.force) - self.assert_(cmd.skip_build) + self.assertTrue(cmd.force) + self.assertTrue(cmd.skip_build) self.assertEqual(cmd.build_dir, "/foo/bar") self.assertEqual(cmd.install_dir, "/splat/funk") @@ -69,7 +69,7 @@ installed = os.listdir(target) for name in expected: - self.assert_(name in installed) + self.assertTrue(name in installed) def test_suite(): Modified: python/trunk/Lib/distutils/tests/test_msvc9compiler.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_msvc9compiler.py (original) +++ python/trunk/Lib/distutils/tests/test_msvc9compiler.py Wed Jul 1 00:57:08 2009 @@ -46,7 +46,7 @@ # windows registeries versions. path = r'Software\Microsoft\Notepad' v = Reg.get_value(path, u"lfitalic") - self.assert_(v in (0, 1)) + self.assertTrue(v in (0, 1)) import _winreg HKCU = _winreg.HKEY_CURRENT_USER @@ -54,7 +54,7 @@ self.assertEquals(keys, None) keys = Reg.read_keys(HKCU, r'Software\Microsoft') - self.assert_('Notepad' in keys) + self.assertTrue('Notepad' in keys) def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) Modified: python/trunk/Lib/distutils/tests/test_register.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_register.py (original) +++ python/trunk/Lib/distutils/tests/test_register.py Wed Jul 1 00:57:08 2009 @@ -96,7 +96,7 @@ cmd = self._get_cmd() # we shouldn't have a .pypirc file yet - self.assert_(not os.path.exists(self.rc)) + self.assertTrue(not os.path.exists(self.rc)) # patching raw_input and getpass.getpass # so register gets happy @@ -115,7 +115,7 @@ del register_module.raw_input # we should have a brand new .pypirc file - self.assert_(os.path.exists(self.rc)) + self.assertTrue(os.path.exists(self.rc)) # with the content similar to WANTED_PYPIRC content = open(self.rc).read() @@ -133,13 +133,13 @@ # let's see what the server received : we should # have 2 similar requests - self.assert_(self.conn.reqs, 2) + self.assertTrue(self.conn.reqs, 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) self.assertEquals(req1['Content-length'], '1374') self.assertEquals(req2['Content-length'], '1374') - self.assert_('xxx' in self.conn.reqs[1].data) + self.assertTrue('xxx' in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -165,11 +165,11 @@ del register_module.raw_input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '608') - self.assert_('tarek' in req.data) + self.assertTrue('tarek' in req.data) def test_password_reset(self): # this test runs choice 3 @@ -183,11 +183,11 @@ del register_module.raw_input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '290') - self.assert_('tarek' in req.data) + self.assertTrue('tarek' in req.data) def test_strict(self): # testing the script option Modified: python/trunk/Lib/distutils/tests/test_sysconfig.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_sysconfig.py (original) +++ python/trunk/Lib/distutils/tests/test_sysconfig.py Wed Jul 1 00:57:08 2009 @@ -21,12 +21,12 @@ def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() - self.assert_(os.path.isfile(config_h), config_h) + self.assertTrue(os.path.isfile(config_h), config_h) def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before - #self.assert_(os.path.isdir(lib_dir), lib_dir) + #self.assertTrue(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) @@ -36,14 +36,14 @@ # This is not much of a test. We make sure Python.h exists # in the directory returned by get_python_inc() but we don't know # it is the correct file. - self.assert_(os.path.isdir(inc_dir), inc_dir) + self.assertTrue(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") - self.assert_(os.path.isfile(python_h), python_h) + self.assertTrue(os.path.isfile(python_h), python_h) def test_get_config_vars(self): cvars = sysconfig.get_config_vars() - self.assert_(isinstance(cvars, dict)) - self.assert_(cvars) + self.assertTrue(isinstance(cvars, dict)) + self.assertTrue(cvars) def test_customize_compiler(self): Modified: python/trunk/Lib/distutils/tests/test_upload.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_upload.py (original) +++ python/trunk/Lib/distutils/tests/test_upload.py Wed Jul 1 00:57:08 2009 @@ -96,11 +96,11 @@ # what did we send ? headers = dict(self.last_open.req.headers) self.assertEquals(headers['Content-length'], '2086') - self.assert_(headers['Content-type'].startswith('multipart/form-data')) + self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEquals(self.last_open.req.get_method(), 'POST') self.assertEquals(self.last_open.req.get_full_url(), 'http://pypi.python.org/pypi') - self.assert_('xxx' in self.last_open.req.data) + self.assertTrue('xxx' in self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) Modified: python/trunk/Lib/distutils/tests/test_util.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_util.py (original) +++ python/trunk/Lib/distutils/tests/test_util.py Wed Jul 1 00:57:08 2009 @@ -225,10 +225,10 @@ no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') for y in yes: - self.assert_(strtobool(y)) + self.assertTrue(strtobool(y)) for n in no: - self.assert_(not strtobool(n)) + self.assertTrue(not strtobool(n)) def test_rfc822_escape(self): header = 'I am a\npoor\nlonesome\nheader\n' Modified: python/trunk/Lib/email/test/test_email.py ============================================================================== --- python/trunk/Lib/email/test/test_email.py (original) +++ python/trunk/Lib/email/test/test_email.py Wed Jul 1 00:57:08 2009 @@ -50,7 +50,7 @@ # Base test class class TestEmailBase(unittest.TestCase): def ndiffAssertEqual(self, first, second): - """Like failUnlessEqual except use ndiff for readable output.""" + """Like assertEqual except use ndiff for readable output.""" if first <> second: sfirst = str(first) ssecond = str(second) @@ -239,12 +239,12 @@ msg['From'] = 'Me' msg['to'] = 'You' # Check for case insensitivity - self.failUnless('from' in msg) - self.failUnless('From' in msg) - self.failUnless('FROM' in msg) - self.failUnless('to' in msg) - self.failUnless('To' in msg) - self.failUnless('TO' in msg) + self.assertTrue('from' in msg) + self.assertTrue('From' in msg) + self.assertTrue('FROM' in msg) + self.assertTrue('to' in msg) + self.assertTrue('To' in msg) + self.assertTrue('TO' in msg) def test_as_string(self): eq = self.assertEqual @@ -266,7 +266,7 @@ eq(text, msg.as_string()) fullrepr = str(msg) lines = fullrepr.split('\n') - self.failUnless(lines[0].startswith('From ')) + self.assertTrue(lines[0].startswith('From ')) eq(text, NL.join(lines[1:])) def test_bad_param(self): @@ -337,10 +337,10 @@ def test_has_key(self): msg = email.message_from_string('Header: exists') - self.failUnless(msg.has_key('header')) - self.failUnless(msg.has_key('Header')) - self.failUnless(msg.has_key('HEADER')) - self.failIf(msg.has_key('headeri')) + self.assertTrue(msg.has_key('header')) + self.assertTrue(msg.has_key('Header')) + self.assertTrue(msg.has_key('HEADER')) + self.assertFalse(msg.has_key('headeri')) def test_set_param(self): eq = self.assertEqual @@ -931,7 +931,7 @@ def test_add_header(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue self._au.add_header('Content-Disposition', 'attachment', filename='audiotest.au') eq(self._au['content-disposition'], @@ -974,7 +974,7 @@ def test_add_header(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue self._im.add_header('Content-Disposition', 'attachment', filename='dingusfish.gif') eq(self._im['content-disposition'], @@ -1001,7 +1001,7 @@ def test_types(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue eq(self._msg.get_content_type(), 'text/plain') eq(self._msg.get_param('charset'), 'us-ascii') missing = [] @@ -1011,7 +1011,7 @@ def test_payload(self): self.assertEqual(self._msg.get_payload(), 'hello there') - self.failUnless(not self._msg.is_multipart()) + self.assertTrue(not self._msg.is_multipart()) def test_charset(self): eq = self.assertEqual @@ -1066,7 +1066,7 @@ def test_hierarchy(self): # convenience eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue raises = self.assertRaises # tests m = self._msg @@ -1380,7 +1380,7 @@ -- XXXX-- ''') - self.failUnless(msg.is_multipart()) + self.assertTrue(msg.is_multipart()) eq(msg.get_boundary(), ' XXXX') eq(len(msg.get_payload()), 2) @@ -1410,7 +1410,7 @@ eq(msg.get_content_subtype(), 'plain') def test_same_boundary_inner_outer(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_15.txt') # XXX We can probably eventually do better inner = msg.get_payload(0) @@ -1420,7 +1420,7 @@ Errors.StartBoundaryNotFoundDefect)) def test_multipart_no_boundary(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_25.txt') unless(isinstance(msg.get_payload(), str)) self.assertEqual(len(msg.defects), 2) @@ -1478,7 +1478,7 @@ """) def test_lying_multipart(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_41.txt') unless(hasattr(msg, 'defects')) self.assertEqual(len(msg.defects), 2) @@ -1498,7 +1498,7 @@ # [*] This message is missing its start boundary bad = outer.get_payload(1).get_payload(0) self.assertEqual(len(bad.defects), 1) - self.failUnless(isinstance(bad.defects[0], + self.assertTrue(isinstance(bad.defects[0], Errors.StartBoundaryNotFoundDefect)) def test_first_line_is_continuation_header(self): @@ -1508,7 +1508,7 @@ eq(msg.keys(), []) eq(msg.get_payload(), 'Line 2\nLine 3') eq(len(msg.defects), 1) - self.failUnless(isinstance(msg.defects[0], + self.assertTrue(isinstance(msg.defects[0], Errors.FirstHeaderLineIsContinuationDefect)) eq(msg.defects[0].line, ' Line 1\n') @@ -1576,7 +1576,7 @@ def test_valid_argument(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue subject = 'A sub-message' m = Message() m['Subject'] = subject @@ -1620,20 +1620,20 @@ def test_parse_message_rfc822(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_11.txt') eq(msg.get_content_type(), 'message/rfc822') payload = msg.get_payload() unless(isinstance(payload, list)) eq(len(payload), 1) submsg = payload[0] - self.failUnless(isinstance(submsg, Message)) + self.assertTrue(isinstance(submsg, Message)) eq(submsg['subject'], 'An enclosed message') eq(submsg.get_payload(), 'Here is the body of the message.\n') def test_dsn(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue # msg 16 is a Delivery Status Notification, see RFC 1894 msg = self._msgobj('msg_16.txt') eq(msg.get_content_type(), 'multipart/report') @@ -1983,7 +1983,7 @@ def test_content_type(self): eq = self.assertEquals - unless = self.failUnless + unless = self.assertTrue # Get a message object and reset the seek pointer for other tests msg, text = self._msgobj('msg_05.txt') eq(msg.get_content_type(), 'multipart/report') @@ -2005,7 +2005,7 @@ eq(msg2.get_payload(), 'Yadda yadda yadda\n') msg3 = msg.get_payload(2) eq(msg3.get_content_type(), 'message/rfc822') - self.failUnless(isinstance(msg3, Message)) + self.assertTrue(isinstance(msg3, Message)) payload = msg3.get_payload() unless(isinstance(payload, list)) eq(len(payload), 1) @@ -2015,7 +2015,7 @@ def test_parser(self): eq = self.assertEquals - unless = self.failUnless + unless = self.assertTrue msg, text = self._msgobj('msg_06.txt') # Check some of the outer headers eq(msg.get_content_type(), 'message/rfc822') @@ -2025,9 +2025,9 @@ unless(isinstance(payload, list)) eq(len(payload), 1) msg1 = payload[0] - self.failUnless(isinstance(msg1, Message)) + self.assertTrue(isinstance(msg1, Message)) eq(msg1.get_content_type(), 'text/plain') - self.failUnless(isinstance(msg1.get_payload(), str)) + self.assertTrue(isinstance(msg1.get_payload(), str)) eq(msg1.get_payload(), '\n') @@ -2064,7 +2064,7 @@ fp.close() def test_message_from_string_with_class(self): - unless = self.failUnless + unless = self.assertTrue fp = openfile('msg_01.txt') try: text = fp.read() @@ -2087,7 +2087,7 @@ unless(isinstance(subpart, MyMessage)) def test_message_from_file_with_class(self): - unless = self.failUnless + unless = self.assertTrue # Create a subclass class MyMessage(Message): pass @@ -2229,7 +2229,7 @@ def test_charset_richcomparisons(self): eq = self.assertEqual - ne = self.failIfEqual + ne = self.assertNotEqual cset1 = Charset() cset2 = Charset() eq(cset1, 'us-ascii') @@ -2428,8 +2428,8 @@ eq(msg['from'], 'ppp-request at zzz.org') eq(msg['to'], 'ppp at zzz.org') eq(msg.get_content_type(), 'multipart/mixed') - self.failIf(msg.is_multipart()) - self.failUnless(isinstance(msg.get_payload(), str)) + self.assertFalse(msg.is_multipart()) + self.assertTrue(isinstance(msg.get_payload(), str)) def test_whitespace_continuation(self): eq = self.assertEqual @@ -2648,15 +2648,15 @@ def test_header_quopri_check(self): for c in self.hlit: - self.failIf(quopriMIME.header_quopri_check(c)) + self.assertFalse(quopriMIME.header_quopri_check(c)) for c in self.hnon: - self.failUnless(quopriMIME.header_quopri_check(c)) + self.assertTrue(quopriMIME.header_quopri_check(c)) def test_body_quopri_check(self): for c in self.blit: - self.failIf(quopriMIME.body_quopri_check(c)) + self.assertFalse(quopriMIME.body_quopri_check(c)) for c in self.bnon: - self.failUnless(quopriMIME.body_quopri_check(c)) + self.assertTrue(quopriMIME.body_quopri_check(c)) def test_header_quopri_len(self): eq = self.assertEqual @@ -2825,7 +2825,7 @@ h = Header("I am the very model of a modern Major-General; I've information vegetable, animal, and mineral; I know the kings of England, and I quote the fights historical from Marathon to Waterloo, in order categorical; I'm very well acquainted, too, with matters mathematical; I understand equations, both the simple and quadratical; about binomial theorem I'm teeming with a lot o' news, with many cheerful facts about the square of the hypotenuse.", maxlinelen=76) for l in h.encode(splitchars=' ').split('\n '): - self.failUnless(len(l) <= 76) + self.assertTrue(len(l) <= 76) def test_multilingual(self): eq = self.ndiffAssertEqual @@ -3055,7 +3055,7 @@ ''' msg = email.message_from_string(m) param = msg.get_param('NAME') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual( param, 'file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm') @@ -3208,7 +3208,7 @@ """ msg = email.message_from_string(m) param = msg.get_param('name') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual(param, "Frank's Document") def test_rfc2231_tick_attack_extended(self): @@ -3232,7 +3232,7 @@ """ msg = email.message_from_string(m) param = msg.get_param('name') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual(param, "us-ascii'en-us'Frank's Document") def test_rfc2231_no_extended_values(self): Modified: python/trunk/Lib/email/test/test_email_renamed.py ============================================================================== --- python/trunk/Lib/email/test/test_email_renamed.py (original) +++ python/trunk/Lib/email/test/test_email_renamed.py Wed Jul 1 00:57:08 2009 @@ -51,7 +51,7 @@ # Base test class class TestEmailBase(unittest.TestCase): def ndiffAssertEqual(self, first, second): - """Like failUnlessEqual except use ndiff for readable output.""" + """Like assertEqual except use ndiff for readable output.""" if first <> second: sfirst = str(first) ssecond = str(second) @@ -227,12 +227,12 @@ msg['From'] = 'Me' msg['to'] = 'You' # Check for case insensitivity - self.failUnless('from' in msg) - self.failUnless('From' in msg) - self.failUnless('FROM' in msg) - self.failUnless('to' in msg) - self.failUnless('To' in msg) - self.failUnless('TO' in msg) + self.assertTrue('from' in msg) + self.assertTrue('From' in msg) + self.assertTrue('FROM' in msg) + self.assertTrue('to' in msg) + self.assertTrue('To' in msg) + self.assertTrue('TO' in msg) def test_as_string(self): eq = self.assertEqual @@ -254,7 +254,7 @@ self.ndiffAssertEqual(text, msg.as_string()) fullrepr = str(msg) lines = fullrepr.split('\n') - self.failUnless(lines[0].startswith('From ')) + self.assertTrue(lines[0].startswith('From ')) eq(text, NL.join(lines[1:])) def test_bad_param(self): @@ -325,10 +325,10 @@ def test_has_key(self): msg = email.message_from_string('Header: exists') - self.failUnless(msg.has_key('header')) - self.failUnless(msg.has_key('Header')) - self.failUnless(msg.has_key('HEADER')) - self.failIf(msg.has_key('headeri')) + self.assertTrue(msg.has_key('header')) + self.assertTrue(msg.has_key('Header')) + self.assertTrue(msg.has_key('HEADER')) + self.assertFalse(msg.has_key('headeri')) def test_set_param(self): eq = self.assertEqual @@ -912,7 +912,7 @@ def test_add_header(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue self._au.add_header('Content-Disposition', 'attachment', filename='audiotest.au') eq(self._au['content-disposition'], @@ -955,7 +955,7 @@ def test_add_header(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue self._im.add_header('Content-Disposition', 'attachment', filename='dingusfish.gif') eq(self._im['content-disposition'], @@ -999,7 +999,7 @@ def test_types(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue eq(self._msg.get_content_type(), 'text/plain') eq(self._msg.get_param('charset'), 'us-ascii') missing = [] @@ -1009,7 +1009,7 @@ def test_payload(self): self.assertEqual(self._msg.get_payload(), 'hello there') - self.failUnless(not self._msg.is_multipart()) + self.assertTrue(not self._msg.is_multipart()) def test_charset(self): eq = self.assertEqual @@ -1064,7 +1064,7 @@ def test_hierarchy(self): # convenience eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue raises = self.assertRaises # tests m = self._msg @@ -1378,7 +1378,7 @@ -- XXXX-- ''') - self.failUnless(msg.is_multipart()) + self.assertTrue(msg.is_multipart()) eq(msg.get_boundary(), ' XXXX') eq(len(msg.get_payload()), 2) @@ -1408,7 +1408,7 @@ eq(msg.get_content_subtype(), 'plain') def test_same_boundary_inner_outer(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_15.txt') # XXX We can probably eventually do better inner = msg.get_payload(0) @@ -1418,7 +1418,7 @@ errors.StartBoundaryNotFoundDefect)) def test_multipart_no_boundary(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_25.txt') unless(isinstance(msg.get_payload(), str)) self.assertEqual(len(msg.defects), 2) @@ -1476,7 +1476,7 @@ """) def test_lying_multipart(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_41.txt') unless(hasattr(msg, 'defects')) self.assertEqual(len(msg.defects), 2) @@ -1496,7 +1496,7 @@ # [*] This message is missing its start boundary bad = outer.get_payload(1).get_payload(0) self.assertEqual(len(bad.defects), 1) - self.failUnless(isinstance(bad.defects[0], + self.assertTrue(isinstance(bad.defects[0], errors.StartBoundaryNotFoundDefect)) def test_first_line_is_continuation_header(self): @@ -1506,7 +1506,7 @@ eq(msg.keys(), []) eq(msg.get_payload(), 'Line 2\nLine 3') eq(len(msg.defects), 1) - self.failUnless(isinstance(msg.defects[0], + self.assertTrue(isinstance(msg.defects[0], errors.FirstHeaderLineIsContinuationDefect)) eq(msg.defects[0].line, ' Line 1\n') @@ -1573,7 +1573,7 @@ def test_valid_argument(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue subject = 'A sub-message' m = Message() m['Subject'] = subject @@ -1617,20 +1617,20 @@ def test_parse_message_rfc822(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_11.txt') eq(msg.get_content_type(), 'message/rfc822') payload = msg.get_payload() unless(isinstance(payload, list)) eq(len(payload), 1) submsg = payload[0] - self.failUnless(isinstance(submsg, Message)) + self.assertTrue(isinstance(submsg, Message)) eq(submsg['subject'], 'An enclosed message') eq(submsg.get_payload(), 'Here is the body of the message.\n') def test_dsn(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue # msg 16 is a Delivery Status Notification, see RFC 1894 msg = self._msgobj('msg_16.txt') eq(msg.get_content_type(), 'multipart/report') @@ -1977,7 +1977,7 @@ def test_content_type(self): eq = self.assertEquals - unless = self.failUnless + unless = self.assertTrue # Get a message object and reset the seek pointer for other tests msg, text = self._msgobj('msg_05.txt') eq(msg.get_content_type(), 'multipart/report') @@ -1999,7 +1999,7 @@ eq(msg2.get_payload(), 'Yadda yadda yadda\n') msg3 = msg.get_payload(2) eq(msg3.get_content_type(), 'message/rfc822') - self.failUnless(isinstance(msg3, Message)) + self.assertTrue(isinstance(msg3, Message)) payload = msg3.get_payload() unless(isinstance(payload, list)) eq(len(payload), 1) @@ -2009,7 +2009,7 @@ def test_parser(self): eq = self.assertEquals - unless = self.failUnless + unless = self.assertTrue msg, text = self._msgobj('msg_06.txt') # Check some of the outer headers eq(msg.get_content_type(), 'message/rfc822') @@ -2019,9 +2019,9 @@ unless(isinstance(payload, list)) eq(len(payload), 1) msg1 = payload[0] - self.failUnless(isinstance(msg1, Message)) + self.assertTrue(isinstance(msg1, Message)) eq(msg1.get_content_type(), 'text/plain') - self.failUnless(isinstance(msg1.get_payload(), str)) + self.assertTrue(isinstance(msg1.get_payload(), str)) eq(msg1.get_payload(), '\n') @@ -2058,7 +2058,7 @@ fp.close() def test_message_from_string_with_class(self): - unless = self.failUnless + unless = self.assertTrue fp = openfile('msg_01.txt') try: text = fp.read() @@ -2081,7 +2081,7 @@ unless(isinstance(subpart, MyMessage)) def test_message_from_file_with_class(self): - unless = self.failUnless + unless = self.assertTrue # Create a subclass class MyMessage(Message): pass @@ -2224,7 +2224,7 @@ def test_charset_richcomparisons(self): eq = self.assertEqual - ne = self.failIfEqual + ne = self.assertNotEqual cset1 = Charset() cset2 = Charset() eq(cset1, 'us-ascii') @@ -2423,8 +2423,8 @@ eq(msg['from'], 'ppp-request at zzz.org') eq(msg['to'], 'ppp at zzz.org') eq(msg.get_content_type(), 'multipart/mixed') - self.failIf(msg.is_multipart()) - self.failUnless(isinstance(msg.get_payload(), str)) + self.assertFalse(msg.is_multipart()) + self.assertTrue(isinstance(msg.get_payload(), str)) def test_whitespace_continuation(self): eq = self.assertEqual @@ -2643,15 +2643,15 @@ def test_header_quopri_check(self): for c in self.hlit: - self.failIf(quoprimime.header_quopri_check(c)) + self.assertFalse(quoprimime.header_quopri_check(c)) for c in self.hnon: - self.failUnless(quoprimime.header_quopri_check(c)) + self.assertTrue(quoprimime.header_quopri_check(c)) def test_body_quopri_check(self): for c in self.blit: - self.failIf(quoprimime.body_quopri_check(c)) + self.assertFalse(quoprimime.body_quopri_check(c)) for c in self.bnon: - self.failUnless(quoprimime.body_quopri_check(c)) + self.assertTrue(quoprimime.body_quopri_check(c)) def test_header_quopri_len(self): eq = self.assertEqual @@ -2820,7 +2820,7 @@ h = Header("I am the very model of a modern Major-General; I've information vegetable, animal, and mineral; I know the kings of England, and I quote the fights historical from Marathon to Waterloo, in order categorical; I'm very well acquainted, too, with matters mathematical; I understand equations, both the simple and quadratical; about binomial theorem I'm teeming with a lot o' news, with many cheerful facts about the square of the hypotenuse.", maxlinelen=76) for l in h.encode(splitchars=' ').split('\n '): - self.failUnless(len(l) <= 76) + self.assertTrue(len(l) <= 76) def test_multilingual(self): eq = self.ndiffAssertEqual @@ -3050,7 +3050,7 @@ ''' msg = email.message_from_string(m) param = msg.get_param('NAME') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual( param, 'file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm') @@ -3203,7 +3203,7 @@ """ msg = email.message_from_string(m) param = msg.get_param('name') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual(param, "Frank's Document") def test_rfc2231_tick_attack_extended(self): @@ -3227,7 +3227,7 @@ """ msg = email.message_from_string(m) param = msg.get_param('name') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual(param, "us-ascii'en-us'Frank's Document") def test_rfc2231_no_extended_values(self): Modified: python/trunk/Lib/json/tests/test_decode.py ============================================================================== --- python/trunk/Lib/json/tests/test_decode.py (original) +++ python/trunk/Lib/json/tests/test_decode.py Wed Jul 1 00:57:08 2009 @@ -8,12 +8,12 @@ class TestDecode(TestCase): def test_decimal(self): rval = json.loads('1.1', parse_float=decimal.Decimal) - self.assert_(isinstance(rval, decimal.Decimal)) + self.assertTrue(isinstance(rval, decimal.Decimal)) self.assertEquals(rval, decimal.Decimal('1.1')) def test_float(self): rval = json.loads('1', parse_int=float) - self.assert_(isinstance(rval, float)) + self.assertTrue(isinstance(rval, float)) self.assertEquals(rval, 1.0) def test_decoder_optimizations(self): Modified: python/trunk/Lib/json/tests/test_speedups.py ============================================================================== --- python/trunk/Lib/json/tests/test_speedups.py (original) +++ python/trunk/Lib/json/tests/test_speedups.py Wed Jul 1 00:57:08 2009 @@ -7,9 +7,9 @@ class TestSpeedups(TestCase): def test_scanstring(self): self.assertEquals(decoder.scanstring.__module__, "_json") - self.assert_(decoder.scanstring is decoder.c_scanstring) + self.assertTrue(decoder.scanstring is decoder.c_scanstring) def test_encode_basestring_ascii(self): self.assertEquals(encoder.encode_basestring_ascii.__module__, "_json") - self.assert_(encoder.encode_basestring_ascii is + self.assertTrue(encoder.encode_basestring_ascii is encoder.c_encode_basestring_ascii) Modified: python/trunk/Lib/lib-tk/test/test_tkinter/test_text.py ============================================================================== --- python/trunk/Lib/lib-tk/test/test_tkinter/test_text.py (original) +++ python/trunk/Lib/lib-tk/test/test_tkinter/test_text.py Wed Jul 1 00:57:08 2009 @@ -19,18 +19,18 @@ text = self.text # pattern and index are obligatory arguments. - self.failUnlessRaises(Tkinter.TclError, text.search, None, '1.0') - self.failUnlessRaises(Tkinter.TclError, text.search, 'a', None) - self.failUnlessRaises(Tkinter.TclError, text.search, None, None) + self.assertRaises(Tkinter.TclError, text.search, None, '1.0') + self.assertRaises(Tkinter.TclError, text.search, 'a', None) + self.assertRaises(Tkinter.TclError, text.search, None, None) # Invalid text index. - self.failUnlessRaises(Tkinter.TclError, text.search, '', 0) + self.assertRaises(Tkinter.TclError, text.search, '', 0) # Check if we are getting the indices as strings -- you are likely # to get Tcl_Obj under Tk 8.5 if Tkinter doesn't convert it. text.insert('1.0', 'hi-test') - self.failUnlessEqual(text.search('-test', '1.0', 'end'), '1.2') - self.failUnlessEqual(text.search('test', '1.0', 'end'), '1.3') + self.assertEqual(text.search('-test', '1.0', 'end'), '1.2') + self.assertEqual(text.search('test', '1.0', 'end'), '1.3') tests_gui = (TextTest, ) Modified: python/trunk/Lib/lib-tk/test/test_ttk/test_extensions.py ============================================================================== --- python/trunk/Lib/lib-tk/test/test_ttk/test_extensions.py (original) +++ python/trunk/Lib/lib-tk/test/test_ttk/test_extensions.py Wed Jul 1 00:57:08 2009 @@ -22,16 +22,16 @@ x = ttk.LabeledScale() var = x._variable._name x.destroy() - self.failUnlessRaises(Tkinter.TclError, x.tk.globalgetvar, var) + self.assertRaises(Tkinter.TclError, x.tk.globalgetvar, var) # manually created variable myvar = Tkinter.DoubleVar() name = myvar._name x = ttk.LabeledScale(variable=myvar) x.destroy() - self.failUnlessEqual(x.tk.globalgetvar(name), myvar.get()) + self.assertEqual(x.tk.globalgetvar(name), myvar.get()) del myvar - self.failUnlessRaises(Tkinter.TclError, x.tk.globalgetvar, name) + self.assertRaises(Tkinter.TclError, x.tk.globalgetvar, name) # checking that the tracing callback is properly removed myvar = Tkinter.IntVar() @@ -45,17 +45,17 @@ # it tries calling instance attributes not yet defined. ttk.LabeledScale(variable=myvar) if hasattr(sys, 'last_type'): - self.failIf(sys.last_type == Tkinter.TclError) + self.assertFalse(sys.last_type == Tkinter.TclError) def test_initialization(self): # master passing x = ttk.LabeledScale() - self.failUnlessEqual(x.master, Tkinter._default_root) + self.assertEqual(x.master, Tkinter._default_root) x.destroy() master = Tkinter.Frame() x = ttk.LabeledScale(master) - self.failUnlessEqual(x.master, master) + self.assertEqual(x.master, master) x.destroy() # variable initialization/passing @@ -63,29 +63,29 @@ (-1, -1), (sys.maxint + 1, sys.maxint + 1)) for pair in passed_expected: x = ttk.LabeledScale(from_=pair[0]) - self.failUnlessEqual(x.value, pair[1]) + self.assertEqual(x.value, pair[1]) x.destroy() x = ttk.LabeledScale(from_='2.5') - self.failUnlessRaises(ValueError, x._variable.get) + self.assertRaises(ValueError, x._variable.get) x.destroy() x = ttk.LabeledScale(from_=None) - self.failUnlessRaises(ValueError, x._variable.get) + self.assertRaises(ValueError, x._variable.get) x.destroy() # variable should have its default value set to the from_ value myvar = Tkinter.DoubleVar(value=20) x = ttk.LabeledScale(variable=myvar) - self.failUnlessEqual(x.value, 0) + self.assertEqual(x.value, 0) x.destroy() # check that it is really using a DoubleVar x = ttk.LabeledScale(variable=myvar, from_=0.5) - self.failUnlessEqual(x.value, 0.5) - self.failUnlessEqual(x._variable._name, myvar._name) + self.assertEqual(x.value, 0.5) + self.assertEqual(x._variable._name, myvar._name) x.destroy() # widget positionment def check_positions(scale, scale_pos, label, label_pos): - self.failUnlessEqual(scale.pack_info()['side'], scale_pos) - self.failUnlessEqual(label.place_info()['anchor'], label_pos) + self.assertEqual(scale.pack_info()['side'], scale_pos) + self.assertEqual(label.place_info()['anchor'], label_pos) x = ttk.LabeledScale(compound='top') check_positions(x.scale, 'bottom', x.label, 'n') x.destroy() @@ -100,7 +100,7 @@ x.destroy() # extra, and invalid, kwargs - self.failUnlessRaises(Tkinter.TclError, ttk.LabeledScale, a='b') + self.assertRaises(Tkinter.TclError, ttk.LabeledScale, a='b') def test_horizontal_range(self): @@ -111,7 +111,7 @@ linfo_1 = lscale.label.place_info() prev_xcoord = lscale.scale.coords()[0] - self.failUnlessEqual(prev_xcoord, int(linfo_1['x'])) + self.assertEqual(prev_xcoord, int(linfo_1['x'])) # change range to: from -5 to 5. This should change the x coord of # the scale widget, since 0 is at the middle of the new # range. @@ -120,15 +120,15 @@ # at the same time this shouldn't affect test outcome lscale.update() curr_xcoord = lscale.scale.coords()[0] - self.failUnless(prev_xcoord != curr_xcoord) + self.assertTrue(prev_xcoord != curr_xcoord) # the label widget should have been repositioned too linfo_2 = lscale.label.place_info() - self.failUnlessEqual(lscale.label['text'], 0) - self.failUnlessEqual(curr_xcoord, int(linfo_2['x'])) + self.assertEqual(lscale.label['text'], 0) + self.assertEqual(curr_xcoord, int(linfo_2['x'])) # change the range back lscale.scale.configure(from_=0, to=10) - self.failUnless(prev_xcoord != curr_xcoord) - self.failUnlessEqual(prev_xcoord, int(linfo_1['x'])) + self.assertTrue(prev_xcoord != curr_xcoord) + self.assertEqual(prev_xcoord, int(linfo_1['x'])) lscale.destroy() @@ -145,16 +145,16 @@ # The following update is needed since the test doesn't use mainloop, # at the same time this shouldn't affect test outcome x.update() - self.failUnlessEqual(x.label['text'], newval) - self.failUnless(x.scale.coords()[0] > curr_xcoord) - self.failUnlessEqual(x.scale.coords()[0], + self.assertEqual(x.label['text'], newval) + self.assertTrue(x.scale.coords()[0] > curr_xcoord) + self.assertEqual(x.scale.coords()[0], int(x.label.place_info()['x'])) # value outside range x.value = x.scale['to'] + 1 # no changes shouldn't happen x.update() - self.failUnlessEqual(x.label['text'], newval) - self.failUnlessEqual(x.scale.coords()[0], + self.assertEqual(x.label['text'], newval) + self.assertEqual(x.scale.coords()[0], int(x.label.place_info()['x'])) x.destroy() @@ -172,7 +172,7 @@ x.value = 3 x.update() x.master.wm_geometry("%dx%d" % (width_new, height_new)) - self.failUnlessEqual(int(x.label.place_info()['x']), + self.assertEqual(int(x.label.place_info()['x']), x.scale.coords()[0]) # Reset geometry @@ -197,20 +197,20 @@ name = var._name optmenu.update_idletasks() optmenu.destroy() - self.failUnlessEqual(optmenu.tk.globalgetvar(name), var.get()) + self.assertEqual(optmenu.tk.globalgetvar(name), var.get()) del var - self.failUnlessRaises(Tkinter.TclError, optmenu.tk.globalgetvar, name) + self.assertRaises(Tkinter.TclError, optmenu.tk.globalgetvar, name) def test_initialization(self): - self.failUnlessRaises(Tkinter.TclError, + self.assertRaises(Tkinter.TclError, ttk.OptionMenu, None, self.textvar, invalid='thing') optmenu = ttk.OptionMenu(None, self.textvar, 'b', 'a', 'b') - self.failUnlessEqual(optmenu._variable.get(), 'b') + self.assertEqual(optmenu._variable.get(), 'b') - self.failUnless(optmenu['menu']) - self.failUnless(optmenu['textvariable']) + self.assertTrue(optmenu['menu']) + self.assertTrue(optmenu['textvariable']) optmenu.destroy() @@ -222,10 +222,10 @@ found_default = False for i in range(len(items)): value = optmenu['menu'].entrycget(i, 'value') - self.failUnlessEqual(value, items[i]) + self.assertEqual(value, items[i]) if value == default: found_default = True - self.failUnless(found_default) + self.assertTrue(found_default) optmenu.destroy() # default shouldn't be in menu if it is not part of values @@ -238,26 +238,26 @@ if last == curr: # no more menu entries break - self.failIf(curr == default) + self.assertFalse(curr == default) i += 1 - self.failUnlessEqual(i, len(items)) + self.assertEqual(i, len(items)) # check that variable is updated correctly optmenu.pack() optmenu.wait_visibility() optmenu['menu'].invoke(0) - self.failUnlessEqual(optmenu._variable.get(), items[0]) + self.assertEqual(optmenu._variable.get(), items[0]) # changing to an invalid index shouldn't change the variable - self.failUnlessRaises(Tkinter.TclError, optmenu['menu'].invoke, -1) - self.failUnlessEqual(optmenu._variable.get(), items[0]) + self.assertRaises(Tkinter.TclError, optmenu['menu'].invoke, -1) + self.assertEqual(optmenu._variable.get(), items[0]) optmenu.destroy() # specifying a callback success = [] def cb_test(item): - self.failUnlessEqual(item, items[1]) + self.assertEqual(item, items[1]) success.append(True) optmenu = ttk.OptionMenu(None, self.textvar, 'a', command=cb_test, *items) Modified: python/trunk/Lib/lib-tk/test/test_ttk/test_functions.py ============================================================================== --- python/trunk/Lib/lib-tk/test/test_ttk/test_functions.py (original) +++ python/trunk/Lib/lib-tk/test/test_ttk/test_functions.py Wed Jul 1 00:57:08 2009 @@ -28,12 +28,12 @@ def test_format_optdict(self): def check_against(fmt_opts, result): for i in range(0, len(fmt_opts), 2): - self.failUnlessEqual(result.pop(fmt_opts[i]), fmt_opts[i + 1]) + self.assertEqual(result.pop(fmt_opts[i]), fmt_opts[i + 1]) if result: self.fail("result still got elements: %s" % result) # passing an empty dict should return an empty object (tuple here) - self.failIf(ttk._format_optdict({})) + self.assertFalse(ttk._format_optdict({})) # check list formatting check_against( @@ -63,7 +63,7 @@ # check if giving unicode keys is fine check_against(ttk._format_optdict(opts), {u'-??????': True, u'-??': False}) # opts should remain unchanged - self.failUnlessEqual(opts, orig_opts) + self.assertEqual(opts, orig_opts) # passing values with spaces inside a tuple/list check_against( @@ -73,113 +73,113 @@ # ignore an option amount_opts = len(ttk._format_optdict(opts, ignore=(u'??'))) / 2 - self.failUnlessEqual(amount_opts, len(opts) - 1) + self.assertEqual(amount_opts, len(opts) - 1) # ignore non-existing options amount_opts = len(ttk._format_optdict(opts, ignore=(u'??', 'b'))) / 2 - self.failUnlessEqual(amount_opts, len(opts) - 1) + self.assertEqual(amount_opts, len(opts) - 1) # ignore every option - self.failIf(ttk._format_optdict(opts, ignore=opts.keys())) + self.assertFalse(ttk._format_optdict(opts, ignore=opts.keys())) def test_format_mapdict(self): opts = {'a': [('b', 'c', 'val'), ('d', 'otherval'), ('', 'single')]} result = ttk._format_mapdict(opts) - self.failUnlessEqual(len(result), len(opts.keys()) * 2) - self.failUnlessEqual(result, ('-a', '{b c} val d otherval {} single')) - self.failUnlessEqual(ttk._format_mapdict(opts, script=True), + self.assertEqual(len(result), len(opts.keys()) * 2) + self.assertEqual(result, ('-a', '{b c} val d otherval {} single')) + self.assertEqual(ttk._format_mapdict(opts, script=True), ('-a', '{{b c} val d otherval {} single}')) - self.failUnlessEqual(ttk._format_mapdict({2: []}), ('-2', '')) + self.assertEqual(ttk._format_mapdict({2: []}), ('-2', '')) opts = {u'??????????d??': [(u'??', u'v??l')]} result = ttk._format_mapdict(opts) - self.failUnlessEqual(result, (u'-??????????d??', u'?? v??l')) + self.assertEqual(result, (u'-??????????d??', u'?? v??l')) # empty states valid = {'opt': [('', u'', 'hi')]} - self.failUnlessEqual(ttk._format_mapdict(valid), ('-opt', '{ } hi')) + self.assertEqual(ttk._format_mapdict(valid), ('-opt', '{ } hi')) # when passing multiple states, they all must be strings invalid = {'opt': [(1, 2, 'valid val')]} - self.failUnlessRaises(TypeError, ttk._format_mapdict, invalid) + self.assertRaises(TypeError, ttk._format_mapdict, invalid) invalid = {'opt': [([1], '2', 'valid val')]} - self.failUnlessRaises(TypeError, ttk._format_mapdict, invalid) + self.assertRaises(TypeError, ttk._format_mapdict, invalid) # but when passing a single state, it can be anything valid = {'opt': [[1, 'value']]} - self.failUnlessEqual(ttk._format_mapdict(valid), ('-opt', '1 value')) + self.assertEqual(ttk._format_mapdict(valid), ('-opt', '1 value')) # special attention to single states which evalute to False for stateval in (None, 0, False, '', set()): # just some samples valid = {'opt': [(stateval, 'value')]} - self.failUnlessEqual(ttk._format_mapdict(valid), + self.assertEqual(ttk._format_mapdict(valid), ('-opt', '{} value')) # values must be iterable opts = {'a': None} - self.failUnlessRaises(TypeError, ttk._format_mapdict, opts) + self.assertRaises(TypeError, ttk._format_mapdict, opts) # items in the value must have size >= 2 - self.failUnlessRaises(IndexError, ttk._format_mapdict, + self.assertRaises(IndexError, ttk._format_mapdict, {'a': [('invalid', )]}) def test_format_elemcreate(self): - self.failUnless(ttk._format_elemcreate(None), (None, ())) + self.assertTrue(ttk._format_elemcreate(None), (None, ())) ## Testing type = image # image type expects at least an image name, so this should raise # IndexError since it tries to access the index 0 of an empty tuple - self.failUnlessRaises(IndexError, ttk._format_elemcreate, 'image') + self.assertRaises(IndexError, ttk._format_elemcreate, 'image') # don't format returned values as a tcl script # minimum acceptable for image type - self.failUnlessEqual(ttk._format_elemcreate('image', False, 'test'), + self.assertEqual(ttk._format_elemcreate('image', False, 'test'), ("test ", ())) # specifiyng a state spec - self.failUnlessEqual(ttk._format_elemcreate('image', False, 'test', + self.assertEqual(ttk._format_elemcreate('image', False, 'test', ('', 'a')), ("test {} a", ())) # state spec with multiple states - self.failUnlessEqual(ttk._format_elemcreate('image', False, 'test', + self.assertEqual(ttk._format_elemcreate('image', False, 'test', ('a', 'b', 'c')), ("test {a b} c", ())) # state spec and options - self.failUnlessEqual(ttk._format_elemcreate('image', False, 'test', + self.assertEqual(ttk._format_elemcreate('image', False, 'test', ('a', 'b'), a='x', b='y'), ("test a b", ("-a", "x", "-b", "y"))) # format returned values as a tcl script # state spec with multiple states and an option with a multivalue - self.failUnlessEqual(ttk._format_elemcreate('image', True, 'test', + self.assertEqual(ttk._format_elemcreate('image', True, 'test', ('a', 'b', 'c', 'd'), x=[2, 3]), ("{test {a b c} d}", "-x {2 3}")) ## Testing type = vsapi # vsapi type expects at least a class name and a part_id, so this # should raise an ValueError since it tries to get two elements from # an empty tuple - self.failUnlessRaises(ValueError, ttk._format_elemcreate, 'vsapi') + self.assertRaises(ValueError, ttk._format_elemcreate, 'vsapi') # don't format returned values as a tcl script # minimum acceptable for vsapi - self.failUnlessEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b'), + self.assertEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b'), ("a b ", ())) # now with a state spec with multiple states - self.failUnlessEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b', + self.assertEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b', ('a', 'b', 'c')), ("a b {a b} c", ())) # state spec and option - self.failUnlessEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b', + self.assertEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b', ('a', 'b'), opt='x'), ("a b a b", ("-opt", "x"))) # format returned values as a tcl script # state spec with a multivalue and an option - self.failUnlessEqual(ttk._format_elemcreate('vsapi', True, 'a', 'b', + self.assertEqual(ttk._format_elemcreate('vsapi', True, 'a', 'b', ('a', 'b', [1, 2]), opt='x'), ("{a b {a b} {1 2}}", "-opt x")) # Testing type = from # from type expects at least a type name - self.failUnlessRaises(IndexError, ttk._format_elemcreate, 'from') + self.assertRaises(IndexError, ttk._format_elemcreate, 'from') - self.failUnlessEqual(ttk._format_elemcreate('from', False, 'a'), + self.assertEqual(ttk._format_elemcreate('from', False, 'a'), ('a', ())) - self.failUnlessEqual(ttk._format_elemcreate('from', False, 'a', 'b'), + self.assertEqual(ttk._format_elemcreate('from', False, 'a', 'b'), ('a', ('b', ))) - self.failUnlessEqual(ttk._format_elemcreate('from', True, 'a', 'b'), + self.assertEqual(ttk._format_elemcreate('from', True, 'a', 'b'), ('{a}', 'b')) @@ -208,75 +208,75 @@ spaces(2 * indent_size), spaces(indent_size), spaces())) # empty layout - self.failUnlessEqual(ttk._format_layoutlist([])[0], '') + self.assertEqual(ttk._format_layoutlist([])[0], '') # smallest (after an empty one) acceptable layout smallest = ttk._format_layoutlist([('a', None)], indent=0) - self.failUnlessEqual(smallest, + self.assertEqual(smallest, ttk._format_layoutlist([('a', '')], indent=0)) - self.failUnlessEqual(smallest[0], 'a') + self.assertEqual(smallest[0], 'a') # testing indentation levels - self.failUnlessEqual(sample(), sample_expected()) + self.assertEqual(sample(), sample_expected()) for i in range(4): - self.failUnlessEqual(sample(i), sample_expected(i)) - self.failUnlessEqual(sample(i, i), sample_expected(i, i)) + self.assertEqual(sample(i), sample_expected(i)) + self.assertEqual(sample(i, i), sample_expected(i, i)) # invalid layout format, different kind of exceptions will be # raised # plain wrong format - self.failUnlessRaises(ValueError, ttk._format_layoutlist, + self.assertRaises(ValueError, ttk._format_layoutlist, ['bad', 'format']) - self.failUnlessRaises(TypeError, ttk._format_layoutlist, None) + self.assertRaises(TypeError, ttk._format_layoutlist, None) # _format_layoutlist always expects the second item (in every item) # to act like a dict (except when the value evalutes to False). - self.failUnlessRaises(AttributeError, + self.assertRaises(AttributeError, ttk._format_layoutlist, [('a', 'b')]) # bad children formatting - self.failUnlessRaises(ValueError, ttk._format_layoutlist, + self.assertRaises(ValueError, ttk._format_layoutlist, [('name', {'children': {'a': None}})]) def test_script_from_settings(self): # empty options - self.failIf(ttk._script_from_settings({'name': + self.assertFalse(ttk._script_from_settings({'name': {'configure': None, 'map': None, 'element create': None}})) # empty layout - self.failUnlessEqual( + self.assertEqual( ttk._script_from_settings({'name': {'layout': None}}), "ttk::style layout name {\nnull\n}") configdict = {u'??????': True, u'??': False} - self.failUnless( + self.assertTrue( ttk._script_from_settings({'name': {'configure': configdict}})) mapdict = {u'??????????d??': [(u'??', u'v??l')]} - self.failUnless( + self.assertTrue( ttk._script_from_settings({'name': {'map': mapdict}})) # invalid image element - self.failUnlessRaises(IndexError, + self.assertRaises(IndexError, ttk._script_from_settings, {'name': {'element create': ['image']}}) # minimal valid image - self.failUnless(ttk._script_from_settings({'name': + self.assertTrue(ttk._script_from_settings({'name': {'element create': ['image', 'name']}})) image = {'thing': {'element create': ['image', 'name', ('state1', 'state2', 'val')]}} - self.failUnlessEqual(ttk._script_from_settings(image), + self.assertEqual(ttk._script_from_settings(image), "ttk::style element create thing image {name {state1 state2} val} ") image['thing']['element create'].append({'opt': 30}) - self.failUnlessEqual(ttk._script_from_settings(image), + self.assertEqual(ttk._script_from_settings(image), "ttk::style element create thing image {name {state1 state2} val} " "-opt 30") image['thing']['element create'][-1]['opt'] = [MockTclObj(3), MockTclObj('2m')] - self.failUnlessEqual(ttk._script_from_settings(image), + self.assertEqual(ttk._script_from_settings(image), "ttk::style element create thing image {name {state1 state2} val} " "-opt {3 2m}") @@ -284,28 +284,28 @@ def test_dict_from_tcltuple(self): fakettuple = ('-a', '{1 2 3}', '-something', 'foo') - self.failUnlessEqual(ttk._dict_from_tcltuple(fakettuple, False), + self.assertEqual(ttk._dict_from_tcltuple(fakettuple, False), {'-a': '{1 2 3}', '-something': 'foo'}) - self.failUnlessEqual(ttk._dict_from_tcltuple(fakettuple), + self.assertEqual(ttk._dict_from_tcltuple(fakettuple), {'a': '{1 2 3}', 'something': 'foo'}) # passing a tuple with a single item should return an empty dict, # since it tries to break the tuple by pairs. - self.failIf(ttk._dict_from_tcltuple(('single', ))) + self.assertFalse(ttk._dict_from_tcltuple(('single', ))) sspec = MockStateSpec('a', 'b') - self.failUnlessEqual(ttk._dict_from_tcltuple(('-a', (sspec, 'val'))), + self.assertEqual(ttk._dict_from_tcltuple(('-a', (sspec, 'val'))), {'a': [('a', 'b', 'val')]}) - self.failUnlessEqual(ttk._dict_from_tcltuple((MockTclObj('-padding'), + self.assertEqual(ttk._dict_from_tcltuple((MockTclObj('-padding'), [MockTclObj('1'), 2, MockTclObj('3m')])), {'padding': [1, 2, '3m']}) def test_list_from_statespec(self): def test_it(sspec, value, res_value, states): - self.failUnlessEqual(ttk._list_from_statespec( + self.assertEqual(ttk._list_from_statespec( (sspec, value)), [states + (res_value, )]) states_even = tuple('state%d' % i for i in range(6)) @@ -322,19 +322,19 @@ def test_list_from_layouttuple(self): # empty layout tuple - self.failIf(ttk._list_from_layouttuple(())) + self.assertFalse(ttk._list_from_layouttuple(())) # shortest layout tuple - self.failUnlessEqual(ttk._list_from_layouttuple(('name', )), + self.assertEqual(ttk._list_from_layouttuple(('name', )), [('name', {})]) # not so interesting ltuple sample_ltuple = ('name', '-option', 'value') - self.failUnlessEqual(ttk._list_from_layouttuple(sample_ltuple), + self.assertEqual(ttk._list_from_layouttuple(sample_ltuple), [('name', {'option': 'value'})]) # empty children - self.failUnlessEqual(ttk._list_from_layouttuple( + self.assertEqual(ttk._list_from_layouttuple( ('something', '-children', ())), [('something', {'children': []})] ) @@ -347,7 +347,7 @@ ) ) ) - self.failUnlessEqual(ttk._list_from_layouttuple(ltuple), + self.assertEqual(ttk._list_from_layouttuple(ltuple), [('name', {'option': 'niceone', 'children': [('otherone', {'otheropt': 'othervalue', 'children': [('child', {})] @@ -356,13 +356,13 @@ ) # bad tuples - self.failUnlessRaises(ValueError, ttk._list_from_layouttuple, + self.assertRaises(ValueError, ttk._list_from_layouttuple, ('name', 'no_minus')) - self.failUnlessRaises(ValueError, ttk._list_from_layouttuple, + self.assertRaises(ValueError, ttk._list_from_layouttuple, ('name', 'no_minus', 'value')) - self.failUnlessRaises(ValueError, ttk._list_from_layouttuple, + self.assertRaises(ValueError, ttk._list_from_layouttuple, ('something', '-children')) # no children - self.failUnlessRaises(ValueError, ttk._list_from_layouttuple, + self.assertRaises(ValueError, ttk._list_from_layouttuple, ('something', '-children', 'value')) # invalid children @@ -373,10 +373,10 @@ return (opt, val) options = {'test': None} - self.failUnlessEqual(ttk._val_or_dict(options, func), "test val") + self.assertEqual(ttk._val_or_dict(options, func), "test val") options = {'test': 3} - self.failUnlessEqual(ttk._val_or_dict(options, func), options) + self.assertEqual(ttk._val_or_dict(options, func), options) def test_convert_stringval(self): @@ -385,10 +385,10 @@ (None, 'None') ) for orig, expected in tests: - self.failUnlessEqual(ttk._convert_stringval(orig), expected) + self.assertEqual(ttk._convert_stringval(orig), expected) if sys.getdefaultencoding() == 'ascii': - self.failUnlessRaises(UnicodeDecodeError, + self.assertRaises(UnicodeDecodeError, ttk._convert_stringval, '??') @@ -396,27 +396,27 @@ def test_unicode(self): adict = {'opt': u'v??l????'} - self.failUnlessEqual(ttk.tclobjs_to_py(adict), {'opt': u'v??l????'}) + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': u'v??l????'}) adict['opt'] = MockTclObj(adict['opt']) - self.failUnlessEqual(ttk.tclobjs_to_py(adict), {'opt': u'v??l????'}) + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': u'v??l????'}) def test_multivalues(self): adict = {'opt': [1, 2, 3, 4]} - self.failUnlessEqual(ttk.tclobjs_to_py(adict), {'opt': [1, 2, 3, 4]}) + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': [1, 2, 3, 4]}) adict['opt'] = [1, 'xm', 3] - self.failUnlessEqual(ttk.tclobjs_to_py(adict), {'opt': [1, 'xm', 3]}) + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': [1, 'xm', 3]}) adict['opt'] = (MockStateSpec('a', 'b'), u'v??l????') - self.failUnlessEqual(ttk.tclobjs_to_py(adict), + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': [('a', 'b', u'v??l????')]}) - self.failUnlessEqual(ttk.tclobjs_to_py({'x': ['y z']}), + self.assertEqual(ttk.tclobjs_to_py({'x': ['y z']}), {'x': ['y z']}) def test_nosplit(self): - self.failUnlessEqual(ttk.tclobjs_to_py({'text': 'some text'}), + self.assertEqual(ttk.tclobjs_to_py({'text': 'some text'}), {'text': 'some text'}) tests_nogui = (InternalFunctionsTest, TclObjsToPyTest) Modified: python/trunk/Lib/lib-tk/test/test_ttk/test_style.py ============================================================================== --- python/trunk/Lib/lib-tk/test/test_ttk/test_style.py (original) +++ python/trunk/Lib/lib-tk/test/test_ttk/test_style.py Wed Jul 1 00:57:08 2009 @@ -16,17 +16,17 @@ def test_configure(self): style = self.style style.configure('TButton', background='yellow') - self.failUnlessEqual(style.configure('TButton', 'background'), + self.assertEqual(style.configure('TButton', 'background'), 'yellow') - self.failUnless(isinstance(style.configure('TButton'), dict)) + self.assertTrue(isinstance(style.configure('TButton'), dict)) def test_map(self): style = self.style style.map('TButton', background=[('active', 'background', 'blue')]) - self.failUnlessEqual(style.map('TButton', 'background'), + self.assertEqual(style.map('TButton', 'background'), [('active', 'background', 'blue')]) - self.failUnless(isinstance(style.map('TButton'), dict)) + self.assertTrue(isinstance(style.map('TButton'), dict)) def test_lookup(self): @@ -34,38 +34,38 @@ style.configure('TButton', background='yellow') style.map('TButton', background=[('active', 'background', 'blue')]) - self.failUnlessEqual(style.lookup('TButton', 'background'), 'yellow') - self.failUnlessEqual(style.lookup('TButton', 'background', + self.assertEqual(style.lookup('TButton', 'background'), 'yellow') + self.assertEqual(style.lookup('TButton', 'background', ['active', 'background']), 'blue') - self.failUnlessEqual(style.lookup('TButton', 'optionnotdefined', + self.assertEqual(style.lookup('TButton', 'optionnotdefined', default='iknewit'), 'iknewit') def test_layout(self): style = self.style - self.failUnlessRaises(Tkinter.TclError, style.layout, 'NotALayout') + self.assertRaises(Tkinter.TclError, style.layout, 'NotALayout') tv_style = style.layout('Treeview') # "erase" Treeview layout style.layout('Treeview', '') - self.failUnlessEqual(style.layout('Treeview'), + self.assertEqual(style.layout('Treeview'), [('null', {'sticky': 'nswe'})] ) # restore layout style.layout('Treeview', tv_style) - self.failUnlessEqual(style.layout('Treeview'), tv_style) + self.assertEqual(style.layout('Treeview'), tv_style) # should return a list - self.failUnless(isinstance(style.layout('TButton'), list)) + self.assertTrue(isinstance(style.layout('TButton'), list)) # correct layout, but "option" doesn't exist as option - self.failUnlessRaises(Tkinter.TclError, style.layout, 'Treeview', + self.assertRaises(Tkinter.TclError, style.layout, 'Treeview', [('name', {'option': 'inexistent'})]) def test_theme_use(self): - self.failUnlessRaises(Tkinter.TclError, self.style.theme_use, + self.assertRaises(Tkinter.TclError, self.style.theme_use, 'nonexistingname') curr_theme = self.style.theme_use() @@ -79,8 +79,8 @@ # just one theme available, can't go on with tests return - self.failIf(curr_theme == new_theme) - self.failIf(new_theme != self.style.theme_use()) + self.assertFalse(curr_theme == new_theme) + self.assertFalse(new_theme != self.style.theme_use()) self.style.theme_use(curr_theme) Modified: python/trunk/Lib/lib-tk/test/test_ttk/test_widgets.py ============================================================================== --- python/trunk/Lib/lib-tk/test/test_ttk/test_widgets.py (original) +++ python/trunk/Lib/lib-tk/test/test_ttk/test_widgets.py Wed Jul 1 00:57:08 2009 @@ -24,48 +24,48 @@ def test_identify(self): self.widget.update_idletasks() - self.failUnlessEqual(self.widget.identify(5, 5), "label") - self.failUnlessEqual(self.widget.identify(-1, -1), "") + self.assertEqual(self.widget.identify(5, 5), "label") + self.assertEqual(self.widget.identify(-1, -1), "") - self.failUnlessRaises(Tkinter.TclError, self.widget.identify, None, 5) - self.failUnlessRaises(Tkinter.TclError, self.widget.identify, 5, None) - self.failUnlessRaises(Tkinter.TclError, self.widget.identify, 5, '') + self.assertRaises(Tkinter.TclError, self.widget.identify, None, 5) + self.assertRaises(Tkinter.TclError, self.widget.identify, 5, None) + self.assertRaises(Tkinter.TclError, self.widget.identify, 5, '') def test_widget_state(self): # XXX not sure about the portability of all these tests - self.failUnlessEqual(self.widget.state(), ()) - self.failUnlessEqual(self.widget.instate(['!disabled']), True) + self.assertEqual(self.widget.state(), ()) + self.assertEqual(self.widget.instate(['!disabled']), True) # changing from !disabled to disabled - self.failUnlessEqual(self.widget.state(['disabled']), ('!disabled', )) + self.assertEqual(self.widget.state(['disabled']), ('!disabled', )) # no state change - self.failUnlessEqual(self.widget.state(['disabled']), ()) + self.assertEqual(self.widget.state(['disabled']), ()) # change back to !disable but also active - self.failUnlessEqual(self.widget.state(['!disabled', 'active']), + self.assertEqual(self.widget.state(['!disabled', 'active']), ('!active', 'disabled')) # no state changes, again - self.failUnlessEqual(self.widget.state(['!disabled', 'active']), ()) - self.failUnlessEqual(self.widget.state(['active', '!disabled']), ()) + self.assertEqual(self.widget.state(['!disabled', 'active']), ()) + self.assertEqual(self.widget.state(['active', '!disabled']), ()) def test_cb(arg1, **kw): return arg1, kw - self.failUnlessEqual(self.widget.instate(['!disabled'], + self.assertEqual(self.widget.instate(['!disabled'], test_cb, "hi", **{"msg": "there"}), ('hi', {'msg': 'there'})) # attempt to set invalid statespec currstate = self.widget.state() - self.failUnlessRaises(Tkinter.TclError, self.widget.instate, + self.assertRaises(Tkinter.TclError, self.widget.instate, ['badstate']) - self.failUnlessRaises(Tkinter.TclError, self.widget.instate, + self.assertRaises(Tkinter.TclError, self.widget.instate, ['disabled', 'badstate']) # verify that widget didn't change its state - self.failUnlessEqual(currstate, self.widget.state()) + self.assertEqual(currstate, self.widget.state()) # ensuring that passing None as state doesn't modify current state self.widget.state(['active', '!disabled']) - self.failUnlessEqual(self.widget.state(), ('active', )) + self.assertEqual(self.widget.state(), ('active', )) class ButtonTest(unittest.TestCase): @@ -74,7 +74,7 @@ success = [] btn = ttk.Button(command=lambda: success.append(1)) btn.invoke() - self.failUnless(success) + self.assertTrue(success) class CheckbuttonTest(unittest.TestCase): @@ -88,21 +88,21 @@ cbtn = ttk.Checkbutton(command=cb_test) # the variable automatically created by ttk.Checkbutton is actually # undefined till we invoke the Checkbutton - self.failUnlessEqual(cbtn.state(), ('alternate', )) - self.failUnlessRaises(Tkinter.TclError, cbtn.tk.globalgetvar, + self.assertEqual(cbtn.state(), ('alternate', )) + self.assertRaises(Tkinter.TclError, cbtn.tk.globalgetvar, cbtn['variable']) res = cbtn.invoke() - self.failUnlessEqual(res, "cb test called") - self.failUnlessEqual(cbtn['onvalue'], + self.assertEqual(res, "cb test called") + self.assertEqual(cbtn['onvalue'], cbtn.tk.globalgetvar(cbtn['variable'])) - self.failUnless(success) + self.assertTrue(success) cbtn['command'] = '' res = cbtn.invoke() - self.failUnlessEqual(res, '') - self.failIf(len(success) > 1) - self.failUnlessEqual(cbtn['offvalue'], + self.assertEqual(res, '') + self.assertFalse(len(success) > 1) + self.assertEqual(cbtn['offvalue'], cbtn.tk.globalgetvar(cbtn['variable'])) @@ -138,7 +138,7 @@ self.combo.event_generate('') self.combo.update() - self.failUnless(success) + self.assertTrue(success) def test_postcommand(self): @@ -149,18 +149,18 @@ self.combo.wait_visibility() self._show_drop_down_listbox() - self.failUnless(success) + self.assertTrue(success) # testing postcommand removal self.combo['postcommand'] = '' self._show_drop_down_listbox() - self.failUnlessEqual(len(success), 1) + self.assertEqual(len(success), 1) def test_values(self): def check_get_current(getval, currval): - self.failUnlessEqual(self.combo.get(), getval) - self.failUnlessEqual(self.combo.current(), currval) + self.assertEqual(self.combo.get(), getval) + self.assertEqual(self.combo.current(), currval) check_get_current('', -1) @@ -182,17 +182,17 @@ # testing values with empty string set through configure self.combo.configure(values=[1, '', 2]) - self.failUnlessEqual(self.combo['values'], ('1', '', '2')) + self.assertEqual(self.combo['values'], ('1', '', '2')) # out of range - self.failUnlessRaises(Tkinter.TclError, self.combo.current, + self.assertRaises(Tkinter.TclError, self.combo.current, len(self.combo['values'])) # it expects an integer (or something that can be converted to int) - self.failUnlessRaises(Tkinter.TclError, self.combo.current, '') + self.assertRaises(Tkinter.TclError, self.combo.current, '') # testing creating combobox with empty string in values combo2 = ttk.Combobox(values=[1, 2, '']) - self.failUnlessEqual(combo2['values'], ('1', '2', '')) + self.assertEqual(combo2['values'], ('1', '2', '')) combo2.destroy() @@ -208,12 +208,12 @@ def test_bbox(self): - self.failUnlessEqual(len(self.entry.bbox(0)), 4) + self.assertEqual(len(self.entry.bbox(0)), 4) for item in self.entry.bbox(0): - self.failUnless(isinstance(item, int)) + self.assertTrue(isinstance(item, int)) - self.failUnlessRaises(Tkinter.TclError, self.entry.bbox, 'noindex') - self.failUnlessRaises(Tkinter.TclError, self.entry.bbox, None) + self.assertRaises(Tkinter.TclError, self.entry.bbox, 'noindex') + self.assertRaises(Tkinter.TclError, self.entry.bbox, None) def test_identify(self): @@ -221,12 +221,12 @@ self.entry.wait_visibility() self.entry.update_idletasks() - self.failUnlessEqual(self.entry.identify(5, 5), "textarea") - self.failUnlessEqual(self.entry.identify(-1, -1), "") + self.assertEqual(self.entry.identify(5, 5), "textarea") + self.assertEqual(self.entry.identify(-1, -1), "") - self.failUnlessRaises(Tkinter.TclError, self.entry.identify, None, 5) - self.failUnlessRaises(Tkinter.TclError, self.entry.identify, 5, None) - self.failUnlessRaises(Tkinter.TclError, self.entry.identify, 5, '') + self.assertRaises(Tkinter.TclError, self.entry.identify, None, 5) + self.assertRaises(Tkinter.TclError, self.entry.identify, 5, None) + self.assertRaises(Tkinter.TclError, self.entry.identify, 5, '') def test_validation_options(self): @@ -238,23 +238,23 @@ self.entry['invalidcommand'] = test_invalid self.entry.validate() - self.failUnless(success) + self.assertTrue(success) self.entry['invalidcommand'] = '' self.entry.validate() - self.failUnlessEqual(len(success), 1) + self.assertEqual(len(success), 1) self.entry['invalidcommand'] = test_invalid self.entry['validatecommand'] = lambda: True self.entry.validate() - self.failUnlessEqual(len(success), 1) + self.assertEqual(len(success), 1) self.entry['validatecommand'] = '' self.entry.validate() - self.failUnlessEqual(len(success), 1) + self.assertEqual(len(success), 1) self.entry['validatecommand'] = True - self.failUnlessRaises(Tkinter.TclError, self.entry.validate) + self.assertRaises(Tkinter.TclError, self.entry.validate) def test_validation(self): @@ -271,8 +271,8 @@ self.entry.insert('end', 1) self.entry.insert('end', 'a') - self.failUnlessEqual(validation, [False, True]) - self.failUnlessEqual(self.entry.get(), 'a') + self.assertEqual(validation, [False, True]) + self.assertEqual(self.entry.get(), 'a') def test_revalidation(self): @@ -285,19 +285,19 @@ self.entry['validatecommand'] = self.entry.register(validate), '%P' self.entry.insert('end', 'avocado') - self.failUnlessEqual(self.entry.validate(), True) - self.failUnlessEqual(self.entry.state(), ()) + self.assertEqual(self.entry.validate(), True) + self.assertEqual(self.entry.state(), ()) self.entry.delete(0, 'end') - self.failUnlessEqual(self.entry.get(), '') + self.assertEqual(self.entry.get(), '') self.entry.insert('end', 'a1b') - self.failUnlessEqual(self.entry.validate(), False) - self.failUnlessEqual(self.entry.state(), ('invalid', )) + self.assertEqual(self.entry.validate(), False) + self.assertEqual(self.entry.state(), ('invalid', )) self.entry.delete(1) - self.failUnlessEqual(self.entry.validate(), True) - self.failUnlessEqual(self.entry.state(), ()) + self.assertEqual(self.entry.validate(), True) + self.assertEqual(self.entry.state(), ()) class PanedwindowTest(unittest.TestCase): @@ -315,108 +315,108 @@ # attempt to add a child that is not a direct child of the paned window label = ttk.Label(self.paned) child = ttk.Label(label) - self.failUnlessRaises(Tkinter.TclError, self.paned.add, child) + self.assertRaises(Tkinter.TclError, self.paned.add, child) label.destroy() child.destroy() # another attempt label = ttk.Label() child = ttk.Label(label) - self.failUnlessRaises(Tkinter.TclError, self.paned.add, child) + self.assertRaises(Tkinter.TclError, self.paned.add, child) child.destroy() label.destroy() good_child = ttk.Label() self.paned.add(good_child) # re-adding a child is not accepted - self.failUnlessRaises(Tkinter.TclError, self.paned.add, good_child) + self.assertRaises(Tkinter.TclError, self.paned.add, good_child) other_child = ttk.Label(self.paned) self.paned.add(other_child) - self.failUnlessEqual(self.paned.pane(0), self.paned.pane(1)) - self.failUnlessRaises(Tkinter.TclError, self.paned.pane, 2) + self.assertEqual(self.paned.pane(0), self.paned.pane(1)) + self.assertRaises(Tkinter.TclError, self.paned.pane, 2) good_child.destroy() other_child.destroy() - self.failUnlessRaises(Tkinter.TclError, self.paned.pane, 0) + self.assertRaises(Tkinter.TclError, self.paned.pane, 0) def test_forget(self): - self.failUnlessRaises(Tkinter.TclError, self.paned.forget, None) - self.failUnlessRaises(Tkinter.TclError, self.paned.forget, 0) + self.assertRaises(Tkinter.TclError, self.paned.forget, None) + self.assertRaises(Tkinter.TclError, self.paned.forget, 0) self.paned.add(ttk.Label()) self.paned.forget(0) - self.failUnlessRaises(Tkinter.TclError, self.paned.forget, 0) + self.assertRaises(Tkinter.TclError, self.paned.forget, 0) def test_insert(self): - self.failUnlessRaises(Tkinter.TclError, self.paned.insert, None, 0) - self.failUnlessRaises(Tkinter.TclError, self.paned.insert, 0, None) - self.failUnlessRaises(Tkinter.TclError, self.paned.insert, 0, 0) + self.assertRaises(Tkinter.TclError, self.paned.insert, None, 0) + self.assertRaises(Tkinter.TclError, self.paned.insert, 0, None) + self.assertRaises(Tkinter.TclError, self.paned.insert, 0, 0) child = ttk.Label() child2 = ttk.Label() child3 = ttk.Label() - self.failUnlessRaises(Tkinter.TclError, self.paned.insert, 0, child) + self.assertRaises(Tkinter.TclError, self.paned.insert, 0, child) self.paned.insert('end', child2) self.paned.insert(0, child) - self.failUnlessEqual(self.paned.panes(), (str(child), str(child2))) + self.assertEqual(self.paned.panes(), (str(child), str(child2))) self.paned.insert(0, child2) - self.failUnlessEqual(self.paned.panes(), (str(child2), str(child))) + self.assertEqual(self.paned.panes(), (str(child2), str(child))) self.paned.insert('end', child3) - self.failUnlessEqual(self.paned.panes(), + self.assertEqual(self.paned.panes(), (str(child2), str(child), str(child3))) # reinserting a child should move it to its current position panes = self.paned.panes() self.paned.insert('end', child3) - self.failUnlessEqual(panes, self.paned.panes()) + self.assertEqual(panes, self.paned.panes()) # moving child3 to child2 position should result in child2 ending up # in previous child position and child ending up in previous child3 # position self.paned.insert(child2, child3) - self.failUnlessEqual(self.paned.panes(), + self.assertEqual(self.paned.panes(), (str(child3), str(child2), str(child))) def test_pane(self): - self.failUnlessRaises(Tkinter.TclError, self.paned.pane, 0) + self.assertRaises(Tkinter.TclError, self.paned.pane, 0) child = ttk.Label() self.paned.add(child) - self.failUnless(isinstance(self.paned.pane(0), dict)) - self.failUnlessEqual(self.paned.pane(0, weight=None), 0) + self.assertTrue(isinstance(self.paned.pane(0), dict)) + self.assertEqual(self.paned.pane(0, weight=None), 0) # newer form for querying a single option - self.failUnlessEqual(self.paned.pane(0, 'weight'), 0) - self.failUnlessEqual(self.paned.pane(0), self.paned.pane(str(child))) + self.assertEqual(self.paned.pane(0, 'weight'), 0) + self.assertEqual(self.paned.pane(0), self.paned.pane(str(child))) - self.failUnlessRaises(Tkinter.TclError, self.paned.pane, 0, + self.assertRaises(Tkinter.TclError, self.paned.pane, 0, badoption='somevalue') def test_sashpos(self): - self.failUnlessRaises(Tkinter.TclError, self.paned.sashpos, None) - self.failUnlessRaises(Tkinter.TclError, self.paned.sashpos, '') - self.failUnlessRaises(Tkinter.TclError, self.paned.sashpos, 0) + self.assertRaises(Tkinter.TclError, self.paned.sashpos, None) + self.assertRaises(Tkinter.TclError, self.paned.sashpos, '') + self.assertRaises(Tkinter.TclError, self.paned.sashpos, 0) child = ttk.Label(self.paned, text='a') self.paned.add(child, weight=1) - self.failUnlessRaises(Tkinter.TclError, self.paned.sashpos, 0) + self.assertRaises(Tkinter.TclError, self.paned.sashpos, 0) child2 = ttk.Label(self.paned, text='b') self.paned.add(child2) - self.failUnlessRaises(Tkinter.TclError, self.paned.sashpos, 1) + self.assertRaises(Tkinter.TclError, self.paned.sashpos, 1) self.paned.pack(expand=True, fill='both') self.paned.wait_visibility() curr_pos = self.paned.sashpos(0) self.paned.sashpos(0, 1000) - self.failUnless(curr_pos != self.paned.sashpos(0)) - self.failUnless(isinstance(self.paned.sashpos(0), int)) + self.assertTrue(curr_pos != self.paned.sashpos(0)) + self.assertTrue(isinstance(self.paned.sashpos(0), int)) class RadiobuttonTest(unittest.TestCase): @@ -432,21 +432,21 @@ cbtn2 = ttk.Radiobutton(command=cb_test, variable=myvar, value=1) res = cbtn.invoke() - self.failUnlessEqual(res, "cb test called") - self.failUnlessEqual(cbtn['value'], myvar.get()) - self.failUnlessEqual(myvar.get(), + self.assertEqual(res, "cb test called") + self.assertEqual(cbtn['value'], myvar.get()) + self.assertEqual(myvar.get(), cbtn.tk.globalgetvar(cbtn['variable'])) - self.failUnless(success) + self.assertTrue(success) cbtn2['command'] = '' res = cbtn2.invoke() - self.failUnlessEqual(res, '') - self.failIf(len(success) > 1) - self.failUnlessEqual(cbtn2['value'], myvar.get()) - self.failUnlessEqual(myvar.get(), + self.assertEqual(res, '') + self.assertFalse(len(success) > 1) + self.assertEqual(cbtn2['value'], myvar.get()) + self.assertEqual(myvar.get(), cbtn.tk.globalgetvar(cbtn['variable'])) - self.failUnlessEqual(str(cbtn['variable']), str(cbtn2['variable'])) + self.assertEqual(str(cbtn['variable']), str(cbtn2['variable'])) @@ -472,27 +472,27 @@ self.scale['from_'] = 10 self.scale['to'] = 3 - self.failIf(failure) + self.assertFalse(failure) failure = [1, 1, 1] self.scale.configure(from_=2, to=5) self.scale.configure(from_=0, to=-2) self.scale.configure(to=10) - self.failIf(failure) + self.assertFalse(failure) def test_get(self): scale_width = self.scale.winfo_width() - self.failUnlessEqual(self.scale.get(scale_width, 0), self.scale['to']) + self.assertEqual(self.scale.get(scale_width, 0), self.scale['to']) - self.failUnlessEqual(self.scale.get(0, 0), self.scale['from']) - self.failUnlessEqual(self.scale.get(), self.scale['value']) + self.assertEqual(self.scale.get(0, 0), self.scale['from']) + self.assertEqual(self.scale.get(), self.scale['value']) self.scale['value'] = 30 - self.failUnlessEqual(self.scale.get(), self.scale['value']) + self.assertEqual(self.scale.get(), self.scale['value']) - self.failUnlessRaises(Tkinter.TclError, self.scale.get, '', 0) - self.failUnlessRaises(Tkinter.TclError, self.scale.get, 0, '') + self.assertRaises(Tkinter.TclError, self.scale.get, '', 0) + self.assertRaises(Tkinter.TclError, self.scale.get, 0, '') def test_set(self): @@ -500,30 +500,30 @@ max = self.scale['to'] new_max = max + 10 self.scale.set(new_max) - self.failUnlessEqual(self.scale.get(), max) + self.assertEqual(self.scale.get(), max) min = self.scale['from'] self.scale.set(min - 1) - self.failUnlessEqual(self.scale.get(), min) + self.assertEqual(self.scale.get(), min) # changing directly the variable doesn't impose this limitation tho var = Tkinter.DoubleVar() self.scale['variable'] = var var.set(max + 5) - self.failUnlessEqual(self.scale.get(), var.get()) - self.failUnlessEqual(self.scale.get(), max + 5) + self.assertEqual(self.scale.get(), var.get()) + self.assertEqual(self.scale.get(), max + 5) del var # the same happens with the value option self.scale['value'] = max + 10 - self.failUnlessEqual(self.scale.get(), max + 10) - self.failUnlessEqual(self.scale.get(), self.scale['value']) + self.assertEqual(self.scale.get(), max + 10) + self.assertEqual(self.scale.get(), self.scale['value']) # nevertheless, note that the max/min values we can get specifying # x, y coords are the ones according to the current range - self.failUnlessEqual(self.scale.get(0, 0), min) - self.failUnlessEqual(self.scale.get(self.scale.winfo_width(), 0), max) + self.assertEqual(self.scale.get(0, 0), min) + self.assertEqual(self.scale.get(self.scale.winfo_width(), 0), max) - self.failUnlessRaises(Tkinter.TclError, self.scale.set, None) + self.assertRaises(Tkinter.TclError, self.scale.set, None) class NotebookTest(unittest.TestCase): @@ -546,18 +546,18 @@ def test_tab_identifiers(self): self.nb.forget(0) self.nb.hide(self.child2) - self.failUnlessRaises(Tkinter.TclError, self.nb.tab, self.child1) - self.failUnlessEqual(self.nb.index('end'), 1) + self.assertRaises(Tkinter.TclError, self.nb.tab, self.child1) + self.assertEqual(self.nb.index('end'), 1) self.nb.add(self.child2) - self.failUnlessEqual(self.nb.index('end'), 1) + self.assertEqual(self.nb.index('end'), 1) self.nb.select(self.child2) - self.failUnless(self.nb.tab('current')) + self.assertTrue(self.nb.tab('current')) self.nb.add(self.child1, text='a') self.nb.pack() self.nb.wait_visibility() - self.failUnlessEqual(self.nb.tab('@5,5'), self.nb.tab('current')) + self.assertEqual(self.nb.tab('@5,5'), self.nb.tab('current')) for i in range(5, 100, 5): if self.nb.tab('@%d, 5' % i, text=None) == 'a': @@ -567,17 +567,17 @@ def test_add_and_hidden(self): - self.failUnlessRaises(Tkinter.TclError, self.nb.hide, -1) - self.failUnlessRaises(Tkinter.TclError, self.nb.hide, 'hi') - self.failUnlessRaises(Tkinter.TclError, self.nb.hide, None) - self.failUnlessRaises(Tkinter.TclError, self.nb.add, None) - self.failUnlessRaises(Tkinter.TclError, self.nb.add, ttk.Label(), + self.assertRaises(Tkinter.TclError, self.nb.hide, -1) + self.assertRaises(Tkinter.TclError, self.nb.hide, 'hi') + self.assertRaises(Tkinter.TclError, self.nb.hide, None) + self.assertRaises(Tkinter.TclError, self.nb.add, None) + self.assertRaises(Tkinter.TclError, self.nb.add, ttk.Label(), unknown='option') tabs = self.nb.tabs() self.nb.hide(self.child1) self.nb.add(self.child1) - self.failUnlessEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.tabs(), tabs) child = ttk.Label() self.nb.add(child, text='c') @@ -588,70 +588,70 @@ child2_index = self.nb.index(self.child2) self.nb.hide(self.child2) self.nb.add(self.child2) - self.failUnlessEqual(self.nb.tabs(), tabs) - self.failUnlessEqual(self.nb.index(self.child2), child2_index) - self.failUnless(str(self.child2) == self.nb.tabs()[child2_index]) + self.assertEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.index(self.child2), child2_index) + self.assertTrue(str(self.child2) == self.nb.tabs()[child2_index]) # but the tab next to it (not hidden) is the one selected now - self.failUnlessEqual(self.nb.index('current'), curr + 1) + self.assertEqual(self.nb.index('current'), curr + 1) def test_forget(self): - self.failUnlessRaises(Tkinter.TclError, self.nb.forget, -1) - self.failUnlessRaises(Tkinter.TclError, self.nb.forget, 'hi') - self.failUnlessRaises(Tkinter.TclError, self.nb.forget, None) + self.assertRaises(Tkinter.TclError, self.nb.forget, -1) + self.assertRaises(Tkinter.TclError, self.nb.forget, 'hi') + self.assertRaises(Tkinter.TclError, self.nb.forget, None) tabs = self.nb.tabs() child1_index = self.nb.index(self.child1) self.nb.forget(self.child1) - self.failIf(str(self.child1) in self.nb.tabs()) - self.failUnlessEqual(len(tabs) - 1, len(self.nb.tabs())) + self.assertFalse(str(self.child1) in self.nb.tabs()) + self.assertEqual(len(tabs) - 1, len(self.nb.tabs())) self.nb.add(self.child1) - self.failUnlessEqual(self.nb.index(self.child1), 1) - self.failIf(child1_index == self.nb.index(self.child1)) + self.assertEqual(self.nb.index(self.child1), 1) + self.assertFalse(child1_index == self.nb.index(self.child1)) def test_index(self): - self.failUnlessRaises(Tkinter.TclError, self.nb.index, -1) - self.failUnlessRaises(Tkinter.TclError, self.nb.index, None) + self.assertRaises(Tkinter.TclError, self.nb.index, -1) + self.assertRaises(Tkinter.TclError, self.nb.index, None) - self.failUnless(isinstance(self.nb.index('end'), int)) - self.failUnlessEqual(self.nb.index(self.child1), 0) - self.failUnlessEqual(self.nb.index(self.child2), 1) - self.failUnlessEqual(self.nb.index('end'), 2) + self.assertTrue(isinstance(self.nb.index('end'), int)) + self.assertEqual(self.nb.index(self.child1), 0) + self.assertEqual(self.nb.index(self.child2), 1) + self.assertEqual(self.nb.index('end'), 2) def test_insert(self): # moving tabs tabs = self.nb.tabs() self.nb.insert(1, tabs[0]) - self.failUnlessEqual(self.nb.tabs(), (tabs[1], tabs[0])) + self.assertEqual(self.nb.tabs(), (tabs[1], tabs[0])) self.nb.insert(self.child1, self.child2) - self.failUnlessEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.tabs(), tabs) self.nb.insert('end', self.child1) - self.failUnlessEqual(self.nb.tabs(), (tabs[1], tabs[0])) + self.assertEqual(self.nb.tabs(), (tabs[1], tabs[0])) self.nb.insert('end', 0) - self.failUnlessEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.tabs(), tabs) # bad moves - self.failUnlessRaises(Tkinter.TclError, self.nb.insert, 2, tabs[0]) - self.failUnlessRaises(Tkinter.TclError, self.nb.insert, -1, tabs[0]) + self.assertRaises(Tkinter.TclError, self.nb.insert, 2, tabs[0]) + self.assertRaises(Tkinter.TclError, self.nb.insert, -1, tabs[0]) # new tab child3 = ttk.Label() self.nb.insert(1, child3) - self.failUnlessEqual(self.nb.tabs(), (tabs[0], str(child3), tabs[1])) + self.assertEqual(self.nb.tabs(), (tabs[0], str(child3), tabs[1])) self.nb.forget(child3) - self.failUnlessEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.tabs(), tabs) self.nb.insert(self.child1, child3) - self.failUnlessEqual(self.nb.tabs(), (str(child3), ) + tabs) + self.assertEqual(self.nb.tabs(), (str(child3), ) + tabs) self.nb.forget(child3) - self.failUnlessRaises(Tkinter.TclError, self.nb.insert, 2, child3) - self.failUnlessRaises(Tkinter.TclError, self.nb.insert, -1, child3) + self.assertRaises(Tkinter.TclError, self.nb.insert, 2, child3) + self.assertRaises(Tkinter.TclError, self.nb.insert, -1, child3) # bad inserts - self.failUnlessRaises(Tkinter.TclError, self.nb.insert, 'end', None) - self.failUnlessRaises(Tkinter.TclError, self.nb.insert, None, 0) - self.failUnlessRaises(Tkinter.TclError, self.nb.insert, None, None) + self.assertRaises(Tkinter.TclError, self.nb.insert, 'end', None) + self.assertRaises(Tkinter.TclError, self.nb.insert, None, 0) + self.assertRaises(Tkinter.TclError, self.nb.insert, None, None) def test_select(self): @@ -665,36 +665,36 @@ self.nb.bind('<>', lambda evt: tab_changed.append(True)) - self.failUnlessEqual(self.nb.select(), str(self.child1)) + self.assertEqual(self.nb.select(), str(self.child1)) self.nb.select(self.child2) - self.failUnless(success) - self.failUnlessEqual(self.nb.select(), str(self.child2)) + self.assertTrue(success) + self.assertEqual(self.nb.select(), str(self.child2)) self.nb.update() - self.failUnless(tab_changed) + self.assertTrue(tab_changed) def test_tab(self): - self.failUnlessRaises(Tkinter.TclError, self.nb.tab, -1) - self.failUnlessRaises(Tkinter.TclError, self.nb.tab, 'notab') - self.failUnlessRaises(Tkinter.TclError, self.nb.tab, None) + self.assertRaises(Tkinter.TclError, self.nb.tab, -1) + self.assertRaises(Tkinter.TclError, self.nb.tab, 'notab') + self.assertRaises(Tkinter.TclError, self.nb.tab, None) - self.failUnless(isinstance(self.nb.tab(self.child1), dict)) - self.failUnlessEqual(self.nb.tab(self.child1, text=None), 'a') + self.assertTrue(isinstance(self.nb.tab(self.child1), dict)) + self.assertEqual(self.nb.tab(self.child1, text=None), 'a') # newer form for querying a single option - self.failUnlessEqual(self.nb.tab(self.child1, 'text'), 'a') + self.assertEqual(self.nb.tab(self.child1, 'text'), 'a') self.nb.tab(self.child1, text='abc') - self.failUnlessEqual(self.nb.tab(self.child1, text=None), 'abc') - self.failUnlessEqual(self.nb.tab(self.child1, 'text'), 'abc') + self.assertEqual(self.nb.tab(self.child1, text=None), 'abc') + self.assertEqual(self.nb.tab(self.child1, 'text'), 'abc') def test_tabs(self): - self.failUnlessEqual(len(self.nb.tabs()), 2) + self.assertEqual(len(self.nb.tabs()), 2) self.nb.forget(self.child1) self.nb.forget(self.child2) - self.failUnlessEqual(self.nb.tabs(), ()) + self.assertEqual(self.nb.tabs(), ()) def test_traversal(self): @@ -705,16 +705,16 @@ support.simulate_mouse_click(self.nb, 5, 5) self.nb.event_generate('') - self.failUnlessEqual(self.nb.select(), str(self.child2)) + self.assertEqual(self.nb.select(), str(self.child2)) self.nb.event_generate('') - self.failUnlessEqual(self.nb.select(), str(self.child1)) + self.assertEqual(self.nb.select(), str(self.child1)) self.nb.event_generate('') - self.failUnlessEqual(self.nb.select(), str(self.child2)) + self.assertEqual(self.nb.select(), str(self.child2)) self.nb.tab(self.child1, text='a', underline=0) self.nb.enable_traversal() self.nb.event_generate('') - self.failUnlessEqual(self.nb.select(), str(self.child1)) + self.assertEqual(self.nb.select(), str(self.child1)) class TreeviewTest(unittest.TestCase): @@ -730,17 +730,17 @@ def test_bbox(self): self.tv.pack() - self.failUnlessEqual(self.tv.bbox(''), '') + self.assertEqual(self.tv.bbox(''), '') self.tv.wait_visibility() self.tv.update() item_id = self.tv.insert('', 'end') children = self.tv.get_children() - self.failUnless(children) + self.assertTrue(children) bbox = self.tv.bbox(children[0]) - self.failUnlessEqual(len(bbox), 4) - self.failUnless(isinstance(bbox, tuple)) + self.assertEqual(len(bbox), 4) + self.assertTrue(isinstance(bbox, tuple)) for item in bbox: if not isinstance(item, int): self.fail("Invalid bounding box: %s" % bbox) @@ -751,86 +751,86 @@ self.tv.column('test', width=50) bbox_column0 = self.tv.bbox(children[0], 0) root_width = self.tv.column('#0', width=None) - self.failUnlessEqual(bbox_column0[0], bbox[0] + root_width) + self.assertEqual(bbox_column0[0], bbox[0] + root_width) # verify that bbox of a closed item is the empty string child1 = self.tv.insert(item_id, 'end') - self.failUnlessEqual(self.tv.bbox(child1), '') + self.assertEqual(self.tv.bbox(child1), '') def test_children(self): # no children yet, should get an empty tuple - self.failUnlessEqual(self.tv.get_children(), ()) + self.assertEqual(self.tv.get_children(), ()) item_id = self.tv.insert('', 'end') - self.failUnless(isinstance(self.tv.get_children(), tuple)) - self.failUnlessEqual(self.tv.get_children()[0], item_id) + self.assertTrue(isinstance(self.tv.get_children(), tuple)) + self.assertEqual(self.tv.get_children()[0], item_id) # add item_id and child3 as children of child2 child2 = self.tv.insert('', 'end') child3 = self.tv.insert('', 'end') self.tv.set_children(child2, item_id, child3) - self.failUnlessEqual(self.tv.get_children(child2), (item_id, child3)) + self.assertEqual(self.tv.get_children(child2), (item_id, child3)) # child3 has child2 as parent, thus trying to set child2 as a children # of child3 should result in an error - self.failUnlessRaises(Tkinter.TclError, + self.assertRaises(Tkinter.TclError, self.tv.set_children, child3, child2) # remove child2 children self.tv.set_children(child2) - self.failUnlessEqual(self.tv.get_children(child2), ()) + self.assertEqual(self.tv.get_children(child2), ()) # remove root's children self.tv.set_children('') - self.failUnlessEqual(self.tv.get_children(), ()) + self.assertEqual(self.tv.get_children(), ()) def test_column(self): # return a dict with all options/values - self.failUnless(isinstance(self.tv.column('#0'), dict)) + self.assertTrue(isinstance(self.tv.column('#0'), dict)) # return a single value of the given option - self.failUnless(isinstance(self.tv.column('#0', width=None), int)) + self.assertTrue(isinstance(self.tv.column('#0', width=None), int)) # set a new value for an option self.tv.column('#0', width=10) # testing new way to get option value - self.failUnlessEqual(self.tv.column('#0', 'width'), 10) - self.failUnlessEqual(self.tv.column('#0', width=None), 10) + self.assertEqual(self.tv.column('#0', 'width'), 10) + self.assertEqual(self.tv.column('#0', width=None), 10) # check read-only option - self.failUnlessRaises(Tkinter.TclError, self.tv.column, '#0', id='X') + self.assertRaises(Tkinter.TclError, self.tv.column, '#0', id='X') - self.failUnlessRaises(Tkinter.TclError, self.tv.column, 'invalid') + self.assertRaises(Tkinter.TclError, self.tv.column, 'invalid') invalid_kws = [ {'unknown_option': 'some value'}, {'stretch': 'wrong'}, {'anchor': 'wrong'}, {'width': 'wrong'}, {'minwidth': 'wrong'} ] for kw in invalid_kws: - self.failUnlessRaises(Tkinter.TclError, self.tv.column, '#0', + self.assertRaises(Tkinter.TclError, self.tv.column, '#0', **kw) def test_delete(self): - self.failUnlessRaises(Tkinter.TclError, self.tv.delete, '#0') + self.assertRaises(Tkinter.TclError, self.tv.delete, '#0') item_id = self.tv.insert('', 'end') item2 = self.tv.insert(item_id, 'end') - self.failUnlessEqual(self.tv.get_children(), (item_id, )) - self.failUnlessEqual(self.tv.get_children(item_id), (item2, )) + self.assertEqual(self.tv.get_children(), (item_id, )) + self.assertEqual(self.tv.get_children(item_id), (item2, )) self.tv.delete(item_id) - self.failIf(self.tv.get_children()) + self.assertFalse(self.tv.get_children()) # reattach should fail - self.failUnlessRaises(Tkinter.TclError, + self.assertRaises(Tkinter.TclError, self.tv.reattach, item_id, '', 'end') # test multiple item delete item1 = self.tv.insert('', 'end') item2 = self.tv.insert('', 'end') - self.failUnlessEqual(self.tv.get_children(), (item1, item2)) + self.assertEqual(self.tv.get_children(), (item1, item2)) self.tv.delete(item1, item2) - self.failIf(self.tv.get_children()) + self.assertFalse(self.tv.get_children()) def test_detach_reattach(self): @@ -840,81 +840,81 @@ # calling detach without items is valid, although it does nothing prev = self.tv.get_children() self.tv.detach() # this should do nothing - self.failUnlessEqual(prev, self.tv.get_children()) + self.assertEqual(prev, self.tv.get_children()) - self.failUnlessEqual(self.tv.get_children(), (item_id, )) - self.failUnlessEqual(self.tv.get_children(item_id), (item2, )) + self.assertEqual(self.tv.get_children(), (item_id, )) + self.assertEqual(self.tv.get_children(item_id), (item2, )) # detach item with children self.tv.detach(item_id) - self.failIf(self.tv.get_children()) + self.assertFalse(self.tv.get_children()) # reattach item with children self.tv.reattach(item_id, '', 'end') - self.failUnlessEqual(self.tv.get_children(), (item_id, )) - self.failUnlessEqual(self.tv.get_children(item_id), (item2, )) + self.assertEqual(self.tv.get_children(), (item_id, )) + self.assertEqual(self.tv.get_children(item_id), (item2, )) # move a children to the root self.tv.move(item2, '', 'end') - self.failUnlessEqual(self.tv.get_children(), (item_id, item2)) - self.failUnlessEqual(self.tv.get_children(item_id), ()) + self.assertEqual(self.tv.get_children(), (item_id, item2)) + self.assertEqual(self.tv.get_children(item_id), ()) # bad values - self.failUnlessRaises(Tkinter.TclError, + self.assertRaises(Tkinter.TclError, self.tv.reattach, 'nonexistent', '', 'end') - self.failUnlessRaises(Tkinter.TclError, + self.assertRaises(Tkinter.TclError, self.tv.detach, 'nonexistent') - self.failUnlessRaises(Tkinter.TclError, + self.assertRaises(Tkinter.TclError, self.tv.reattach, item2, 'otherparent', 'end') - self.failUnlessRaises(Tkinter.TclError, + self.assertRaises(Tkinter.TclError, self.tv.reattach, item2, '', 'invalid') # multiple detach self.tv.detach(item_id, item2) - self.failUnlessEqual(self.tv.get_children(), ()) - self.failUnlessEqual(self.tv.get_children(item_id), ()) + self.assertEqual(self.tv.get_children(), ()) + self.assertEqual(self.tv.get_children(item_id), ()) def test_exists(self): - self.failUnlessEqual(self.tv.exists('something'), False) - self.failUnlessEqual(self.tv.exists(''), True) - self.failUnlessEqual(self.tv.exists({}), False) + self.assertEqual(self.tv.exists('something'), False) + self.assertEqual(self.tv.exists(''), True) + self.assertEqual(self.tv.exists({}), False) # the following will make a tk.call equivalent to # tk.call(treeview, "exists") which should result in an error # in the tcl interpreter since tk requires an item. - self.failUnlessRaises(Tkinter.TclError, self.tv.exists, None) + self.assertRaises(Tkinter.TclError, self.tv.exists, None) def test_focus(self): # nothing is focused right now - self.failUnlessEqual(self.tv.focus(), '') + self.assertEqual(self.tv.focus(), '') item1 = self.tv.insert('', 'end') self.tv.focus(item1) - self.failUnlessEqual(self.tv.focus(), item1) + self.assertEqual(self.tv.focus(), item1) self.tv.delete(item1) - self.failUnlessEqual(self.tv.focus(), '') + self.assertEqual(self.tv.focus(), '') # try focusing inexistent item - self.failUnlessRaises(Tkinter.TclError, self.tv.focus, 'hi') + self.assertRaises(Tkinter.TclError, self.tv.focus, 'hi') def test_heading(self): # check a dict is returned - self.failUnless(isinstance(self.tv.heading('#0'), dict)) + self.assertTrue(isinstance(self.tv.heading('#0'), dict)) # check a value is returned self.tv.heading('#0', text='hi') - self.failUnlessEqual(self.tv.heading('#0', 'text'), 'hi') - self.failUnlessEqual(self.tv.heading('#0', text=None), 'hi') + self.assertEqual(self.tv.heading('#0', 'text'), 'hi') + self.assertEqual(self.tv.heading('#0', text=None), 'hi') # invalid option - self.failUnlessRaises(Tkinter.TclError, self.tv.heading, '#0', + self.assertRaises(Tkinter.TclError, self.tv.heading, '#0', background=None) # invalid value - self.failUnlessRaises(Tkinter.TclError, self.tv.heading, '#0', + self.assertRaises(Tkinter.TclError, self.tv.heading, '#0', anchor=1) @@ -940,7 +940,7 @@ success = [] commands = self.tv.master._tclCommands self.tv.heading('#0', command=str(self.tv.heading('#0', command=None))) - self.failUnlessEqual(commands, self.tv.master._tclCommands) + self.assertEqual(commands, self.tv.master._tclCommands) simulate_heading_click(5, 5) if not success: self.fail("The command associated to the treeview heading wasn't " @@ -954,92 +954,92 @@ def test_index(self): # item 'what' doesn't exist - self.failUnlessRaises(Tkinter.TclError, self.tv.index, 'what') + self.assertRaises(Tkinter.TclError, self.tv.index, 'what') - self.failUnlessEqual(self.tv.index(''), 0) + self.assertEqual(self.tv.index(''), 0) item1 = self.tv.insert('', 'end') item2 = self.tv.insert('', 'end') c1 = self.tv.insert(item1, 'end') c2 = self.tv.insert(item1, 'end') - self.failUnlessEqual(self.tv.index(item1), 0) - self.failUnlessEqual(self.tv.index(c1), 0) - self.failUnlessEqual(self.tv.index(c2), 1) - self.failUnlessEqual(self.tv.index(item2), 1) + self.assertEqual(self.tv.index(item1), 0) + self.assertEqual(self.tv.index(c1), 0) + self.assertEqual(self.tv.index(c2), 1) + self.assertEqual(self.tv.index(item2), 1) self.tv.move(item2, '', 0) - self.failUnlessEqual(self.tv.index(item2), 0) - self.failUnlessEqual(self.tv.index(item1), 1) + self.assertEqual(self.tv.index(item2), 0) + self.assertEqual(self.tv.index(item1), 1) # check that index still works even after its parent and siblings # have been detached self.tv.detach(item1) - self.failUnlessEqual(self.tv.index(c2), 1) + self.assertEqual(self.tv.index(c2), 1) self.tv.detach(c1) - self.failUnlessEqual(self.tv.index(c2), 0) + self.assertEqual(self.tv.index(c2), 0) # but it fails after item has been deleted self.tv.delete(item1) - self.failUnlessRaises(Tkinter.TclError, self.tv.index, c2) + self.assertRaises(Tkinter.TclError, self.tv.index, c2) def test_insert_item(self): # parent 'none' doesn't exist - self.failUnlessRaises(Tkinter.TclError, self.tv.insert, 'none', 'end') + self.assertRaises(Tkinter.TclError, self.tv.insert, 'none', 'end') # open values - self.failUnlessRaises(Tkinter.TclError, self.tv.insert, '', 'end', + self.assertRaises(Tkinter.TclError, self.tv.insert, '', 'end', open='') - self.failUnlessRaises(Tkinter.TclError, self.tv.insert, '', 'end', + self.assertRaises(Tkinter.TclError, self.tv.insert, '', 'end', open='please') - self.failIf(self.tv.delete(self.tv.insert('', 'end', open=True))) - self.failIf(self.tv.delete(self.tv.insert('', 'end', open=False))) + self.assertFalse(self.tv.delete(self.tv.insert('', 'end', open=True))) + self.assertFalse(self.tv.delete(self.tv.insert('', 'end', open=False))) # invalid index - self.failUnlessRaises(Tkinter.TclError, self.tv.insert, '', 'middle') + self.assertRaises(Tkinter.TclError, self.tv.insert, '', 'middle') # trying to duplicate item id is invalid itemid = self.tv.insert('', 'end', 'first-item') - self.failUnlessEqual(itemid, 'first-item') - self.failUnlessRaises(Tkinter.TclError, self.tv.insert, '', 'end', + self.assertEqual(itemid, 'first-item') + self.assertRaises(Tkinter.TclError, self.tv.insert, '', 'end', 'first-item') - self.failUnlessRaises(Tkinter.TclError, self.tv.insert, '', 'end', + self.assertRaises(Tkinter.TclError, self.tv.insert, '', 'end', MockTclObj('first-item')) # unicode values value = u'\xe1ba' item = self.tv.insert('', 'end', values=(value, )) - self.failUnlessEqual(self.tv.item(item, 'values'), (value, )) - self.failUnlessEqual(self.tv.item(item, values=None), (value, )) + self.assertEqual(self.tv.item(item, 'values'), (value, )) + self.assertEqual(self.tv.item(item, values=None), (value, )) self.tv.item(item, values=list(self.tv.item(item, values=None))) - self.failUnlessEqual(self.tv.item(item, values=None), (value, )) + self.assertEqual(self.tv.item(item, values=None), (value, )) - self.failUnless(isinstance(self.tv.item(item), dict)) + self.assertTrue(isinstance(self.tv.item(item), dict)) # erase item values self.tv.item(item, values='') - self.failIf(self.tv.item(item, values=None)) + self.assertFalse(self.tv.item(item, values=None)) # item tags item = self.tv.insert('', 'end', tags=[1, 2, value]) - self.failUnlessEqual(self.tv.item(item, tags=None), ('1', '2', value)) + self.assertEqual(self.tv.item(item, tags=None), ('1', '2', value)) self.tv.item(item, tags=[]) - self.failIf(self.tv.item(item, tags=None)) + self.assertFalse(self.tv.item(item, tags=None)) self.tv.item(item, tags=(1, 2)) - self.failUnlessEqual(self.tv.item(item, tags=None), ('1', '2')) + self.assertEqual(self.tv.item(item, tags=None), ('1', '2')) # values with spaces item = self.tv.insert('', 'end', values=('a b c', '%s %s' % (value, value))) - self.failUnlessEqual(self.tv.item(item, values=None), + self.assertEqual(self.tv.item(item, values=None), ('a b c', '%s %s' % (value, value))) # text - self.failUnlessEqual(self.tv.item( + self.assertEqual(self.tv.item( self.tv.insert('', 'end', text="Label here"), text=None), "Label here") - self.failUnlessEqual(self.tv.item( + self.assertEqual(self.tv.item( self.tv.insert('', 'end', text=value), text=None), value) @@ -1047,29 +1047,29 @@ def test_set(self): self.tv['columns'] = ['A', 'B'] item = self.tv.insert('', 'end', values=['a', 'b']) - self.failUnlessEqual(self.tv.set(item), {'A': 'a', 'B': 'b'}) + self.assertEqual(self.tv.set(item), {'A': 'a', 'B': 'b'}) self.tv.set(item, 'B', 'a') - self.failUnlessEqual(self.tv.item(item, values=None), ('a', 'a')) + self.assertEqual(self.tv.item(item, values=None), ('a', 'a')) self.tv['columns'] = ['B'] - self.failUnlessEqual(self.tv.set(item), {'B': 'a'}) + self.assertEqual(self.tv.set(item), {'B': 'a'}) self.tv.set(item, 'B', 'b') - self.failUnlessEqual(self.tv.set(item, column='B'), 'b') - self.failUnlessEqual(self.tv.item(item, values=None), ('b', 'a')) + self.assertEqual(self.tv.set(item, column='B'), 'b') + self.assertEqual(self.tv.item(item, values=None), ('b', 'a')) self.tv.set(item, 'B', 123) - self.failUnlessEqual(self.tv.set(item, 'B'), 123) - self.failUnlessEqual(self.tv.item(item, values=None), (123, 'a')) - self.failUnlessEqual(self.tv.set(item), {'B': 123}) + self.assertEqual(self.tv.set(item, 'B'), 123) + self.assertEqual(self.tv.item(item, values=None), (123, 'a')) + self.assertEqual(self.tv.set(item), {'B': 123}) # inexistent column - self.failUnlessRaises(Tkinter.TclError, self.tv.set, item, 'A') - self.failUnlessRaises(Tkinter.TclError, self.tv.set, item, 'A', 'b') + self.assertRaises(Tkinter.TclError, self.tv.set, item, 'A') + self.assertRaises(Tkinter.TclError, self.tv.set, item, 'A', 'b') # inexistent item - self.failUnlessRaises(Tkinter.TclError, self.tv.set, 'notme') + self.assertRaises(Tkinter.TclError, self.tv.set, 'notme') def test_tag_bind(self): @@ -1095,28 +1095,28 @@ pos_y.add(i) found.add(item_id) - self.failUnlessEqual(len(pos_y), 2) # item1 and item2 y pos + self.assertEqual(len(pos_y), 2) # item1 and item2 y pos for y in pos_y: support.simulate_mouse_click(self.tv, 0, y) # by now there should be 4 things in the events list, since each # item had a bind for two events that were simulated above - self.failUnlessEqual(len(events), 4) + self.assertEqual(len(events), 4) for evt in zip(events[::2], events[1::2]): - self.failUnlessEqual(evt, (1, 2)) + self.assertEqual(evt, (1, 2)) def test_tag_configure(self): # Just testing parameter passing for now - self.failUnlessRaises(TypeError, self.tv.tag_configure) - self.failUnlessRaises(Tkinter.TclError, self.tv.tag_configure, + self.assertRaises(TypeError, self.tv.tag_configure) + self.assertRaises(Tkinter.TclError, self.tv.tag_configure, 'test', sky='blue') self.tv.tag_configure('test', foreground='blue') - self.failUnlessEqual(self.tv.tag_configure('test', 'foreground'), + self.assertEqual(self.tv.tag_configure('test', 'foreground'), 'blue') - self.failUnlessEqual(self.tv.tag_configure('test', foreground=None), + self.assertEqual(self.tv.tag_configure('test', foreground=None), 'blue') - self.failUnless(isinstance(self.tv.tag_configure('test'), dict)) + self.assertTrue(isinstance(self.tv.tag_configure('test'), dict)) tests_gui = ( Modified: python/trunk/Lib/test/mapping_tests.py ============================================================================== --- python/trunk/Lib/test/mapping_tests.py (original) +++ python/trunk/Lib/test/mapping_tests.py Wed Jul 1 00:57:08 2009 @@ -50,17 +50,17 @@ for key, value in self.reference.items(): self.assertEqual(d[key], value) knownkey = self.other.keys()[0] - self.failUnlessRaises(KeyError, lambda:d[knownkey]) + self.assertRaises(KeyError, lambda:d[knownkey]) #len self.assertEqual(len(p), 0) self.assertEqual(len(d), len(self.reference)) #has_key for k in self.reference: - self.assert_(d.has_key(k)) - self.assert_(k in d) + self.assertTrue(d.has_key(k)) + self.assertTrue(k in d) for k in self.other: - self.failIf(d.has_key(k)) - self.failIf(k in d) + self.assertFalse(d.has_key(k)) + self.assertFalse(k in d) #cmp self.assertEqual(cmp(p,p), 0) self.assertEqual(cmp(d,d), 0) @@ -71,10 +71,10 @@ if not d: self.fail("Full mapping must compare to True") # keys(), items(), iterkeys() ... def check_iterandlist(iter, lst, ref): - self.assert_(hasattr(iter, 'next')) - self.assert_(hasattr(iter, '__iter__')) + self.assertTrue(hasattr(iter, 'next')) + self.assertTrue(hasattr(iter, '__iter__')) x = list(iter) - self.assert_(set(x)==set(lst)==set(ref)) + self.assertTrue(set(x)==set(lst)==set(ref)) check_iterandlist(d.iterkeys(), d.keys(), self.reference.keys()) check_iterandlist(iter(d), d.keys(), self.reference.keys()) check_iterandlist(d.itervalues(), d.values(), self.reference.values()) @@ -84,7 +84,7 @@ knownkey, knownvalue = self.other.iteritems().next() self.assertEqual(d.get(key, knownvalue), value) self.assertEqual(d.get(knownkey, knownvalue), knownvalue) - self.failIf(knownkey in d) + self.assertFalse(knownkey in d) def test_write(self): # Test for write operations on mapping @@ -95,7 +95,7 @@ self.assertEqual(p[key], value) for key in self.reference.keys(): del p[key] - self.failUnlessRaises(KeyError, lambda:p[key]) + self.assertRaises(KeyError, lambda:p[key]) p = self._empty_mapping() #update p.update(self.reference) @@ -114,16 +114,16 @@ self.assertEqual(d[knownkey], knownvalue) #pop self.assertEqual(d.pop(knownkey), knownvalue) - self.failIf(knownkey in d) + self.assertFalse(knownkey in d) self.assertRaises(KeyError, d.pop, knownkey) default = 909 d[knownkey] = knownvalue self.assertEqual(d.pop(knownkey, default), knownvalue) - self.failIf(knownkey in d) + self.assertFalse(knownkey in d) self.assertEqual(d.pop(knownkey, default), default) #popitem key, value = d.popitem() - self.failIf(key in d) + self.assertFalse(key in d) self.assertEqual(value, self.reference[key]) p=self._empty_mapping() self.assertRaises(KeyError, p.popitem) @@ -132,17 +132,17 @@ self.assertEqual(self._empty_mapping(), self._empty_mapping()) def test_bool(self): - self.assert_(not self._empty_mapping()) - self.assert_(self.reference) - self.assert_(bool(self._empty_mapping()) is False) - self.assert_(bool(self.reference) is True) + self.assertTrue(not self._empty_mapping()) + self.assertTrue(self.reference) + self.assertTrue(bool(self._empty_mapping()) is False) + self.assertTrue(bool(self.reference) is True) def test_keys(self): d = self._empty_mapping() self.assertEqual(d.keys(), []) d = self.reference - self.assert_(self.inmapping.keys()[0] in d.keys()) - self.assert_(self.other.keys()[0] not in d.keys()) + self.assertTrue(self.inmapping.keys()[0] in d.keys()) + self.assertTrue(self.other.keys()[0] not in d.keys()) self.assertRaises(TypeError, d.keys, None) def test_values(self): @@ -268,10 +268,10 @@ def test_get(self): d = self._empty_mapping() - self.assert_(d.get(self.other.keys()[0]) is None) + self.assertTrue(d.get(self.other.keys()[0]) is None) self.assertEqual(d.get(self.other.keys()[0], 3), 3) d = self.reference - self.assert_(d.get(self.other.keys()[0]) is None) + self.assertTrue(d.get(self.other.keys()[0]) is None) self.assertEqual(d.get(self.other.keys()[0], 3), 3) self.assertEqual(d.get(self.inmapping.keys()[0]), self.inmapping.values()[0]) self.assertEqual(d.get(self.inmapping.keys()[0], 3), self.inmapping.values()[0]) @@ -302,15 +302,15 @@ class TestMappingProtocol(BasicTestMappingProtocol): def test_constructor(self): BasicTestMappingProtocol.test_constructor(self) - self.assert_(self._empty_mapping() is not self._empty_mapping()) + self.assertTrue(self._empty_mapping() is not self._empty_mapping()) self.assertEqual(self.type2test(x=1, y=2), {"x": 1, "y": 2}) def test_bool(self): BasicTestMappingProtocol.test_bool(self) - self.assert_(not self._empty_mapping()) - self.assert_(self._full_mapping({"x": "y"})) - self.assert_(bool(self._empty_mapping()) is False) - self.assert_(bool(self._full_mapping({"x": "y"})) is True) + self.assertTrue(not self._empty_mapping()) + self.assertTrue(self._full_mapping({"x": "y"})) + self.assertTrue(bool(self._empty_mapping()) is False) + self.assertTrue(bool(self._full_mapping({"x": "y"})) is True) def test_keys(self): BasicTestMappingProtocol.test_keys(self) @@ -318,9 +318,9 @@ self.assertEqual(d.keys(), []) d = self._full_mapping({'a': 1, 'b': 2}) k = d.keys() - self.assert_('a' in k) - self.assert_('b' in k) - self.assert_('c' not in k) + self.assertTrue('a' in k) + self.assertTrue('b' in k) + self.assertTrue('c' not in k) def test_values(self): BasicTestMappingProtocol.test_values(self) @@ -335,7 +335,7 @@ def test_has_key(self): d = self._empty_mapping() - self.assert_(not d.has_key('a')) + self.assertTrue(not d.has_key('a')) d = self._full_mapping({'a': 1, 'b': 2}) k = d.keys() k.sort() @@ -345,12 +345,12 @@ def test_contains(self): d = self._empty_mapping() - self.assert_(not ('a' in d)) - self.assert_('a' not in d) + self.assertTrue(not ('a' in d)) + self.assertTrue('a' not in d) d = self._full_mapping({'a': 1, 'b': 2}) - self.assert_('a' in d) - self.assert_('b' in d) - self.assert_('c' not in d) + self.assertTrue('a' in d) + self.assertTrue('b' in d) + self.assertTrue('c' not in d) self.assertRaises(TypeError, d.__contains__) @@ -429,7 +429,7 @@ def test_fromkeys(self): self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) d = self._empty_mapping() - self.assert_(not(d.fromkeys('abc') is d)) + self.assertTrue(not(d.fromkeys('abc') is d)) self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) self.assertEqual(d.fromkeys([]), {}) @@ -440,17 +440,17 @@ class dictlike(self.type2test): pass self.assertEqual(dictlike.fromkeys('a'), {'a':None}) self.assertEqual(dictlike().fromkeys('a'), {'a':None}) - self.assert_(dictlike.fromkeys('a').__class__ is dictlike) - self.assert_(dictlike().fromkeys('a').__class__ is dictlike) + self.assertTrue(dictlike.fromkeys('a').__class__ is dictlike) + self.assertTrue(dictlike().fromkeys('a').__class__ is dictlike) # FIXME: the following won't work with UserDict, because it's an old style class - # self.assert_(type(dictlike.fromkeys('a')) is dictlike) + # self.assertTrue(type(dictlike.fromkeys('a')) is dictlike) class mydict(self.type2test): def __new__(cls): return UserDict.UserDict() ud = mydict.fromkeys('ab') self.assertEqual(ud, {'a':None, 'b':None}) # FIXME: the following won't work with UserDict, because it's an old style class - # self.assert_(isinstance(ud, UserDict.UserDict)) + # self.assertTrue(isinstance(ud, UserDict.UserDict)) self.assertRaises(TypeError, dict.fromkeys) class Exc(Exception): pass @@ -480,16 +480,16 @@ self.assertEqual(d.copy(), {1:1, 2:2, 3:3}) d = self._empty_mapping() self.assertEqual(d.copy(), d) - self.assert_(isinstance(d.copy(), d.__class__)) + self.assertTrue(isinstance(d.copy(), d.__class__)) self.assertRaises(TypeError, d.copy, None) def test_get(self): BasicTestMappingProtocol.test_get(self) d = self._empty_mapping() - self.assert_(d.get('c') is None) + self.assertTrue(d.get('c') is None) self.assertEqual(d.get('c', 3), 3) d = self._full_mapping({'a' : 1, 'b' : 2}) - self.assert_(d.get('c') is None) + self.assertTrue(d.get('c') is None) self.assertEqual(d.get('c', 3), 3) self.assertEqual(d.get('a'), 1) self.assertEqual(d.get('a', 3), 1) @@ -497,9 +497,9 @@ def test_setdefault(self): BasicTestMappingProtocol.test_setdefault(self) d = self._empty_mapping() - self.assert_(d.setdefault('key0') is None) + self.assertTrue(d.setdefault('key0') is None) d.setdefault('key0', []) - self.assert_(d.setdefault('key0') is None) + self.assertTrue(d.setdefault('key0') is None) d.setdefault('key', []).append(3) self.assertEqual(d['key'][0], 3) d.setdefault('key', []).append(4) @@ -525,9 +525,9 @@ self.assertEqual(va, int(ka)) kb, vb = tb = b.popitem() self.assertEqual(vb, int(kb)) - self.assert_(not(copymode < 0 and ta != tb)) - self.assert_(not a) - self.assert_(not b) + self.assertTrue(not(copymode < 0 and ta != tb)) + self.assertTrue(not a) + self.assertTrue(not b) def test_pop(self): BasicTestMappingProtocol.test_pop(self) @@ -585,7 +585,7 @@ return UserDict.UserDict() ud = mydict.fromkeys('ab') self.assertEqual(ud, {'a':None, 'b':None}) - self.assert_(isinstance(ud, UserDict.UserDict)) + self.assertTrue(isinstance(ud, UserDict.UserDict)) def test_pop(self): TestMappingProtocol.test_pop(self) @@ -636,8 +636,8 @@ self.assertRaises(Exc, repr, d) def test_le(self): - self.assert_(not (self._empty_mapping() < self._empty_mapping())) - self.assert_(not (self._full_mapping({1: 2}) < self._full_mapping({1L: 2L}))) + self.assertTrue(not (self._empty_mapping() < self._empty_mapping())) + self.assertTrue(not (self._full_mapping({1: 2}) < self._full_mapping({1L: 2L}))) class Exc(Exception): pass Modified: python/trunk/Lib/test/pickletester.py ============================================================================== --- python/trunk/Lib/test/pickletester.py (original) +++ python/trunk/Lib/test/pickletester.py Wed Jul 1 00:57:08 2009 @@ -461,7 +461,7 @@ s = self.dumps(l, proto) x = self.loads(s) self.assertEqual(len(x), 1) - self.assert_(x is x[0]) + self.assertTrue(x is x[0]) def test_recursive_tuple(self): t = ([],) @@ -471,7 +471,7 @@ x = self.loads(s) self.assertEqual(len(x), 1) self.assertEqual(len(x[0]), 1) - self.assert_(x is x[0][0]) + self.assertTrue(x is x[0][0]) def test_recursive_dict(self): d = {} @@ -480,7 +480,7 @@ s = self.dumps(d, proto) x = self.loads(s) self.assertEqual(x.keys(), [1]) - self.assert_(x[1] is x) + self.assertTrue(x[1] is x) def test_recursive_inst(self): i = C() @@ -489,7 +489,7 @@ s = self.dumps(i, 2) x = self.loads(s) self.assertEqual(dir(x), dir(i)) - self.assert_(x.attr is x) + self.assertTrue(x.attr is x) def test_recursive_multi(self): l = [] @@ -503,7 +503,7 @@ self.assertEqual(len(x), 1) self.assertEqual(dir(x[0]), dir(i)) self.assertEqual(x[0].attr.keys(), [1]) - self.assert_(x[0].attr[1] is x) + self.assertTrue(x[0].attr[1] is x) def test_garyp(self): self.assertRaises(self.error, self.loads, 'garyp') @@ -644,7 +644,7 @@ try: self.loads(badpickle) except ValueError, detail: - self.failUnless(str(detail).startswith( + self.assertTrue(str(detail).startswith( "unsupported pickle protocol")) else: self.fail("expected bad protocol number to raise ValueError") @@ -716,7 +716,7 @@ for x in None, False, True: s = self.dumps(x, proto) y = self.loads(s) - self.assert_(x is y, (proto, x, s, y)) + self.assertTrue(x is y, (proto, x, s, y)) expected = expected_opcode[proto, x] self.assertEqual(opcode_in_pickle(expected, s), True) @@ -766,8 +766,8 @@ # Dump using protocol 1 for comparison. s1 = self.dumps(x, 1) - self.assert_(__name__ in s1) - self.assert_("MyList" in s1) + self.assertTrue(__name__ in s1) + self.assertTrue("MyList" in s1) self.assertEqual(opcode_in_pickle(opcode, s1), False) y = self.loads(s1) @@ -776,8 +776,8 @@ # Dump using protocol 2 for test. s2 = self.dumps(x, 2) - self.assert_(__name__ not in s2) - self.assert_("MyList" not in s2) + self.assertTrue(__name__ not in s2) + self.assertTrue("MyList" not in s2) self.assertEqual(opcode_in_pickle(opcode, s2), True) y = self.loads(s2) @@ -821,7 +821,7 @@ if proto == 0: self.assertEqual(num_appends, 0) else: - self.failUnless(num_appends >= 2) + self.assertTrue(num_appends >= 2) def test_dict_chunking(self): n = 10 # too small to chunk @@ -843,7 +843,7 @@ if proto == 0: self.assertEqual(num_setitems, 0) else: - self.failUnless(num_setitems >= 2) + self.assertTrue(num_setitems >= 2) def test_simple_newobj(self): x = object.__new__(SimpleNewObj) # avoid __init__ Modified: python/trunk/Lib/test/test_StringIO.py ============================================================================== --- python/trunk/Lib/test/test_StringIO.py (original) +++ python/trunk/Lib/test/test_StringIO.py Wed Jul 1 00:57:08 2009 @@ -85,7 +85,7 @@ def test_iterator(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue eq(iter(self._fp), self._fp) # Does this object support the iteration protocol? unless(hasattr(self._fp, '__iter__')) Modified: python/trunk/Lib/test/test___all__.py ============================================================================== --- python/trunk/Lib/test/test___all__.py (original) +++ python/trunk/Lib/test/test___all__.py Wed Jul 1 00:57:08 2009 @@ -18,7 +18,7 @@ # Silent fail here seems the best route since some modules # may not be available in all environments. return - self.failUnless(hasattr(sys.modules[modname], "__all__"), + self.assertTrue(hasattr(sys.modules[modname], "__all__"), "%s has no __all__ attribute" % modname) names = {} exec "from %s import *" % modname in names Modified: python/trunk/Lib/test/test___future__.py ============================================================================== --- python/trunk/Lib/test/test___future__.py (original) +++ python/trunk/Lib/test/test___future__.py Wed Jul 1 00:57:08 2009 @@ -15,7 +15,7 @@ for name in dir(__future__): obj = getattr(__future__, name, None) if obj is not None and isinstance(obj, __future__._Feature): - self.assert_( + self.assertTrue( name in given_feature_names, "%r should have been in all_feature_names" % name ) @@ -30,7 +30,7 @@ optional = value.getOptionalRelease() mandatory = value.getMandatoryRelease() - a = self.assert_ + a = self.assertTrue e = self.assertEqual def check(t, name): a(isinstance(t, tuple), "%s isn't tuple" % name) Modified: python/trunk/Lib/test/test_abc.py ============================================================================== --- python/trunk/Lib/test/test_abc.py (original) +++ python/trunk/Lib/test/test_abc.py Wed Jul 1 00:57:08 2009 @@ -44,23 +44,23 @@ def bar(self): pass # concrete self.assertEqual(C.__abstractmethods__, set(["foo"])) self.assertRaises(TypeError, C) # because foo is abstract - self.assert_(isabstract(C)) + self.assertTrue(isabstract(C)) class D(C): def bar(self): pass # concrete override of concrete self.assertEqual(D.__abstractmethods__, set(["foo"])) self.assertRaises(TypeError, D) # because foo is still abstract - self.assert_(isabstract(D)) + self.assertTrue(isabstract(D)) class E(D): def foo(self): pass self.assertEqual(E.__abstractmethods__, set()) E() # now foo is concrete, too - self.failIf(isabstract(E)) + self.assertFalse(isabstract(E)) class F(E): @abstractthing def bar(self): pass # abstract override of concrete self.assertEqual(F.__abstractmethods__, set(["bar"])) self.assertRaises(TypeError, F) # because bar is abstract now - self.assert_(isabstract(F)) + self.assertTrue(isabstract(F)) def test_subclass_oldstyle_class(self): class A: @@ -152,41 +152,41 @@ def test_registration_transitiveness(self): class A: __metaclass__ = abc.ABCMeta - self.failUnless(issubclass(A, A)) - self.failUnless(issubclass(A, (A,))) + self.assertTrue(issubclass(A, A)) + self.assertTrue(issubclass(A, (A,))) class B: __metaclass__ = abc.ABCMeta - self.failIf(issubclass(A, B)) - self.failIf(issubclass(A, (B,))) - self.failIf(issubclass(B, A)) - self.failIf(issubclass(B, (A,))) + self.assertFalse(issubclass(A, B)) + self.assertFalse(issubclass(A, (B,))) + self.assertFalse(issubclass(B, A)) + self.assertFalse(issubclass(B, (A,))) class C: __metaclass__ = abc.ABCMeta A.register(B) class B1(B): pass - self.failUnless(issubclass(B1, A)) - self.failUnless(issubclass(B1, (A,))) + self.assertTrue(issubclass(B1, A)) + self.assertTrue(issubclass(B1, (A,))) class C1(C): pass B1.register(C1) - self.failIf(issubclass(C, B)) - self.failIf(issubclass(C, (B,))) - self.failIf(issubclass(C, B1)) - self.failIf(issubclass(C, (B1,))) - self.failUnless(issubclass(C1, A)) - self.failUnless(issubclass(C1, (A,))) - self.failUnless(issubclass(C1, B)) - self.failUnless(issubclass(C1, (B,))) - self.failUnless(issubclass(C1, B1)) - self.failUnless(issubclass(C1, (B1,))) + self.assertFalse(issubclass(C, B)) + self.assertFalse(issubclass(C, (B,))) + self.assertFalse(issubclass(C, B1)) + self.assertFalse(issubclass(C, (B1,))) + self.assertTrue(issubclass(C1, A)) + self.assertTrue(issubclass(C1, (A,))) + self.assertTrue(issubclass(C1, B)) + self.assertTrue(issubclass(C1, (B,))) + self.assertTrue(issubclass(C1, B1)) + self.assertTrue(issubclass(C1, (B1,))) C1.register(int) class MyInt(int): pass - self.failUnless(issubclass(MyInt, A)) - self.failUnless(issubclass(MyInt, (A,))) - self.failUnless(isinstance(42, A)) - self.failUnless(isinstance(42, (A,))) + self.assertTrue(issubclass(MyInt, A)) + self.assertTrue(issubclass(MyInt, (A,))) + self.assertTrue(isinstance(42, A)) + self.assertTrue(isinstance(42, (A,))) def test_all_new_methods_are_called(self): class A: Modified: python/trunk/Lib/test/test_abstract_numbers.py ============================================================================== --- python/trunk/Lib/test/test_abstract_numbers.py (original) +++ python/trunk/Lib/test/test_abstract_numbers.py Wed Jul 1 00:57:08 2009 @@ -9,8 +9,8 @@ class TestNumbers(unittest.TestCase): def test_int(self): - self.failUnless(issubclass(int, Integral)) - self.failUnless(issubclass(int, Complex)) + self.assertTrue(issubclass(int, Integral)) + self.assertTrue(issubclass(int, Complex)) self.assertEqual(7, int(7).real) self.assertEqual(0, int(7).imag) @@ -19,8 +19,8 @@ self.assertEqual(1, int(7).denominator) def test_long(self): - self.failUnless(issubclass(long, Integral)) - self.failUnless(issubclass(long, Complex)) + self.assertTrue(issubclass(long, Integral)) + self.assertTrue(issubclass(long, Complex)) self.assertEqual(7, long(7).real) self.assertEqual(0, long(7).imag) @@ -29,16 +29,16 @@ self.assertEqual(1, long(7).denominator) def test_float(self): - self.failIf(issubclass(float, Rational)) - self.failUnless(issubclass(float, Real)) + self.assertFalse(issubclass(float, Rational)) + self.assertTrue(issubclass(float, Real)) self.assertEqual(7.3, float(7.3).real) self.assertEqual(0, float(7.3).imag) self.assertEqual(7.3, float(7.3).conjugate()) def test_complex(self): - self.failIf(issubclass(complex, Real)) - self.failUnless(issubclass(complex, Complex)) + self.assertFalse(issubclass(complex, Real)) + self.assertTrue(issubclass(complex, Complex)) c1, c2 = complex(3, 2), complex(4,1) # XXX: This is not ideal, but see the comment in math_trunc(). Modified: python/trunk/Lib/test/test_array.py ============================================================================== --- python/trunk/Lib/test/test_array.py (original) +++ python/trunk/Lib/test/test_array.py Wed Jul 1 00:57:08 2009 @@ -48,7 +48,7 @@ def test_constructor(self): a = array.array(self.typecode) self.assertEqual(a.typecode, self.typecode) - self.assert_(a.itemsize>=self.minitemsize) + self.assertTrue(a.itemsize>=self.minitemsize) self.assertRaises(TypeError, array.array, self.typecode, None) def test_len(self): @@ -63,10 +63,10 @@ a = array.array(self.typecode, self.example) self.assertRaises(TypeError, a.buffer_info, 42) bi = a.buffer_info() - self.assert_(isinstance(bi, tuple)) + self.assertTrue(isinstance(bi, tuple)) self.assertEqual(len(bi), 2) - self.assert_(isinstance(bi[0], (int, long))) - self.assert_(isinstance(bi[1], int)) + self.assertTrue(isinstance(bi[0], (int, long))) + self.assertTrue(isinstance(bi[1], int)) self.assertEqual(bi[1], len(a)) def test_byteswap(self): @@ -222,39 +222,39 @@ def test_cmp(self): a = array.array(self.typecode, self.example) - self.assert_((a == 42) is False) - self.assert_((a != 42) is True) + self.assertTrue((a == 42) is False) + self.assertTrue((a != 42) is True) - self.assert_((a == a) is True) - self.assert_((a != a) is False) - self.assert_((a < a) is False) - self.assert_((a <= a) is True) - self.assert_((a > a) is False) - self.assert_((a >= a) is True) + self.assertTrue((a == a) is True) + self.assertTrue((a != a) is False) + self.assertTrue((a < a) is False) + self.assertTrue((a <= a) is True) + self.assertTrue((a > a) is False) + self.assertTrue((a >= a) is True) al = array.array(self.typecode, self.smallerexample) ab = array.array(self.typecode, self.biggerexample) - self.assert_((a == 2*a) is False) - self.assert_((a != 2*a) is True) - self.assert_((a < 2*a) is True) - self.assert_((a <= 2*a) is True) - self.assert_((a > 2*a) is False) - self.assert_((a >= 2*a) is False) - - self.assert_((a == al) is False) - self.assert_((a != al) is True) - self.assert_((a < al) is False) - self.assert_((a <= al) is False) - self.assert_((a > al) is True) - self.assert_((a >= al) is True) - - self.assert_((a == ab) is False) - self.assert_((a != ab) is True) - self.assert_((a < ab) is True) - self.assert_((a <= ab) is True) - self.assert_((a > ab) is False) - self.assert_((a >= ab) is False) + self.assertTrue((a == 2*a) is False) + self.assertTrue((a != 2*a) is True) + self.assertTrue((a < 2*a) is True) + self.assertTrue((a <= 2*a) is True) + self.assertTrue((a > 2*a) is False) + self.assertTrue((a >= 2*a) is False) + + self.assertTrue((a == al) is False) + self.assertTrue((a != al) is True) + self.assertTrue((a < al) is False) + self.assertTrue((a <= al) is False) + self.assertTrue((a > al) is True) + self.assertTrue((a >= al) is True) + + self.assertTrue((a == ab) is False) + self.assertTrue((a != ab) is True) + self.assertTrue((a < ab) is True) + self.assertTrue((a <= ab) is True) + self.assertTrue((a > ab) is False) + self.assertTrue((a >= ab) is False) def test_add(self): a = array.array(self.typecode, self.example) \ @@ -273,7 +273,7 @@ a = array.array(self.typecode, self.example[::-1]) b = a a += array.array(self.typecode, 2*self.example) - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual( a, array.array(self.typecode, self.example[::-1]+2*self.example) @@ -316,22 +316,22 @@ b = a a *= 5 - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual( a, array.array(self.typecode, 5*self.example) ) a *= 0 - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual(a, array.array(self.typecode)) a *= 1000 - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual(a, array.array(self.typecode)) a *= -1 - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual(a, array.array(self.typecode)) a = array.array(self.typecode, self.example) Modified: python/trunk/Lib/test/test_ast.py ============================================================================== --- python/trunk/Lib/test/test_ast.py (original) +++ python/trunk/Lib/test/test_ast.py Wed Jul 1 00:57:08 2009 @@ -122,20 +122,20 @@ class AST_Tests(unittest.TestCase): - def _assert_order(self, ast_node, parent_pos): + def _assertTrueorder(self, ast_node, parent_pos): if not isinstance(ast_node, ast.AST) or ast_node._fields is None: return if isinstance(ast_node, (ast.expr, ast.stmt, ast.excepthandler)): node_pos = (ast_node.lineno, ast_node.col_offset) - self.assert_(node_pos >= parent_pos) + self.assertTrue(node_pos >= parent_pos) parent_pos = (ast_node.lineno, ast_node.col_offset) for name in ast_node._fields: value = getattr(ast_node, name) if isinstance(value, list): for child in value: - self._assert_order(child, parent_pos) + self._assertTrueorder(child, parent_pos) elif value is not None: - self._assert_order(value, parent_pos) + self._assertTrueorder(value, parent_pos) def test_snippets(self): for input, output, kind in ((exec_tests, exec_results, "exec"), @@ -144,7 +144,7 @@ for i, o in itertools.izip(input, output): ast_tree = compile(i, "?", kind, ast.PyCF_ONLY_AST) self.assertEquals(to_tuple(ast_tree), o) - self._assert_order(ast_tree, (0, 0)) + self._assertTrueorder(ast_tree, (0, 0)) def test_slice(self): slc = ast.parse("x[::]").body[0].value.slice Modified: python/trunk/Lib/test/test_augassign.py ============================================================================== --- python/trunk/Lib/test/test_augassign.py (original) +++ python/trunk/Lib/test/test_augassign.py Wed Jul 1 00:57:08 2009 @@ -71,7 +71,7 @@ y[1:2] += [1] self.assertEquals(x, [1, 2, 1, 2, 3]) - self.assert_(x is y) + self.assertTrue(x is y) def testCustomMethods1(self): @@ -96,23 +96,23 @@ y = x x += 10 - self.assert_(isinstance(x, aug_test)) - self.assert_(y is not x) + self.assertTrue(isinstance(x, aug_test)) + self.assertTrue(y is not x) self.assertEquals(x.val, 11) x = aug_test2(2) y = x x += 10 - self.assert_(y is x) + self.assertTrue(y is x) self.assertEquals(x.val, 12) x = aug_test3(3) y = x x += 10 - self.assert_(isinstance(x, aug_test3)) - self.assert_(y is not x) + self.assertTrue(isinstance(x, aug_test3)) + self.assertTrue(y is not x) self.assertEquals(x.val, 13) Modified: python/trunk/Lib/test/test_bigmem.py ============================================================================== --- python/trunk/Lib/test/test_bigmem.py (original) +++ python/trunk/Lib/test/test_bigmem.py Wed Jul 1 00:57:08 2009 @@ -130,18 +130,18 @@ except MemoryError: pass # acceptable on 32-bit else: - self.failUnless(s == eval(r)) + self.assertTrue(s == eval(r)) @bigmemtest(minsize=_2G, memuse=2) def test_endswith(self, size): SUBSTR = ' abc def ghi' s = '-' * size + SUBSTR - self.failUnless(s.endswith(SUBSTR)) - self.failUnless(s.endswith(s)) + self.assertTrue(s.endswith(SUBSTR)) + self.assertTrue(s.endswith(s)) s2 = '...' + s - self.failUnless(s2.endswith(s)) - self.failIf(s.endswith('a' + SUBSTR)) - self.failIf(SUBSTR.endswith(s)) + self.assertTrue(s2.endswith(s)) + self.assertFalse(s.endswith('a' + SUBSTR)) + self.assertFalse(SUBSTR.endswith(s)) @bigmemtest(minsize=_2G + 10, memuse=2) def test_expandtabs(self, size): @@ -191,62 +191,62 @@ def test_isalnum(self, size): SUBSTR = '123456' s = 'a' * size + SUBSTR - self.failUnless(s.isalnum()) + self.assertTrue(s.isalnum()) s += '.' - self.failIf(s.isalnum()) + self.assertFalse(s.isalnum()) @bigmemtest(minsize=_2G, memuse=2) def test_isalpha(self, size): SUBSTR = 'zzzzzzz' s = 'a' * size + SUBSTR - self.failUnless(s.isalpha()) + self.assertTrue(s.isalpha()) s += '.' - self.failIf(s.isalpha()) + self.assertFalse(s.isalpha()) @bigmemtest(minsize=_2G, memuse=2) def test_isdigit(self, size): SUBSTR = '123456' s = '9' * size + SUBSTR - self.failUnless(s.isdigit()) + self.assertTrue(s.isdigit()) s += 'z' - self.failIf(s.isdigit()) + self.assertFalse(s.isdigit()) @bigmemtest(minsize=_2G, memuse=2) def test_islower(self, size): chars = ''.join([ chr(c) for c in range(255) if not chr(c).isupper() ]) repeats = size // len(chars) + 2 s = chars * repeats - self.failUnless(s.islower()) + self.assertTrue(s.islower()) s += 'A' - self.failIf(s.islower()) + self.assertFalse(s.islower()) @bigmemtest(minsize=_2G, memuse=2) def test_isspace(self, size): whitespace = ' \f\n\r\t\v' repeats = size // len(whitespace) + 2 s = whitespace * repeats - self.failUnless(s.isspace()) + self.assertTrue(s.isspace()) s += 'j' - self.failIf(s.isspace()) + self.assertFalse(s.isspace()) @bigmemtest(minsize=_2G, memuse=2) def test_istitle(self, size): SUBSTR = '123456' s = ''.join(['A', 'a' * size, SUBSTR]) - self.failUnless(s.istitle()) + self.assertTrue(s.istitle()) s += 'A' - self.failUnless(s.istitle()) + self.assertTrue(s.istitle()) s += 'aA' - self.failIf(s.istitle()) + self.assertFalse(s.istitle()) @bigmemtest(minsize=_2G, memuse=2) def test_isupper(self, size): chars = ''.join([ chr(c) for c in range(255) if not chr(c).islower() ]) repeats = size // len(chars) + 2 s = chars * repeats - self.failUnless(s.isupper()) + self.assertTrue(s.isupper()) s += 'a' - self.failIf(s.isupper()) + self.assertFalse(s.isupper()) @bigmemtest(minsize=_2G, memuse=2) def test_join(self, size): @@ -254,14 +254,14 @@ x = s.join(['aaaaa', 'bbbbb']) self.assertEquals(x.count('a'), 5) self.assertEquals(x.count('b'), 5) - self.failUnless(x.startswith('aaaaaA')) - self.failUnless(x.endswith('Abbbbb')) + self.assertTrue(x.startswith('aaaaaA')) + self.assertTrue(x.endswith('Abbbbb')) @bigmemtest(minsize=_2G + 10, memuse=1) def test_ljust(self, size): SUBSTR = ' abc def ghi' s = SUBSTR.ljust(size) - self.failUnless(s.startswith(SUBSTR + ' ')) + self.assertTrue(s.startswith(SUBSTR + ' ')) self.assertEquals(len(s), size) self.assertEquals(s.strip(), SUBSTR.strip()) @@ -282,7 +282,7 @@ s = SUBSTR.ljust(size) self.assertEquals(len(s), size) stripped = s.lstrip() - self.failUnless(stripped is s) + self.assertTrue(stripped is s) @bigmemtest(minsize=_2G + 10, memuse=2) def test_replace(self, size): @@ -333,7 +333,7 @@ def test_rjust(self, size): SUBSTR = ' abc def ghi' s = SUBSTR.ljust(size) - self.failUnless(s.startswith(SUBSTR + ' ')) + self.assertTrue(s.startswith(SUBSTR + ' ')) self.assertEquals(len(s), size) self.assertEquals(s.strip(), SUBSTR.strip()) @@ -347,7 +347,7 @@ s = SUBSTR.rjust(size) self.assertEquals(len(s), size) stripped = s.rstrip() - self.failUnless(stripped is s) + self.assertTrue(stripped is s) # The test takes about size bytes to build a string, and then about # sqrt(size) substrings of sqrt(size) in size and a list to @@ -399,9 +399,9 @@ def test_startswith(self, size): SUBSTR = ' abc def ghi' s = '-' * size + SUBSTR - self.failUnless(s.startswith(s)) - self.failUnless(s.startswith('-' * size)) - self.failIf(s.startswith(SUBSTR)) + self.assertTrue(s.startswith(s)) + self.assertTrue(s.startswith('-' * size)) + self.assertFalse(s.startswith(SUBSTR)) @bigmemtest(minsize=_2G, memuse=1) def test_strip(self, size): @@ -430,8 +430,8 @@ SUBSTR = 'SpaaHAaaAaham' s = SUBSTR * (size // len(SUBSTR) + 2) s = s.title() - self.failUnless(s.startswith((SUBSTR * 3).title())) - self.failUnless(s.endswith(SUBSTR.lower() * 3)) + self.assertTrue(s.startswith((SUBSTR * 3).title())) + self.assertTrue(s.endswith(SUBSTR.lower() * 3)) @bigmemtest(minsize=_2G, memuse=2) def test_translate(self, size): @@ -459,8 +459,8 @@ def test_zfill(self, size): SUBSTR = '-568324723598234' s = SUBSTR.zfill(size) - self.failUnless(s.endswith('0' + SUBSTR[1:])) - self.failUnless(s.startswith('-0')) + self.assertTrue(s.endswith('0' + SUBSTR[1:])) + self.assertTrue(s.startswith('-0')) self.assertEquals(len(s), size) self.assertEquals(s.count('0'), size - len(SUBSTR)) @@ -468,12 +468,12 @@ def test_format(self, size): s = '-' * size sf = '%s' % (s,) - self.failUnless(s == sf) + self.assertTrue(s == sf) del sf sf = '..%s..' % (s,) self.assertEquals(len(sf), len(s) + 4) - self.failUnless(sf.startswith('..-')) - self.failUnless(sf.endswith('-..')) + self.assertTrue(sf.startswith('..-')) + self.assertTrue(sf.endswith('-..')) del s, sf size //= 2 @@ -519,7 +519,7 @@ @bigmemtest(minsize=2**32 / 5, memuse=6+2) def test_unicode_repr(self, size): s = u"\uAAAA" * size - self.failUnless(len(repr(s)) > size) + self.assertTrue(len(repr(s)) > size) # This test is meaningful even with size < 2G, as long as the # doubled string is > 2G (but it tests more if both are > 2G :) @@ -580,24 +580,24 @@ edge = '-' * (size // 2) s = ''.join([edge, SUBSTR, edge]) del edge - self.failUnless(SUBSTR in s) - self.failIf(SUBSTR * 2 in s) - self.failUnless('-' in s) - self.failIf('a' in s) + self.assertTrue(SUBSTR in s) + self.assertFalse(SUBSTR * 2 in s) + self.assertTrue('-' in s) + self.assertFalse('a' in s) s += 'a' - self.failUnless('a' in s) + self.assertTrue('a' in s) @bigmemtest(minsize=_2G + 10, memuse=2) def test_compare(self, size): s1 = '-' * size s2 = '-' * size - self.failUnless(s1 == s2) + self.assertTrue(s1 == s2) del s2 s2 = s1 + 'a' - self.failIf(s1 == s2) + self.assertFalse(s1 == s2) del s2 s2 = '.' * size - self.failIf(s1 == s2) + self.assertFalse(s1 == s2) @bigmemtest(minsize=_2G + 10, memuse=1) def test_hash(self, size): @@ -611,7 +611,7 @@ h1 = hash(s) del s s = '\x00' * (size + 1) - self.failIf(h1 == hash(s)) + self.assertFalse(h1 == hash(s)) class TupleTest(unittest.TestCase): @@ -628,13 +628,13 @@ def test_compare(self, size): t1 = (u'',) * size t2 = (u'',) * size - self.failUnless(t1 == t2) + self.assertTrue(t1 == t2) del t2 t2 = (u'',) * (size + 1) - self.failIf(t1 == t2) + self.assertFalse(t1 == t2) del t2 t2 = (1,) * size - self.failIf(t1 == t2) + self.assertFalse(t1 == t2) # Test concatenating into a single tuple of more than 2G in length, # and concatenating a tuple of more than 2G in length separately, so @@ -659,9 +659,9 @@ def test_contains(self, size): t = (1, 2, 3, 4, 5) * size self.assertEquals(len(t), size * 5) - self.failUnless(5 in t) - self.failIf((1, 2, 3, 4, 5) in t) - self.failIf(0 in t) + self.assertTrue(5 in t) + self.assertFalse((1, 2, 3, 4, 5) in t) + self.assertFalse(0 in t) @bigmemtest(minsize=_2G + 10, memuse=8) def test_hash(self, size): @@ -669,7 +669,7 @@ h1 = hash(t1) del t1 t2 = (0,) * (size + 1) - self.failIf(h1 == hash(t2)) + self.assertFalse(h1 == hash(t2)) @bigmemtest(minsize=_2G + 10, memuse=8) def test_index_and_slice(self, size): @@ -762,13 +762,13 @@ def test_compare(self, size): l1 = [u''] * size l2 = [u''] * size - self.failUnless(l1 == l2) + self.assertTrue(l1 == l2) del l2 l2 = [u''] * (size + 1) - self.failIf(l1 == l2) + self.assertFalse(l1 == l2) del l2 l2 = [2] * size - self.failIf(l1 == l2) + self.assertFalse(l1 == l2) # Test concatenating into a single list of more than 2G in length, # and concatenating a list of more than 2G in length separately, so @@ -793,8 +793,8 @@ l = [sys.stdout] * size l += l self.assertEquals(len(l), size * 2) - self.failUnless(l[0] is l[-1]) - self.failUnless(l[size - 1] is l[size + 1]) + self.assertTrue(l[0] is l[-1]) + self.assertTrue(l[size - 1] is l[size + 1]) @bigmemtest(minsize=_2G // 2 + 2, memuse=24) def test_inplace_concat_small(self, size): @@ -808,14 +808,14 @@ def test_contains(self, size): l = [1, 2, 3, 4, 5] * size self.assertEquals(len(l), size * 5) - self.failUnless(5 in l) - self.failIf([1, 2, 3, 4, 5] in l) - self.failIf(0 in l) + self.assertTrue(5 in l) + self.assertFalse([1, 2, 3, 4, 5] in l) + self.assertFalse(0 in l) @bigmemtest(minsize=_2G + 10, memuse=8) def test_hash(self, size): l = [0] * size - self.failUnlessRaises(TypeError, hash, l) + self.assertRaises(TypeError, hash, l) @bigmemtest(minsize=_2G + 10, memuse=8) def test_index_and_slice(self, size): @@ -875,7 +875,7 @@ # Like test_concat, split in two. def basic_test_repeat(self, size): l = [] * size - self.failIf(l) + self.assertFalse(l) l = [''] * size self.assertEquals(len(l), size) l = l * 2 @@ -893,13 +893,13 @@ l = [''] l *= size self.assertEquals(len(l), size) - self.failUnless(l[0] is l[-1]) + self.assertTrue(l[0] is l[-1]) del l l = [''] * size l *= 2 self.assertEquals(len(l), size * 2) - self.failUnless(l[size - 1] is l[-1]) + self.assertTrue(l[size - 1] is l[-1]) @bigmemtest(minsize=_2G // 2 + 2, memuse=16) def test_inplace_repeat_small(self, size): @@ -933,8 +933,8 @@ l = [object()] * size l.append(object()) self.assertEquals(len(l), size+1) - self.failUnless(l[-3] is l[-2]) - self.failIf(l[-2] is l[-1]) + self.assertTrue(l[-3] is l[-2]) + self.assertFalse(l[-2] is l[-1]) @bigmemtest(minsize=_2G // 5 + 2, memuse=8 * 5) def test_count(self, size): @@ -946,8 +946,8 @@ l = [file] * size l.extend(l) self.assertEquals(len(l), size * 2) - self.failUnless(l[0] is l[-1]) - self.failUnless(l[size - 1] is l[size + 1]) + self.assertTrue(l[0] is l[-1]) + self.assertTrue(l[size - 1] is l[size + 1]) @bigmemtest(minsize=_2G // 2 + 2, memuse=16) def test_extend_small(self, size): Modified: python/trunk/Lib/test/test_binascii.py ============================================================================== --- python/trunk/Lib/test/test_binascii.py (original) +++ python/trunk/Lib/test/test_binascii.py Wed Jul 1 00:57:08 2009 @@ -14,8 +14,8 @@ def test_exceptions(self): # Check module exceptions - self.assert_(issubclass(binascii.Error, Exception)) - self.assert_(issubclass(binascii.Incomplete, Exception)) + self.assertTrue(issubclass(binascii.Error, Exception)) + self.assertTrue(issubclass(binascii.Incomplete, Exception)) def test_functions(self): # Check presence of all functions @@ -26,10 +26,10 @@ prefixes.extend(["crc_", "rlecode_", "rledecode_"]) for prefix in prefixes: name = prefix + suffix - self.assert_(callable(getattr(binascii, name))) + self.assertTrue(callable(getattr(binascii, name))) self.assertRaises(TypeError, getattr(binascii, name)) for name in ("hexlify", "unhexlify"): - self.assert_(callable(getattr(binascii, name))) + self.assertTrue(callable(getattr(binascii, name))) self.assertRaises(TypeError, getattr(binascii, name)) def test_base64valid(self): Modified: python/trunk/Lib/test/test_binop.py ============================================================================== --- python/trunk/Lib/test/test_binop.py (original) +++ python/trunk/Lib/test/test_binop.py Wed Jul 1 00:57:08 2009 @@ -220,10 +220,10 @@ self.assertEqual(gcd(-10, -2), -2) for i in range(1, 20): for j in range(1, 20): - self.assert_(gcd(i, j) > 0) - self.assert_(gcd(-i, j) < 0) - self.assert_(gcd(i, -j) > 0) - self.assert_(gcd(-i, -j) < 0) + self.assertTrue(gcd(i, j) > 0) + self.assertTrue(gcd(-i, j) < 0) + self.assertTrue(gcd(i, -j) > 0) + self.assertTrue(gcd(-i, -j) < 0) def test_constructor(self): a = Rat(10, 15) Modified: python/trunk/Lib/test/test_bisect.py ============================================================================== --- python/trunk/Lib/test/test_bisect.py (original) +++ python/trunk/Lib/test/test_bisect.py Wed Jul 1 00:57:08 2009 @@ -130,14 +130,14 @@ elem = randrange(-1, n+1) ip = self.module.bisect_left(data, elem) if ip < len(data): - self.failUnless(elem <= data[ip]) + self.assertTrue(elem <= data[ip]) if ip > 0: - self.failUnless(data[ip-1] < elem) + self.assertTrue(data[ip-1] < elem) ip = self.module.bisect_right(data, elem) if ip < len(data): - self.failUnless(elem < data[ip]) + self.assertTrue(elem < data[ip]) if ip > 0: - self.failUnless(data[ip-1] <= elem) + self.assertTrue(data[ip-1] <= elem) def test_optionalSlicing(self): for func, data, elem, expected in self.precomputedCases: @@ -146,15 +146,15 @@ for hi in xrange(3,8): hi = min(len(data), hi) ip = func(data, elem, lo, hi) - self.failUnless(lo <= ip <= hi) + self.assertTrue(lo <= ip <= hi) if func is self.module.bisect_left and ip < hi: - self.failUnless(elem <= data[ip]) + self.assertTrue(elem <= data[ip]) if func is self.module.bisect_left and ip > lo: - self.failUnless(data[ip-1] < elem) + self.assertTrue(data[ip-1] < elem) if func is self.module.bisect_right and ip < hi: - self.failUnless(elem < data[ip]) + self.assertTrue(elem < data[ip]) if func is self.module.bisect_right and ip > lo: - self.failUnless(data[ip-1] <= elem) + self.assertTrue(data[ip-1] <= elem) self.assertEqual(ip, max(lo, min(hi, expected))) def test_backcompatibility(self): Modified: python/trunk/Lib/test/test_bool.py ============================================================================== --- python/trunk/Lib/test/test_bool.py (original) +++ python/trunk/Lib/test/test_bool.py Wed Jul 1 00:57:08 2009 @@ -8,10 +8,10 @@ class BoolTest(unittest.TestCase): def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def assertIsNot(self, a, b): - self.assert_(a is not b) + self.assertTrue(a is not b) def test_subclass(self): try: @@ -233,15 +233,15 @@ def test_boolean(self): self.assertEqual(True & 1, 1) - self.assert_(not isinstance(True & 1, bool)) + self.assertTrue(not isinstance(True & 1, bool)) self.assertIs(True & True, True) self.assertEqual(True | 1, 1) - self.assert_(not isinstance(True | 1, bool)) + self.assertTrue(not isinstance(True | 1, bool)) self.assertIs(True | True, True) self.assertEqual(True ^ 1, 0) - self.assert_(not isinstance(True ^ 1, bool)) + self.assertTrue(not isinstance(True ^ 1, bool)) self.assertIs(True ^ True, False) def test_fileclosed(self): Modified: python/trunk/Lib/test/test_bsddb.py ============================================================================== --- python/trunk/Lib/test/test_bsddb.py (original) +++ python/trunk/Lib/test/test_bsddb.py Wed Jul 1 00:57:08 2009 @@ -43,8 +43,8 @@ def test_change(self): self.f['r'] = 'discovered' self.assertEqual(self.f['r'], 'discovered') - self.assert_('r' in self.f.keys()) - self.assert_('discovered' in self.f.values()) + self.assertTrue('r' in self.f.keys()) + self.assertTrue('discovered' in self.f.values()) def test_close_and_reopen(self): if self.fname is None: @@ -176,7 +176,7 @@ def test_first_while_deleting(self): # Test for bug 1725856 - self.assert_(len(self.d) >= 2, "test requires >=2 items") + self.assertTrue(len(self.d) >= 2, "test requires >=2 items") for _ in self.d: key = self.f.first()[0] del self.f[key] @@ -184,7 +184,7 @@ def test_last_while_deleting(self): # Test for bug 1725856's evil twin - self.assert_(len(self.d) >= 2, "test requires >=2 items") + self.assertTrue(len(self.d) >= 2, "test requires >=2 items") for _ in self.d: key = self.f.last()[0] del self.f[key] @@ -195,13 +195,13 @@ def test_contains(self): for k in self.d: - self.assert_(k in self.f) - self.assert_('not here' not in self.f) + self.assertTrue(k in self.f) + self.assertTrue('not here' not in self.f) def test_has_key(self): for k in self.d: - self.assert_(self.f.has_key(k)) - self.assert_(not self.f.has_key('not here')) + self.assertTrue(self.f.has_key(k)) + self.assertTrue(not self.f.has_key('not here')) def test_clear(self): self.f.clear() @@ -253,11 +253,11 @@ if debug: print "K" # test the legacy cursor interface mixed with writes - self.assert_(self.f.first()[0] in self.d) + self.assertTrue(self.f.first()[0] in self.d) k = self.f.next()[0] - self.assert_(k in self.d) + self.assertTrue(k in self.d) self.f[k] = "be gone with ye deadlocks" - self.assert_(self.f[k], "be gone with ye deadlocks") + self.assertTrue(self.f[k], "be gone with ye deadlocks") def test_for_cursor_memleak(self): # do the bsddb._DBWithCursor iterator internals leak cursors? @@ -275,21 +275,21 @@ self.assertEqual(nc1, nc2) self.assertEqual(nc1, nc4) - self.assert_(nc3 == nc1+1) + self.assertTrue(nc3 == nc1+1) def test_popitem(self): k, v = self.f.popitem() - self.assert_(k in self.d) - self.assert_(v in self.d.values()) - self.assert_(k not in self.f) + self.assertTrue(k in self.d) + self.assertTrue(v in self.d.values()) + self.assertTrue(k not in self.f) self.assertEqual(len(self.d)-1, len(self.f)) def test_pop(self): k = 'w' v = self.f.pop(k) self.assertEqual(v, self.d[k]) - self.assert_(k not in self.f) - self.assert_(v not in self.f.values()) + self.assertTrue(k not in self.f) + self.assertTrue(v not in self.f.values()) self.assertEqual(len(self.d)-1, len(self.f)) def test_get(self): Modified: python/trunk/Lib/test/test_bufio.py ============================================================================== --- python/trunk/Lib/test/test_bufio.py (original) +++ python/trunk/Lib/test/test_bufio.py Wed Jul 1 00:57:08 2009 @@ -34,7 +34,7 @@ line = f.readline() self.assertEqual(line, s) line = f.readline() - self.assert_(not line) # Must be at EOF + self.assertTrue(not line) # Must be at EOF f.close() finally: support.unlink(support.TESTFN) Modified: python/trunk/Lib/test/test_builtin.py ============================================================================== --- python/trunk/Lib/test/test_builtin.py (original) +++ python/trunk/Lib/test/test_builtin.py Wed Jul 1 00:57:08 2009 @@ -122,7 +122,7 @@ def test_neg(self): x = -sys.maxint-1 - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) self.assertEqual(-x, sys.maxint+1) def test_apply(self): @@ -152,19 +152,19 @@ self.assertRaises(TypeError, apply, id, (42,), 42) def test_callable(self): - self.assert_(callable(len)) + self.assertTrue(callable(len)) def f(): pass - self.assert_(callable(f)) + self.assertTrue(callable(f)) class C: def meth(self): pass - self.assert_(callable(C)) + self.assertTrue(callable(C)) x = C() - self.assert_(callable(x.meth)) - self.assert_(not callable(x)) + self.assertTrue(callable(x.meth)) + self.assertTrue(not callable(x)) class D(C): def __call__(self): pass y = D() - self.assert_(callable(y)) + self.assertTrue(callable(y)) y() def test_chr(self): @@ -193,9 +193,9 @@ self.assertRaises(TypeError, cmp) def test_coerce(self): - self.assert_(not fcmp(coerce(1, 1.1), (1.0, 1.1))) + self.assertTrue(not fcmp(coerce(1, 1.1), (1.0, 1.1))) self.assertEqual(coerce(1, 1L), (1L, 1L)) - self.assert_(not fcmp(coerce(1L, 1.1), (1.0, 1.1))) + self.assertTrue(not fcmp(coerce(1L, 1.1), (1.0, 1.1))) self.assertRaises(TypeError, coerce) class BadNumber: def __coerce__(self, other): @@ -234,11 +234,11 @@ # dir() - local scope local_var = 1 - self.assert_('local_var' in dir()) + self.assertTrue('local_var' in dir()) # dir(module) import sys - self.assert_('exit' in dir(sys)) + self.assertTrue('exit' in dir(sys)) # dir(module_with_invalid__dict__) import types @@ -248,8 +248,8 @@ self.assertRaises(TypeError, dir, f) # dir(type) - self.assert_("strip" in dir(str)) - self.assert_("__mro__" not in dir(str)) + self.assertTrue("strip" in dir(str)) + self.assertTrue("__mro__" not in dir(str)) # dir(obj) class Foo(object): @@ -258,13 +258,13 @@ self.y = 8 self.z = 9 f = Foo() - self.assert_("y" in dir(f)) + self.assertTrue("y" in dir(f)) # dir(obj_no__dict__) class Foo(object): __slots__ = [] f = Foo() - self.assert_("__repr__" in dir(f)) + self.assertTrue("__repr__" in dir(f)) # dir(obj_no__class__with__dict__) # (an ugly trick to cause getattr(f, "__class__") to fail) @@ -273,15 +273,15 @@ def __init__(self): self.bar = "wow" f = Foo() - self.assert_("__repr__" not in dir(f)) - self.assert_("bar" in dir(f)) + self.assertTrue("__repr__" not in dir(f)) + self.assertTrue("bar" in dir(f)) # dir(obj_using __dir__) class Foo(object): def __dir__(self): return ["kan", "ga", "roo"] f = Foo() - self.assert_(dir(f) == ["ga", "kan", "roo"]) + self.assertTrue(dir(f) == ["ga", "kan", "roo"]) # dir(obj__dir__not_list) class Foo(object): @@ -309,10 +309,10 @@ self.assertEqual(divmod(-sys.maxint-1, -1), (sys.maxint+1, 0)) - self.assert_(not fcmp(divmod(3.25, 1.0), (3.0, 0.25))) - self.assert_(not fcmp(divmod(-3.25, 1.0), (-4.0, 0.75))) - self.assert_(not fcmp(divmod(3.25, -1.0), (-4.0, -0.75))) - self.assert_(not fcmp(divmod(-3.25, -1.0), (3.0, -0.25))) + self.assertTrue(not fcmp(divmod(3.25, 1.0), (3.0, 0.25))) + self.assertTrue(not fcmp(divmod(-3.25, 1.0), (-4.0, 0.75))) + self.assertTrue(not fcmp(divmod(3.25, -1.0), (-4.0, -0.75))) + self.assertTrue(not fcmp(divmod(-3.25, -1.0), (3.0, -0.25))) self.assertRaises(TypeError, divmod) @@ -571,11 +571,11 @@ for func in funcs: outp = filter(func, cls(inp)) self.assertEqual(outp, exp) - self.assert_(not isinstance(outp, cls)) + self.assertTrue(not isinstance(outp, cls)) def test_getattr(self): import sys - self.assert_(getattr(sys, 'stdout') is sys.stdout) + self.assertTrue(getattr(sys, 'stdout') is sys.stdout) self.assertRaises(TypeError, getattr, sys, 1) self.assertRaises(TypeError, getattr, sys, 1, "foo") self.assertRaises(TypeError, getattr) @@ -584,7 +584,7 @@ def test_hasattr(self): import sys - self.assert_(hasattr(sys, 'stdout')) + self.assertTrue(hasattr(sys, 'stdout')) self.assertRaises(TypeError, hasattr, sys, 1) self.assertRaises(TypeError, hasattr) if have_unicode: @@ -647,9 +647,9 @@ def test_intern(self): self.assertRaises(TypeError, intern) s = "never interned before" - self.assert_(intern(s) is s) + self.assertTrue(intern(s) is s) s2 = s.swapcase().swapcase() - self.assert_(intern(s2) is s) + self.assertTrue(intern(s2) is s) # Subclasses of string can't be interned, because they # provide too much opportunity for insane things to happen. @@ -690,11 +690,11 @@ c = C() d = D() e = E() - self.assert_(isinstance(c, C)) - self.assert_(isinstance(d, C)) - self.assert_(not isinstance(e, C)) - self.assert_(not isinstance(c, D)) - self.assert_(not isinstance('foo', E)) + self.assertTrue(isinstance(c, C)) + self.assertTrue(isinstance(d, C)) + self.assertTrue(not isinstance(e, C)) + self.assertTrue(not isinstance(c, D)) + self.assertTrue(not isinstance('foo', E)) self.assertRaises(TypeError, isinstance, E, 'foo') self.assertRaises(TypeError, isinstance) @@ -708,9 +708,9 @@ c = C() d = D() e = E() - self.assert_(issubclass(D, C)) - self.assert_(issubclass(C, C)) - self.assert_(not issubclass(C, D)) + self.assertTrue(issubclass(D, C)) + self.assertTrue(issubclass(C, C)) + self.assertTrue(not issubclass(C, D)) self.assertRaises(TypeError, issubclass, 'foo', E) self.assertRaises(TypeError, issubclass, E, 'foo') self.assertRaises(TypeError, issubclass) @@ -1042,18 +1042,18 @@ self.assertEqual(range(a+4, a, -2), [a+4, a+2]) seq = range(a, b, c) - self.assert_(a in seq) - self.assert_(b not in seq) + self.assertTrue(a in seq) + self.assertTrue(b not in seq) self.assertEqual(len(seq), 2) seq = range(b, a, -c) - self.assert_(b in seq) - self.assert_(a not in seq) + self.assertTrue(b in seq) + self.assertTrue(a not in seq) self.assertEqual(len(seq), 2) seq = range(-a, -b, -c) - self.assert_(-a in seq) - self.assert_(-b not in seq) + self.assertTrue(-a in seq) + self.assertTrue(-b not in seq) self.assertEqual(len(seq), 2) self.assertRaises(TypeError, range) @@ -1452,7 +1452,7 @@ # tests for object.__format__ really belong elsewhere, but # there's no good place to put them x = object().__format__('') - self.assert_(x.startswith('= b2) - self.failUnless(b3 >= b2) - self.failUnless(b3 > b2) - - self.failIf(b1 != b2) - self.failIf(b2 == b3) - self.failIf(b1 > b2) - self.failIf(b1 > b3) - self.failIf(b1 >= b3) - self.failIf(b1 < b2) - self.failIf(b3 < b2) - self.failIf(b3 <= b2) + self.assertTrue(b2 != b3) + self.assertTrue(b1 <= b2) + self.assertTrue(b1 <= b3) + self.assertTrue(b1 < b3) + self.assertTrue(b1 >= b2) + self.assertTrue(b3 >= b2) + self.assertTrue(b3 > b2) + + self.assertFalse(b1 != b2) + self.assertFalse(b2 == b3) + self.assertFalse(b1 > b2) + self.assertFalse(b1 > b3) + self.assertFalse(b1 >= b3) + self.assertFalse(b1 < b2) + self.assertFalse(b3 < b2) + self.assertFalse(b3 <= b2) def test_compare_to_str(self): warnings.simplefilter('ignore', BytesWarning) @@ -220,27 +220,27 @@ def test_contains(self): b = self.type2test(b"abc") - self.failUnless(ord('a') in b) - self.failUnless(int(ord('a')) in b) - self.failIf(200 in b) - self.failIf(200 in b) + self.assertTrue(ord('a') in b) + self.assertTrue(int(ord('a')) in b) + self.assertFalse(200 in b) + self.assertFalse(200 in b) self.assertRaises(ValueError, lambda: 300 in b) self.assertRaises(ValueError, lambda: -1 in b) self.assertRaises(TypeError, lambda: None in b) self.assertRaises(TypeError, lambda: float(ord('a')) in b) self.assertRaises(TypeError, lambda: u"a" in b) for f in bytes, bytearray: - self.failUnless(f(b"") in b) - self.failUnless(f(b"a") in b) - self.failUnless(f(b"b") in b) - self.failUnless(f(b"c") in b) - self.failUnless(f(b"ab") in b) - self.failUnless(f(b"bc") in b) - self.failUnless(f(b"abc") in b) - self.failIf(f(b"ac") in b) - self.failIf(f(b"d") in b) - self.failIf(f(b"dab") in b) - self.failIf(f(b"abd") in b) + self.assertTrue(f(b"") in b) + self.assertTrue(f(b"a") in b) + self.assertTrue(f(b"b") in b) + self.assertTrue(f(b"c") in b) + self.assertTrue(f(b"ab") in b) + self.assertTrue(f(b"bc") in b) + self.assertTrue(f(b"abc") in b) + self.assertFalse(f(b"ac") in b) + self.assertFalse(f(b"d") in b) + self.assertFalse(f(b"dab") in b) + self.assertFalse(f(b"abd") in b) def test_fromhex(self): self.assertRaises(TypeError, self.type2test.fromhex) @@ -600,7 +600,7 @@ b += b"def" self.assertEqual(b, b"abcdef") self.assertEqual(b, b1) - self.failUnless(b is b1) + self.assertTrue(b is b1) b += b"xyz" self.assertEqual(b, b"abcdefxyz") try: @@ -616,7 +616,7 @@ b *= 3 self.assertEqual(b, b"abcabcabc") self.assertEqual(b, b1) - self.failUnless(b is b1) + self.assertTrue(b is b1) def test_irepeat_1char(self): b = bytearray(b"x") @@ -624,17 +624,17 @@ b *= 100 self.assertEqual(b, b"x"*100) self.assertEqual(b, b1) - self.failUnless(b is b1) + self.assertTrue(b is b1) def test_alloc(self): b = bytearray() alloc = b.__alloc__() - self.assert_(alloc >= 0) + self.assertTrue(alloc >= 0) seq = [alloc] for i in range(100): b += b"x" alloc = b.__alloc__() - self.assert_(alloc >= len(b)) + self.assertTrue(alloc >= len(b)) if alloc not in seq: seq.append(alloc) @@ -734,7 +734,7 @@ a, b, c = bytearray(b"x").partition(b"y") self.assertEqual(b, b"") self.assertEqual(c, b"") - self.assert_(b is not c) + self.assertTrue(b is not c) b += b"!" self.assertEqual(c, b"") a, b, c = bytearray(b"x").partition(b"y") @@ -744,7 +744,7 @@ b, c, a = bytearray(b"x").rpartition(b"y") self.assertEqual(b, b"") self.assertEqual(c, b"") - self.assert_(b is not c) + self.assertTrue(b is not c) b += b"!" self.assertEqual(c, b"") c, b, a = bytearray(b"x").rpartition(b"y") @@ -836,10 +836,10 @@ self.assertEqual(bytes(b"abc") <= b"ab", False) def test_doc(self): - self.failUnless(bytearray.__doc__ != None) - self.failUnless(bytearray.__doc__.startswith("bytearray("), bytearray.__doc__) - self.failUnless(bytes.__doc__ != None) - self.failUnless(bytes.__doc__.startswith("bytes("), bytes.__doc__) + self.assertTrue(bytearray.__doc__ != None) + self.assertTrue(bytearray.__doc__.startswith("bytearray("), bytearray.__doc__) + self.assertTrue(bytes.__doc__ != None) + self.assertTrue(bytes.__doc__.startswith("bytes("), bytes.__doc__) def test_from_bytearray(self): sample = bytes(b"Hello world\n\x80\x81\xfe\xff") @@ -958,20 +958,20 @@ class ByteArraySubclassTest(unittest.TestCase): def test_basic(self): - self.assert_(issubclass(ByteArraySubclass, bytearray)) - self.assert_(isinstance(ByteArraySubclass(), bytearray)) + self.assertTrue(issubclass(ByteArraySubclass, bytearray)) + self.assertTrue(isinstance(ByteArraySubclass(), bytearray)) a, b = b"abcd", b"efgh" _a, _b = ByteArraySubclass(a), ByteArraySubclass(b) # test comparison operators with subclass instances - self.assert_(_a == _a) - self.assert_(_a != _b) - self.assert_(_a < _b) - self.assert_(_a <= _b) - self.assert_(_b >= _a) - self.assert_(_b > _a) - self.assert_(_a is not a) + self.assertTrue(_a == _a) + self.assertTrue(_a != _b) + self.assertTrue(_a < _b) + self.assertTrue(_a <= _b) + self.assertTrue(_b >= _a) + self.assertTrue(_b > _a) + self.assertTrue(_a is not a) # test concat of subclass instances self.assertEqual(a + b, _a + _b) @@ -979,7 +979,7 @@ self.assertEqual(a + b, _a + b) # test repeat - self.assert_(a*5 == _a*5) + self.assertTrue(a*5 == _a*5) def test_join(self): # Make sure join returns a NEW object for single item sequences @@ -987,12 +987,12 @@ # Make sure that it is of the appropriate type. s1 = ByteArraySubclass(b"abcd") s2 = bytearray().join([s1]) - self.assert_(s1 is not s2) - self.assert_(type(s2) is bytearray, type(s2)) + self.assertTrue(s1 is not s2) + self.assertTrue(type(s2) is bytearray, type(s2)) # Test reverse, calling join on subclass s3 = s1.join([b"abcd"]) - self.assert_(type(s3) is bytearray) + self.assertTrue(type(s3) is bytearray) def test_pickle(self): a = ByteArraySubclass(b"abcd") Modified: python/trunk/Lib/test/test_capi.py ============================================================================== --- python/trunk/Lib/test/test_capi.py (original) +++ python/trunk/Lib/test/test_capi.py Wed Jul 1 00:57:08 2009 @@ -41,7 +41,7 @@ if context and not context.event.is_set(): continue count += 1 - self.failUnless(count < 10000, + self.assertTrue(count < 10000, "timeout waiting for %i callbacks, got %i"%(n, len(l))) if False and test_support.verbose: print "(%i)"%(len(l),) Modified: python/trunk/Lib/test/test_cfgparser.py ============================================================================== --- python/trunk/Lib/test/test_cfgparser.py (original) +++ python/trunk/Lib/test/test_cfgparser.py Wed Jul 1 00:57:08 2009 @@ -81,16 +81,16 @@ eq(cf.get('Spaces', 'key with spaces'), 'value') eq(cf.get('Spaces', 'another with spaces'), 'splat!') - self.failIf('__name__' in cf.options("Foo Bar"), + self.assertFalse('__name__' in cf.options("Foo Bar"), '__name__ "option" should not be exposed by the API!') # Make sure the right things happen for remove_option(); # added to include check for SourceForge bug #123324: - self.failUnless(cf.remove_option('Foo Bar', 'foo'), + self.assertTrue(cf.remove_option('Foo Bar', 'foo'), "remove_option() failed to report existence of option") - self.failIf(cf.has_option('Foo Bar', 'foo'), + self.assertFalse(cf.has_option('Foo Bar', 'foo'), "remove_option() failed to remove option") - self.failIf(cf.remove_option('Foo Bar', 'foo'), + self.assertFalse(cf.remove_option('Foo Bar', 'foo'), "remove_option() failed to report non-existence of option" " that was removed") @@ -112,10 +112,10 @@ eq(cf.options("a"), ["b"]) eq(cf.get("a", "b"), "value", "could not locate option, expecting case-insensitive option names") - self.failUnless(cf.has_option("a", "b")) + self.assertTrue(cf.has_option("a", "b")) cf.set("A", "A-B", "A-B value") for opt in ("a-b", "A-b", "a-B", "A-B"): - self.failUnless( + self.assertTrue( cf.has_option("A", opt), "has_option() returned false for option which should exist") eq(cf.options("A"), ["a-b"]) @@ -132,7 +132,7 @@ # SF bug #561822: cf = self.fromstring("[section]\nnekey=nevalue\n", defaults={"key":"value"}) - self.failUnless(cf.has_option("section", "Key")) + self.assertTrue(cf.has_option("section", "Key")) def test_default_case_sensitivity(self): @@ -168,7 +168,7 @@ cf = self.newconfig() self.assertEqual(cf.sections(), [], "new ConfigParser should have no defined sections") - self.failIf(cf.has_section("Foo"), + self.assertFalse(cf.has_section("Foo"), "new ConfigParser should have no acknowledged sections") self.assertRaises(ConfigParser.NoSectionError, cf.options, "Foo") @@ -207,8 +207,8 @@ "E5=FALSE AND MORE" ) for x in range(1, 5): - self.failUnless(cf.getboolean('BOOLTEST', 't%d' % x)) - self.failIf(cf.getboolean('BOOLTEST', 'f%d' % x)) + self.assertTrue(cf.getboolean('BOOLTEST', 't%d' % x)) + self.assertFalse(cf.getboolean('BOOLTEST', 'f%d' % x)) self.assertRaises(ValueError, cf.getboolean, 'BOOLTEST', 'e%d' % x) Modified: python/trunk/Lib/test/test_cgi.py ============================================================================== --- python/trunk/Lib/test/test_cgi.py (original) +++ python/trunk/Lib/test/test_cgi.py Wed Jul 1 00:57:08 2009 @@ -151,10 +151,10 @@ # test individual fields for key in expect.keys(): expect_val = expect[key] - self.assert_(fcd.has_key(key)) + self.assertTrue(fcd.has_key(key)) self.assertEqual(norm(fcd[key]), norm(expect[key])) self.assertEqual(fcd.get(key, "default"), fcd[key]) - self.assert_(fs.has_key(key)) + self.assertTrue(fs.has_key(key)) if len(expect_val) > 1: single_value = 0 else: @@ -162,10 +162,10 @@ try: val = sd[key] except IndexError: - self.failIf(single_value) + self.assertFalse(single_value) self.assertEqual(fs.getvalue(key), expect_val) else: - self.assert_(single_value) + self.assertTrue(single_value) self.assertEqual(val, expect_val[0]) self.assertEqual(fs.getvalue(key), expect_val[0]) self.assertEqual(norm(sd.getlist(key)), norm(expect_val)) @@ -231,7 +231,7 @@ # if we're not chunking properly, readline is only called twice # (by read_binary); if we are chunking properly, it will be called 5 times # as long as the chunksize is 1 << 16. - self.assert_(f.numcalls > 2) + self.assertTrue(f.numcalls > 2) def test_fieldstorage_multipart(self): #Test basic FieldStorage multipart parsing Modified: python/trunk/Lib/test/test_cmath.py ============================================================================== --- python/trunk/Lib/test/test_cmath.py (original) +++ python/trunk/Lib/test/test_cmath.py Wed Jul 1 00:57:08 2009 @@ -416,7 +416,7 @@ # real or imaginary part NaN for z in complex_nans: - self.assert_(math.isnan(phase(z))) + self.assertTrue(math.isnan(phase(z))) def test_abs(self): # zeros @@ -429,18 +429,18 @@ # real or imaginary part NaN self.assertEqual(abs(complex(NAN, -INF)), INF) - self.assert_(math.isnan(abs(complex(NAN, -2.3)))) - self.assert_(math.isnan(abs(complex(NAN, -0.0)))) - self.assert_(math.isnan(abs(complex(NAN, 0.0)))) - self.assert_(math.isnan(abs(complex(NAN, 2.3)))) + self.assertTrue(math.isnan(abs(complex(NAN, -2.3)))) + self.assertTrue(math.isnan(abs(complex(NAN, -0.0)))) + self.assertTrue(math.isnan(abs(complex(NAN, 0.0)))) + self.assertTrue(math.isnan(abs(complex(NAN, 2.3)))) self.assertEqual(abs(complex(NAN, INF)), INF) self.assertEqual(abs(complex(-INF, NAN)), INF) - self.assert_(math.isnan(abs(complex(-2.3, NAN)))) - self.assert_(math.isnan(abs(complex(-0.0, NAN)))) - self.assert_(math.isnan(abs(complex(0.0, NAN)))) - self.assert_(math.isnan(abs(complex(2.3, NAN)))) + self.assertTrue(math.isnan(abs(complex(-2.3, NAN)))) + self.assertTrue(math.isnan(abs(complex(-0.0, NAN)))) + self.assertTrue(math.isnan(abs(complex(0.0, NAN)))) + self.assertTrue(math.isnan(abs(complex(2.3, NAN)))) self.assertEqual(abs(complex(INF, NAN)), INF) - self.assert_(math.isnan(abs(complex(NAN, NAN)))) + self.assertTrue(math.isnan(abs(complex(NAN, NAN)))) # result overflows if float.__getformat__("double").startswith("IEEE"): @@ -459,26 +459,26 @@ self.assertCEqual(rect(1, -pi/2), (0, -1.)) def test_isnan(self): - self.failIf(cmath.isnan(1)) - self.failIf(cmath.isnan(1j)) - self.failIf(cmath.isnan(INF)) - self.assert_(cmath.isnan(NAN)) - self.assert_(cmath.isnan(complex(NAN, 0))) - self.assert_(cmath.isnan(complex(0, NAN))) - self.assert_(cmath.isnan(complex(NAN, NAN))) - self.assert_(cmath.isnan(complex(NAN, INF))) - self.assert_(cmath.isnan(complex(INF, NAN))) + self.assertFalse(cmath.isnan(1)) + self.assertFalse(cmath.isnan(1j)) + self.assertFalse(cmath.isnan(INF)) + self.assertTrue(cmath.isnan(NAN)) + self.assertTrue(cmath.isnan(complex(NAN, 0))) + self.assertTrue(cmath.isnan(complex(0, NAN))) + self.assertTrue(cmath.isnan(complex(NAN, NAN))) + self.assertTrue(cmath.isnan(complex(NAN, INF))) + self.assertTrue(cmath.isnan(complex(INF, NAN))) def test_isinf(self): - self.failIf(cmath.isinf(1)) - self.failIf(cmath.isinf(1j)) - self.failIf(cmath.isinf(NAN)) - self.assert_(cmath.isinf(INF)) - self.assert_(cmath.isinf(complex(INF, 0))) - self.assert_(cmath.isinf(complex(0, INF))) - self.assert_(cmath.isinf(complex(INF, INF))) - self.assert_(cmath.isinf(complex(NAN, INF))) - self.assert_(cmath.isinf(complex(INF, NAN))) + self.assertFalse(cmath.isinf(1)) + self.assertFalse(cmath.isinf(1j)) + self.assertFalse(cmath.isinf(NAN)) + self.assertTrue(cmath.isinf(INF)) + self.assertTrue(cmath.isinf(complex(INF, 0))) + self.assertTrue(cmath.isinf(complex(0, INF))) + self.assertTrue(cmath.isinf(complex(INF, INF))) + self.assertTrue(cmath.isinf(complex(NAN, INF))) + self.assertTrue(cmath.isinf(complex(INF, NAN))) def test_main(): Modified: python/trunk/Lib/test/test_cmd_line_script.py ============================================================================== --- python/trunk/Lib/test/test_cmd_line_script.py (original) +++ python/trunk/Lib/test/test_cmd_line_script.py Wed Jul 1 00:57:08 2009 @@ -154,9 +154,9 @@ print printed_file print printed_package print printed_argv0 - self.assert_(printed_file in data) - self.assert_(printed_package in data) - self.assert_(printed_argv0 in data) + self.assertTrue(printed_file in data) + self.assertTrue(printed_package in data) + self.assertTrue(printed_argv0 in data) def _check_import_error(self, script_name, expected_msg, *cmd_line_switches): @@ -166,7 +166,7 @@ print 'Output from test script %r:' % script_name print data print 'Expected output: %r' % expected_msg - self.assert_(expected_msg in data) + self.assertTrue(expected_msg in data) def test_basic_script(self): with temp_dir() as script_dir: Modified: python/trunk/Lib/test/test_codecs.py ============================================================================== --- python/trunk/Lib/test/test_codecs.py (original) +++ python/trunk/Lib/test/test_codecs.py Wed Jul 1 00:57:08 2009 @@ -263,7 +263,7 @@ f.write(u"spam") d = s.getvalue() # check whether there is exactly one BOM in it - self.assert_(d == self.spamle or d == self.spambe) + self.assertTrue(d == self.spamle or d == self.spambe) # try to read it back s = StringIO.StringIO(d) f = reader(s) @@ -390,7 +390,7 @@ f.write(u"spam") d = s.getvalue() # check whether there is exactly one BOM in it - self.assert_(d == self.spamle or d == self.spambe) + self.assertTrue(d == self.spamle or d == self.spambe) # try to read it back s = StringIO.StringIO(d) f = reader(s) @@ -1129,14 +1129,14 @@ reader = codecs.getreader("base64_codec")(StringIO.StringIO(sin)) sout = reader.read() self.assertEqual(sout, "\x80") - self.assert_(isinstance(sout, str)) + self.assertTrue(isinstance(sout, str)) def test_readline(self): sin = "\x80".encode("base64_codec") reader = codecs.getreader("base64_codec")(StringIO.StringIO(sin)) sout = reader.readline() self.assertEqual(sout, "\x80") - self.assert_(isinstance(sout, str)) + self.assertTrue(isinstance(sout, str)) all_unicode_encodings = [ "ascii", Modified: python/trunk/Lib/test/test_codeop.py ============================================================================== --- python/trunk/Lib/test/test_codeop.py (original) +++ python/trunk/Lib/test/test_codeop.py Wed Jul 1 00:57:08 2009 @@ -23,7 +23,7 @@ '''succeed iff str is a valid piece of code''' if is_jython: code = compile_command(str, "", symbol) - self.assert_(code) + self.assertTrue(code) if symbol == "single": d,r = {},{} saved_stdout = sys.stdout @@ -52,9 +52,9 @@ compile_command(str,symbol=symbol) self.fail("No exception thrown for invalid code") except SyntaxError: - self.assert_(is_syntax) + self.assertTrue(is_syntax) except OverflowError: - self.assert_(not is_syntax) + self.assertTrue(not is_syntax) def test_valid(self): av = self.assertValid Modified: python/trunk/Lib/test/test_coercion.py ============================================================================== --- python/trunk/Lib/test/test_coercion.py (original) +++ python/trunk/Lib/test/test_coercion.py Wed Jul 1 00:57:08 2009 @@ -307,14 +307,14 @@ # ...but that this still works class WackyComparer(object): def __cmp__(slf, other): - self.assert_(other == 42, 'expected evil_coercer, got %r' % other) + self.assertTrue(other == 42, 'expected evil_coercer, got %r' % other) return 0 __hash__ = None # Invalid cmp makes this unhashable self.assertEquals(cmp(WackyComparer(), evil_coercer), 0) # ...and classic classes too, since that code path is a little different class ClassicWackyComparer: def __cmp__(slf, other): - self.assert_(other == 42, 'expected evil_coercer, got %r' % other) + self.assertTrue(other == 42, 'expected evil_coercer, got %r' % other) return 0 self.assertEquals(cmp(ClassicWackyComparer(), evil_coercer), 0) Modified: python/trunk/Lib/test/test_collections.py ============================================================================== --- python/trunk/Lib/test/test_collections.py (original) +++ python/trunk/Lib/test/test_collections.py Wed Jul 1 00:57:08 2009 @@ -42,9 +42,9 @@ namedtuple('_', 'a b c') # Test leading underscores in a typename nt = namedtuple('nt', u'the quick brown fox') # check unicode input - self.assert_("u'" not in repr(nt._fields)) + self.assertTrue("u'" not in repr(nt._fields)) nt = namedtuple('nt', (u'the', u'quick')) # check unicode input - self.assert_("u'" not in repr(nt._fields)) + self.assertTrue("u'" not in repr(nt._fields)) self.assertRaises(TypeError, Point._make, [11]) # catch too few args self.assertRaises(TypeError, Point._make, [11, 22, 33]) # catch too many args @@ -73,8 +73,8 @@ self.assertRaises(TypeError, eval, 'Point(XXX=1, y=2)', locals()) # wrong keyword argument self.assertRaises(TypeError, eval, 'Point(x=1)', locals()) # missing keyword argument self.assertEqual(repr(p), 'Point(x=11, y=22)') - self.assert_('__dict__' not in dir(p)) # verify instance has no dict - self.assert_('__weakref__' not in dir(p)) + self.assertTrue('__dict__' not in dir(p)) # verify instance has no dict + self.assertTrue('__weakref__' not in dir(p)) self.assertEqual(p, Point._make([11, 22])) # test _make classmethod self.assertEqual(p._fields, ('x', 'y')) # test _fields attribute self.assertEqual(p._replace(x=1), (1, 22)) # test _replace method @@ -101,7 +101,7 @@ Point = namedtuple('Point', 'x y') p = Point(11, 22) - self.assert_(isinstance(p, tuple)) + self.assertTrue(isinstance(p, tuple)) self.assertEqual(p, (11, 22)) # matches a real tuple self.assertEqual(tuple(p), (11, 22)) # coercable to a real tuple self.assertEqual(list(p), [11, 22]) # coercable to a list @@ -233,8 +233,8 @@ # Check some non-hashables non_samples = [list(), set(), dict()] for x in non_samples: - self.failIf(isinstance(x, Hashable), repr(x)) - self.failIf(issubclass(type(x), Hashable), repr(type(x))) + self.assertFalse(isinstance(x, Hashable), repr(x)) + self.assertFalse(issubclass(type(x), Hashable), repr(type(x))) # Check some hashables samples = [None, int(), float(), complex(), @@ -243,8 +243,8 @@ 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.assertTrue(isinstance(x, Hashable), repr(x)) + self.assertTrue(issubclass(type(x), Hashable), repr(type(x))) self.assertRaises(TypeError, Hashable) # Check direct subclassing class H(Hashable): @@ -252,15 +252,15 @@ return super(H, self).__hash__() __eq__ = Hashable.__eq__ # Silence Py3k warning self.assertEqual(hash(H()), 0) - self.failIf(issubclass(int, H)) + self.assertFalse(issubclass(int, H)) self.validate_abstract_methods(Hashable, '__hash__') 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))) + self.assertFalse(isinstance(x, Iterable), repr(x)) + self.assertFalse(issubclass(type(x), Iterable), repr(type(x))) # Check some iterables samples = [str(), tuple(), list(), set(), frozenset(), dict(), @@ -269,22 +269,22 @@ (x for x in []), ] for x in samples: - self.failUnless(isinstance(x, Iterable), repr(x)) - self.failUnless(issubclass(type(x), Iterable), repr(type(x))) + self.assertTrue(isinstance(x, Iterable), repr(x)) + self.assertTrue(issubclass(type(x), Iterable), repr(type(x))) # Check direct subclassing class I(Iterable): def __iter__(self): return super(I, self).__iter__() self.assertEqual(list(I()), []) - self.failIf(issubclass(str, I)) + self.assertFalse(issubclass(str, I)) self.validate_abstract_methods(Iterable, '__iter__') def test_Iterator(self): non_samples = [None, 42, 3.14, 1j, "".encode('ascii'), "", (), [], {}, set()] for x in non_samples: - self.failIf(isinstance(x, Iterator), repr(x)) - self.failIf(issubclass(type(x), Iterator), repr(type(x))) + self.assertFalse(isinstance(x, Iterator), repr(x)) + self.assertFalse(issubclass(type(x), Iterator), repr(type(x))) samples = [iter(str()), iter(tuple()), iter(list()), iter(dict()), iter(set()), iter(frozenset()), @@ -294,8 +294,8 @@ (x for x in []), ] for x in samples: - self.failUnless(isinstance(x, Iterator), repr(x)) - self.failUnless(issubclass(type(x), Iterator), repr(type(x))) + self.assertTrue(isinstance(x, Iterator), repr(x)) + self.assertTrue(issubclass(type(x), Iterator), repr(type(x))) self.validate_abstract_methods(Iterator, 'next') def test_Sized(self): @@ -304,15 +304,15 @@ (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))) + self.assertFalse(isinstance(x, Sized), repr(x)) + self.assertFalse(issubclass(type(x), Sized), repr(type(x))) samples = [str(), 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))) + self.assertTrue(isinstance(x, Sized), repr(x)) + self.assertTrue(issubclass(type(x), Sized), repr(type(x))) self.validate_abstract_methods(Sized, '__len__') def test_Container(self): @@ -321,15 +321,15 @@ (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))) + self.assertFalse(isinstance(x, Container), repr(x)) + self.assertFalse(issubclass(type(x), Container), repr(type(x))) samples = [str(), 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))) + self.assertTrue(isinstance(x, Container), repr(x)) + self.assertTrue(issubclass(type(x), Container), repr(type(x))) self.validate_abstract_methods(Container, '__contains__') def test_Callable(self): @@ -339,33 +339,33 @@ (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))) + self.assertFalse(isinstance(x, Callable), repr(x)) + self.assertFalse(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))) + self.assertTrue(isinstance(x, Callable), repr(x)) + self.assertTrue(issubclass(type(x), Callable), repr(type(x))) self.validate_abstract_methods(Callable, '__call__') 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)) + self.assertTrue(issubclass(C, B)) + self.assertFalse(issubclass(int, C)) def test_registration(self): for B in Hashable, Iterable, Iterator, Sized, Container, Callable: class C: __metaclass__ = type __hash__ = None # Make sure it isn't hashable by default - self.failIf(issubclass(C, B), B.__name__) + self.assertFalse(issubclass(C, B), B.__name__) B.register(C) - self.failUnless(issubclass(C, B)) + self.assertTrue(issubclass(C, B)) class WithSet(MutableSet): @@ -395,8 +395,8 @@ def test_Set(self): for sample in [set, frozenset]: - self.failUnless(isinstance(sample(), Set)) - self.failUnless(issubclass(sample, Set)) + self.assertTrue(isinstance(sample(), Set)) + self.assertTrue(issubclass(sample, Set)) self.validate_abstract_methods(Set, '__contains__', '__iter__', '__len__') def test_hash_Set(self): @@ -412,13 +412,13 @@ def __hash__(self): return self._hash() a, b = OneTwoThreeSet(), OneTwoThreeSet() - self.failUnless(hash(a) == hash(b)) + self.assertTrue(hash(a) == hash(b)) def test_MutableSet(self): - self.failUnless(isinstance(set(), MutableSet)) - self.failUnless(issubclass(set, MutableSet)) - self.failIf(isinstance(frozenset(), MutableSet)) - self.failIf(issubclass(frozenset, MutableSet)) + self.assertTrue(isinstance(set(), MutableSet)) + self.assertTrue(issubclass(set, MutableSet)) + self.assertFalse(isinstance(frozenset(), MutableSet)) + self.assertFalse(issubclass(frozenset, MutableSet)) self.validate_abstract_methods(MutableSet, '__contains__', '__iter__', '__len__', 'add', 'discard') @@ -457,37 +457,37 @@ def test_Mapping(self): for sample in [dict]: - self.failUnless(isinstance(sample(), Mapping)) - self.failUnless(issubclass(sample, Mapping)) + self.assertTrue(isinstance(sample(), Mapping)) + self.assertTrue(issubclass(sample, Mapping)) self.validate_abstract_methods(Mapping, '__contains__', '__iter__', '__len__', '__getitem__') def test_MutableMapping(self): for sample in [dict]: - self.failUnless(isinstance(sample(), MutableMapping)) - self.failUnless(issubclass(sample, MutableMapping)) + self.assertTrue(isinstance(sample(), MutableMapping)) + self.assertTrue(issubclass(sample, MutableMapping)) self.validate_abstract_methods(MutableMapping, '__contains__', '__iter__', '__len__', '__getitem__', '__setitem__', '__delitem__') def test_Sequence(self): for sample in [tuple, list, str]: - self.failUnless(isinstance(sample(), Sequence)) - self.failUnless(issubclass(sample, Sequence)) - self.failUnless(issubclass(basestring, Sequence)) - self.failUnless(isinstance(range(10), Sequence)) - self.failUnless(issubclass(xrange, Sequence)) - self.failUnless(issubclass(str, Sequence)) + self.assertTrue(isinstance(sample(), Sequence)) + self.assertTrue(issubclass(sample, Sequence)) + self.assertTrue(issubclass(basestring, Sequence)) + self.assertTrue(isinstance(range(10), Sequence)) + self.assertTrue(issubclass(xrange, Sequence)) + self.assertTrue(issubclass(str, Sequence)) self.validate_abstract_methods(Sequence, '__contains__', '__iter__', '__len__', '__getitem__') def test_MutableSequence(self): for sample in [tuple, str]: - self.failIf(isinstance(sample(), MutableSequence)) - self.failIf(issubclass(sample, MutableSequence)) + self.assertFalse(isinstance(sample(), MutableSequence)) + self.assertFalse(issubclass(sample, MutableSequence)) for sample in [list]: - self.failUnless(isinstance(sample(), MutableSequence)) - self.failUnless(issubclass(sample, MutableSequence)) - self.failIf(issubclass(basestring, MutableSequence)) + self.assertTrue(isinstance(sample(), MutableSequence)) + self.assertTrue(issubclass(sample, MutableSequence)) + self.assertFalse(issubclass(basestring, MutableSequence)) self.validate_abstract_methods(MutableSequence, '__contains__', '__iter__', '__len__', '__getitem__', '__setitem__', '__delitem__', 'insert') @@ -497,10 +497,10 @@ c = Counter('abcaba') self.assertEqual(c, Counter({'a':3 , 'b': 2, 'c': 1})) self.assertEqual(c, Counter(a=3, b=2, c=1)) - self.assert_(isinstance(c, dict)) - self.assert_(isinstance(c, Mapping)) - self.assert_(issubclass(Counter, dict)) - self.assert_(issubclass(Counter, Mapping)) + self.assertTrue(isinstance(c, dict)) + self.assertTrue(isinstance(c, Mapping)) + self.assertTrue(issubclass(Counter, dict)) + self.assertTrue(issubclass(Counter, Mapping)) self.assertEqual(len(c), 3) self.assertEqual(sum(c.values()), 6) self.assertEqual(sorted(c.values()), [1, 2, 3]) @@ -578,7 +578,7 @@ Counter(words), ]): msg = (i, dup, words) - self.assert_(dup is not words) + self.assertTrue(dup is not words) self.assertEquals(dup, words) self.assertEquals(len(dup), len(words)) self.assertEquals(type(dup), type(words)) @@ -594,7 +594,7 @@ def test_invariant_for_the_in_operator(self): c = Counter(a=10, b=-2, c=0) for elem in c: - self.assert_(elem in c) + self.assertTrue(elem in c) def test_multiset_operations(self): # Verify that adding a zero counter will strip zeros and negatives @@ -619,7 +619,7 @@ self.assertEqual(numberop(p[x], q[x]), result[x], (counterop, x, p, q)) # verify that results exclude non-positive counts - self.assert_(x>0 for x in result.values()) + self.assertTrue(x>0 for x in result.values()) elements = 'abcdef' for i in range(100): @@ -693,7 +693,7 @@ pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] od = OrderedDict(pairs) del od['a'] - self.assert_('a' not in od) + self.assertTrue('a' not in od) with self.assertRaises(KeyError): del od['a'] self.assertEqual(list(od.items()), pairs[:2] + pairs[3:]) @@ -776,7 +776,7 @@ update_test, OrderedDict(od), ]): - self.assert_(dup is not od) + self.assertTrue(dup is not od) self.assertEquals(dup, od) self.assertEquals(list(dup.items()), list(od.items())) self.assertEquals(len(dup), len(od)) @@ -789,7 +789,7 @@ od = OrderedDict(pairs) # yaml.dump(od) --> # '!!python/object/apply:__main__.OrderedDict\n- - [a, 1]\n - [b, 2]\n' - self.assert_(all(type(pair)==list for pair in od.__reduce__()[1])) + self.assertTrue(all(type(pair)==list for pair in od.__reduce__()[1])) def test_reduce_not_too_fat(self): # do not save instance dictionary if not needed Modified: python/trunk/Lib/test/test_commands.py ============================================================================== --- python/trunk/Lib/test/test_commands.py (original) +++ python/trunk/Lib/test/test_commands.py Wed Jul 1 00:57:08 2009 @@ -57,7 +57,7 @@ /\. # and end with the name of the file. ''' - self.assert_(re.match(pat, getstatus("/."), re.VERBOSE)) + self.assertTrue(re.match(pat, getstatus("/."), re.VERBOSE)) def test_main(): Modified: python/trunk/Lib/test/test_compile.py ============================================================================== --- python/trunk/Lib/test/test_compile.py (original) +++ python/trunk/Lib/test/test_compile.py Wed Jul 1 00:57:08 2009 @@ -424,10 +424,10 @@ import __mangled_mod import __package__.module - self.assert_("_A__mangled" in A.f.func_code.co_varnames) - self.assert_("__not_mangled__" in A.f.func_code.co_varnames) - self.assert_("_A__mangled_mod" in A.f.func_code.co_varnames) - self.assert_("__package__" in A.f.func_code.co_varnames) + self.assertTrue("_A__mangled" in A.f.func_code.co_varnames) + self.assertTrue("__not_mangled__" in A.f.func_code.co_varnames) + self.assertTrue("_A__mangled_mod" in A.f.func_code.co_varnames) + self.assertTrue("__package__" in A.f.func_code.co_varnames) def test_compile_ast(self): fname = __file__ @@ -450,7 +450,7 @@ for fname, code in sample_code: co1 = compile(code, '%s1' % fname, 'exec') ast = compile(code, '%s2' % fname, 'exec', _ast.PyCF_ONLY_AST) - self.assert_(type(ast) == _ast.Module) + self.assertTrue(type(ast) == _ast.Module) co2 = compile(ast, '%s3' % fname, 'exec') self.assertEqual(co1, co2) # the code object's filename comes from the second compilation step Modified: python/trunk/Lib/test/test_compiler.py ============================================================================== --- python/trunk/Lib/test/test_compiler.py (original) +++ python/trunk/Lib/test/test_compiler.py Wed Jul 1 00:57:08 2009 @@ -87,7 +87,7 @@ def testDocstrings(self): c = compiler.compile('"doc"', '', 'exec') - self.assert_('__doc__' in c.co_names) + self.assertTrue('__doc__' in c.co_names) c = compiler.compile('def f():\n "doc"', '', 'exec') g = {} exec c in g @@ -110,9 +110,9 @@ def _check_lineno(self, node): if not node.__class__ in NOLINENO: - self.assert_(isinstance(node.lineno, int), + self.assertTrue(isinstance(node.lineno, int), "lineno=%s on %s" % (node.lineno, node.__class__)) - self.assert_(node.lineno > 0, + self.assertTrue(node.lineno > 0, "lineno=%s on %s" % (node.lineno, node.__class__)) for child in node.getChildNodes(): self.check_lineno(child) Modified: python/trunk/Lib/test/test_complex.py ============================================================================== --- python/trunk/Lib/test/test_complex.py (original) +++ python/trunk/Lib/test/test_complex.py Wed Jul 1 00:57:08 2009 @@ -42,7 +42,7 @@ if x == 0: return abs(y) < eps # check that relative difference < eps - self.assert_(abs((x-y)/y) < eps) + self.assertTrue(abs((x-y)/y) < eps) def assertFloatsAreIdentical(self, x, y): """assert that floats x and y are identical, in the sense that: @@ -73,7 +73,7 @@ self.assertCloseAbs(x.imag, y.imag, eps) def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def check_div(self, x, y): """Compute complex z=x*y, and check that z/x==y and z/y==x.""" @@ -192,8 +192,8 @@ def test_boolcontext(self): for i in xrange(100): - self.assert_(complex(random() + 1e-6, random() + 1e-6)) - self.assert_(not complex(0.0, 0.0)) + self.assertTrue(complex(random() + 1e-6, random() + 1e-6)) + self.assertTrue(not complex(0.0, 0.0)) def test_conjugate(self): self.assertClose(complex(5.3, 9.8).conjugate(), 5.3-9.8j) @@ -275,7 +275,7 @@ self.assertEqual(split_zeros(complex(-0., 1.).real), split_zeros(-0.)) c = 3.14 + 1j - self.assert_(complex(c) is c) + self.assertTrue(complex(c) is c) del c self.assertRaises(TypeError, complex, "1", "1") Modified: python/trunk/Lib/test/test_contains.py ============================================================================== --- python/trunk/Lib/test/test_contains.py (original) +++ python/trunk/Lib/test/test_contains.py Wed Jul 1 00:57:08 2009 @@ -20,57 +20,57 @@ a = base_set(1) b = set(1) c = seq(1) - self.assert_(1 in b) - self.assert_(0 not in b) - self.assert_(1 in c) - self.assert_(0 not in c) + self.assertTrue(1 in b) + self.assertTrue(0 not in b) + self.assertTrue(1 in c) + self.assertTrue(0 not in c) self.assertRaises(TypeError, lambda: 1 in a) self.assertRaises(TypeError, lambda: 1 not in a) # test char in string - self.assert_('c' in 'abc') - self.assert_('d' not in 'abc') + self.assertTrue('c' in 'abc') + self.assertTrue('d' not in 'abc') - self.assert_('' in '') - self.assert_('' in 'abc') + self.assertTrue('' in '') + self.assertTrue('' in 'abc') self.assertRaises(TypeError, lambda: None in 'abc') if have_unicode: def test_char_in_unicode(self): - self.assert_('c' in unicode('abc')) - self.assert_('d' not in unicode('abc')) + self.assertTrue('c' in unicode('abc')) + self.assertTrue('d' not in unicode('abc')) - self.assert_('' in unicode('')) - self.assert_(unicode('') in '') - self.assert_(unicode('') in unicode('')) - self.assert_('' in unicode('abc')) - self.assert_(unicode('') in 'abc') - self.assert_(unicode('') in unicode('abc')) + self.assertTrue('' in unicode('')) + self.assertTrue(unicode('') in '') + self.assertTrue(unicode('') in unicode('')) + self.assertTrue('' in unicode('abc')) + self.assertTrue(unicode('') in 'abc') + self.assertTrue(unicode('') in unicode('abc')) self.assertRaises(TypeError, lambda: None in unicode('abc')) # test Unicode char in Unicode - self.assert_(unicode('c') in unicode('abc')) - self.assert_(unicode('d') not in unicode('abc')) + self.assertTrue(unicode('c') in unicode('abc')) + self.assertTrue(unicode('d') not in unicode('abc')) # test Unicode char in string - self.assert_(unicode('c') in 'abc') - self.assert_(unicode('d') not in 'abc') + self.assertTrue(unicode('c') in 'abc') + self.assertTrue(unicode('d') not in 'abc') def test_builtin_sequence_types(self): # a collection of tests on builtin sequence types a = range(10) for i in a: - self.assert_(i in a) - self.assert_(16 not in a) - self.assert_(a not in a) + self.assertTrue(i in a) + self.assertTrue(16 not in a) + self.assertTrue(a not in a) a = tuple(a) for i in a: - self.assert_(i in a) - self.assert_(16 not in a) - self.assert_(a not in a) + self.assertTrue(i in a) + self.assertTrue(16 not in a) + self.assertTrue(a not in a) class Deviant1: """Behaves strangely when compared @@ -86,7 +86,7 @@ self.aList.remove(14) return 1 - self.assert_(Deviant1() not in Deviant1.aList) + self.assertTrue(Deviant1() not in Deviant1.aList) class Deviant2: """Behaves strangely when compared @@ -99,7 +99,7 @@ raise RuntimeError, "gotcha" try: - self.assert_(Deviant2() not in a) + self.assertTrue(Deviant2() not in a) except TypeError: pass Modified: python/trunk/Lib/test/test_contextlib.py ============================================================================== --- python/trunk/Lib/test/test_contextlib.py (original) +++ python/trunk/Lib/test/test_contextlib.py Wed Jul 1 00:57:08 2009 @@ -54,7 +54,7 @@ ctx = whee() ctx.__enter__() # Calling __exit__ should not result in an exception - self.failIf(ctx.__exit__(TypeError, TypeError("foo"), None)) + self.assertFalse(ctx.__exit__(TypeError, TypeError("foo"), None)) def test_contextmanager_trap_yield_after_throw(self): @contextmanager @@ -261,17 +261,17 @@ try: f = None with open(tfn, "w") as f: - self.failIf(f.closed) + self.assertFalse(f.closed) f.write("Booh\n") - self.failUnless(f.closed) + self.assertTrue(f.closed) f = None try: with open(tfn, "r") as f: - self.failIf(f.closed) + self.assertFalse(f.closed) self.assertEqual(f.read(), "Booh\n") 1/0 except ZeroDivisionError: - self.failUnless(f.closed) + self.assertTrue(f.closed) else: self.fail("Didn't raise ZeroDivisionError") finally: @@ -283,16 +283,16 @@ class LockContextTestCase(unittest.TestCase): def boilerPlate(self, lock, locked): - self.failIf(locked()) + self.assertFalse(locked()) with lock: - self.failUnless(locked()) - self.failIf(locked()) + self.assertTrue(locked()) + self.assertFalse(locked()) try: with lock: - self.failUnless(locked()) + self.assertTrue(locked()) 1/0 except ZeroDivisionError: - self.failIf(locked()) + self.assertFalse(locked()) else: self.fail("Didn't raise ZeroDivisionError") Modified: python/trunk/Lib/test/test_cookielib.py ============================================================================== --- python/trunk/Lib/test/test_cookielib.py (original) +++ python/trunk/Lib/test/test_cookielib.py Wed Jul 1 00:57:08 2009 @@ -21,7 +21,7 @@ az = time2isoz() bz = time2isoz(500000) for text in (az, bz): - self.assert_(re.search(r"^\d{4}-\d\d-\d\d \d\d:\d\d:\d\dZ$", text), + self.assertTrue(re.search(r"^\d{4}-\d\d-\d\d \d\d:\d\d:\d\dZ$", text), "bad time2isoz format: %s %s" % (az, bz)) def test_http2time(self): @@ -74,7 +74,7 @@ t2 = http2time(s.lower()) t3 = http2time(s.upper()) - self.assert_(t == t2 == t3 == test_t, + self.assertTrue(t == t2 == t3 == test_t, "'%s' => %s, %s, %s (%s)" % (s, t, t2, t3, test_t)) def test_http2time_garbage(self): @@ -92,7 +92,7 @@ '01-01-1980 00:61:00', '01-01-1980 00:00:62', ]: - self.assert_(http2time(test) is None, + self.assertTrue(http2time(test) is None, "http2time(%s) is not None\n" "http2time(test) %s" % (test, http2time(test)) ) @@ -349,8 +349,8 @@ ]: request = urllib2.Request(url) r = pol.domain_return_ok(domain, request) - if ok: self.assert_(r) - else: self.assert_(not r) + if ok: self.assertTrue(r) + else: self.assertTrue(not r) def test_missing_value(self): from cookielib import MozillaCookieJar, lwp_cookie_str @@ -362,10 +362,10 @@ interact_netscape(c, "http://www.acme.com/", 'eggs') interact_netscape(c, "http://www.acme.com/", '"spam"; path=/foo/') cookie = c._cookies["www.acme.com"]["/"]["eggs"] - self.assert_(cookie.value is None) + self.assertTrue(cookie.value is None) self.assertEquals(cookie.name, "eggs") cookie = c._cookies["www.acme.com"]['/foo/']['"spam"'] - self.assert_(cookie.value is None) + self.assertTrue(cookie.value is None) self.assertEquals(cookie.name, '"spam"') self.assertEquals(lwp_cookie_str(cookie), ( r'"spam"; path="/foo/"; domain="www.acme.com"; ' @@ -409,7 +409,7 @@ try: cookie = c._cookies["www.example.com"]["/"]["ni"] except KeyError: - self.assert_(version is None) # didn't expect a stored cookie + self.assertTrue(version is None) # didn't expect a stored cookie else: self.assertEqual(cookie.version, version) # 2965 cookies are unaffected @@ -433,28 +433,28 @@ cookie = c._cookies[".acme.com"]["/"]["spam"] self.assertEquals(cookie.domain, ".acme.com") - self.assert_(cookie.domain_specified) + self.assertTrue(cookie.domain_specified) self.assertEquals(cookie.port, DEFAULT_HTTP_PORT) - self.assert_(not cookie.port_specified) + self.assertTrue(not cookie.port_specified) # case is preserved - self.assert_(cookie.has_nonstandard_attr("blArgh") and + self.assertTrue(cookie.has_nonstandard_attr("blArgh") and not cookie.has_nonstandard_attr("blargh")) cookie = c._cookies["www.acme.com"]["/"]["ni"] self.assertEquals(cookie.domain, "www.acme.com") - self.assert_(not cookie.domain_specified) + self.assertTrue(not cookie.domain_specified) self.assertEquals(cookie.port, "80,8080") - self.assert_(cookie.port_specified) + self.assertTrue(cookie.port_specified) cookie = c._cookies["www.acme.com"]["/"]["nini"] - self.assert_(cookie.port is None) - self.assert_(not cookie.port_specified) + self.assertTrue(cookie.port is None) + self.assertTrue(not cookie.port_specified) # invalid expires should not cause cookie to be dropped foo = c._cookies["www.acme.com"]["/"]["foo"] spam = c._cookies["www.acme.com"]["/"]["foo"] - self.assert_(foo.expires is None) - self.assert_(spam.expires is None) + self.assertTrue(foo.expires is None) + self.assertTrue(spam.expires is None) def test_ns_parser_special_names(self): # names such as 'expires' are not special in first name=value pair @@ -466,8 +466,8 @@ interact_netscape(c, "http://www.acme.com/", 'version=eggs; spam=eggs') cookies = c._cookies["www.acme.com"]["/"] - self.assert_('expires' in cookies) - self.assert_('version' in cookies) + self.assertTrue('expires' in cookies) + self.assertTrue('version' in cookies) def test_expires(self): from cookielib import time2netscape, CookieJar @@ -484,7 +484,7 @@ now) h = interact_netscape(c, "http://www.acme.com/") self.assertEquals(len(c), 1) - self.assert_('spam="bar"' in h and "foo" not in h) + self.assertTrue('spam="bar"' in h and "foo" not in h) # max-age takes precedence over expires, and zero max-age is request to # delete both new cookie and any old matching cookie @@ -505,7 +505,7 @@ self.assertEquals(len(c), 2) c.clear_session_cookies() self.assertEquals(len(c), 1) - self.assert_('spam="bar"' in h) + self.assertTrue('spam="bar"' in h) # XXX RFC 2965 expiry rules (some apply to V0 too) @@ -517,39 +517,39 @@ c = CookieJar(pol) interact_2965(c, "http://www.acme.com/", 'spam="bar"; Version="1"') - self.assert_("/" in c._cookies["www.acme.com"]) + self.assertTrue("/" in c._cookies["www.acme.com"]) c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah", 'eggs="bar"; Version="1"') - self.assert_("/" in c._cookies["www.acme.com"]) + self.assertTrue("/" in c._cookies["www.acme.com"]) c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah/rhubarb", 'eggs="bar"; Version="1"') - self.assert_("/blah/" in c._cookies["www.acme.com"]) + self.assertTrue("/blah/" in c._cookies["www.acme.com"]) c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah/rhubarb/", 'eggs="bar"; Version="1"') - self.assert_("/blah/rhubarb/" in c._cookies["www.acme.com"]) + self.assertTrue("/blah/rhubarb/" in c._cookies["www.acme.com"]) # Netscape c = CookieJar() interact_netscape(c, "http://www.acme.com/", 'spam="bar"') - self.assert_("/" in c._cookies["www.acme.com"]) + self.assertTrue("/" in c._cookies["www.acme.com"]) c = CookieJar() interact_netscape(c, "http://www.acme.com/blah", 'eggs="bar"') - self.assert_("/" in c._cookies["www.acme.com"]) + self.assertTrue("/" in c._cookies["www.acme.com"]) c = CookieJar() interact_netscape(c, "http://www.acme.com/blah/rhubarb", 'eggs="bar"') - self.assert_("/blah" in c._cookies["www.acme.com"]) + self.assertTrue("/blah" in c._cookies["www.acme.com"]) c = CookieJar() interact_netscape(c, "http://www.acme.com/blah/rhubarb/", 'eggs="bar"') - self.assert_("/blah/rhubarb" in c._cookies["www.acme.com"]) + self.assertTrue("/blah/rhubarb" in c._cookies["www.acme.com"]) def test_escape_path(self): from cookielib import escape_path @@ -627,14 +627,14 @@ def test_is_HDN(self): from cookielib import is_HDN - self.assert_(is_HDN("foo.bar.com")) - self.assert_(is_HDN("1foo2.3bar4.5com")) - self.assert_(not is_HDN("192.168.1.1")) - self.assert_(not is_HDN("")) - self.assert_(not is_HDN(".")) - self.assert_(not is_HDN(".foo.bar.com")) - self.assert_(not is_HDN("..foo")) - self.assert_(not is_HDN("foo.")) + self.assertTrue(is_HDN("foo.bar.com")) + self.assertTrue(is_HDN("1foo2.3bar4.5com")) + self.assertTrue(not is_HDN("192.168.1.1")) + self.assertTrue(not is_HDN("")) + self.assertTrue(not is_HDN(".")) + self.assertTrue(not is_HDN(".foo.bar.com")) + self.assertTrue(not is_HDN("..foo")) + self.assertTrue(not is_HDN("foo.")) def test_reach(self): from cookielib import reach @@ -649,40 +649,40 @@ def test_domain_match(self): from cookielib import domain_match, user_domain_match - self.assert_(domain_match("192.168.1.1", "192.168.1.1")) - self.assert_(not domain_match("192.168.1.1", ".168.1.1")) - self.assert_(domain_match("x.y.com", "x.Y.com")) - self.assert_(domain_match("x.y.com", ".Y.com")) - self.assert_(not domain_match("x.y.com", "Y.com")) - self.assert_(domain_match("a.b.c.com", ".c.com")) - self.assert_(not domain_match(".c.com", "a.b.c.com")) - self.assert_(domain_match("example.local", ".local")) - self.assert_(not domain_match("blah.blah", "")) - self.assert_(not domain_match("", ".rhubarb.rhubarb")) - self.assert_(domain_match("", "")) - - self.assert_(user_domain_match("acme.com", "acme.com")) - self.assert_(not user_domain_match("acme.com", ".acme.com")) - self.assert_(user_domain_match("rhubarb.acme.com", ".acme.com")) - self.assert_(user_domain_match("www.rhubarb.acme.com", ".acme.com")) - self.assert_(user_domain_match("x.y.com", "x.Y.com")) - self.assert_(user_domain_match("x.y.com", ".Y.com")) - self.assert_(not user_domain_match("x.y.com", "Y.com")) - self.assert_(user_domain_match("y.com", "Y.com")) - self.assert_(not user_domain_match(".y.com", "Y.com")) - self.assert_(user_domain_match(".y.com", ".Y.com")) - self.assert_(user_domain_match("x.y.com", ".com")) - self.assert_(not user_domain_match("x.y.com", "com")) - self.assert_(not user_domain_match("x.y.com", "m")) - self.assert_(not user_domain_match("x.y.com", ".m")) - self.assert_(not user_domain_match("x.y.com", "")) - self.assert_(not user_domain_match("x.y.com", ".")) - self.assert_(user_domain_match("192.168.1.1", "192.168.1.1")) + self.assertTrue(domain_match("192.168.1.1", "192.168.1.1")) + self.assertTrue(not domain_match("192.168.1.1", ".168.1.1")) + self.assertTrue(domain_match("x.y.com", "x.Y.com")) + self.assertTrue(domain_match("x.y.com", ".Y.com")) + self.assertTrue(not domain_match("x.y.com", "Y.com")) + self.assertTrue(domain_match("a.b.c.com", ".c.com")) + self.assertTrue(not domain_match(".c.com", "a.b.c.com")) + self.assertTrue(domain_match("example.local", ".local")) + self.assertTrue(not domain_match("blah.blah", "")) + self.assertTrue(not domain_match("", ".rhubarb.rhubarb")) + self.assertTrue(domain_match("", "")) + + self.assertTrue(user_domain_match("acme.com", "acme.com")) + self.assertTrue(not user_domain_match("acme.com", ".acme.com")) + self.assertTrue(user_domain_match("rhubarb.acme.com", ".acme.com")) + self.assertTrue(user_domain_match("www.rhubarb.acme.com", ".acme.com")) + self.assertTrue(user_domain_match("x.y.com", "x.Y.com")) + self.assertTrue(user_domain_match("x.y.com", ".Y.com")) + self.assertTrue(not user_domain_match("x.y.com", "Y.com")) + self.assertTrue(user_domain_match("y.com", "Y.com")) + self.assertTrue(not user_domain_match(".y.com", "Y.com")) + self.assertTrue(user_domain_match(".y.com", ".Y.com")) + self.assertTrue(user_domain_match("x.y.com", ".com")) + self.assertTrue(not user_domain_match("x.y.com", "com")) + self.assertTrue(not user_domain_match("x.y.com", "m")) + self.assertTrue(not user_domain_match("x.y.com", ".m")) + self.assertTrue(not user_domain_match("x.y.com", "")) + self.assertTrue(not user_domain_match("x.y.com", ".")) + self.assertTrue(user_domain_match("192.168.1.1", "192.168.1.1")) # not both HDNs, so must string-compare equal to match - self.assert_(not user_domain_match("192.168.1.1", ".168.1.1")) - self.assert_(not user_domain_match("192.168.1.1", ".")) + self.assertTrue(not user_domain_match("192.168.1.1", ".168.1.1")) + self.assertTrue(not user_domain_match("192.168.1.1", ".")) # empty string is a special case - self.assert_(not user_domain_match("192.168.1.1", "")) + self.assertTrue(not user_domain_match("192.168.1.1", "")) def test_wrong_domain(self): # Cookies whose effective request-host name does not domain-match the @@ -839,7 +839,7 @@ self.assertEquals(len(c), 2) # ... and check is doesn't get returned c.add_cookie_header(req) - self.assert_(not req.has_header("Cookie")) + self.assertTrue(not req.has_header("Cookie")) def test_domain_block(self): from cookielib import CookieJar, DefaultCookiePolicy @@ -866,7 +866,7 @@ self.assertEquals(len(c), 1) req = Request("http://www.roadrunner.net/") c.add_cookie_header(req) - self.assert_((req.has_header("Cookie") and + self.assertTrue((req.has_header("Cookie") and req.has_header("Cookie2"))) c.clear() @@ -882,7 +882,7 @@ self.assertEquals(len(c), 2) # ... and check is doesn't get returned c.add_cookie_header(req) - self.assert_(not req.has_header("Cookie")) + self.assertTrue(not req.has_header("Cookie")) def test_secure(self): from cookielib import CookieJar, DefaultCookiePolicy @@ -902,10 +902,10 @@ url = "http://www.acme.com/" int(c, url, "foo1=bar%s%s" % (vs, whitespace)) int(c, url, "foo2=bar%s; secure%s" % (vs, whitespace)) - self.assert_( + self.assertTrue( not c._cookies["www.acme.com"]["/"]["foo1"].secure, "non-secure cookie registered secure") - self.assert_( + self.assertTrue( c._cookies["www.acme.com"]["/"]["foo2"].secure, "secure cookie registered non-secure") @@ -926,7 +926,7 @@ req = Request(url) self.assertEquals(len(c), 1) c.add_cookie_header(req) - self.assert_(req.has_header("Cookie")) + self.assertTrue(req.has_header("Cookie")) def test_domain_mirror(self): from cookielib import CookieJar, DefaultCookiePolicy @@ -937,21 +937,21 @@ url = "http://foo.bar.com/" interact_2965(c, url, "spam=eggs; Version=1") h = interact_2965(c, url) - self.assert_("Domain" not in h, + self.assertTrue("Domain" not in h, "absent domain returned with domain present") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, 'spam=eggs; Version=1; Domain=.bar.com') h = interact_2965(c, url) - self.assert_('$Domain=".bar.com"' in h, "domain not returned") + self.assertTrue('$Domain=".bar.com"' in h, "domain not returned") c = CookieJar(pol) url = "http://foo.bar.com/" # note missing initial dot in Domain interact_2965(c, url, 'spam=eggs; Version=1; Domain=bar.com') h = interact_2965(c, url) - self.assert_('$Domain="bar.com"' in h, "domain not returned") + self.assertTrue('$Domain="bar.com"' in h, "domain not returned") def test_path_mirror(self): from cookielib import CookieJar, DefaultCookiePolicy @@ -962,14 +962,14 @@ url = "http://foo.bar.com/" interact_2965(c, url, "spam=eggs; Version=1") h = interact_2965(c, url) - self.assert_("Path" not in h, + self.assertTrue("Path" not in h, "absent path returned with path present") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, 'spam=eggs; Version=1; Path=/') h = interact_2965(c, url) - self.assert_('$Path="/"' in h, "path not returned") + self.assertTrue('$Path="/"' in h, "path not returned") def test_port_mirror(self): from cookielib import CookieJar, DefaultCookiePolicy @@ -980,28 +980,28 @@ url = "http://foo.bar.com/" interact_2965(c, url, "spam=eggs; Version=1") h = interact_2965(c, url) - self.assert_("Port" not in h, + self.assertTrue("Port" not in h, "absent port returned with port present") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, "spam=eggs; Version=1; Port") h = interact_2965(c, url) - self.assert_(re.search("\$Port([^=]|$)", h), + self.assertTrue(re.search("\$Port([^=]|$)", h), "port with no value not returned with no value") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, 'spam=eggs; Version=1; Port="80"') h = interact_2965(c, url) - self.assert_('$Port="80"' in h, + self.assertTrue('$Port="80"' in h, "port with single value not returned with single value") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, 'spam=eggs; Version=1; Port="80,8080"') h = interact_2965(c, url) - self.assert_('$Port="80,8080"' in h, + self.assertTrue('$Port="80,8080"' in h, "port with multiple values not returned with multiple " "values") @@ -1014,7 +1014,7 @@ 'Comment="does anybody read these?"; ' 'CommentURL="http://foo.bar.net/comment.html"') h = interact_2965(c, url) - self.assert_( + self.assertTrue( "Comment" not in h, "Comment or CommentURL cookie-attributes returned to server") @@ -1045,7 +1045,7 @@ for i in range(4): i = 0 for c in cs: - self.assert_(isinstance(c, Cookie)) + self.assertTrue(isinstance(c, Cookie)) self.assertEquals(c.version, versions[i]) self.assertEquals(c.name, names[i]) self.assertEquals(c.domain, domains[i]) @@ -1102,7 +1102,7 @@ headers = ["Set-Cookie: c=foo; expires=Foo Bar 12 33:22:11 2000"] c = cookiejar_from_cookie_headers(headers) cookie = c._cookies["www.example.com"]["/"]["c"] - self.assert_(cookie.expires is None) + self.assertTrue(cookie.expires is None) class LWPCookieTests(TestCase): @@ -1179,7 +1179,7 @@ c.add_cookie_header(req) h = req.get_header("Cookie") - self.assert_("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and + self.assertTrue("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and "CUSTOMER=WILE_E_COYOTE" in h) headers.append('Set-Cookie: SHIPPING=FEDEX; path=/foo') @@ -1190,7 +1190,7 @@ c.add_cookie_header(req) h = req.get_header("Cookie") - self.assert_("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and + self.assertTrue("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and "CUSTOMER=WILE_E_COYOTE" in h and "SHIPPING=FEDEX" not in h) @@ -1198,7 +1198,7 @@ c.add_cookie_header(req) h = req.get_header("Cookie") - self.assert_(("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and + self.assertTrue(("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and "CUSTOMER=WILE_E_COYOTE" in h and h.startswith("SHIPPING=FEDEX;"))) @@ -1252,7 +1252,7 @@ req = Request("http://www.acme.com/ammo") c.add_cookie_header(req) - self.assert_(re.search(r"PART_NUMBER=RIDING_ROCKET_0023;\s*" + self.assertTrue(re.search(r"PART_NUMBER=RIDING_ROCKET_0023;\s*" "PART_NUMBER=ROCKET_LAUNCHER_0001", req.get_header("Cookie"))) @@ -1288,7 +1288,7 @@ cookie = interact_2965( c, 'http://www.acme.com/acme/login', 'Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"') - self.assert_(not cookie) + self.assertTrue(not cookie) # # 3. User Agent -> Server @@ -1310,7 +1310,7 @@ cookie = interact_2965(c, 'http://www.acme.com/acme/pickitem', 'Part_Number="Rocket_Launcher_0001"; ' 'Version="1"; Path="/acme"'); - self.assert_(re.search( + self.assertTrue(re.search( r'^\$Version="?1"?; Customer="?WILE_E_COYOTE"?; \$Path="/acme"$', cookie)) @@ -1335,10 +1335,10 @@ cookie = interact_2965(c, "http://www.acme.com/acme/shipping", 'Shipping="FedEx"; Version="1"; Path="/acme"') - self.assert_(re.search(r'^\$Version="?1"?;', cookie)) - self.assert_(re.search(r'Part_Number="?Rocket_Launcher_0001"?;' + self.assertTrue(re.search(r'^\$Version="?1"?;', cookie)) + self.assertTrue(re.search(r'Part_Number="?Rocket_Launcher_0001"?;' '\s*\$Path="\/acme"', cookie)) - self.assert_(re.search(r'Customer="?WILE_E_COYOTE"?;\s*\$Path="\/acme"', + self.assertTrue(re.search(r'Customer="?WILE_E_COYOTE"?;\s*\$Path="\/acme"', cookie)) # @@ -1360,7 +1360,7 @@ # Transaction is complete. cookie = interact_2965(c, "http://www.acme.com/acme/process") - self.assert_( + self.assertTrue( re.search(r'Shipping="?FedEx"?;\s*\$Path="\/acme"', cookie) and "WILE_E_COYOTE" in cookie) @@ -1411,7 +1411,7 @@ # than once. cookie = interact_2965(c, "http://www.acme.com/acme/ammo/...") - self.assert_( + self.assertTrue( re.search(r"Riding_Rocket_0023.*Rocket_Launcher_0001", cookie)) # A subsequent request by the user agent to the (same) server for a URL of @@ -1424,7 +1424,7 @@ # the server. cookie = interact_2965(c, "http://www.acme.com/acme/parts/") - self.assert_("Rocket_Launcher_0001" in cookie and + self.assertTrue("Rocket_Launcher_0001" in cookie and "Riding_Rocket_0023" not in cookie) def test_rejection(self): @@ -1440,7 +1440,7 @@ # illegal domain (no embedded dots) cookie = interact_2965(c, "http://www.acme.com", 'foo=bar; domain=".com"; version=1') - self.assert_(not c) + self.assertTrue(not c) # legal domain cookie = interact_2965(c, "http://www.acme.com", @@ -1533,11 +1533,11 @@ c, "http://www.acme.com/foo%2f%25/<<%0anew?/???", 'bar=baz; path="/foo/"; version=1'); version_re = re.compile(r'^\$version=\"?1\"?', re.I) - self.assert_("foo=bar" in cookie and version_re.search(cookie)) + self.assertTrue("foo=bar" in cookie and version_re.search(cookie)) cookie = interact_2965( c, "http://www.acme.com/foo/%25/<<%0anew?/???") - self.assert_(not cookie) + self.assertTrue(not cookie) # unicode URL doesn't raise exception cookie = interact_2965(c, u"http://www.acme.com/\xfc") @@ -1579,11 +1579,11 @@ new_c = save_and_restore(c, True) self.assertEquals(len(new_c), 6) # none discarded - self.assert_("name='foo1', value='bar'" in repr(new_c)) + self.assertTrue("name='foo1', value='bar'" in repr(new_c)) new_c = save_and_restore(c, False) self.assertEquals(len(new_c), 4) # 2 of them discarded on save - self.assert_("name='foo1', value='bar'" in repr(new_c)) + self.assertTrue("name='foo1', value='bar'" in repr(new_c)) def test_netscape_misc(self): # Some additional Netscape cookies tests. @@ -1608,7 +1608,7 @@ req = Request("http://foo.bar.acme.com/foo") c.add_cookie_header(req) - self.assert_( + self.assertTrue( "PART_NUMBER=3,4" in req.get_header("Cookie") and "Customer=WILE_E_COYOTE" in req.get_header("Cookie")) @@ -1621,11 +1621,11 @@ "foo1=bar; PORT; Discard; Version=1;") cookie = interact_2965(c, "http://example/", 'foo2=bar; domain=".local"; Version=1') - self.assert_("foo1=bar" in cookie) + self.assertTrue("foo1=bar" in cookie) interact_2965(c, "http://example/", 'foo3=bar; Version=1') cookie = interact_2965(c, "http://example/") - self.assert_("foo2=bar" in cookie and len(c) == 3) + self.assertTrue("foo2=bar" in cookie and len(c) == 3) def test_intranet_domains_ns(self): from cookielib import CookieJar, DefaultCookiePolicy @@ -1635,10 +1635,10 @@ cookie = interact_netscape(c, "http://example/", 'foo2=bar; domain=.local') self.assertEquals(len(c), 2) - self.assert_("foo1=bar" in cookie) + self.assertTrue("foo1=bar" in cookie) cookie = interact_netscape(c, "http://example/") - self.assert_("foo2=bar" in cookie) + self.assertTrue("foo2=bar" in cookie) self.assertEquals(len(c), 2) def test_empty_path(self): @@ -1713,7 +1713,7 @@ key = "%s_after" % cookie.value counter[key] = counter[key] + 1 - self.assert_(not ( + self.assertTrue(not ( # a permanent cookie got lost accidentally counter["perm_after"] != counter["perm_before"] or # a session cookie hasn't been cleared Modified: python/trunk/Lib/test/test_copy.py ============================================================================== --- python/trunk/Lib/test/test_copy.py (original) +++ python/trunk/Lib/test/test_copy.py Wed Jul 1 00:57:08 2009 @@ -13,8 +13,8 @@ # Attempt full line coverage of copy.py from top to bottom def test_exceptions(self): - self.assert_(copy.Error is copy.error) - self.assert_(issubclass(copy.Error, Exception)) + self.assertTrue(copy.Error is copy.error) + self.assertTrue(issubclass(copy.Error, Exception)) # The copy() method @@ -55,7 +55,7 @@ raise test_support.TestFailed, "shouldn't call this" x = C() y = copy.copy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_copy_reduce(self): class C(object): @@ -63,7 +63,7 @@ return "" x = C() y = copy.copy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_copy_cant(self): class C(object): @@ -87,7 +87,7 @@ "hello", u"hello\u1234", f.func_code, NewStyle, xrange(10), Classic, max] for x in tests: - self.assert_(copy.copy(x) is x, repr(x)) + self.assertTrue(copy.copy(x) is x, repr(x)) def test_copy_list(self): x = [1, 2, 3] @@ -181,9 +181,9 @@ x = [x, x] y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y[0] is not x[0]) - self.assert_(y[0] is y[1]) + self.assertTrue(y is not x) + self.assertTrue(y[0] is not x[0]) + self.assertTrue(y[0] is y[1]) def test_deepcopy_issubclass(self): # XXX Note: there's no way to test the TypeError coming out of @@ -228,7 +228,7 @@ raise test_support.TestFailed, "shouldn't call this" x = C() y = copy.deepcopy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_deepcopy_reduce(self): class C(object): @@ -236,7 +236,7 @@ return "" x = C() y = copy.deepcopy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_deepcopy_cant(self): class C(object): @@ -260,61 +260,61 @@ "hello", u"hello\u1234", f.func_code, NewStyle, xrange(10), Classic, max] for x in tests: - self.assert_(copy.deepcopy(x) is x, repr(x)) + self.assertTrue(copy.deepcopy(x) is x, repr(x)) def test_deepcopy_list(self): x = [[1, 2], 3] y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(x is not y) - self.assert_(x[0] is not y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is not y[0]) def test_deepcopy_reflexive_list(self): x = [] x.append(x) y = copy.deepcopy(x) self.assertRaises(RuntimeError, cmp, y, x) - self.assert_(y is not x) - self.assert_(y[0] is y) + self.assertTrue(y is not x) + self.assertTrue(y[0] is y) self.assertEqual(len(y), 1) def test_deepcopy_tuple(self): x = ([1, 2], 3) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(x is not y) - self.assert_(x[0] is not y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is not y[0]) def test_deepcopy_reflexive_tuple(self): x = ([],) x[0].append(x) y = copy.deepcopy(x) self.assertRaises(RuntimeError, cmp, y, x) - self.assert_(y is not x) - self.assert_(y[0] is not x[0]) - self.assert_(y[0][0] is y) + self.assertTrue(y is not x) + self.assertTrue(y[0] is not x[0]) + self.assertTrue(y[0][0] is y) def test_deepcopy_dict(self): x = {"foo": [1, 2], "bar": 3} y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(x is not y) - self.assert_(x["foo"] is not y["foo"]) + self.assertTrue(x is not y) + self.assertTrue(x["foo"] is not y["foo"]) def test_deepcopy_reflexive_dict(self): x = {} x['foo'] = x y = copy.deepcopy(x) self.assertRaises(RuntimeError, cmp, y, x) - self.assert_(y is not x) - self.assert_(y['foo'] is y) + self.assertTrue(y is not x) + self.assertTrue(y['foo'] is y) self.assertEqual(len(y), 1) def test_deepcopy_keepalive(self): memo = {} x = 42 y = copy.deepcopy(x, memo) - self.assert_(memo[id(x)] is x) + self.assertTrue(memo[id(x)] is x) def test_deepcopy_inst_vanilla(self): class C: @@ -325,7 +325,7 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_deepcopy(self): class C: @@ -338,8 +338,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_getinitargs(self): class C: @@ -352,8 +352,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_getstate(self): class C: @@ -366,8 +366,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_setstate(self): class C: @@ -380,8 +380,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_getstate_setstate(self): class C: @@ -396,8 +396,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_reflexive_inst(self): class C: @@ -405,8 +405,8 @@ x = C() x.foo = x y = copy.deepcopy(x) - self.assert_(y is not x) - self.assert_(y.foo is y) + self.assertTrue(y is not x) + self.assertTrue(y.foo is y) # _reconstruct() @@ -416,9 +416,9 @@ return "" x = C() y = copy.copy(x) - self.assert_(y is x) + self.assertTrue(y is x) y = copy.deepcopy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_reconstruct_nostate(self): class C(object): @@ -427,9 +427,9 @@ x = C() x.foo = 42 y = copy.copy(x) - self.assert_(y.__class__ is x.__class__) + self.assertTrue(y.__class__ is x.__class__) y = copy.deepcopy(x) - self.assert_(y.__class__ is x.__class__) + self.assertTrue(y.__class__ is x.__class__) def test_reconstruct_state(self): class C(object): @@ -444,7 +444,7 @@ self.assertEqual(y, x) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y.foo is not x.foo) def test_reconstruct_state_setstate(self): class C(object): @@ -461,7 +461,7 @@ self.assertEqual(y, x) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y.foo is not x.foo) def test_reconstruct_reflexive(self): class C(object): @@ -469,8 +469,8 @@ x = C() x.foo = x y = copy.deepcopy(x) - self.assert_(y is not x) - self.assert_(y.foo is y) + self.assertTrue(y is not x) + self.assertTrue(y.foo is y) # Additions for Python 2.3 and pickle protocol 2 @@ -485,12 +485,12 @@ x = C([[1, 2], 3]) y = copy.copy(x) self.assertEqual(x, y) - self.assert_(x is not y) - self.assert_(x[0] is y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is y[0]) y = copy.deepcopy(x) self.assertEqual(x, y) - self.assert_(x is not y) - self.assert_(x[0] is not y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is not y[0]) def test_reduce_5tuple(self): class C(dict): @@ -503,12 +503,12 @@ x = C([("foo", [1, 2]), ("bar", 3)]) y = copy.copy(x) self.assertEqual(x, y) - self.assert_(x is not y) - self.assert_(x["foo"] is y["foo"]) + self.assertTrue(x is not y) + self.assertTrue(x["foo"] is y["foo"]) y = copy.deepcopy(x) self.assertEqual(x, y) - self.assert_(x is not y) - self.assert_(x["foo"] is not y["foo"]) + self.assertTrue(x is not y) + self.assertTrue(x["foo"] is not y["foo"]) def test_copy_slots(self): class C(object): @@ -516,7 +516,7 @@ x = C() x.foo = [42] y = copy.copy(x) - self.assert_(x.foo is y.foo) + self.assertTrue(x.foo is y.foo) def test_deepcopy_slots(self): class C(object): @@ -525,7 +525,7 @@ x.foo = [42] y = copy.deepcopy(x) self.assertEqual(x.foo, y.foo) - self.assert_(x.foo is not y.foo) + self.assertTrue(x.foo is not y.foo) def test_copy_list_subclass(self): class C(list): @@ -535,8 +535,8 @@ y = copy.copy(x) self.assertEqual(list(x), list(y)) self.assertEqual(x.foo, y.foo) - self.assert_(x[0] is y[0]) - self.assert_(x.foo is y.foo) + self.assertTrue(x[0] is y[0]) + self.assertTrue(x.foo is y.foo) def test_deepcopy_list_subclass(self): class C(list): @@ -546,8 +546,8 @@ y = copy.deepcopy(x) self.assertEqual(list(x), list(y)) self.assertEqual(x.foo, y.foo) - self.assert_(x[0] is not y[0]) - self.assert_(x.foo is not y.foo) + self.assertTrue(x[0] is not y[0]) + self.assertTrue(x.foo is not y.foo) def test_copy_tuple_subclass(self): class C(tuple): @@ -564,8 +564,8 @@ self.assertEqual(tuple(x), ([1, 2], 3)) y = copy.deepcopy(x) self.assertEqual(tuple(y), ([1, 2], 3)) - self.assert_(x is not y) - self.assert_(x[0] is not y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is not y[0]) def test_getstate_exc(self): class EvilState(object): Modified: python/trunk/Lib/test/test_copy_reg.py ============================================================================== --- python/trunk/Lib/test/test_copy_reg.py (original) +++ python/trunk/Lib/test/test_copy_reg.py Wed Jul 1 00:57:08 2009 @@ -51,10 +51,10 @@ mod, func, code) copy_reg.add_extension(mod, func, code) # Should be in the registry. - self.assert_(copy_reg._extension_registry[mod, func] == code) - self.assert_(copy_reg._inverted_registry[code] == (mod, func)) + self.assertTrue(copy_reg._extension_registry[mod, func] == code) + self.assertTrue(copy_reg._inverted_registry[code] == (mod, func)) # Shouldn't be in the cache. - self.assert_(code not in copy_reg._extension_cache) + self.assertTrue(code not in copy_reg._extension_cache) # Redundant registration should be OK. copy_reg.add_extension(mod, func, code) # shouldn't blow up # Conflicting code. @@ -81,7 +81,7 @@ e.restore() # Shouldn't be there anymore. - self.assert_((mod, func) not in copy_reg._extension_registry) + self.assertTrue((mod, func) not in copy_reg._extension_registry) # The code *may* be in copy_reg._extension_registry, though, if # we happened to pick on a registered code. So don't check for # that. Modified: python/trunk/Lib/test/test_csv.py ============================================================================== --- python/trunk/Lib/test/test_csv.py (original) +++ python/trunk/Lib/test/test_csv.py Wed Jul 1 00:57:08 2009 @@ -326,7 +326,7 @@ expected_dialects.sort() csv.register_dialect(name, myexceltsv) try: - self.failUnless(csv.get_dialect(name).delimiter, '\t') + self.assertTrue(csv.get_dialect(name).delimiter, '\t') got_dialects = csv.list_dialects() got_dialects.sort() self.assertEqual(expected_dialects, got_dialects) @@ -337,8 +337,8 @@ name = 'fedcba' csv.register_dialect(name, delimiter=';') try: - self.failUnless(csv.get_dialect(name).delimiter, '\t') - self.failUnless(list(csv.reader('X;Y;Z', name)), ['X', 'Y', 'Z']) + self.assertTrue(csv.get_dialect(name).delimiter, '\t') + self.assertTrue(list(csv.reader('X;Y;Z', name)), ['X', 'Y', 'Z']) finally: csv.unregister_dialect(name) @@ -935,7 +935,7 @@ # given that all three lines in sample3 are equal, # I think that any character could have been 'guessed' as the # delimiter, depending on dictionary order - self.assert_(dialect.delimiter in self.sample3) + self.assertTrue(dialect.delimiter in self.sample3) dialect = sniffer.sniff(self.sample3, delimiters="?,") self.assertEqual(dialect.delimiter, "?") dialect = sniffer.sniff(self.sample3, delimiters="/,") Modified: python/trunk/Lib/test/test_datetime.py ============================================================================== --- python/trunk/Lib/test/test_datetime.py (original) +++ python/trunk/Lib/test/test_datetime.py Wed Jul 1 00:57:08 2009 @@ -79,9 +79,9 @@ def __init__(self, offset, name): self.__offset = offset self.__name = name - self.failUnless(issubclass(NotEnough, tzinfo)) + self.assertTrue(issubclass(NotEnough, tzinfo)) ne = NotEnough(3, "NotByALongShot") - self.failUnless(isinstance(ne, tzinfo)) + self.assertTrue(isinstance(ne, tzinfo)) dt = datetime.now() self.assertRaises(NotImplementedError, ne.tzname, dt) @@ -90,7 +90,7 @@ def test_normal(self): fo = FixedOffset(3, "Three") - self.failUnless(isinstance(fo, tzinfo)) + self.assertTrue(isinstance(fo, tzinfo)) for dt in datetime.now(), None: self.assertEqual(fo.utcoffset(dt), timedelta(minutes=3)) self.assertEqual(fo.tzname(dt), "Three") @@ -101,25 +101,25 @@ # carry no data), but they need to be picklable anyway else # concrete subclasses can't be pickled. orig = tzinfo.__new__(tzinfo) - self.failUnless(type(orig) is tzinfo) + self.assertTrue(type(orig) is tzinfo) for pickler, unpickler, proto in pickle_choices: green = pickler.dumps(orig, proto) derived = unpickler.loads(green) - self.failUnless(type(derived) is tzinfo) + self.assertTrue(type(derived) is tzinfo) def test_pickling_subclass(self): # Make sure we can pickle/unpickle an instance of a subclass. offset = timedelta(minutes=-300) orig = PicklableFixedOffset(offset, 'cookie') - self.failUnless(isinstance(orig, tzinfo)) - self.failUnless(type(orig) is PicklableFixedOffset) + self.assertTrue(isinstance(orig, tzinfo)) + self.assertTrue(type(orig) is PicklableFixedOffset) self.assertEqual(orig.utcoffset(None), offset) self.assertEqual(orig.tzname(None), 'cookie') for pickler, unpickler, proto in pickle_choices: green = pickler.dumps(orig, proto) derived = unpickler.loads(green) - self.failUnless(isinstance(derived, tzinfo)) - self.failUnless(type(derived) is PicklableFixedOffset) + self.assertTrue(isinstance(derived, tzinfo)) + self.assertTrue(type(derived) is PicklableFixedOffset) self.assertEqual(derived.utcoffset(None), offset) self.assertEqual(derived.tzname(None), 'cookie') @@ -136,16 +136,16 @@ def test_harmless_mixed_comparison(self): me = self.theclass(1, 1, 1) - self.failIf(me == ()) - self.failUnless(me != ()) - self.failIf(() == me) - self.failUnless(() != me) + self.assertFalse(me == ()) + self.assertTrue(me != ()) + self.assertFalse(() == me) + self.assertTrue(() != me) - self.failUnless(me in [1, 20L, [], me]) - self.failIf(me not in [1, 20L, [], me]) + self.assertTrue(me in [1, 20L, [], me]) + self.assertFalse(me not in [1, 20L, [], me]) - self.failUnless([] in [me, 1, 20L, []]) - self.failIf([] not in [me, 1, 20L, []]) + self.assertTrue([] in [me, 1, 20L, []]) + self.assertFalse([] not in [me, 1, 20L, []]) def test_harmful_mixed_comparison(self): me = self.theclass(1, 1, 1) @@ -307,29 +307,29 @@ def test_compare(self): t1 = timedelta(2, 3, 4) t2 = timedelta(2, 3, 4) - self.failUnless(t1 == t2) - self.failUnless(t1 <= t2) - self.failUnless(t1 >= t2) - self.failUnless(not t1 != t2) - self.failUnless(not t1 < t2) - self.failUnless(not t1 > t2) + self.assertTrue(t1 == t2) + self.assertTrue(t1 <= t2) + self.assertTrue(t1 >= t2) + self.assertTrue(not t1 != t2) + self.assertTrue(not t1 < t2) + self.assertTrue(not t1 > t2) self.assertEqual(cmp(t1, t2), 0) self.assertEqual(cmp(t2, t1), 0) for args in (3, 3, 3), (2, 4, 4), (2, 3, 5): t2 = timedelta(*args) # this is larger than t1 - self.failUnless(t1 < t2) - self.failUnless(t2 > t1) - self.failUnless(t1 <= t2) - self.failUnless(t2 >= t1) - self.failUnless(t1 != t2) - self.failUnless(t2 != t1) - self.failUnless(not t1 == t2) - self.failUnless(not t2 == t1) - self.failUnless(not t1 > t2) - self.failUnless(not t2 < t1) - self.failUnless(not t1 >= t2) - self.failUnless(not t2 <= t1) + self.assertTrue(t1 < t2) + self.assertTrue(t2 > t1) + self.assertTrue(t1 <= t2) + self.assertTrue(t2 >= t1) + self.assertTrue(t1 != t2) + self.assertTrue(t2 != t1) + self.assertTrue(not t1 == t2) + self.assertTrue(not t2 == t1) + self.assertTrue(not t1 > t2) + self.assertTrue(not t2 < t1) + self.assertTrue(not t1 >= t2) + self.assertTrue(not t2 <= t1) self.assertEqual(cmp(t1, t2), -1) self.assertEqual(cmp(t2, t1), 1) @@ -377,7 +377,7 @@ # Verify td -> string -> td identity. s = repr(td) - self.failUnless(s.startswith('datetime.')) + self.assertTrue(s.startswith('datetime.')) s = s[9:] td2 = eval(s) self.assertEqual(td, td2) @@ -387,10 +387,10 @@ self.assertEqual(td, td2) def test_resolution_info(self): - self.assert_(isinstance(timedelta.min, timedelta)) - self.assert_(isinstance(timedelta.max, timedelta)) - self.assert_(isinstance(timedelta.resolution, timedelta)) - self.assert_(timedelta.max > timedelta.min) + self.assertTrue(isinstance(timedelta.min, timedelta)) + self.assertTrue(isinstance(timedelta.max, timedelta)) + self.assertTrue(isinstance(timedelta.resolution, timedelta)) + self.assertTrue(timedelta.max > timedelta.min) self.assertEqual(timedelta.min, timedelta(-999999999)) self.assertEqual(timedelta.max, timedelta(999999999, 24*3600-1, 1e6-1)) self.assertEqual(timedelta.resolution, timedelta(0, 0, 1)) @@ -437,11 +437,11 @@ (-1, 24*3600-1, 999999)) def test_bool(self): - self.failUnless(timedelta(1)) - self.failUnless(timedelta(0, 1)) - self.failUnless(timedelta(0, 0, 1)) - self.failUnless(timedelta(microseconds=1)) - self.failUnless(not timedelta(0)) + self.assertTrue(timedelta(1)) + self.assertTrue(timedelta(0, 1)) + self.assertTrue(timedelta(0, 0, 1)) + self.assertTrue(timedelta(microseconds=1)) + self.assertTrue(not timedelta(0)) def test_subclass_timedelta(self): @@ -457,17 +457,17 @@ return round(sum) t1 = T(days=1) - self.assert_(type(t1) is T) + self.assertTrue(type(t1) is T) self.assertEqual(t1.as_hours(), 24) t2 = T(days=-1, seconds=-3600) - self.assert_(type(t2) is T) + self.assertTrue(type(t2) is T) self.assertEqual(t2.as_hours(), -25) t3 = t1 + t2 - self.assert_(type(t3) is timedelta) + self.assertTrue(type(t3) is timedelta) t4 = T.from_td(t3) - self.assert_(type(t4) is T) + self.assertTrue(type(t4) is T) self.assertEqual(t3.days, t4.days) self.assertEqual(t3.seconds, t4.seconds) self.assertEqual(t3.microseconds, t4.microseconds) @@ -530,7 +530,7 @@ self.theclass.today()): # Verify dt -> string -> date identity. s = repr(dt) - self.failUnless(s.startswith('datetime.')) + self.assertTrue(s.startswith('datetime.')) s = s[9:] dt2 = eval(s) self.assertEqual(dt, dt2) @@ -764,7 +764,7 @@ # It worked or it didn't. If it didn't, assume it's reason #2, and # let the test pass if they're within half a second of each other. - self.failUnless(today == todayagain or + self.assertTrue(today == todayagain or abs(todayagain - today) < timedelta(seconds=0.5)) def test_weekday(self): @@ -901,10 +901,10 @@ self.assertEqual(b.__format__(fmt), 'B') def test_resolution_info(self): - self.assert_(isinstance(self.theclass.min, self.theclass)) - self.assert_(isinstance(self.theclass.max, self.theclass)) - self.assert_(isinstance(self.theclass.resolution, timedelta)) - self.assert_(self.theclass.max > self.theclass.min) + self.assertTrue(isinstance(self.theclass.min, self.theclass)) + self.assertTrue(isinstance(self.theclass.max, self.theclass)) + self.assertTrue(isinstance(self.theclass.resolution, timedelta)) + self.assertTrue(self.theclass.max > self.theclass.min) def test_extreme_timedelta(self): big = self.theclass.max - self.theclass.min @@ -952,29 +952,29 @@ def test_compare(self): t1 = self.theclass(2, 3, 4) t2 = self.theclass(2, 3, 4) - self.failUnless(t1 == t2) - self.failUnless(t1 <= t2) - self.failUnless(t1 >= t2) - self.failUnless(not t1 != t2) - self.failUnless(not t1 < t2) - self.failUnless(not t1 > t2) + self.assertTrue(t1 == t2) + self.assertTrue(t1 <= t2) + self.assertTrue(t1 >= t2) + self.assertTrue(not t1 != t2) + self.assertTrue(not t1 < t2) + self.assertTrue(not t1 > t2) self.assertEqual(cmp(t1, t2), 0) self.assertEqual(cmp(t2, t1), 0) for args in (3, 3, 3), (2, 4, 4), (2, 3, 5): t2 = self.theclass(*args) # this is larger than t1 - self.failUnless(t1 < t2) - self.failUnless(t2 > t1) - self.failUnless(t1 <= t2) - self.failUnless(t2 >= t1) - self.failUnless(t1 != t2) - self.failUnless(t2 != t1) - self.failUnless(not t1 == t2) - self.failUnless(not t2 == t1) - self.failUnless(not t1 > t2) - self.failUnless(not t2 < t1) - self.failUnless(not t1 >= t2) - self.failUnless(not t2 <= t1) + self.assertTrue(t1 < t2) + self.assertTrue(t2 > t1) + self.assertTrue(t1 <= t2) + self.assertTrue(t2 >= t1) + self.assertTrue(t1 != t2) + self.assertTrue(t2 != t1) + self.assertTrue(not t1 == t2) + self.assertTrue(not t2 == t1) + self.assertTrue(not t1 > t2) + self.assertTrue(not t2 < t1) + self.assertTrue(not t1 >= t2) + self.assertTrue(not t2 <= t1) self.assertEqual(cmp(t1, t2), -1) self.assertEqual(cmp(t2, t1), 1) @@ -1028,13 +1028,13 @@ their = Comparable() self.assertEqual(cmp(our, their), 0) self.assertEqual(cmp(their, our), 0) - self.failUnless(our == their) - self.failUnless(their == our) + self.assertTrue(our == their) + self.assertTrue(their == our) def test_bool(self): # All dates are considered true. - self.failUnless(self.theclass.min) - self.failUnless(self.theclass.max) + self.assertTrue(self.theclass.min) + self.assertTrue(self.theclass.max) def test_strftime_out_of_range(self): # For nasty technical reasons, we can't handle years before 1900. @@ -1157,7 +1157,7 @@ self.theclass.now()): # Verify dt -> string -> datetime identity. s = repr(dt) - self.failUnless(s.startswith('datetime.')) + self.assertTrue(s.startswith('datetime.')) s = s[9:] dt2 = eval(s) self.assertEqual(dt, dt2) @@ -1230,7 +1230,7 @@ dt2 = self.theclass(2002, 3, 1, 10, 0, 0) dt3 = self.theclass(2002, 3, 1, 9, 0, 0) self.assertEqual(dt1, dt3) - self.assert_(dt2 > dt3) + self.assertTrue(dt2 > dt3) # Make sure comparison doesn't forget microseconds, and isn't done # via comparing a float timestamp (an IEEE double doesn't have enough @@ -1241,7 +1241,7 @@ us = timedelta(microseconds=1) dt2 = dt1 + us self.assertEqual(dt2 - dt1, us) - self.assert_(dt1 < dt2) + self.assertTrue(dt1 < dt2) def test_strftime_with_bad_tzname_replace(self): # verify ok if tzinfo.tzname().replace() returns a non-string @@ -1421,12 +1421,12 @@ args = [2000, 11, 29, 20, 58, 16, 999998] t1 = self.theclass(*args) t2 = self.theclass(*args) - self.failUnless(t1 == t2) - self.failUnless(t1 <= t2) - self.failUnless(t1 >= t2) - self.failUnless(not t1 != t2) - self.failUnless(not t1 < t2) - self.failUnless(not t1 > t2) + self.assertTrue(t1 == t2) + self.assertTrue(t1 <= t2) + self.assertTrue(t1 >= t2) + self.assertTrue(not t1 != t2) + self.assertTrue(not t1 < t2) + self.assertTrue(not t1 > t2) self.assertEqual(cmp(t1, t2), 0) self.assertEqual(cmp(t2, t1), 0) @@ -1434,18 +1434,18 @@ newargs = args[:] newargs[i] = args[i] + 1 t2 = self.theclass(*newargs) # this is larger than t1 - self.failUnless(t1 < t2) - self.failUnless(t2 > t1) - self.failUnless(t1 <= t2) - self.failUnless(t2 >= t1) - self.failUnless(t1 != t2) - self.failUnless(t2 != t1) - self.failUnless(not t1 == t2) - self.failUnless(not t2 == t1) - self.failUnless(not t1 > t2) - self.failUnless(not t2 < t1) - self.failUnless(not t1 >= t2) - self.failUnless(not t2 <= t1) + self.assertTrue(t1 < t2) + self.assertTrue(t2 > t1) + self.assertTrue(t1 <= t2) + self.assertTrue(t2 >= t1) + self.assertTrue(t1 != t2) + self.assertTrue(t2 != t1) + self.assertTrue(not t1 == t2) + self.assertTrue(not t2 == t1) + self.assertTrue(not t1 > t2) + self.assertTrue(not t2 < t1) + self.assertTrue(not t1 >= t2) + self.assertTrue(not t2 <= t1) self.assertEqual(cmp(t1, t2), -1) self.assertEqual(cmp(t2, t1), 1) @@ -1526,7 +1526,7 @@ if abs(from_timestamp - from_now) <= tolerance: break # Else try again a few times. - self.failUnless(abs(from_timestamp - from_now) <= tolerance) + self.assertTrue(abs(from_timestamp - from_now) <= tolerance) def test_strptime(self): import _strptime @@ -1695,7 +1695,7 @@ # Verify t -> string -> time identity. s = repr(t) - self.failUnless(s.startswith('datetime.')) + self.assertTrue(s.startswith('datetime.')) s = s[9:] t2 = eval(s) self.assertEqual(t, t2) @@ -1709,12 +1709,12 @@ args = [1, 2, 3, 4] t1 = self.theclass(*args) t2 = self.theclass(*args) - self.failUnless(t1 == t2) - self.failUnless(t1 <= t2) - self.failUnless(t1 >= t2) - self.failUnless(not t1 != t2) - self.failUnless(not t1 < t2) - self.failUnless(not t1 > t2) + self.assertTrue(t1 == t2) + self.assertTrue(t1 <= t2) + self.assertTrue(t1 >= t2) + self.assertTrue(not t1 != t2) + self.assertTrue(not t1 < t2) + self.assertTrue(not t1 > t2) self.assertEqual(cmp(t1, t2), 0) self.assertEqual(cmp(t2, t1), 0) @@ -1722,18 +1722,18 @@ newargs = args[:] newargs[i] = args[i] + 1 t2 = self.theclass(*newargs) # this is larger than t1 - self.failUnless(t1 < t2) - self.failUnless(t2 > t1) - self.failUnless(t1 <= t2) - self.failUnless(t2 >= t1) - self.failUnless(t1 != t2) - self.failUnless(t2 != t1) - self.failUnless(not t1 == t2) - self.failUnless(not t2 == t1) - self.failUnless(not t1 > t2) - self.failUnless(not t2 < t1) - self.failUnless(not t1 >= t2) - self.failUnless(not t2 <= t1) + self.assertTrue(t1 < t2) + self.assertTrue(t2 > t1) + self.assertTrue(t1 <= t2) + self.assertTrue(t2 >= t1) + self.assertTrue(t1 != t2) + self.assertTrue(t2 != t1) + self.assertTrue(not t1 == t2) + self.assertTrue(not t2 == t1) + self.assertTrue(not t1 > t2) + self.assertTrue(not t2 < t1) + self.assertTrue(not t1 >= t2) + self.assertTrue(not t2 <= t1) self.assertEqual(cmp(t1, t2), -1) self.assertEqual(cmp(t2, t1), 1) @@ -1886,10 +1886,10 @@ "%s(23, 15)" % name) def test_resolution_info(self): - self.assert_(isinstance(self.theclass.min, self.theclass)) - self.assert_(isinstance(self.theclass.max, self.theclass)) - self.assert_(isinstance(self.theclass.resolution, timedelta)) - self.assert_(self.theclass.max > self.theclass.min) + self.assertTrue(isinstance(self.theclass.min, self.theclass)) + self.assertTrue(isinstance(self.theclass.max, self.theclass)) + self.assertTrue(isinstance(self.theclass.resolution, timedelta)) + self.assertTrue(self.theclass.max > self.theclass.min) def test_pickling(self): args = 20, 59, 16, 64**2 @@ -1909,12 +1909,12 @@ def test_bool(self): cls = self.theclass - self.failUnless(cls(1)) - self.failUnless(cls(0, 1)) - self.failUnless(cls(0, 0, 1)) - self.failUnless(cls(0, 0, 0, 1)) - self.failUnless(not cls(0)) - self.failUnless(not cls()) + self.assertTrue(cls(1)) + self.assertTrue(cls(0, 1)) + self.assertTrue(cls(0, 0, 1)) + self.assertTrue(cls(0, 0, 0, 1)) + self.assertTrue(not cls(0)) + self.assertTrue(not cls()) def test_replace(self): cls = self.theclass @@ -2011,7 +2011,7 @@ def utcoffset(self, dt): pass b = BetterTry() t = cls(1, 1, 1, tzinfo=b) - self.failUnless(t.tzinfo is b) + self.assertTrue(t.tzinfo is b) def test_utc_offset_out_of_bounds(self): class Edgy(tzinfo): @@ -2050,9 +2050,9 @@ for t in (cls(1, 1, 1), cls(1, 1, 1, tzinfo=None), cls(1, 1, 1, tzinfo=C1())): - self.failUnless(t.utcoffset() is None) - self.failUnless(t.dst() is None) - self.failUnless(t.tzname() is None) + self.assertTrue(t.utcoffset() is None) + self.assertTrue(t.dst() is None) + self.assertTrue(t.tzname() is None) class C3(tzinfo): def utcoffset(self, dt): return timedelta(minutes=-1439) @@ -2146,7 +2146,7 @@ self.assertEqual(t.minute, 0) self.assertEqual(t.second, 0) self.assertEqual(t.microsecond, 0) - self.failUnless(t.tzinfo is None) + self.assertTrue(t.tzinfo is None) def test_zones(self): est = FixedOffset(-300, "EST", 1) @@ -2161,25 +2161,25 @@ self.assertEqual(t1.tzinfo, est) self.assertEqual(t2.tzinfo, utc) self.assertEqual(t3.tzinfo, met) - self.failUnless(t4.tzinfo is None) + self.assertTrue(t4.tzinfo is None) self.assertEqual(t5.tzinfo, utc) self.assertEqual(t1.utcoffset(), timedelta(minutes=-300)) self.assertEqual(t2.utcoffset(), timedelta(minutes=0)) self.assertEqual(t3.utcoffset(), timedelta(minutes=60)) - self.failUnless(t4.utcoffset() is None) + self.assertTrue(t4.utcoffset() is None) self.assertRaises(TypeError, t1.utcoffset, "no args") self.assertEqual(t1.tzname(), "EST") self.assertEqual(t2.tzname(), "UTC") self.assertEqual(t3.tzname(), "MET") - self.failUnless(t4.tzname() is None) + self.assertTrue(t4.tzname() is None) self.assertRaises(TypeError, t1.tzname, "no args") self.assertEqual(t1.dst(), timedelta(minutes=1)) self.assertEqual(t2.dst(), timedelta(minutes=-2)) self.assertEqual(t3.dst(), timedelta(minutes=3)) - self.failUnless(t4.dst() is None) + self.assertTrue(t4.dst() is None) self.assertRaises(TypeError, t1.dst, "no args") self.assertEqual(hash(t1), hash(t2)) @@ -2255,7 +2255,7 @@ green = pickler.dumps(orig, proto) derived = unpickler.loads(green) self.assertEqual(orig, derived) - self.failUnless(isinstance(derived.tzinfo, PicklableFixedOffset)) + self.assertTrue(isinstance(derived.tzinfo, PicklableFixedOffset)) self.assertEqual(derived.utcoffset(), timedelta(minutes=-300)) self.assertEqual(derived.tzname(), 'cookie') @@ -2264,20 +2264,20 @@ cls = self.theclass t = cls(0, tzinfo=FixedOffset(-300, "")) - self.failUnless(t) + self.assertTrue(t) t = cls(5, tzinfo=FixedOffset(-300, "")) - self.failUnless(t) + self.assertTrue(t) t = cls(5, tzinfo=FixedOffset(300, "")) - self.failUnless(not t) + self.assertTrue(not t) t = cls(23, 59, tzinfo=FixedOffset(23*60 + 59, "")) - self.failUnless(not t) + self.assertTrue(not t) # Mostly ensuring this doesn't overflow internally. t = cls(0, tzinfo=FixedOffset(23*60 + 59, "")) - self.failUnless(t) + self.assertTrue(t) # But this should yield a value error -- the utcoffset is bogus. t = cls(0, tzinfo=FixedOffset(24*60, "")) @@ -2311,13 +2311,13 @@ # Ensure we can get rid of a tzinfo. self.assertEqual(base.tzname(), "+100") base2 = base.replace(tzinfo=None) - self.failUnless(base2.tzinfo is None) - self.failUnless(base2.tzname() is None) + self.assertTrue(base2.tzinfo is None) + self.assertTrue(base2.tzname() is None) # Ensure we can add one. base3 = base2.replace(tzinfo=z100) self.assertEqual(base, base3) - self.failUnless(base.tzinfo is base3.tzinfo) + self.assertTrue(base.tzinfo is base3.tzinfo) # Out of bounds. base = cls(1) @@ -2354,7 +2354,7 @@ # But if they're not identical, it isn't ignored. t2 = t2.replace(tzinfo=Varies()) - self.failUnless(t1 < t2) # t1's offset counter still going up + self.assertTrue(t1 < t2) # t1's offset counter still going up def test_subclass_timetz(self): @@ -2410,12 +2410,12 @@ tzinfo=FixedOffset(-1439, "")) # Make sure those compare correctly, and w/o overflow. - self.failUnless(t1 < t2) - self.failUnless(t1 != t2) - self.failUnless(t2 > t1) + self.assertTrue(t1 < t2) + self.assertTrue(t1 != t2) + self.assertTrue(t2 > t1) - self.failUnless(t1 == t1) - self.failUnless(t2 == t2) + self.assertTrue(t1 == t1) + self.assertTrue(t2 == t2) # Equal afer adjustment. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(1, "")) @@ -2424,21 +2424,21 @@ # Change t1 not to subtract a minute, and t1 should be larger. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(0, "")) - self.failUnless(t1 > t2) + self.assertTrue(t1 > t2) # Change t1 to subtract 2 minutes, and t1 should be smaller. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(2, "")) - self.failUnless(t1 < t2) + self.assertTrue(t1 < t2) # Back to the original t1, but make seconds resolve it. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(1, ""), second=1) - self.failUnless(t1 > t2) + self.assertTrue(t1 > t2) # Likewise, but make microseconds resolve it. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(1, ""), microsecond=1) - self.failUnless(t1 > t2) + self.assertTrue(t1 > t2) # Make t2 naive and it should fail. t2 = self.theclass.min @@ -2482,7 +2482,7 @@ green = pickler.dumps(orig, proto) derived = unpickler.loads(green) self.assertEqual(orig, derived) - self.failUnless(isinstance(derived.tzinfo, + self.assertTrue(isinstance(derived.tzinfo, PicklableFixedOffset)) self.assertEqual(derived.utcoffset(), timedelta(minutes=-300)) self.assertEqual(derived.tzname(), 'cookie') @@ -2553,7 +2553,7 @@ tz55 = FixedOffset(-330, "west 5:30") timeaware = now.time().replace(tzinfo=tz55) nowaware = self.theclass.combine(now.date(), timeaware) - self.failUnless(nowaware.tzinfo is tz55) + self.assertTrue(nowaware.tzinfo is tz55) self.assertEqual(nowaware.timetz(), timeaware) # Can't mix aware and non-aware. @@ -2572,15 +2572,15 @@ # Adding a delta should preserve tzinfo. delta = timedelta(weeks=1, minutes=12, microseconds=5678) nowawareplus = nowaware + delta - self.failUnless(nowaware.tzinfo is tz55) + self.assertTrue(nowaware.tzinfo is tz55) nowawareplus2 = delta + nowaware - self.failUnless(nowawareplus2.tzinfo is tz55) + self.assertTrue(nowawareplus2.tzinfo is tz55) self.assertEqual(nowawareplus, nowawareplus2) # that - delta should be what we started with, and that - what we # started with should be delta. diff = nowawareplus - delta - self.failUnless(diff.tzinfo is tz55) + self.assertTrue(diff.tzinfo is tz55) self.assertEqual(nowaware, diff) self.assertRaises(TypeError, lambda: delta - nowawareplus) self.assertEqual(nowawareplus - nowaware, delta) @@ -2589,7 +2589,7 @@ tzr = FixedOffset(random.randrange(-1439, 1440), "randomtimezone") # Attach it to nowawareplus. nowawareplus = nowawareplus.replace(tzinfo=tzr) - self.failUnless(nowawareplus.tzinfo is tzr) + self.assertTrue(nowawareplus.tzinfo is tzr) # Make sure the difference takes the timezone adjustments into account. got = nowaware - nowawareplus # Expected: (nowaware base - nowaware offset) - @@ -2616,7 +2616,7 @@ off42 = FixedOffset(42, "42") another = meth(off42) again = meth(tz=off42) - self.failUnless(another.tzinfo is again.tzinfo) + self.assertTrue(another.tzinfo is again.tzinfo) self.assertEqual(another.utcoffset(), timedelta(minutes=42)) # Bad argument with and w/o naming the keyword. self.assertRaises(TypeError, meth, 16) @@ -2633,7 +2633,7 @@ utc = FixedOffset(0, "utc", 0) for dummy in range(3): now = datetime.now(weirdtz) - self.failUnless(now.tzinfo is weirdtz) + self.assertTrue(now.tzinfo is weirdtz) utcnow = datetime.utcnow().replace(tzinfo=utc) now2 = utcnow.astimezone(weirdtz) if abs(now - now2) < timedelta(seconds=30): @@ -2654,7 +2654,7 @@ off42 = FixedOffset(42, "42") another = meth(ts, off42) again = meth(ts, tz=off42) - self.failUnless(another.tzinfo is again.tzinfo) + self.assertTrue(another.tzinfo is again.tzinfo) self.assertEqual(another.utcoffset(), timedelta(minutes=42)) # Bad argument with and w/o naming the keyword. self.assertRaises(TypeError, meth, ts, 16) @@ -2848,13 +2848,13 @@ # Ensure we can get rid of a tzinfo. self.assertEqual(base.tzname(), "+100") base2 = base.replace(tzinfo=None) - self.failUnless(base2.tzinfo is None) - self.failUnless(base2.tzname() is None) + self.assertTrue(base2.tzinfo is None) + self.assertTrue(base2.tzname() is None) # Ensure we can add one. base3 = base2.replace(tzinfo=z100) self.assertEqual(base, base3) - self.failUnless(base.tzinfo is base3.tzinfo) + self.assertTrue(base.tzinfo is base3.tzinfo) # Out of bounds. base = cls(2000, 2, 29) @@ -2867,20 +2867,20 @@ fm5h = FixedOffset(-timedelta(hours=5), "m300") dt = self.theclass.now(tz=f44m) - self.failUnless(dt.tzinfo is f44m) + self.assertTrue(dt.tzinfo is f44m) # Replacing with degenerate tzinfo raises an exception. self.assertRaises(ValueError, dt.astimezone, fnone) # Ditto with None tz. self.assertRaises(TypeError, dt.astimezone, None) # Replacing with same tzinfo makes no change. x = dt.astimezone(dt.tzinfo) - self.failUnless(x.tzinfo is f44m) + self.assertTrue(x.tzinfo is f44m) self.assertEqual(x.date(), dt.date()) self.assertEqual(x.time(), dt.time()) # Replacing with different tzinfo does adjust. got = dt.astimezone(fm5h) - self.failUnless(got.tzinfo is fm5h) + self.assertTrue(got.tzinfo is fm5h) self.assertEqual(got.utcoffset(), timedelta(hours=-5)) expected = dt - dt.utcoffset() # in effect, convert to UTC expected += fm5h.utcoffset(dt) # and from there to local time @@ -2888,7 +2888,7 @@ self.assertEqual(got.date(), expected.date()) self.assertEqual(got.time(), expected.time()) self.assertEqual(got.timetz(), expected.timetz()) - self.failUnless(got.tzinfo is expected.tzinfo) + self.assertTrue(got.tzinfo is expected.tzinfo) self.assertEqual(got, expected) def test_aware_subtract(self): @@ -2963,7 +2963,7 @@ # But if they're not identical, it isn't ignored. t2 = t2.replace(tzinfo=Varies()) - self.failUnless(t1 < t2) # t1's offset counter still going up + self.assertTrue(t1 < t2) # t1's offset counter still going up def test_subclass_datetimetz(self): @@ -3314,10 +3314,10 @@ # type comparison, despite that datetime is a subclass of date. as_date = date.today() as_datetime = datetime.combine(as_date, time()) - self.assert_(as_date != as_datetime) - self.assert_(as_datetime != as_date) - self.assert_(not as_date == as_datetime) - self.assert_(not as_datetime == as_date) + self.assertTrue(as_date != as_datetime) + self.assertTrue(as_datetime != as_date) + self.assertTrue(not as_date == as_datetime) + self.assertTrue(not as_datetime == as_date) self.assertRaises(TypeError, lambda: as_date < as_datetime) self.assertRaises(TypeError, lambda: as_datetime < as_date) self.assertRaises(TypeError, lambda: as_date <= as_datetime) @@ -3329,9 +3329,9 @@ # Neverthelss, comparison should work with the base-class (date) # projection if use of a date method is forced. - self.assert_(as_date.__eq__(as_datetime)) + self.assertTrue(as_date.__eq__(as_datetime)) different_day = (as_date.day + 1) % 20 + 1 - self.assert_(not as_date.__eq__(as_datetime.replace(day= + self.assertTrue(not as_date.__eq__(as_datetime.replace(day= different_day))) # And date should compare with other subclasses of date. If a Modified: python/trunk/Lib/test/test_dbm.py ============================================================================== --- python/trunk/Lib/test/test_dbm.py (original) +++ python/trunk/Lib/test/test_dbm.py Wed Jul 1 00:57:08 2009 @@ -21,9 +21,9 @@ self.d[k] = v self.assertEqual(sorted(self.d.keys()), sorted(k for (k, v) in a)) for k, v in a: - self.assert_(k in self.d) + self.assertTrue(k in self.d) self.assertEqual(self.d[k], v) - self.assert_('xxx' not in self.d) + self.assertTrue('xxx' not in self.d) self.assertRaises(KeyError, lambda: self.d['xxx']) self.d.close() Modified: python/trunk/Lib/test/test_decimal.py ============================================================================== --- python/trunk/Lib/test/test_decimal.py (original) +++ python/trunk/Lib/test/test_decimal.py Wed Jul 1 00:57:08 2009 @@ -513,7 +513,7 @@ # from int d = nc.create_decimal(456) - self.failUnless(isinstance(d, Decimal)) + self.assertTrue(isinstance(d, Decimal)) self.assertEqual(nc.create_decimal(45678), nc.create_decimal('457E+2')) @@ -1061,12 +1061,12 @@ f = Decimal('2') for x, y in [(n, n), (n, i), (i, n), (n, f), (f, n), (s, n), (n, s), (s, i), (i, s), (s, f), (f, s), (s, s)]: - self.assert_(x != y) - self.assert_(not (x == y)) - self.assert_(not (x < y)) - self.assert_(not (x <= y)) - self.assert_(not (x > y)) - self.assert_(not (x >= y)) + self.assertTrue(x != y) + self.assertTrue(not (x == y)) + self.assertTrue(not (x < y)) + self.assertTrue(not (x <= y)) + self.assertTrue(not (x > y)) + self.assertTrue(not (x >= y)) # The following are two functions used to test threading in the next class @@ -1139,22 +1139,22 @@ dc = Decimal('45') #two Decimals - self.failUnless(dc > da) - self.failUnless(dc >= da) - self.failUnless(da < dc) - self.failUnless(da <= dc) - self.failUnless(da == db) - self.failUnless(da != dc) - self.failUnless(da <= db) - self.failUnless(da >= db) + self.assertTrue(dc > da) + self.assertTrue(dc >= da) + self.assertTrue(da < dc) + self.assertTrue(da <= dc) + self.assertTrue(da == db) + self.assertTrue(da != dc) + self.assertTrue(da <= db) + self.assertTrue(da >= db) self.assertEqual(cmp(dc,da), 1) self.assertEqual(cmp(da,dc), -1) self.assertEqual(cmp(da,db), 0) #a Decimal and an int - self.failUnless(dc > 23) - self.failUnless(23 < dc) - self.failUnless(dc == 45) + self.assertTrue(dc > 23) + self.assertTrue(23 < dc) + self.assertTrue(dc == 45) self.assertEqual(cmp(dc,23), 1) self.assertEqual(cmp(23,dc), -1) self.assertEqual(cmp(dc,45), 0) @@ -1221,8 +1221,8 @@ #the same hash that to an int self.assertEqual(hash(Decimal(23)), hash(23)) self.assertRaises(TypeError, hash, Decimal('NaN')) - self.assert_(hash(Decimal('Inf'))) - self.assert_(hash(Decimal('-Inf'))) + self.assertTrue(hash(Decimal('Inf'))) + self.assertTrue(hash(Decimal('-Inf'))) # check that the value of the hash doesn't depend on the # current context (issue #1757) @@ -1249,22 +1249,22 @@ l2 = 28 #between Decimals - self.failUnless(min(d1,d2) is d1) - self.failUnless(min(d2,d1) is d1) - self.failUnless(max(d1,d2) is d2) - self.failUnless(max(d2,d1) is d2) + self.assertTrue(min(d1,d2) is d1) + self.assertTrue(min(d2,d1) is d1) + self.assertTrue(max(d1,d2) is d2) + self.assertTrue(max(d2,d1) is d2) #between Decimal and long - self.failUnless(min(d1,l2) is d1) - self.failUnless(min(l2,d1) is d1) - self.failUnless(max(l1,d2) is d2) - self.failUnless(max(d2,l1) is d2) + self.assertTrue(min(d1,l2) is d1) + self.assertTrue(min(l2,d1) is d1) + self.assertTrue(max(l1,d2) is d2) + self.assertTrue(max(d2,l1) is d2) def test_as_nonzero(self): #as false - self.failIf(Decimal(0)) + self.assertFalse(Decimal(0)) #as true - self.failUnless(Decimal('0.372')) + self.assertTrue(Decimal('0.372')) def test_tostring_methods(self): #Test str and repr methods. @@ -1459,10 +1459,10 @@ class DecimalPythonAPItests(unittest.TestCase): def test_abc(self): - self.assert_(issubclass(Decimal, numbers.Number)) - self.assert_(not issubclass(Decimal, numbers.Real)) - self.assert_(isinstance(Decimal(0), numbers.Number)) - self.assert_(not isinstance(Decimal(0), numbers.Real)) + self.assertTrue(issubclass(Decimal, numbers.Number)) + self.assertTrue(not issubclass(Decimal, numbers.Real)) + self.assertTrue(isinstance(Decimal(0), numbers.Number)) + self.assertTrue(not isinstance(Decimal(0), numbers.Real)) def test_pickle(self): d = Decimal('-3.141590000') @@ -1501,9 +1501,9 @@ '0.1000000000000000055511151231257827021181583404541015625') bigint = 12345678901234567890123456789 self.assertEqual(MyDecimal.from_float(bigint), MyDecimal(bigint)) - self.assert_(MyDecimal.from_float(float('nan')).is_qnan()) - self.assert_(MyDecimal.from_float(float('inf')).is_infinite()) - self.assert_(MyDecimal.from_float(float('-inf')).is_infinite()) + self.assertTrue(MyDecimal.from_float(float('nan')).is_qnan()) + self.assertTrue(MyDecimal.from_float(float('inf')).is_infinite()) + self.assertTrue(MyDecimal.from_float(float('-inf')).is_infinite()) self.assertEqual(str(MyDecimal.from_float(float('nan'))), str(Decimal('NaN'))) self.assertEqual(str(MyDecimal.from_float(float('inf'))), @@ -1550,8 +1550,8 @@ self.assertEqual(v1, v2) def test_equality_with_other_types(self): - self.assert_(Decimal(10) in ['a', 1.0, Decimal(10), (1,2), {}]) - self.assert_(Decimal(10) not in ['a', 1.0, (1,2), {}]) + self.assertTrue(Decimal(10) in ['a', 1.0, Decimal(10), (1,2), {}]) + self.assertTrue(Decimal(10) not in ['a', 1.0, (1,2), {}]) def test_copy(self): # All copies should be deep @@ -1571,9 +1571,9 @@ with localcontext() as enter_ctx: set_ctx = getcontext() final_ctx = getcontext() - self.assert_(orig_ctx is final_ctx, 'did not restore context correctly') - self.assert_(orig_ctx is not set_ctx, 'did not copy the context') - self.assert_(set_ctx is enter_ctx, '__enter__ returned wrong context') + self.assertTrue(orig_ctx is final_ctx, 'did not restore context correctly') + self.assertTrue(orig_ctx is not set_ctx, 'did not copy the context') + self.assertTrue(set_ctx is enter_ctx, '__enter__ returned wrong context') def test_localcontextarg(self): # Use a copy of the supplied context in the block @@ -1582,10 +1582,10 @@ with localcontext(new_ctx) as enter_ctx: set_ctx = getcontext() final_ctx = getcontext() - self.assert_(orig_ctx is final_ctx, 'did not restore context correctly') - self.assert_(set_ctx.prec == new_ctx.prec, 'did not set correct context') - self.assert_(new_ctx is not set_ctx, 'did not copy the context') - self.assert_(set_ctx is enter_ctx, '__enter__ returned wrong context') + self.assertTrue(orig_ctx is final_ctx, 'did not restore context correctly') + self.assertTrue(set_ctx.prec == new_ctx.prec, 'did not set correct context') + self.assertTrue(new_ctx is not set_ctx, 'did not copy the context') + self.assertTrue(set_ctx is enter_ctx, '__enter__ returned wrong context') class ContextFlags(unittest.TestCase): def test_flags_irrelevant(self): Modified: python/trunk/Lib/test/test_defaultdict.py ============================================================================== --- python/trunk/Lib/test/test_defaultdict.py (original) +++ python/trunk/Lib/test/test_defaultdict.py Wed Jul 1 00:57:08 2009 @@ -24,21 +24,21 @@ d1[13] d1[14] self.assertEqual(d1, {12: [42, 24], 13: [], 14: []}) - self.assert_(d1[12] is not d1[13] is not d1[14]) + self.assertTrue(d1[12] is not d1[13] is not d1[14]) d2 = defaultdict(list, foo=1, bar=2) self.assertEqual(d2.default_factory, list) self.assertEqual(d2, {"foo": 1, "bar": 2}) self.assertEqual(d2["foo"], 1) self.assertEqual(d2["bar"], 2) self.assertEqual(d2[42], []) - self.assert_("foo" in d2) - self.assert_("foo" in d2.keys()) - self.assert_("bar" in d2) - self.assert_("bar" in d2.keys()) - self.assert_(42 in d2) - self.assert_(42 in d2.keys()) - self.assert_(12 not in d2) - self.assert_(12 not in d2.keys()) + self.assertTrue("foo" in d2) + self.assertTrue("foo" in d2.keys()) + self.assertTrue("bar" in d2) + self.assertTrue("bar" in d2.keys()) + self.assertTrue(42 in d2) + self.assertTrue(42 in d2.keys()) + self.assertTrue(12 not in d2) + self.assertTrue(12 not in d2.keys()) d2.default_factory = None self.assertEqual(d2.default_factory, None) try: @@ -67,7 +67,7 @@ self.assertEqual(repr(d2), "defaultdict(, {12: 42})") def foo(): return 43 d3 = defaultdict(foo) - self.assert_(d3.default_factory is foo) + self.assertTrue(d3.default_factory is foo) d3[13] self.assertEqual(repr(d3), "defaultdict(%s, {13: 43})" % repr(foo)) @@ -126,7 +126,7 @@ d2 = copy.deepcopy(d1) self.assertEqual(d2.default_factory, foobar) self.assertEqual(d2, d1) - self.assert_(d1[1] is not d2[1]) + self.assertTrue(d1[1] is not d2[1]) d1.default_factory = list d2 = copy.deepcopy(d1) self.assertEqual(d2.default_factory, list) @@ -149,7 +149,7 @@ def _factory(self): return [] d = sub() - self.assert_(repr(d).startswith( + self.assertTrue(repr(d).startswith( "defaultdict(= 0) + self.assertTrue(str(c1).find('C object at ') >= 0) self.assertEqual(str(c1), repr(c1)) - self.assert_(-1 not in c1) + self.assertTrue(-1 not in c1) for i in range(10): - self.assert_(i in c1) + self.assertTrue(i in c1) self.assertFalse(10 in c1) # Test the default behavior for dynamic classes class D(object): @@ -1800,22 +1800,22 @@ raise IndexError d1 = D() d2 = D() - self.assert_(not not d1) + self.assertTrue(not not d1) self.assertNotEqual(id(d1), id(d2)) hash(d1) hash(d2) self.assertEqual(cmp(d1, d2), cmp(id(d1), id(d2))) self.assertEqual(d1, d1) self.assertNotEqual(d1, d2) - self.assert_(not d1 != d1) - self.assert_(not d1 == d2) + self.assertTrue(not d1 != d1) + self.assertTrue(not d1 == d2) # Note that the module name appears in str/repr, and that varies # depending on whether this test is run standalone or from a framework. - self.assert_(str(d1).find('D object at ') >= 0) + self.assertTrue(str(d1).find('D object at ') >= 0) self.assertEqual(str(d1), repr(d1)) - self.assert_(-1 not in d1) + self.assertTrue(-1 not in d1) for i in range(10): - self.assert_(i in d1) + self.assertTrue(i in d1) self.assertFalse(10 in d1) # Test overridden behavior for static classes class Proxy(object): @@ -1841,11 +1841,11 @@ p1 = Proxy(1) p_1 = Proxy(-1) self.assertFalse(p0) - self.assert_(not not p1) + self.assertTrue(not not p1) self.assertEqual(hash(p0), hash(0)) self.assertEqual(p0, p0) self.assertNotEqual(p0, p1) - self.assert_(not p0 != p0) + self.assertTrue(not p0 != p0) self.assertEqual(not p0, p1) self.assertEqual(cmp(p0, p1), -1) self.assertEqual(cmp(p0, p0), 0) @@ -1855,7 +1855,7 @@ p10 = Proxy(range(10)) self.assertFalse(-1 in p10) for i in range(10): - self.assert_(i in p10) + self.assertTrue(i in p10) self.assertFalse(10 in p10) # Test overridden behavior for dynamic classes class DProxy(object): @@ -1881,7 +1881,7 @@ p1 = DProxy(1) p_1 = DProxy(-1) self.assertFalse(p0) - self.assert_(not not p1) + self.assertTrue(not not p1) self.assertEqual(hash(p0), hash(0)) self.assertEqual(p0, p0) self.assertNotEqual(p0, p1) @@ -1895,7 +1895,7 @@ p10 = DProxy(range(10)) self.assertFalse(-1 in p10) for i in range(10): - self.assert_(i in p10) + self.assertTrue(i in p10) self.assertFalse(10 in p10) # Safety test for __cmp__ @@ -1975,7 +1975,7 @@ try: weakref.ref(no) except TypeError, msg: - self.assert_(str(msg).find("weak reference") >= 0) + self.assertTrue(str(msg).find("weak reference") >= 0) else: self.fail("weakref.ref(no) should be illegal") class Weak(object): @@ -2012,18 +2012,18 @@ self.assertFalse(hasattr(a, "x")) raw = C.__dict__['x'] - self.assert_(isinstance(raw, property)) + self.assertTrue(isinstance(raw, property)) attrs = dir(raw) - self.assert_("__doc__" in attrs) - self.assert_("fget" in attrs) - self.assert_("fset" in attrs) - self.assert_("fdel" in attrs) + self.assertTrue("__doc__" in attrs) + self.assertTrue("fget" in attrs) + self.assertTrue("fset" in attrs) + self.assertTrue("fdel" in attrs) self.assertEqual(raw.__doc__, "I'm the x property.") - self.assert_(raw.fget is C.__dict__['getx']) - self.assert_(raw.fset is C.__dict__['setx']) - self.assert_(raw.fdel is C.__dict__['delx']) + self.assertTrue(raw.fget is C.__dict__['getx']) + self.assertTrue(raw.fset is C.__dict__['setx']) + self.assertTrue(raw.fdel is C.__dict__['delx']) for attr in "__doc__", "fget", "fset", "fdel": try: @@ -2085,7 +2085,7 @@ self.assertEqual(C.foo.__doc__, "hello") self.assertFalse(hasattr(c, "foo")) c.foo = -42 - self.assert_(hasattr(c, '_foo')) + self.assertTrue(hasattr(c, '_foo')) self.assertEqual(c._foo, 42) self.assertEqual(c.foo, 42) del c.foo @@ -2236,7 +2236,7 @@ cstuff = ['Cdata', 'Cmethod', '__doc__', '__module__'] self.assertEqual(dir(C), cstuff) - self.assert_('im_self' in dir(C.Cmethod)) + self.assertTrue('im_self' in dir(C.Cmethod)) c = C() # c.__doc__ is an odd thing to see here; ditto c.__module__. self.assertEqual(dir(c), cstuff) @@ -2244,7 +2244,7 @@ c.cdata = 2 c.cmethod = lambda self: 0 self.assertEqual(dir(c), cstuff + ['cdata', 'cmethod']) - self.assert_('im_self' in dir(c.Cmethod)) + self.assertTrue('im_self' in dir(c.Cmethod)) class A(C): Adata = 1 @@ -2252,10 +2252,10 @@ astuff = ['Adata', 'Amethod'] + cstuff self.assertEqual(dir(A), astuff) - self.assert_('im_self' in dir(A.Amethod)) + self.assertTrue('im_self' in dir(A.Amethod)) a = A() self.assertEqual(dir(a), astuff) - self.assert_('im_self' in dir(a.Amethod)) + self.assertTrue('im_self' in dir(a.Amethod)) a.adata = 42 a.amethod = lambda self: 3 self.assertEqual(dir(a), astuff + ['adata', 'amethod']) @@ -2274,12 +2274,12 @@ c = C() self.assertEqual(interesting(dir(c)), cstuff) - self.assert_('im_self' in dir(C.Cmethod)) + self.assertTrue('im_self' in dir(C.Cmethod)) c.cdata = 2 c.cmethod = lambda self: 0 self.assertEqual(interesting(dir(c)), cstuff + ['cdata', 'cmethod']) - self.assert_('im_self' in dir(c.Cmethod)) + self.assertTrue('im_self' in dir(c.Cmethod)) class A(C): Adata = 1 @@ -2287,13 +2287,13 @@ astuff = ['Adata', 'Amethod'] + cstuff self.assertEqual(interesting(dir(A)), astuff) - self.assert_('im_self' in dir(A.Amethod)) + self.assertTrue('im_self' in dir(A.Amethod)) a = A() self.assertEqual(interesting(dir(a)), astuff) a.adata = 42 a.amethod = lambda self: 3 self.assertEqual(interesting(dir(a)), astuff + ['adata', 'amethod']) - self.assert_('im_self' in dir(a.Amethod)) + self.assertTrue('im_self' in dir(a.Amethod)) # Try a module subclass. import sys @@ -2477,13 +2477,13 @@ a = hexint(12345) self.assertEqual(a, 12345) self.assertEqual(int(a), 12345) - self.assert_(int(a).__class__ is int) + self.assertTrue(int(a).__class__ is int) self.assertEqual(hash(a), hash(12345)) - self.assert_((+a).__class__ is int) - self.assert_((a >> 0).__class__ is int) - self.assert_((a << 0).__class__ is int) - self.assert_((hexint(0) << 12).__class__ is int) - self.assert_((hexint(0) >> 12).__class__ is int) + self.assertTrue((+a).__class__ is int) + self.assertTrue((a >> 0).__class__ is int) + self.assertTrue((a << 0).__class__ is int) + self.assertTrue((hexint(0) << 12).__class__ is int) + self.assertTrue((hexint(0) >> 12).__class__ is int) class octlong(long): __slots__ = [] @@ -2503,36 +2503,36 @@ self.assertEqual(a, 12345L) self.assertEqual(long(a), 12345L) self.assertEqual(hash(a), hash(12345L)) - self.assert_(long(a).__class__ is long) - self.assert_((+a).__class__ is long) - self.assert_((-a).__class__ is long) - self.assert_((-octlong(0)).__class__ is long) - self.assert_((a >> 0).__class__ is long) - self.assert_((a << 0).__class__ is long) - self.assert_((a - 0).__class__ is long) - self.assert_((a * 1).__class__ is long) - self.assert_((a ** 1).__class__ is long) - self.assert_((a // 1).__class__ is long) - self.assert_((1 * a).__class__ is long) - self.assert_((a | 0).__class__ is long) - self.assert_((a ^ 0).__class__ is long) - self.assert_((a & -1L).__class__ is long) - self.assert_((octlong(0) << 12).__class__ is long) - self.assert_((octlong(0) >> 12).__class__ is long) - self.assert_(abs(octlong(0)).__class__ is long) + self.assertTrue(long(a).__class__ is long) + self.assertTrue((+a).__class__ is long) + self.assertTrue((-a).__class__ is long) + self.assertTrue((-octlong(0)).__class__ is long) + self.assertTrue((a >> 0).__class__ is long) + self.assertTrue((a << 0).__class__ is long) + self.assertTrue((a - 0).__class__ is long) + self.assertTrue((a * 1).__class__ is long) + self.assertTrue((a ** 1).__class__ is long) + self.assertTrue((a // 1).__class__ is long) + self.assertTrue((1 * a).__class__ is long) + self.assertTrue((a | 0).__class__ is long) + self.assertTrue((a ^ 0).__class__ is long) + self.assertTrue((a & -1L).__class__ is long) + self.assertTrue((octlong(0) << 12).__class__ is long) + self.assertTrue((octlong(0) >> 12).__class__ is long) + self.assertTrue(abs(octlong(0)).__class__ is long) # Because octlong overrides __add__, we can't check the absence of +0 # optimizations using octlong. class longclone(long): pass a = longclone(1) - self.assert_((a + 0).__class__ is long) - self.assert_((0 + a).__class__ is long) + self.assertTrue((a + 0).__class__ is long) + self.assertTrue((0 + a).__class__ is long) # Check that negative clones don't segfault a = longclone(-1) self.assertEqual(a.__dict__, {}) - self.assertEqual(long(a), -1) # self.assert_ PyNumber_Long() copies the sign bit + self.assertEqual(long(a), -1) # self.assertTrue PyNumber_Long() copies the sign bit class precfloat(float): __slots__ = ['prec'] @@ -2544,9 +2544,9 @@ a = precfloat(12345) self.assertEqual(a, 12345.0) self.assertEqual(float(a), 12345.0) - self.assert_(float(a).__class__ is float) + self.assertTrue(float(a).__class__ is float) self.assertEqual(hash(a), hash(12345.0)) - self.assert_((+a).__class__ is float) + self.assertTrue((+a).__class__ is float) class madcomplex(complex): def __repr__(self): @@ -2594,20 +2594,20 @@ self.assertEqual(v, t) a = madtuple((1,2,3,4,5)) self.assertEqual(tuple(a), (1,2,3,4,5)) - self.assert_(tuple(a).__class__ is tuple) + self.assertTrue(tuple(a).__class__ is tuple) self.assertEqual(hash(a), hash((1,2,3,4,5))) - self.assert_(a[:].__class__ is tuple) - self.assert_((a * 1).__class__ is tuple) - self.assert_((a * 0).__class__ is tuple) - self.assert_((a + ()).__class__ is tuple) + self.assertTrue(a[:].__class__ is tuple) + self.assertTrue((a * 1).__class__ is tuple) + self.assertTrue((a * 0).__class__ is tuple) + self.assertTrue((a + ()).__class__ is tuple) a = madtuple(()) self.assertEqual(tuple(a), ()) - self.assert_(tuple(a).__class__ is tuple) - self.assert_((a + a).__class__ is tuple) - self.assert_((a * 0).__class__ is tuple) - self.assert_((a * 1).__class__ is tuple) - self.assert_((a * 2).__class__ is tuple) - self.assert_(a[:].__class__ is tuple) + self.assertTrue(tuple(a).__class__ is tuple) + self.assertTrue((a + a).__class__ is tuple) + self.assertTrue((a * 0).__class__ is tuple) + self.assertTrue((a * 1).__class__ is tuple) + self.assertTrue((a * 2).__class__ is tuple) + self.assertTrue(a[:].__class__ is tuple) class madstring(str): _rev = None @@ -2629,51 +2629,51 @@ self.assertEqual(u, s) s = madstring("12345") self.assertEqual(str(s), "12345") - self.assert_(str(s).__class__ is str) + self.assertTrue(str(s).__class__ is str) base = "\x00" * 5 s = madstring(base) self.assertEqual(s, base) self.assertEqual(str(s), base) - self.assert_(str(s).__class__ is str) + self.assertTrue(str(s).__class__ is str) self.assertEqual(hash(s), hash(base)) self.assertEqual({s: 1}[base], 1) self.assertEqual({base: 1}[s], 1) - self.assert_((s + "").__class__ is str) + self.assertTrue((s + "").__class__ is str) self.assertEqual(s + "", base) - self.assert_(("" + s).__class__ is str) + self.assertTrue(("" + s).__class__ is str) self.assertEqual("" + s, base) - self.assert_((s * 0).__class__ is str) + self.assertTrue((s * 0).__class__ is str) self.assertEqual(s * 0, "") - self.assert_((s * 1).__class__ is str) + self.assertTrue((s * 1).__class__ is str) self.assertEqual(s * 1, base) - self.assert_((s * 2).__class__ is str) + self.assertTrue((s * 2).__class__ is str) self.assertEqual(s * 2, base + base) - self.assert_(s[:].__class__ is str) + self.assertTrue(s[:].__class__ is str) self.assertEqual(s[:], base) - self.assert_(s[0:0].__class__ is str) + self.assertTrue(s[0:0].__class__ is str) self.assertEqual(s[0:0], "") - self.assert_(s.strip().__class__ is str) + self.assertTrue(s.strip().__class__ is str) self.assertEqual(s.strip(), base) - self.assert_(s.lstrip().__class__ is str) + self.assertTrue(s.lstrip().__class__ is str) self.assertEqual(s.lstrip(), base) - self.assert_(s.rstrip().__class__ is str) + self.assertTrue(s.rstrip().__class__ is str) self.assertEqual(s.rstrip(), base) identitytab = ''.join([chr(i) for i in range(256)]) - self.assert_(s.translate(identitytab).__class__ is str) + self.assertTrue(s.translate(identitytab).__class__ is str) self.assertEqual(s.translate(identitytab), base) - self.assert_(s.translate(identitytab, "x").__class__ is str) + self.assertTrue(s.translate(identitytab, "x").__class__ is str) self.assertEqual(s.translate(identitytab, "x"), base) self.assertEqual(s.translate(identitytab, "\x00"), "") - self.assert_(s.replace("x", "x").__class__ is str) + self.assertTrue(s.replace("x", "x").__class__ is str) self.assertEqual(s.replace("x", "x"), base) - self.assert_(s.ljust(len(s)).__class__ is str) + self.assertTrue(s.ljust(len(s)).__class__ is str) self.assertEqual(s.ljust(len(s)), base) - self.assert_(s.rjust(len(s)).__class__ is str) + self.assertTrue(s.rjust(len(s)).__class__ is str) self.assertEqual(s.rjust(len(s)), base) - self.assert_(s.center(len(s)).__class__ is str) + self.assertTrue(s.center(len(s)).__class__ is str) self.assertEqual(s.center(len(s)), base) - self.assert_(s.lower().__class__ is str) + self.assertTrue(s.lower().__class__ is str) self.assertEqual(s.lower(), base) class madunicode(unicode): @@ -2692,47 +2692,47 @@ base = u"12345" u = madunicode(base) self.assertEqual(unicode(u), base) - self.assert_(unicode(u).__class__ is unicode) + self.assertTrue(unicode(u).__class__ is unicode) self.assertEqual(hash(u), hash(base)) self.assertEqual({u: 1}[base], 1) self.assertEqual({base: 1}[u], 1) - self.assert_(u.strip().__class__ is unicode) + self.assertTrue(u.strip().__class__ is unicode) self.assertEqual(u.strip(), base) - self.assert_(u.lstrip().__class__ is unicode) + self.assertTrue(u.lstrip().__class__ is unicode) self.assertEqual(u.lstrip(), base) - self.assert_(u.rstrip().__class__ is unicode) + self.assertTrue(u.rstrip().__class__ is unicode) self.assertEqual(u.rstrip(), base) - self.assert_(u.replace(u"x", u"x").__class__ is unicode) + self.assertTrue(u.replace(u"x", u"x").__class__ is unicode) self.assertEqual(u.replace(u"x", u"x"), base) - self.assert_(u.replace(u"xy", u"xy").__class__ is unicode) + self.assertTrue(u.replace(u"xy", u"xy").__class__ is unicode) self.assertEqual(u.replace(u"xy", u"xy"), base) - self.assert_(u.center(len(u)).__class__ is unicode) + self.assertTrue(u.center(len(u)).__class__ is unicode) self.assertEqual(u.center(len(u)), base) - self.assert_(u.ljust(len(u)).__class__ is unicode) + self.assertTrue(u.ljust(len(u)).__class__ is unicode) self.assertEqual(u.ljust(len(u)), base) - self.assert_(u.rjust(len(u)).__class__ is unicode) + self.assertTrue(u.rjust(len(u)).__class__ is unicode) self.assertEqual(u.rjust(len(u)), base) - self.assert_(u.lower().__class__ is unicode) + self.assertTrue(u.lower().__class__ is unicode) self.assertEqual(u.lower(), base) - self.assert_(u.upper().__class__ is unicode) + self.assertTrue(u.upper().__class__ is unicode) self.assertEqual(u.upper(), base) - self.assert_(u.capitalize().__class__ is unicode) + self.assertTrue(u.capitalize().__class__ is unicode) self.assertEqual(u.capitalize(), base) - self.assert_(u.title().__class__ is unicode) + self.assertTrue(u.title().__class__ is unicode) self.assertEqual(u.title(), base) - self.assert_((u + u"").__class__ is unicode) + self.assertTrue((u + u"").__class__ is unicode) self.assertEqual(u + u"", base) - self.assert_((u"" + u).__class__ is unicode) + self.assertTrue((u"" + u).__class__ is unicode) self.assertEqual(u"" + u, base) - self.assert_((u * 0).__class__ is unicode) + self.assertTrue((u * 0).__class__ is unicode) self.assertEqual(u * 0, u"") - self.assert_((u * 1).__class__ is unicode) + self.assertTrue((u * 1).__class__ is unicode) self.assertEqual(u * 1, base) - self.assert_((u * 2).__class__ is unicode) + self.assertTrue((u * 2).__class__ is unicode) self.assertEqual(u * 2, base + base) - self.assert_(u[:].__class__ is unicode) + self.assertTrue(u[:].__class__ is unicode) self.assertEqual(u[:], base) - self.assert_(u[0:0].__class__ is unicode) + self.assertTrue(u[0:0].__class__ is unicode) self.assertEqual(u[0:0], u"") class sublist(list): @@ -2851,7 +2851,7 @@ self.assertEqual(d[cistr('one')], 1) self.assertEqual(d[cistr('tWo')], 2) self.assertEqual(d[cistr('THrEE')], 3) - self.assert_(cistr('ONe') in d) + self.assertTrue(cistr('ONe') in d) self.assertEqual(d.get(cistr('thrEE')), 3) def test_classic_comparisons(self): @@ -2878,12 +2878,12 @@ c = {1: c1, 2: c2, 3: c3} for x in 1, 2, 3: for y in 1, 2, 3: - self.assert_(cmp(c[x], c[y]) == cmp(x, y), "x=%d, y=%d" % (x, y)) + self.assertTrue(cmp(c[x], c[y]) == cmp(x, y), "x=%d, y=%d" % (x, y)) for op in "<", "<=", "==", "!=", ">", ">=": - self.assert_(eval("c[x] %s c[y]" % op) == eval("x %s y" % op), + self.assertTrue(eval("c[x] %s c[y]" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) - self.assert_(cmp(c[x], y) == cmp(x, y), "x=%d, y=%d" % (x, y)) - self.assert_(cmp(x, c[y]) == cmp(x, y), "x=%d, y=%d" % (x, y)) + self.assertTrue(cmp(c[x], y) == cmp(x, y), "x=%d, y=%d" % (x, y)) + self.assertTrue(cmp(x, c[y]) == cmp(x, y), "x=%d, y=%d" % (x, y)) def test_rich_comparisons(self): # Testing rich comparisons... @@ -2956,11 +2956,11 @@ for x in 1, 2, 3: for y in 1, 2, 3: for op in "<", "<=", "==", "!=", ">", ">=": - self.assert_(eval("c[x] %s c[y]" % op) == eval("x %s y" % op), + self.assertTrue(eval("c[x] %s c[y]" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) - self.assert_(eval("c[x] %s y" % op) == eval("x %s y" % op), + self.assertTrue(eval("c[x] %s y" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) - self.assert_(eval("x %s c[y]" % op) == eval("x %s y" % op), + self.assertTrue(eval("x %s c[y]" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) def test_coercions(self): @@ -3026,9 +3026,9 @@ for cls2 in C, D, E, F: x = cls() x.__class__ = cls2 - self.assert_(x.__class__ is cls2) + self.assertTrue(x.__class__ is cls2) x.__class__ = cls - self.assert_(x.__class__ is cls) + self.assertTrue(x.__class__ is cls) def cant(x, C): try: x.__class__ = C @@ -3090,11 +3090,11 @@ x = cls() x.a = 1 x.__class__ = cls2 - self.assert_(x.__class__ is cls2, + self.assertTrue(x.__class__ is cls2, "assigning %r as __class__ for %r silently failed" % (cls2, x)) self.assertEqual(x.a, 1) x.__class__ = cls - self.assert_(x.__class__ is cls, + self.assertTrue(x.__class__ is cls, "assigning %r as __class__ for %r silently failed" % (cls, x)) self.assertEqual(x.a, 1) for cls in G, J, K, L, M, N, P, R, list, Int: @@ -3264,7 +3264,7 @@ for cls in C, C1, C2: s = p.dumps(cls, bin) cls2 = p.loads(s) - self.assert_(cls2 is cls) + self.assertTrue(cls2 is cls) a = C1(1, 2); a.append(42); a.append(24) b = C2("hello", "world", 42) @@ -3294,7 +3294,7 @@ import copy for cls in C, C1, C2: cls2 = copy.deepcopy(cls) - self.assert_(cls2 is cls) + self.assertTrue(cls2 is cls) a = C1(1, 2); a.append(42); a.append(24) b = C2("hello", "world", 42) @@ -3866,8 +3866,8 @@ __slots__=() if test_support.check_impl_detail(): self.assertEqual(C.__basicsize__, B.__basicsize__) - self.assert_(hasattr(C, '__dict__')) - self.assert_(hasattr(C, '__weakref__')) + self.assertTrue(hasattr(C, '__dict__')) + self.assertTrue(hasattr(C, '__weakref__')) C().x = 2 def test_rmul(self): @@ -4224,29 +4224,29 @@ pass a = C() pa = Proxy(a) - self.assert_(isinstance(a, C)) # Baseline - self.assert_(isinstance(pa, C)) # Test + self.assertTrue(isinstance(a, C)) # Baseline + self.assertTrue(isinstance(pa, C)) # Test # Test with a classic subclass class D(C): pass a = D() pa = Proxy(a) - self.assert_(isinstance(a, C)) # Baseline - self.assert_(isinstance(pa, C)) # Test + self.assertTrue(isinstance(a, C)) # Baseline + self.assertTrue(isinstance(pa, C)) # Test # Test with a new-style class class C(object): pass a = C() pa = Proxy(a) - self.assert_(isinstance(a, C)) # Baseline - self.assert_(isinstance(pa, C)) # Test + self.assertTrue(isinstance(a, C)) # Baseline + self.assertTrue(isinstance(pa, C)) # Test # Test with a new-style subclass class D(C): pass a = D() pa = Proxy(a) - self.assert_(isinstance(a, C)) # Baseline - self.assert_(isinstance(pa, C)) # Test + self.assertTrue(isinstance(a, C)) # Baseline + self.assertTrue(isinstance(pa, C)) # Test def test_proxy_super(self): # Testing super() for a proxy object... @@ -4373,17 +4373,17 @@ l = [] self.assertEqual(l.__add__, l.__add__) self.assertEqual(l.__add__, [].__add__) - self.assert_(l.__add__ != [5].__add__) - self.assert_(l.__add__ != l.__mul__) - self.assert_(l.__add__.__name__ == '__add__') + self.assertTrue(l.__add__ != [5].__add__) + self.assertTrue(l.__add__ != l.__mul__) + self.assertTrue(l.__add__.__name__ == '__add__') if hasattr(l.__add__, '__self__'): # CPython - self.assert_(l.__add__.__self__ is l) - self.assert_(l.__add__.__objclass__ is list) + self.assertTrue(l.__add__.__self__ is l) + self.assertTrue(l.__add__.__objclass__ is list) else: # Python implementations where [].__add__ is a normal bound method - self.assert_(l.__add__.im_self is l) - self.assert_(l.__add__.im_class is list) + self.assertTrue(l.__add__.im_self is l) + self.assertTrue(l.__add__.im_class is list) self.assertEqual(l.__add__.__doc__, list.__add__.__doc__) try: hash(l.__add__) Modified: python/trunk/Lib/test/test_dict.py ============================================================================== --- python/trunk/Lib/test/test_dict.py (original) +++ python/trunk/Lib/test/test_dict.py Wed Jul 1 00:57:08 2009 @@ -9,7 +9,7 @@ def test_constructor(self): # calling built-in types without argument must return empty self.assertEqual(dict(), {}) - self.assert_(dict() is not {}) + self.assertTrue(dict() is not {}) def test_literal_constructor(self): # check literal constructor for different sized dicts (to exercise the BUILD_MAP oparg @@ -23,18 +23,18 @@ self.assertEqual(eval(dictliteral), dict(items)) def test_bool(self): - self.assert_(not {}) - self.assert_({1: 2}) - self.assert_(bool({}) is False) - self.assert_(bool({1: 2}) is True) + self.assertTrue(not {}) + self.assertTrue({1: 2}) + self.assertTrue(bool({}) is False) + self.assertTrue(bool({1: 2}) is True) def test_keys(self): d = {} self.assertEqual(d.keys(), []) d = {'a': 1, 'b': 2} k = d.keys() - self.assert_(d.has_key('a')) - self.assert_(d.has_key('b')) + self.assertTrue(d.has_key('a')) + self.assertTrue(d.has_key('b')) self.assertRaises(TypeError, d.keys, None) @@ -57,7 +57,7 @@ def test_has_key(self): d = {} - self.assert_(not d.has_key('a')) + self.assertTrue(not d.has_key('a')) d = {'a': 1, 'b': 2} k = d.keys() k.sort() @@ -67,12 +67,12 @@ def test_contains(self): d = {} - self.assert_(not ('a' in d)) - self.assert_('a' not in d) + self.assertTrue(not ('a' in d)) + self.assertTrue('a' not in d) d = {'a': 1, 'b': 2} - self.assert_('a' in d) - self.assert_('b' in d) - self.assert_('c' not in d) + self.assertTrue('a' in d) + self.assertTrue('b' in d) + self.assertTrue('c' not in d) self.assertRaises(TypeError, d.__contains__) @@ -206,7 +206,7 @@ def test_fromkeys(self): self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) d = {} - self.assert_(not(d.fromkeys('abc') is d)) + self.assertTrue(not(d.fromkeys('abc') is d)) self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) self.assertEqual(d.fromkeys([]), {}) @@ -217,14 +217,14 @@ class dictlike(dict): pass self.assertEqual(dictlike.fromkeys('a'), {'a':None}) self.assertEqual(dictlike().fromkeys('a'), {'a':None}) - self.assert_(type(dictlike.fromkeys('a')) is dictlike) - self.assert_(type(dictlike().fromkeys('a')) is dictlike) + self.assertTrue(type(dictlike.fromkeys('a')) is dictlike) + self.assertTrue(type(dictlike().fromkeys('a')) is dictlike) class mydict(dict): def __new__(cls): return UserDict.UserDict() ud = mydict.fromkeys('ab') self.assertEqual(ud, {'a':None, 'b':None}) - self.assert_(isinstance(ud, UserDict.UserDict)) + self.assertTrue(isinstance(ud, UserDict.UserDict)) self.assertRaises(TypeError, dict.fromkeys) class Exc(Exception): pass @@ -261,10 +261,10 @@ def test_get(self): d = {} - self.assert_(d.get('c') is None) + self.assertTrue(d.get('c') is None) self.assertEqual(d.get('c', 3), 3) d = {'a' : 1, 'b' : 2} - self.assert_(d.get('c') is None) + self.assertTrue(d.get('c') is None) self.assertEqual(d.get('c', 3), 3) self.assertEqual(d.get('a'), 1) self.assertEqual(d.get('a', 3), 1) @@ -274,9 +274,9 @@ def test_setdefault(self): # dict.setdefault() d = {} - self.assert_(d.setdefault('key0') is None) + self.assertTrue(d.setdefault('key0') is None) d.setdefault('key0', []) - self.assert_(d.setdefault('key0') is None) + self.assertTrue(d.setdefault('key0') is None) d.setdefault('key', []).append(3) self.assertEqual(d['key'][0], 3) d.setdefault('key', []).append(4) @@ -318,9 +318,9 @@ self.assertEqual(va, int(ka)) kb, vb = tb = b.popitem() self.assertEqual(vb, int(kb)) - self.assert_(not(copymode < 0 and ta != tb)) - self.assert_(not a) - self.assert_(not b) + self.assertTrue(not(copymode < 0 and ta != tb)) + self.assertTrue(not a) + self.assertTrue(not b) d = {} self.assertRaises(KeyError, d.popitem) @@ -395,8 +395,8 @@ self.assertRaises(Exc, repr, d) def test_le(self): - self.assert_(not ({} < {})) - self.assert_(not ({1: 2} < {1L: 2L})) + self.assertTrue(not ({} < {})) + self.assertTrue(not ({1: 2} < {1L: 2L})) class Exc(Exception): pass @@ -430,8 +430,8 @@ d = D({1: 2, 3: 4}) self.assertEqual(d[1], 2) self.assertEqual(d[3], 4) - self.assert_(2 not in d) - self.assert_(2 not in d.keys()) + self.assertTrue(2 not in d) + self.assertTrue(2 not in d.keys()) self.assertEqual(d[2], 42) class E(dict): def __missing__(self, key): @@ -567,7 +567,7 @@ obj.x = i(container) del obj, container gc.collect() - self.assert_(ref() is None, "Cycle was not collected") + self.assertTrue(ref() is None, "Cycle was not collected") def _not_tracked(self, t): # Nested containers can take several collections to untrack Modified: python/trunk/Lib/test/test_dircache.py ============================================================================== --- python/trunk/Lib/test/test_dircache.py (original) +++ python/trunk/Lib/test/test_dircache.py Wed Jul 1 00:57:08 2009 @@ -38,7 +38,7 @@ self.assertEquals(entries, []) # Check that cache is actually caching, not just passing through. - self.assert_(dircache.listdir(self.tempdir) is entries) + self.assertTrue(dircache.listdir(self.tempdir) is entries) # Directories aren't "files" on Windows, and directory mtime has # nothing to do with when files under a directory get created. @@ -53,7 +53,7 @@ self.writeTemp("test1") entries = dircache.listdir(self.tempdir) self.assertEquals(entries, ['test1']) - self.assert_(dircache.listdir(self.tempdir) is entries) + self.assertTrue(dircache.listdir(self.tempdir) is entries) ## UNSUCCESSFUL CASES self.assertRaises(OSError, dircache.listdir, self.tempdir+"_nonexistent") Modified: python/trunk/Lib/test/test_docxmlrpc.py ============================================================================== --- python/trunk/Lib/test/test_docxmlrpc.py (original) +++ python/trunk/Lib/test/test_docxmlrpc.py Wed Jul 1 00:57:08 2009 @@ -105,7 +105,7 @@ self.client.request("GET", "/") response = self.client.getresponse() - self.assert_( + self.assertTrue( """
<lambda>(x, y)
""" in response.read()) @@ -119,7 +119,7 @@ self.client.request("GET", "/") response = self.client.getresponse() - self.assert_( # This is ugly ... how can it be made better? + self.assertTrue( # This is ugly ... how can it be made better? """
add(x, y)
Add two instances together. This follows PEP008, but has nothing
\nto do with RFC1952. Case should matter: pEp008 and rFC1952.  Things
\nthat start with http and ftp should be auto-linked, too:
\nhttp://google.com.
""" in response.read()) @@ -132,7 +132,7 @@ self.client.request("GET", "/") response = self.client.getresponse() - self.assert_( + self.assertTrue( """
system.listMethods()
system.listMethods() => [\'add\', \'subtract\', \'multiple\']
\n 
\nReturns a list of the methods supported by the server.
\n
system.methodHelp(method_name)
system.methodHelp(\'add\') => "Adds two integers together"
\n 
\nReturns a string containing documentation for the specified method.
\n
system.methodSignature(method_name)
system.methodSignature(\'add\') => [double, int, int]
\n 
\nReturns a list describing the signature of the method. In the
\nabove example, the add method takes two integers as arguments
\nand returns a double result.
\n 
\nThis server does NOT support system.methodSignature.
""" in response.read()) @@ -142,7 +142,7 @@ self.client.request("GET", "/") response = self.client.getresponse() - self.assert_("""Try self.add, too.""" in + self.assertTrue("""Try self.add, too.""" in response.read()) def test_main(): Modified: python/trunk/Lib/test/test_dummy_thread.py ============================================================================== --- python/trunk/Lib/test/test_dummy_thread.py (original) +++ python/trunk/Lib/test/test_dummy_thread.py Wed Jul 1 00:57:08 2009 @@ -24,43 +24,43 @@ def test_initlock(self): #Make sure locks start locked - self.failUnless(not self.lock.locked(), + self.assertTrue(not self.lock.locked(), "Lock object is not initialized unlocked.") def test_release(self): # Test self.lock.release() self.lock.acquire() self.lock.release() - self.failUnless(not self.lock.locked(), + self.assertTrue(not self.lock.locked(), "Lock object did not release properly.") def test_improper_release(self): #Make sure release of an unlocked thread raises _thread.error - self.failUnlessRaises(_thread.error, self.lock.release) + self.assertRaises(_thread.error, self.lock.release) def test_cond_acquire_success(self): #Make sure the conditional acquiring of the lock works. - self.failUnless(self.lock.acquire(0), + self.assertTrue(self.lock.acquire(0), "Conditional acquiring of the lock failed.") def test_cond_acquire_fail(self): #Test acquiring locked lock returns False self.lock.acquire(0) - self.failUnless(not self.lock.acquire(0), + self.assertTrue(not self.lock.acquire(0), "Conditional acquiring of a locked lock incorrectly " "succeeded.") def test_uncond_acquire_success(self): #Make sure unconditional acquiring of a lock works. self.lock.acquire() - self.failUnless(self.lock.locked(), + self.assertTrue(self.lock.locked(), "Uncondional locking failed.") def test_uncond_acquire_return_val(self): #Make sure that an unconditional locking returns True. - self.failUnless(self.lock.acquire(1) is True, + self.assertTrue(self.lock.acquire(1) is True, "Unconditional locking did not return True.") - self.failUnless(self.lock.acquire() is True) + self.assertTrue(self.lock.acquire() is True) def test_uncond_acquire_blocking(self): #Make sure that unconditional acquiring of a locked lock blocks. @@ -80,7 +80,7 @@ end_time = int(time.time()) if test_support.verbose: print "done" - self.failUnless((end_time - start_time) >= DELAY, + self.assertTrue((end_time - start_time) >= DELAY, "Blocking by unconditional acquiring failed.") class MiscTests(unittest.TestCase): @@ -88,18 +88,18 @@ def test_exit(self): #Make sure _thread.exit() raises SystemExit - self.failUnlessRaises(SystemExit, _thread.exit) + self.assertRaises(SystemExit, _thread.exit) def test_ident(self): #Test sanity of _thread.get_ident() - self.failUnless(isinstance(_thread.get_ident(), int), + self.assertTrue(isinstance(_thread.get_ident(), int), "_thread.get_ident() returned a non-integer") - self.failUnless(_thread.get_ident() != 0, + self.assertTrue(_thread.get_ident() != 0, "_thread.get_ident() returned 0") def test_LockType(self): #Make sure _thread.LockType is the same type as _thread.allocate_locke() - self.failUnless(isinstance(_thread.allocate_lock(), _thread.LockType), + self.assertTrue(isinstance(_thread.allocate_lock(), _thread.LockType), "_thread.LockType is not an instance of what is " "returned by _thread.allocate_lock()") @@ -108,13 +108,13 @@ # should raise KeyboardInterrupt upon completion. def call_interrupt(): _thread.interrupt_main() - self.failUnlessRaises(KeyboardInterrupt, _thread.start_new_thread, + self.assertRaises(KeyboardInterrupt, _thread.start_new_thread, call_interrupt, tuple()) def test_interrupt_in_main(self): # Make sure that if interrupt_main is called in main threat that # KeyboardInterrupt is raised instantly. - self.failUnlessRaises(KeyboardInterrupt, _thread.interrupt_main) + self.assertRaises(KeyboardInterrupt, _thread.interrupt_main) class ThreadTests(unittest.TestCase): """Test thread creation.""" @@ -128,16 +128,16 @@ testing_queue = Queue.Queue(1) _thread.start_new_thread(arg_tester, (testing_queue, True, True)) result = testing_queue.get() - self.failUnless(result[0] and result[1], + self.assertTrue(result[0] and result[1], "Argument passing for thread creation using tuple failed") _thread.start_new_thread(arg_tester, tuple(), {'queue':testing_queue, 'arg1':True, 'arg2':True}) result = testing_queue.get() - self.failUnless(result[0] and result[1], + self.assertTrue(result[0] and result[1], "Argument passing for thread creation using kwargs failed") _thread.start_new_thread(arg_tester, (testing_queue, True), {'arg2':True}) result = testing_queue.get() - self.failUnless(result[0] and result[1], + self.assertTrue(result[0] and result[1], "Argument passing for thread creation using both tuple" " and kwargs failed") @@ -164,7 +164,7 @@ time.sleep(DELAY) if test_support.verbose: print 'done' - self.failUnless(testing_queue.qsize() == thread_count, + self.assertTrue(testing_queue.qsize() == thread_count, "Not all %s threads executed properly after %s sec." % (thread_count, DELAY)) Modified: python/trunk/Lib/test/test_epoll.py ============================================================================== --- python/trunk/Lib/test/test_epoll.py (original) +++ python/trunk/Lib/test/test_epoll.py Wed Jul 1 00:57:08 2009 @@ -71,10 +71,10 @@ ep = select.epoll(16) except OSError, e: raise AssertionError(str(e)) - self.assert_(ep.fileno() > 0, ep.fileno()) - self.assert_(not ep.closed) + self.assertTrue(ep.fileno() > 0, ep.fileno()) + self.assertTrue(not ep.closed) ep.close() - self.assert_(ep.closed) + self.assertTrue(ep.closed) self.assertRaises(ValueError, ep.fileno) def test_badcreate(self): @@ -141,7 +141,7 @@ try: ep2.poll(1, 4) except IOError, e: - self.failUnlessEqual(e.args[0], errno.EBADF, e) + self.assertEqual(e.args[0], errno.EBADF, e) else: self.fail("epoll on closed fd didn't raise EBADF") @@ -157,7 +157,7 @@ now = time.time() events = ep.poll(1, 4) then = time.time() - self.failIf(then - now > 0.1, then - now) + self.assertFalse(then - now > 0.1, then - now) events.sort() expected = [(client.fileno(), select.EPOLLOUT), @@ -165,12 +165,12 @@ expected.sort() self.assertEquals(events, expected) - self.failIf(then - now > 0.01, then - now) + self.assertFalse(then - now > 0.01, then - now) now = time.time() events = ep.poll(timeout=2.1, maxevents=4) then = time.time() - self.failIf(events) + self.assertFalse(events) client.send("Hello!") server.send("world!!!") @@ -178,7 +178,7 @@ now = time.time() events = ep.poll(1, 4) then = time.time() - self.failIf(then - now > 0.01) + self.assertFalse(then - now > 0.01) events.sort() expected = [(client.fileno(), select.EPOLLIN | select.EPOLLOUT), @@ -192,7 +192,7 @@ now = time.time() events = ep.poll(1, 4) then = time.time() - self.failIf(then - now > 0.01) + self.assertFalse(then - now > 0.01) expected = [(server.fileno(), select.EPOLLOUT)] self.assertEquals(events, expected) @@ -211,7 +211,7 @@ now = time.time() events = ep.poll(1, 4) then = time.time() - self.failIf(then - now > 0.01) + self.assertFalse(then - now > 0.01) server.close() ep.unregister(fd) Modified: python/trunk/Lib/test/test_errno.py ============================================================================== --- python/trunk/Lib/test/test_errno.py (original) +++ python/trunk/Lib/test/test_errno.py Wed Jul 1 00:57:08 2009 @@ -14,13 +14,13 @@ def test_for_improper_attributes(self): # No unexpected attributes should be on the module. for error_code in std_c_errors: - self.assert_(hasattr(errno, error_code), + self.assertTrue(hasattr(errno, error_code), "errno is missing %s" % error_code) def test_using_errorcode(self): # Every key value in errno.errorcode should be on the module. for value in errno.errorcode.itervalues(): - self.assert_(hasattr(errno, value), 'no %s attr in errno' % value) + self.assertTrue(hasattr(errno, value), 'no %s attr in errno' % value) class ErrorcodeTests(unittest.TestCase): @@ -28,7 +28,7 @@ def test_attributes_in_errorcode(self): for attribute in errno.__dict__.iterkeys(): if attribute.isupper(): - self.assert_(getattr(errno, attribute) in errno.errorcode, + self.assertTrue(getattr(errno, attribute) in errno.errorcode, 'no %s attr in errno.errorcode' % attribute) Modified: python/trunk/Lib/test/test_exceptions.py ============================================================================== --- python/trunk/Lib/test/test_exceptions.py (original) +++ python/trunk/Lib/test/test_exceptions.py Wed Jul 1 00:57:08 2009 @@ -162,7 +162,7 @@ exc, err, tb = sys.exc_info() co = tb.tb_frame.f_code self.assertEquals(co.co_name, "test_capi1") - self.assert_(co.co_filename.endswith('test_exceptions'+os.extsep+'py')) + self.assertTrue(co.co_filename.endswith('test_exceptions'+os.extsep+'py')) else: self.fail("Expected exception") @@ -174,7 +174,7 @@ exc, err, tb = sys.exc_info() co = tb.tb_frame.f_code self.assertEquals(co.co_name, "__init__") - self.assert_(co.co_filename.endswith('test_exceptions'+os.extsep+'py')) + self.assertTrue(co.co_filename.endswith('test_exceptions'+os.extsep+'py')) co2 = tb.tb_frame.f_back.f_code self.assertEquals(co2.co_name, "test_capi2") else: @@ -190,12 +190,12 @@ except NameError: pass else: - self.failUnlessEqual(str(WindowsError(1001)), + self.assertEqual(str(WindowsError(1001)), "1001") - self.failUnlessEqual(str(WindowsError(1001, "message")), + self.assertEqual(str(WindowsError(1001, "message")), "[Error 1001] message") - self.failUnlessEqual(WindowsError(1001, "message").errno, 22) - self.failUnlessEqual(WindowsError(1001, "message").winerror, 1001) + self.assertEqual(WindowsError(1001, "message").errno, 22) + self.assertEqual(WindowsError(1001, "message").winerror, 1001) def testAttributes(self): # test that exception attributes are happy @@ -308,7 +308,7 @@ # going through the 'args' attribute. args = (1, 2, 3) exc = BaseException(*args) - self.failUnlessEqual(exc[:], args) + self.assertEqual(exc[:], args) def testKeywordArgs(self): # test that builtin exception don't take keyword args, @@ -350,11 +350,11 @@ def testUnicodeStrUsage(self): # Make sure both instances and classes have a str and unicode # representation. - self.failUnless(str(Exception)) - self.failUnless(unicode(Exception)) - self.failUnless(str(Exception('a'))) - self.failUnless(unicode(Exception(u'a'))) - self.failUnless(unicode(Exception(u'\xe1'))) + self.assertTrue(str(Exception)) + self.assertTrue(unicode(Exception)) + self.assertTrue(str(Exception('a'))) + self.assertTrue(unicode(Exception(u'a'))) + self.assertTrue(unicode(Exception(u'\xe1'))) def test_badisinstance(self): # Bug #2542: if issubclass(e, MyException) raises an exception, @@ -386,8 +386,8 @@ except RuntimeError: return sys.exc_info() e, v, tb = g() - self.assert_(e is RuntimeError, e) - self.assert_("maximum recursion depth exceeded" in str(v), v) + self.assertTrue(e is RuntimeError, e) + self.assertTrue("maximum recursion depth exceeded" in str(v), v) def test_main(): Modified: python/trunk/Lib/test/test_file.py ============================================================================== --- python/trunk/Lib/test/test_file.py (original) +++ python/trunk/Lib/test/test_file.py Wed Jul 1 00:57:08 2009 @@ -88,13 +88,13 @@ def testErrors(self): f = self.f self.assertEquals(f.name, TESTFN) - self.assert_(not f.isatty()) - self.assert_(not f.closed) + self.assertTrue(not f.isatty()) + self.assertTrue(not f.closed) if hasattr(f, "readinto"): self.assertRaises((IOError, TypeError), f.readinto, "") f.close() - self.assert_(f.closed) + self.assertTrue(f.closed) def testMethods(self): methods = [('fileno', ()), @@ -116,7 +116,7 @@ # __exit__ should close the file self.f.__exit__(None, None, None) - self.assert_(self.f.closed) + self.assertTrue(self.f.closed) for methodname, args in methods: method = getattr(self.f, methodname) Modified: python/trunk/Lib/test/test_file2k.py ============================================================================== --- python/trunk/Lib/test/test_file2k.py (original) +++ python/trunk/Lib/test/test_file2k.py Wed Jul 1 00:57:08 2009 @@ -83,17 +83,17 @@ def testRepr(self): # verify repr works - self.assert_(repr(self.f).startswith(" size2 >= size0) + self.assertTrue(size1 > size2 >= size0) def test_main(): Modified: python/trunk/Lib/test/test_genericpath.py ============================================================================== --- python/trunk/Lib/test/test_genericpath.py (original) +++ python/trunk/Lib/test/test_genericpath.py Wed Jul 1 00:57:08 2009 @@ -6,7 +6,7 @@ class AllCommonTest(unittest.TestCase): def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def test_commonprefix(self): self.assertEqual( @@ -50,7 +50,7 @@ f.close() self.assertEqual(d, "foobar") - self.assert_( + self.assertTrue( genericpath.getctime(test_support.TESTFN) <= genericpath.getmtime(test_support.TESTFN) ) Modified: python/trunk/Lib/test/test_getargs2.py ============================================================================== --- python/trunk/Lib/test/test_getargs2.py (original) +++ python/trunk/Lib/test/test_getargs2.py Wed Jul 1 00:57:08 2009 @@ -67,69 +67,69 @@ def test_b(self): from _testcapi import getargs_b # b returns 'unsigned char', and does range checking (0 ... UCHAR_MAX) - self.failUnlessEqual(3, getargs_b(3.14)) - self.failUnlessEqual(99, getargs_b(Long())) - self.failUnlessEqual(99, getargs_b(Int())) + self.assertEqual(3, getargs_b(3.14)) + self.assertEqual(99, getargs_b(Long())) + self.assertEqual(99, getargs_b(Int())) self.assertRaises(OverflowError, getargs_b, -1) - self.failUnlessEqual(0, getargs_b(0)) - self.failUnlessEqual(UCHAR_MAX, getargs_b(UCHAR_MAX)) + self.assertEqual(0, getargs_b(0)) + self.assertEqual(UCHAR_MAX, getargs_b(UCHAR_MAX)) self.assertRaises(OverflowError, getargs_b, UCHAR_MAX + 1) - self.failUnlessEqual(42, getargs_b(42)) - self.failUnlessEqual(42, getargs_b(42L)) + self.assertEqual(42, getargs_b(42)) + self.assertEqual(42, getargs_b(42L)) self.assertRaises(OverflowError, getargs_b, VERY_LARGE) def test_B(self): from _testcapi import getargs_B # B returns 'unsigned char', no range checking - self.failUnlessEqual(3, getargs_B(3.14)) - self.failUnlessEqual(99, getargs_B(Long())) - self.failUnlessEqual(99, getargs_B(Int())) - - self.failUnlessEqual(UCHAR_MAX, getargs_B(-1)) - self.failUnlessEqual(UCHAR_MAX, getargs_B(-1L)) - self.failUnlessEqual(0, getargs_B(0)) - self.failUnlessEqual(UCHAR_MAX, getargs_B(UCHAR_MAX)) - self.failUnlessEqual(0, getargs_B(UCHAR_MAX+1)) - - self.failUnlessEqual(42, getargs_B(42)) - self.failUnlessEqual(42, getargs_B(42L)) - self.failUnlessEqual(UCHAR_MAX & VERY_LARGE, getargs_B(VERY_LARGE)) + self.assertEqual(3, getargs_B(3.14)) + self.assertEqual(99, getargs_B(Long())) + self.assertEqual(99, getargs_B(Int())) + + self.assertEqual(UCHAR_MAX, getargs_B(-1)) + self.assertEqual(UCHAR_MAX, getargs_B(-1L)) + self.assertEqual(0, getargs_B(0)) + self.assertEqual(UCHAR_MAX, getargs_B(UCHAR_MAX)) + self.assertEqual(0, getargs_B(UCHAR_MAX+1)) + + self.assertEqual(42, getargs_B(42)) + self.assertEqual(42, getargs_B(42L)) + self.assertEqual(UCHAR_MAX & VERY_LARGE, getargs_B(VERY_LARGE)) def test_H(self): from _testcapi import getargs_H # H returns 'unsigned short', no range checking - self.failUnlessEqual(3, getargs_H(3.14)) - self.failUnlessEqual(99, getargs_H(Long())) - self.failUnlessEqual(99, getargs_H(Int())) - - self.failUnlessEqual(USHRT_MAX, getargs_H(-1)) - self.failUnlessEqual(0, getargs_H(0)) - self.failUnlessEqual(USHRT_MAX, getargs_H(USHRT_MAX)) - self.failUnlessEqual(0, getargs_H(USHRT_MAX+1)) + self.assertEqual(3, getargs_H(3.14)) + self.assertEqual(99, getargs_H(Long())) + self.assertEqual(99, getargs_H(Int())) + + self.assertEqual(USHRT_MAX, getargs_H(-1)) + self.assertEqual(0, getargs_H(0)) + self.assertEqual(USHRT_MAX, getargs_H(USHRT_MAX)) + self.assertEqual(0, getargs_H(USHRT_MAX+1)) - self.failUnlessEqual(42, getargs_H(42)) - self.failUnlessEqual(42, getargs_H(42L)) + self.assertEqual(42, getargs_H(42)) + self.assertEqual(42, getargs_H(42L)) - self.failUnlessEqual(VERY_LARGE & USHRT_MAX, getargs_H(VERY_LARGE)) + self.assertEqual(VERY_LARGE & USHRT_MAX, getargs_H(VERY_LARGE)) def test_I(self): from _testcapi import getargs_I # I returns 'unsigned int', no range checking - self.failUnlessEqual(3, getargs_I(3.14)) - self.failUnlessEqual(99, getargs_I(Long())) - self.failUnlessEqual(99, getargs_I(Int())) - - self.failUnlessEqual(UINT_MAX, getargs_I(-1)) - self.failUnlessEqual(0, getargs_I(0)) - self.failUnlessEqual(UINT_MAX, getargs_I(UINT_MAX)) - self.failUnlessEqual(0, getargs_I(UINT_MAX+1)) + self.assertEqual(3, getargs_I(3.14)) + self.assertEqual(99, getargs_I(Long())) + self.assertEqual(99, getargs_I(Int())) + + self.assertEqual(UINT_MAX, getargs_I(-1)) + self.assertEqual(0, getargs_I(0)) + self.assertEqual(UINT_MAX, getargs_I(UINT_MAX)) + self.assertEqual(0, getargs_I(UINT_MAX+1)) - self.failUnlessEqual(42, getargs_I(42)) - self.failUnlessEqual(42, getargs_I(42L)) + self.assertEqual(42, getargs_I(42)) + self.assertEqual(42, getargs_I(42L)) - self.failUnlessEqual(VERY_LARGE & UINT_MAX, getargs_I(VERY_LARGE)) + self.assertEqual(VERY_LARGE & UINT_MAX, getargs_I(VERY_LARGE)) def test_k(self): from _testcapi import getargs_k @@ -139,64 +139,64 @@ self.assertRaises(TypeError, getargs_k, Long()) self.assertRaises(TypeError, getargs_k, Int()) - self.failUnlessEqual(ULONG_MAX, getargs_k(-1)) - self.failUnlessEqual(0, getargs_k(0)) - self.failUnlessEqual(ULONG_MAX, getargs_k(ULONG_MAX)) - self.failUnlessEqual(0, getargs_k(ULONG_MAX+1)) + self.assertEqual(ULONG_MAX, getargs_k(-1)) + self.assertEqual(0, getargs_k(0)) + self.assertEqual(ULONG_MAX, getargs_k(ULONG_MAX)) + self.assertEqual(0, getargs_k(ULONG_MAX+1)) - self.failUnlessEqual(42, getargs_k(42)) - self.failUnlessEqual(42, getargs_k(42L)) + self.assertEqual(42, getargs_k(42)) + self.assertEqual(42, getargs_k(42L)) - self.failUnlessEqual(VERY_LARGE & ULONG_MAX, getargs_k(VERY_LARGE)) + self.assertEqual(VERY_LARGE & ULONG_MAX, getargs_k(VERY_LARGE)) class Signed_TestCase(unittest.TestCase): def test_i(self): from _testcapi import getargs_i # i returns 'int', and does range checking (INT_MIN ... INT_MAX) - self.failUnlessEqual(3, getargs_i(3.14)) - self.failUnlessEqual(99, getargs_i(Long())) - self.failUnlessEqual(99, getargs_i(Int())) + self.assertEqual(3, getargs_i(3.14)) + self.assertEqual(99, getargs_i(Long())) + self.assertEqual(99, getargs_i(Int())) self.assertRaises(OverflowError, getargs_i, INT_MIN-1) - self.failUnlessEqual(INT_MIN, getargs_i(INT_MIN)) - self.failUnlessEqual(INT_MAX, getargs_i(INT_MAX)) + self.assertEqual(INT_MIN, getargs_i(INT_MIN)) + self.assertEqual(INT_MAX, getargs_i(INT_MAX)) self.assertRaises(OverflowError, getargs_i, INT_MAX+1) - self.failUnlessEqual(42, getargs_i(42)) - self.failUnlessEqual(42, getargs_i(42L)) + self.assertEqual(42, getargs_i(42)) + self.assertEqual(42, getargs_i(42L)) self.assertRaises(OverflowError, getargs_i, VERY_LARGE) def test_l(self): from _testcapi import getargs_l # l returns 'long', and does range checking (LONG_MIN ... LONG_MAX) - self.failUnlessEqual(3, getargs_l(3.14)) - self.failUnlessEqual(99, getargs_l(Long())) - self.failUnlessEqual(99, getargs_l(Int())) + self.assertEqual(3, getargs_l(3.14)) + self.assertEqual(99, getargs_l(Long())) + self.assertEqual(99, getargs_l(Int())) self.assertRaises(OverflowError, getargs_l, LONG_MIN-1) - self.failUnlessEqual(LONG_MIN, getargs_l(LONG_MIN)) - self.failUnlessEqual(LONG_MAX, getargs_l(LONG_MAX)) + self.assertEqual(LONG_MIN, getargs_l(LONG_MIN)) + self.assertEqual(LONG_MAX, getargs_l(LONG_MAX)) self.assertRaises(OverflowError, getargs_l, LONG_MAX+1) - self.failUnlessEqual(42, getargs_l(42)) - self.failUnlessEqual(42, getargs_l(42L)) + self.assertEqual(42, getargs_l(42)) + self.assertEqual(42, getargs_l(42L)) self.assertRaises(OverflowError, getargs_l, VERY_LARGE) def test_n(self): from _testcapi import getargs_n # n returns 'Py_ssize_t', and does range checking # (PY_SSIZE_T_MIN ... PY_SSIZE_T_MAX) - self.failUnlessEqual(3, getargs_n(3.14)) - self.failUnlessEqual(99, getargs_n(Long())) - self.failUnlessEqual(99, getargs_n(Int())) + self.assertEqual(3, getargs_n(3.14)) + self.assertEqual(99, getargs_n(Long())) + self.assertEqual(99, getargs_n(Int())) self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MIN-1) - self.failUnlessEqual(PY_SSIZE_T_MIN, getargs_n(PY_SSIZE_T_MIN)) - self.failUnlessEqual(PY_SSIZE_T_MAX, getargs_n(PY_SSIZE_T_MAX)) + self.assertEqual(PY_SSIZE_T_MIN, getargs_n(PY_SSIZE_T_MIN)) + self.assertEqual(PY_SSIZE_T_MAX, getargs_n(PY_SSIZE_T_MAX)) self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MAX+1) - self.failUnlessEqual(42, getargs_n(42)) - self.failUnlessEqual(42, getargs_n(42L)) + self.assertEqual(42, getargs_n(42)) + self.assertEqual(42, getargs_n(42L)) self.assertRaises(OverflowError, getargs_n, VERY_LARGE) @@ -204,18 +204,18 @@ def test_L(self): from _testcapi import getargs_L # L returns 'long long', and does range checking (LLONG_MIN ... LLONG_MAX) - self.failUnlessRaises(TypeError, getargs_L, "Hello") - self.failUnlessEqual(3, getargs_L(3.14)) - self.failUnlessEqual(99, getargs_L(Long())) - self.failUnlessEqual(99, getargs_L(Int())) + self.assertRaises(TypeError, getargs_L, "Hello") + self.assertEqual(3, getargs_L(3.14)) + self.assertEqual(99, getargs_L(Long())) + self.assertEqual(99, getargs_L(Int())) self.assertRaises(OverflowError, getargs_L, LLONG_MIN-1) - self.failUnlessEqual(LLONG_MIN, getargs_L(LLONG_MIN)) - self.failUnlessEqual(LLONG_MAX, getargs_L(LLONG_MAX)) + self.assertEqual(LLONG_MIN, getargs_L(LLONG_MIN)) + self.assertEqual(LLONG_MAX, getargs_L(LLONG_MAX)) self.assertRaises(OverflowError, getargs_L, LLONG_MAX+1) - self.failUnlessEqual(42, getargs_L(42)) - self.failUnlessEqual(42, getargs_L(42L)) + self.assertEqual(42, getargs_L(42)) + self.assertEqual(42, getargs_L(42L)) self.assertRaises(OverflowError, getargs_L, VERY_LARGE) def test_K(self): @@ -224,14 +224,14 @@ self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) - self.failUnlessEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) - self.failUnlessEqual(0, getargs_K(0)) - self.failUnlessEqual(0, getargs_K(ULLONG_MAX+1)) + self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) + self.assertEqual(0, getargs_K(0)) + self.assertEqual(0, getargs_K(ULLONG_MAX+1)) - self.failUnlessEqual(42, getargs_K(42)) - self.failUnlessEqual(42, getargs_K(42L)) + self.assertEqual(42, getargs_K(42)) + self.assertEqual(42, getargs_K(42L)) - self.failUnlessEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE)) + self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE)) class Tuple_TestCase(unittest.TestCase): Modified: python/trunk/Lib/test/test_getopt.py ============================================================================== --- python/trunk/Lib/test/test_getopt.py (original) +++ python/trunk/Lib/test/test_getopt.py Wed Jul 1 00:57:08 2009 @@ -23,21 +23,21 @@ self.assertRaises(getopt.GetoptError, *args, **kwargs) def test_short_has_arg(self): - self.failUnless(getopt.short_has_arg('a', 'a:')) - self.failIf(getopt.short_has_arg('a', 'a')) + self.assertTrue(getopt.short_has_arg('a', 'a:')) + self.assertFalse(getopt.short_has_arg('a', 'a')) self.assertError(getopt.short_has_arg, 'a', 'b') def test_long_has_args(self): has_arg, option = getopt.long_has_args('abc', ['abc=']) - self.failUnless(has_arg) + self.assertTrue(has_arg) self.assertEqual(option, 'abc') has_arg, option = getopt.long_has_args('abc', ['abc']) - self.failIf(has_arg) + self.assertFalse(has_arg) self.assertEqual(option, 'abc') has_arg, option = getopt.long_has_args('abc', ['abcd']) - self.failIf(has_arg) + self.assertFalse(has_arg) self.assertEqual(option, 'abcd') self.assertError(getopt.long_has_args, 'abc', ['def']) Modified: python/trunk/Lib/test/test_gettext.py ============================================================================== --- python/trunk/Lib/test/test_gettext.py (original) +++ python/trunk/Lib/test/test_gettext.py Wed Jul 1 00:57:08 2009 @@ -306,7 +306,7 @@ self._ = self.t.ugettext def test_unicode_msgid(self): - unless = self.failUnless + unless = self.assertTrue unless(isinstance(self._(''), unicode)) unless(isinstance(self._(u''), unicode)) Modified: python/trunk/Lib/test/test_grammar.py ============================================================================== --- python/trunk/Lib/test/test_grammar.py (original) +++ python/trunk/Lib/test/test_grammar.py Wed Jul 1 00:57:08 2009 @@ -36,8 +36,8 @@ if maxint == 2147483647: self.assertEquals(-2147483647-1, -020000000000) # XXX -2147483648 - self.assert_(037777777777 > 0) - self.assert_(0xffffffff > 0) + self.assertTrue(037777777777 > 0) + self.assertTrue(0xffffffff > 0) for s in '2147483648', '040000000000', '0x100000000': try: x = eval(s) @@ -45,8 +45,8 @@ self.fail("OverflowError on huge integer literal %r" % s) elif maxint == 9223372036854775807: self.assertEquals(-9223372036854775807-1, -01000000000000000000000) - self.assert_(01777777777777777777777 > 0) - self.assert_(0xffffffffffffffff > 0) + self.assertTrue(01777777777777777777777 > 0) + self.assertTrue(0xffffffffffffffff > 0) for s in '9223372036854775808', '02000000000000000000000', \ '0x10000000000000000': try: @@ -81,15 +81,15 @@ x = 3.1e4 def testStringLiterals(self): - x = ''; y = ""; self.assert_(len(x) == 0 and x == y) - x = '\''; y = "'"; self.assert_(len(x) == 1 and x == y and ord(x) == 39) - x = '"'; y = "\""; self.assert_(len(x) == 1 and x == y and ord(x) == 34) + x = ''; y = ""; self.assertTrue(len(x) == 0 and x == y) + x = '\''; y = "'"; self.assertTrue(len(x) == 1 and x == y and ord(x) == 39) + x = '"'; y = "\""; self.assertTrue(len(x) == 1 and x == y and ord(x) == 34) x = "doesn't \"shrink\" does it" y = 'doesn\'t "shrink" does it' - self.assert_(len(x) == 24 and x == y) + self.assertTrue(len(x) == 24 and x == y) x = "does \"shrink\" doesn't it" y = 'does "shrink" doesn\'t it' - self.assert_(len(x) == 24 and x == y) + self.assertTrue(len(x) == 24 and x == y) x = """ The "quick" brown fox @@ -550,7 +550,7 @@ self.fail('exec ... in g (%s), l (%s)' %(g,l)) def testAssert(self): - # assert_stmt: 'assert' test [',' test] + # assertTruestmt: 'assert' test [',' test] assert 1 assert 1, 1 assert lambda x:x Modified: python/trunk/Lib/test/test_grp.py ============================================================================== --- python/trunk/Lib/test/test_grp.py (original) +++ python/trunk/Lib/test/test_grp.py Wed Jul 1 00:57:08 2009 @@ -12,13 +12,13 @@ # attributes promised by the docs self.assertEqual(len(value), 4) self.assertEqual(value[0], value.gr_name) - self.assert_(isinstance(value.gr_name, basestring)) + self.assertTrue(isinstance(value.gr_name, basestring)) self.assertEqual(value[1], value.gr_passwd) - self.assert_(isinstance(value.gr_passwd, basestring)) + self.assertTrue(isinstance(value.gr_passwd, basestring)) self.assertEqual(value[2], value.gr_gid) - self.assert_(isinstance(value.gr_gid, int)) + self.assertTrue(isinstance(value.gr_gid, int)) self.assertEqual(value[3], value.gr_mem) - self.assert_(isinstance(value.gr_mem, list)) + self.assertTrue(isinstance(value.gr_mem, list)) def test_values(self): entries = grp.getgrall() Modified: python/trunk/Lib/test/test_gzip.py ============================================================================== --- python/trunk/Lib/test/test_gzip.py (original) +++ python/trunk/Lib/test/test_gzip.py Wed Jul 1 00:57:08 2009 @@ -91,7 +91,7 @@ while 1: L = f.readline(line_length) if L == "" and line_length != 0: break - self.assert_(len(L) <= line_length) + self.assertTrue(len(L) <= line_length) line_length = (line_length + 1) % 50 f.close() @@ -157,7 +157,7 @@ def test_1647484(self): for mode in ('wb', 'rb'): f = gzip.GzipFile(self.filename, mode) - self.assert_(hasattr(f, "name")) + self.assertTrue(hasattr(f, "name")) self.assertEqual(f.name, self.filename) f.close() @@ -169,7 +169,7 @@ fRead = gzip.GzipFile(self.filename) dataRead = fRead.read() self.assertEqual(dataRead, data1) - self.assert_(hasattr(fRead, 'mtime')) + self.assertTrue(hasattr(fRead, 'mtime')) self.assertEqual(fRead.mtime, mtime) fRead.close() Modified: python/trunk/Lib/test/test_hash.py ============================================================================== --- python/trunk/Lib/test/test_hash.py (original) +++ python/trunk/Lib/test/test_hash.py Wed Jul 1 00:57:08 2009 @@ -105,7 +105,7 @@ objects = (self.default_expected + self.fixed_expected) for obj in objects: - self.assert_(isinstance(obj, Hashable), repr(obj)) + self.assertTrue(isinstance(obj, Hashable), repr(obj)) def test_not_hashable(self): for obj in self.error_expected: Modified: python/trunk/Lib/test/test_hashlib.py ============================================================================== --- python/trunk/Lib/test/test_hashlib.py (original) +++ python/trunk/Lib/test/test_hashlib.py Wed Jul 1 00:57:08 2009 @@ -37,12 +37,12 @@ except ValueError: pass else: - self.assert_(0 == "hashlib didn't reject bogus hash name") + self.assertTrue(0 == "hashlib didn't reject bogus hash name") def test_hexdigest(self): for name in self.supported_hash_names: h = hashlib.new(name) - self.assert_(hexstr(h.digest()) == h.hexdigest()) + self.assertTrue(hexstr(h.digest()) == h.hexdigest()) def test_large_update(self): aas = 'a' * 128 Modified: python/trunk/Lib/test/test_heapq.py ============================================================================== --- python/trunk/Lib/test/test_heapq.py (original) +++ python/trunk/Lib/test/test_heapq.py Wed Jul 1 00:57:08 2009 @@ -46,7 +46,7 @@ for pos, item in enumerate(heap): if pos: # pos 0 has no parent parentpos = (pos-1) >> 1 - self.assert_(heap[parentpos] <= item) + self.assertTrue(heap[parentpos] <= item) def test_heapify(self): for size in range(30): Modified: python/trunk/Lib/test/test_hmac.py ============================================================================== --- python/trunk/Lib/test/test_hmac.py (original) +++ python/trunk/Lib/test/test_hmac.py Wed Jul 1 00:57:08 2009 @@ -260,7 +260,7 @@ # Testing if HMAC defaults to MD5 algorithm. # NOTE: this whitebox test depends on the hmac class internals h = hmac.HMAC("key") - self.failUnless(h.digest_cons == hashlib.md5) + self.assertTrue(h.digest_cons == hashlib.md5) def test_exercise_all_methods(self): # Exercising all methods once. @@ -280,11 +280,11 @@ # Testing if attributes are of same type. h1 = hmac.HMAC("key") h2 = h1.copy() - self.failUnless(h1.digest_cons == h2.digest_cons, + self.assertTrue(h1.digest_cons == h2.digest_cons, "digest constructors don't match.") - self.failUnless(type(h1.inner) == type(h2.inner), + self.assertTrue(type(h1.inner) == type(h2.inner), "Types of inner don't match.") - self.failUnless(type(h1.outer) == type(h2.outer), + self.assertTrue(type(h1.outer) == type(h2.outer), "Types of outer don't match.") def test_realcopy(self): @@ -292,10 +292,10 @@ h1 = hmac.HMAC("key") h2 = h1.copy() # Using id() in case somebody has overridden __cmp__. - self.failUnless(id(h1) != id(h2), "No real copy of the HMAC instance.") - self.failUnless(id(h1.inner) != id(h2.inner), + self.assertTrue(id(h1) != id(h2), "No real copy of the HMAC instance.") + self.assertTrue(id(h1.inner) != id(h2.inner), "No real copy of the attribute 'inner'.") - self.failUnless(id(h1.outer) != id(h2.outer), + self.assertTrue(id(h1.outer) != id(h2.outer), "No real copy of the attribute 'outer'.") def test_equality(self): @@ -303,9 +303,9 @@ h1 = hmac.HMAC("key") h1.update("some random text") h2 = h1.copy() - self.failUnless(h1.digest() == h2.digest(), + self.assertTrue(h1.digest() == h2.digest(), "Digest of copy doesn't match original digest.") - self.failUnless(h1.hexdigest() == h2.hexdigest(), + self.assertTrue(h1.hexdigest() == h2.hexdigest(), "Hexdigest of copy doesn't match original hexdigest.") def test_main(): Modified: python/trunk/Lib/test/test_hotshot.py ============================================================================== --- python/trunk/Lib/test/test_hotshot.py (original) +++ python/trunk/Lib/test/test_hotshot.py Wed Jul 1 00:57:08 2009 @@ -64,11 +64,11 @@ def run_test(self, callable, events, profiler=None): if profiler is None: profiler = self.new_profiler() - self.failUnless(not profiler._prof.closed) + self.assertTrue(not profiler._prof.closed) profiler.runcall(callable) - self.failUnless(not profiler._prof.closed) + self.assertTrue(not profiler._prof.closed) profiler.close() - self.failUnless(profiler._prof.closed) + self.assertTrue(profiler._prof.closed) self.check_events(events) def test_addinfo(self): @@ -80,7 +80,7 @@ log = self.get_logreader() info = log._info list(log) - self.failUnless(info["test-key"] == ["test-value"]) + self.assertTrue(info["test-key"] == ["test-value"]) def test_line_numbers(self): def f(): Modified: python/trunk/Lib/test/test_httplib.py ============================================================================== --- python/trunk/Lib/test/test_httplib.py (original) +++ python/trunk/Lib/test/test_httplib.py Wed Jul 1 00:57:08 2009 @@ -239,7 +239,7 @@ HTTPConnection and into the socket. ''' # default -- use global socket timeout - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(30) try: httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT) @@ -250,7 +250,7 @@ httpConn.close() # no timeout -- do not use global socket default - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(30) try: httpConn = httplib.HTTPConnection(HOST, TimeoutTest.PORT, Modified: python/trunk/Lib/test/test_httpservers.py ============================================================================== --- python/trunk/Lib/test/test_httpservers.py (original) +++ python/trunk/Lib/test/test_httpservers.py Wed Jul 1 00:57:08 2009 @@ -216,9 +216,9 @@ def check_status_and_reason(self, response, status, data=None): body = response.read() - self.assert_(response) + self.assertTrue(response) self.assertEquals(response.status, status) - self.assert_(response.reason != None) + self.assertTrue(response.reason != None) if data: self.assertEqual(data, body) Modified: python/trunk/Lib/test/test_imp.py ============================================================================== --- python/trunk/Lib/test/test_imp.py (original) +++ python/trunk/Lib/test/test_imp.py Wed Jul 1 00:57:08 2009 @@ -8,7 +8,7 @@ """Very basic test of import lock functions.""" def verify_lock_state(self, expected): - self.failUnlessEqual(imp.lock_held(), expected, + self.assertEqual(imp.lock_held(), expected, "expected imp.lock_held() to be %r" % expected) def testLock(self): LOOPS = 50 Modified: python/trunk/Lib/test/test_import.py ============================================================================== --- python/trunk/Lib/test/test_import.py (original) +++ python/trunk/Lib/test/test_import.py Wed Jul 1 00:57:08 2009 @@ -161,7 +161,7 @@ sys.path.insert(0, os.curdir) try: mod = __import__(TESTFN) - self.assert_(TESTFN in sys.modules, "expected module in sys.modules") + self.assertTrue(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") @@ -181,7 +181,7 @@ # 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") + self.assertFalse(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. @@ -208,12 +208,12 @@ # import x.y.z binds x in the current namespace import test as x import test.test_support - self.assert_(x is test, x.__name__) - self.assert_(hasattr(test.test_support, "__file__")) + self.assertTrue(x is test, x.__name__) + self.assertTrue(hasattr(test.test_support, "__file__")) # import x.y.z as w binds z as w import test.test_support as y - self.assert_(y is test.test_support, y.__name__) + self.assertTrue(y is test.test_support, y.__name__) def test_import_initless_directory_warning(self): with warnings.catch_warnings(): @@ -394,14 +394,14 @@ ns = dict(__package__='foo', __name__='test.notarealmodule') with check_warnings() as w: check_absolute() - self.assert_('foo' in str(w.message)) + self.assertTrue('foo' in str(w.message)) self.assertEqual(w.category, RuntimeWarning) self.assertRaises(SystemError, check_relative) # Check relative fails with __package__ and __name__ wrong ns = dict(__package__='foo', __name__='notarealpkg.notarealmodule') with check_warnings() as w: check_absolute() - self.assert_('foo' in str(w.message)) + self.assertTrue('foo' in str(w.message)) self.assertEqual(w.category, RuntimeWarning) self.assertRaises(SystemError, check_relative) # Check both fail with package set to a non-string Modified: python/trunk/Lib/test/test_importhooks.py ============================================================================== --- python/trunk/Lib/test/test_importhooks.py (original) +++ python/trunk/Lib/test/test_importhooks.py Wed Jul 1 00:57:08 2009 @@ -177,11 +177,11 @@ TestImporter.modules['reloadmodule'] = (False, test_co) import reloadmodule - self.failIf(hasattr(reloadmodule,'reloaded')) + self.assertFalse(hasattr(reloadmodule,'reloaded')) TestImporter.modules['reloadmodule'] = (False, reload_co) reload(reloadmodule) - self.failUnless(hasattr(reloadmodule,'reloaded')) + self.assertTrue(hasattr(reloadmodule,'reloaded')) import hooktestpackage.oldabs self.assertEqual(hooktestpackage.oldabs.get_name(), Modified: python/trunk/Lib/test/test_index.py ============================================================================== --- python/trunk/Lib/test/test_index.py (original) +++ python/trunk/Lib/test/test_index.py Wed Jul 1 00:57:08 2009 @@ -60,10 +60,10 @@ def test_error(self): self.o.ind = 'dumb' self.n.ind = 'bad' - self.failUnlessRaises(TypeError, operator.index, self.o) - self.failUnlessRaises(TypeError, operator.index, self.n) - self.failUnlessRaises(TypeError, slice(self.o).indices, 0) - self.failUnlessRaises(TypeError, slice(self.n).indices, 0) + self.assertRaises(TypeError, operator.index, self.o) + self.assertRaises(TypeError, operator.index, self.n) + self.assertRaises(TypeError, slice(self.o).indices, 0) + self.assertRaises(TypeError, slice(self.n).indices, 0) class SeqTestCase(unittest.TestCase): @@ -115,11 +115,11 @@ self.o.ind = 'dumb' self.n.ind = 'bad' indexobj = lambda x, obj: obj.seq[x] - self.failUnlessRaises(TypeError, indexobj, self.o, self) - self.failUnlessRaises(TypeError, indexobj, self.n, self) + self.assertRaises(TypeError, indexobj, self.o, self) + self.assertRaises(TypeError, indexobj, self.n, self) sliceobj = lambda x, obj: obj.seq[x:] - self.failUnlessRaises(TypeError, sliceobj, self.o, self) - self.failUnlessRaises(TypeError, sliceobj, self.n, self) + self.assertRaises(TypeError, sliceobj, self.o, self) + self.assertRaises(TypeError, sliceobj, self.n, self) class ListTestCase(SeqTestCase): @@ -152,7 +152,7 @@ lst = [5, 6, 7, 8, 9, 11] l2 = lst.__imul__(self.n) - self.assert_(l2 is lst) + self.assertTrue(l2 is lst) self.assertEqual(lst, [5, 6, 7, 8, 9, 11] * 3) @@ -206,8 +206,8 @@ self._getitem_helper(Empty) def test_sequence_repeat(self): - self.failUnlessRaises(OverflowError, lambda: "a" * self.pos) - self.failUnlessRaises(OverflowError, lambda: "a" * self.neg) + self.assertRaises(OverflowError, lambda: "a" * self.pos) + self.assertRaises(OverflowError, lambda: "a" * self.neg) def test_main(): Modified: python/trunk/Lib/test/test_inspect.py ============================================================================== --- python/trunk/Lib/test/test_inspect.py (original) +++ python/trunk/Lib/test/test_inspect.py Wed Jul 1 00:57:08 2009 @@ -43,13 +43,13 @@ def istest(self, predicate, exp): obj = eval(exp) - self.failUnless(predicate(obj), '%s(%s)' % (predicate.__name__, exp)) + self.assertTrue(predicate(obj), '%s(%s)' % (predicate.__name__, exp)) for other in self.predicates - set([predicate]): if predicate == inspect.isgeneratorfunction and\ other == inspect.isfunction: continue - self.failIf(other(obj), 'not %s(%s)' % (other.__name__, exp)) + self.assertFalse(other(obj), 'not %s(%s)' % (other.__name__, exp)) def generator_function_example(self): for i in xrange(2): @@ -83,15 +83,15 @@ self.istest(inspect.isgetsetdescriptor, 'type(tb.tb_frame).f_locals') else: - self.failIf(inspect.isgetsetdescriptor(type(tb.tb_frame).f_locals)) + self.assertFalse(inspect.isgetsetdescriptor(type(tb.tb_frame).f_locals)) if hasattr(types, 'MemberDescriptorType'): self.istest(inspect.ismemberdescriptor, 'datetime.timedelta.days') else: - self.failIf(inspect.ismemberdescriptor(datetime.timedelta.days)) + self.assertFalse(inspect.ismemberdescriptor(datetime.timedelta.days)) def test_isroutine(self): - self.assert_(inspect.isroutine(mod.spam)) - self.assert_(inspect.isroutine([].count)) + self.assertTrue(inspect.isroutine(mod.spam)) + self.assertTrue(inspect.isroutine([].count)) def test_isclass(self): self.istest(inspect.isclass, 'mod.StupidGit') @@ -112,8 +112,8 @@ x = C() x.a = 42 members = dict(inspect.getmembers(x)) - self.assert_('a' in members) - self.assert_('b' not in members) + self.assertTrue('a' in members) + self.assertTrue('b' not in members) class TestInterpreterStack(IsTestBase): @@ -127,7 +127,7 @@ self.istest(inspect.isframe, 'mod.fr') def test_stack(self): - self.assert_(len(mod.st) >= 5) + self.assertTrue(len(mod.st) >= 5) self.assertEqual(mod.st[0][1:], (modfile, 16, 'eggs', [' st = inspect.stack()\n'], 0)) self.assertEqual(mod.st[1][1:], @@ -419,23 +419,23 @@ datablob = '1' attrs = attrs_wo_objs(A) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'class method', A) in attrs, 'missing class method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', A) in attrs, 'missing plain method') - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'class method', A) in attrs, 'missing class method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class B(A): def m(self): pass attrs = attrs_wo_objs(B) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'class method', A) in attrs, 'missing class method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', B) in attrs, 'missing plain method') - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'class method', A) in attrs, 'missing class method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', B) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class C(A): @@ -443,23 +443,23 @@ def c(self): pass attrs = attrs_wo_objs(C) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'method', C) in attrs, 'missing plain method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', C) in attrs, 'missing plain method') - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'method', C) in attrs, 'missing plain method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', C) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class D(B, C): def m1(self): pass attrs = attrs_wo_objs(D) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'class method', A) in attrs, 'missing class method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', B) in attrs, 'missing plain method') - self.assert_(('m1', 'method', D) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'class method', A) in attrs, 'missing class method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', B) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', D) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') # Repeat all that, but w/ new-style classes. def test_classify_newstyle(self): @@ -481,24 +481,24 @@ datablob = '1' attrs = attrs_wo_objs(A) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'class method', A) in attrs, 'missing class method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', A) in attrs, 'missing plain method') - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'class method', A) in attrs, 'missing class method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class B(A): def m(self): pass attrs = attrs_wo_objs(B) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'class method', A) in attrs, 'missing class method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', B) in attrs, 'missing plain method') - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'class method', A) in attrs, 'missing class method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', B) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class C(A): @@ -507,24 +507,24 @@ def c(self): pass attrs = attrs_wo_objs(C) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'method', C) in attrs, 'missing plain method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', C) in attrs, 'missing plain method') - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'method', C) in attrs, 'missing plain method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', C) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class D(B, C): def m1(self): pass attrs = attrs_wo_objs(D) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'method', C) in attrs, 'missing plain method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', B) in attrs, 'missing plain method') - self.assert_(('m1', 'method', D) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'method', C) in attrs, 'missing plain method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', B) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', D) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') def test_main(): run_unittest(TestDecorators, TestRetrievingSourceCode, TestOneliners, Modified: python/trunk/Lib/test/test_int.py ============================================================================== --- python/trunk/Lib/test/test_int.py (original) +++ python/trunk/Lib/test/test_int.py Wed Jul 1 00:57:08 2009 @@ -76,15 +76,15 @@ s = repr(-1-sys.maxint) x = int(s) self.assertEqual(x+1, -sys.maxint) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) # should return long self.assertEqual(int(s[1:]), sys.maxint+1) # should return long x = int(1e100) - self.assert_(isinstance(x, long)) + self.assertTrue(isinstance(x, long)) x = int(-1e100) - self.assert_(isinstance(x, long)) + self.assertTrue(isinstance(x, long)) # SF bug 434186: 0x80000000/2 != 0x80000000>>1. @@ -102,11 +102,11 @@ self.assertRaises(ValueError, int, '123\x00 245', 20) x = int('1' * 600) - self.assert_(isinstance(x, long)) + self.assertTrue(isinstance(x, long)) if have_unicode: x = int(unichr(0x661) * 600) - self.assert_(isinstance(x, long)) + self.assertTrue(isinstance(x, long)) self.assertRaises(TypeError, int, 1, 12) @@ -249,7 +249,7 @@ self.assertEqual(k, len(bin(x).lstrip('-0b'))) # Behaviour as specified in the docs if x != 0: - self.assert_(2**(k-1) <= abs(x) < 2**k) + self.assertTrue(2**(k-1) <= abs(x) < 2**k) else: self.assertEqual(k, 0) # Alternative definition: x.bit_length() == 1 + floor(log_2(x)) Modified: python/trunk/Lib/test/test_io.py ============================================================================== --- python/trunk/Lib/test/test_io.py (original) +++ python/trunk/Lib/test/test_io.py Wed Jul 1 00:57:08 2009 @@ -396,7 +396,7 @@ with self.open(support.TESTFN, "ab") as f: self.assertEqual(f.tell(), 3) with self.open(support.TESTFN, "a") as f: - self.assert_(f.tell() > 0) + self.assertTrue(f.tell() > 0) def test_destructor(self): record = [] @@ -514,7 +514,7 @@ wr = weakref.ref(f) del f support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) with self.open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"abcxxx") @@ -622,8 +622,8 @@ if s: # The destructor *may* have printed an unraisable error, check it self.assertEqual(len(s.splitlines()), 1) - self.assert_(s.startswith("Exception IOError: "), s) - self.assert_(s.endswith(" ignored"), s) + self.assertTrue(s.startswith("Exception IOError: "), s) + self.assertTrue(s.endswith(" ignored"), s) def test_repr(self): raw = self.MockRawIO() @@ -720,7 +720,7 @@ self.assertEquals(b"e", bufio.read(1)) self.assertEquals(b"fg", bufio.read()) self.assertEquals(b"", bufio.peek(1)) - self.assert_(None is bufio.read()) + self.assertTrue(None is bufio.read()) self.assertEquals(b"", bufio.read()) def test_read_past_eof(self): @@ -822,7 +822,7 @@ wr = weakref.ref(f) del f support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) class PyBufferedReaderTest(BufferedReaderTest): tp = pyio.BufferedReader @@ -871,7 +871,7 @@ flushed = b"".join(writer._write_stack) # At least (total - 8) bytes were implicitly flushed, perhaps more # depending on the implementation. - self.assert_(flushed.startswith(contents[:-8]), flushed) + self.assertTrue(flushed.startswith(contents[:-8]), flushed) def check_writes(self, intermediate_func): # Lots of writes, test the flushed output is as expected. @@ -1083,7 +1083,7 @@ wr = weakref.ref(f) del f support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) with self.open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"123xxx") @@ -1573,7 +1573,7 @@ t = self.TextIOWrapper(b, encoding="utf8") self.assertEqual(t.encoding, "utf8") t = self.TextIOWrapper(b) - self.assert_(t.encoding is not None) + self.assertTrue(t.encoding is not None) codecs.lookup(t.encoding) def test_encoding_errors_reading(self): @@ -1743,8 +1743,8 @@ if s: # The destructor *may* have printed an unraisable error, check it self.assertEqual(len(s.splitlines()), 1) - self.assert_(s.startswith("Exception IOError: "), s) - self.assert_(s.endswith(" ignored"), s) + self.assertTrue(s.startswith("Exception IOError: "), s) + self.assertTrue(s.endswith(" ignored"), s) # Systematic tests of the text I/O API @@ -2064,7 +2064,7 @@ wr = weakref.ref(t) del t support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) with self.open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"456def") @@ -2288,7 +2288,7 @@ wr = weakref.ref(c) del c, b support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) def test_abcs(self): # Test the visible base classes are ABCs. Modified: python/trunk/Lib/test/test_ioctl.py ============================================================================== --- python/trunk/Lib/test/test_ioctl.py (original) +++ python/trunk/Lib/test/test_ioctl.py Wed Jul 1 00:57:08 2009 @@ -24,7 +24,7 @@ tty = open("/dev/tty", "r") r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ") rpgrp = struct.unpack("i", r)[0] - self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + self.assertTrue(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) def test_ioctl_mutate(self): import array @@ -34,7 +34,7 @@ r = fcntl.ioctl(tty, termios.TIOCGPGRP, buf, 1) rpgrp = buf[0] self.assertEquals(r, 0) - self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + self.assertTrue(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) def test_ioctl_signed_unsigned_code_param(self): if not pty: Modified: python/trunk/Lib/test/test_iter.py ============================================================================== --- python/trunk/Lib/test/test_iter.py (original) +++ python/trunk/Lib/test/test_iter.py Wed Jul 1 00:57:08 2009 @@ -75,7 +75,7 @@ seq = range(10) it = iter(seq) it2 = iter(it) - self.assert_(it is it2) + self.assertTrue(it is it2) # Test that for loops over iterators work def test_iter_for_loop(self): @@ -566,23 +566,23 @@ def test_in_and_not_in(self): for sc5 in IteratingSequenceClass(5), SequenceClass(5): for i in range(5): - self.assert_(i in sc5) + self.assertTrue(i in sc5) for i in "abc", -1, 5, 42.42, (3, 4), [], {1: 1}, 3-12j, sc5: - self.assert_(i not in sc5) + self.assertTrue(i not in sc5) self.assertRaises(TypeError, lambda: 3 in 12) self.assertRaises(TypeError, lambda: 3 not in map) d = {"one": 1, "two": 2, "three": 3, 1j: 2j} for k in d: - self.assert_(k in d) - self.assert_(k not in d.itervalues()) + self.assertTrue(k in d) + self.assertTrue(k not in d.itervalues()) for v in d.values(): - self.assert_(v in d.itervalues()) - self.assert_(v not in d) + self.assertTrue(v in d.itervalues()) + self.assertTrue(v not in d) for k, v in d.iteritems(): - self.assert_((k, v) in d.iteritems()) - self.assert_((v, k) not in d.iteritems()) + self.assertTrue((k, v) in d.iteritems()) + self.assertTrue((v, k) not in d.iteritems()) f = open(TESTFN, "w") try: @@ -593,9 +593,9 @@ try: for chunk in "abc": f.seek(0, 0) - self.assert_(chunk not in f) + self.assertTrue(chunk not in f) f.seek(0, 0) - self.assert_((chunk + "\n") in f) + self.assertTrue((chunk + "\n") in f) finally: f.close() try: Modified: python/trunk/Lib/test/test_itertools.py ============================================================================== --- python/trunk/Lib/test/test_itertools.py (original) +++ python/trunk/Lib/test/test_itertools.py Wed Jul 1 00:57:08 2009 @@ -127,7 +127,7 @@ self.assertEqual(len(c), r) # r-length combinations self.assertEqual(len(set(c)), r) # no duplicate elements self.assertEqual(list(c), sorted(c)) # keep original ordering - self.assert_(all(e in values for e in c)) # elements taken from input iterable + self.assertTrue(all(e in values for e in c)) # elements taken from input iterable self.assertEqual(list(c), [e for e in values if e in c]) # comb is a subsequence of the input iterable self.assertEqual(result, list(combinations1(values, r))) # matches first pure python version @@ -191,14 +191,14 @@ if n == 0 or r <= 1: self.assertEquals(result, regular_combs) # cases that should be identical else: - self.assert_(set(result) >= set(regular_combs)) # rest should be supersets of regular combs + self.assertTrue(set(result) >= set(regular_combs)) # rest should be supersets of regular combs for c in result: self.assertEqual(len(c), r) # r-length combinations noruns = [k for k,v in groupby(c)] # combo without consecutive repeats self.assertEqual(len(noruns), len(set(noruns))) # no repeats other than consecutive self.assertEqual(list(c), sorted(c)) # keep original ordering - self.assert_(all(e in values for e in c)) # elements taken from input iterable + self.assertTrue(all(e in values for e in c)) # elements taken from input iterable self.assertEqual(noruns, [e for e in values if e in c]) # comb is a subsequence of the input iterable self.assertEqual(result, list(cwr1(values, r))) # matches first pure python version @@ -261,7 +261,7 @@ for p in result: self.assertEqual(len(p), r) # r-length permutations self.assertEqual(len(set(p)), r) # no duplicate elements - self.assert_(all(e in values for e in p)) # elements taken from input iterable + self.assertTrue(all(e in values for e in p)) # elements taken from input iterable self.assertEqual(result, list(permutations1(values, r))) # matches first pure python version self.assertEqual(result, list(permutations2(values, r))) # matches second pure python version if r == n: @@ -821,7 +821,7 @@ # tee pass-through to copyable iterator a, b = tee('abc') c, d = tee(a) - self.assert_(a is c) + self.assertTrue(a is c) # test tee_new t1, t2 = tee('abc') @@ -829,7 +829,7 @@ self.assertRaises(TypeError, tnew) self.assertRaises(TypeError, tnew, 10) t3 = tnew(t1) - self.assert_(list(t1) == list(t2) == list(t3) == list('abc')) + self.assertTrue(list(t1) == list(t2) == list(t3) == list('abc')) # test that tee objects are weak referencable a, b = tee(xrange(10)) @@ -1336,7 +1336,7 @@ Subclass(newarg=1) except TypeError, err: # we expect type errors because of wrong argument count - self.failIf("does not take keyword arguments" in err.args[0]) + self.assertFalse("does not take keyword arguments" in err.args[0]) libreftest = """ Doctest for examples in the library reference: libitertools.tex Modified: python/trunk/Lib/test/test_kqueue.py ============================================================================== --- python/trunk/Lib/test/test_kqueue.py (original) +++ python/trunk/Lib/test/test_kqueue.py Wed Jul 1 00:57:08 2009 @@ -15,10 +15,10 @@ class TestKQueue(unittest.TestCase): def test_create_queue(self): kq = select.kqueue() - self.assert_(kq.fileno() > 0, kq.fileno()) - self.assert_(not kq.closed) + self.assertTrue(kq.fileno() > 0, kq.fileno()) + self.assertTrue(not kq.closed) kq.close() - self.assert_(kq.closed) + self.assertTrue(kq.closed) self.assertRaises(ValueError, kq.fileno) def test_create_event(self): @@ -34,8 +34,8 @@ self.assertEqual(ev, ev) self.assertNotEqual(ev, other) self.assertEqual(cmp(ev, other), -1) - self.assert_(ev < other) - self.assert_(other >= ev) + self.assertTrue(ev < other) + self.assertTrue(other >= ev) self.assertRaises(TypeError, cmp, ev, None) self.assertRaises(TypeError, cmp, ev, 1) self.assertRaises(TypeError, cmp, ev, "ev") Modified: python/trunk/Lib/test/test_largefile.py ============================================================================== --- python/trunk/Lib/test/test_largefile.py (original) +++ python/trunk/Lib/test/test_largefile.py Wed Jul 1 00:57:08 2009 @@ -145,7 +145,7 @@ for pos in (2**31-1, 2**31, 2**31+1): with self.open(TESTFN, 'rb') as f: f.seek(pos) - self.assert_(f.seekable()) + self.assertTrue(f.seekable()) def test_main(): Modified: python/trunk/Lib/test/test_list.py ============================================================================== --- python/trunk/Lib/test/test_list.py (original) +++ python/trunk/Lib/test/test_list.py Wed Jul 1 00:57:08 2009 @@ -9,7 +9,7 @@ l0_3 = [0, 1, 2, 3] l0_3_bis = list(l0_3) self.assertEqual(l0_3, l0_3_bis) - self.assert_(l0_3 is not l0_3_bis) + self.assertTrue(l0_3 is not l0_3_bis) self.assertEqual(list(()), []) self.assertEqual(list((0, 1, 2, 3)), [0, 1, 2, 3]) self.assertEqual(list(''), []) @@ -39,11 +39,11 @@ def test_truth(self): super(ListTest, self).test_truth() - self.assert_(not []) - self.assert_([42]) + self.assertTrue(not []) + self.assertTrue([42]) def test_identity(self): - self.assert_([] is not []) + self.assertTrue([] is not []) def test_len(self): super(ListTest, self).test_len() Modified: python/trunk/Lib/test/test_logging.py ============================================================================== --- python/trunk/Lib/test/test_logging.py (original) +++ python/trunk/Lib/test/test_logging.py Wed Jul 1 00:57:08 2009 @@ -99,7 +99,7 @@ finally: logging._releaseLock() - def assert_log_lines(self, expected_values, stream=None): + def assertTruelog_lines(self, expected_values, stream=None): """Match the collected log lines against the regular expression self.expected_log_pat, and compare the extracted group values to the expected_values list of tuples.""" @@ -165,7 +165,7 @@ INF.debug(m()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('ERR', 'CRITICAL', '1'), ('ERR', 'ERROR', '2'), ('INF', 'CRITICAL', '3'), @@ -197,7 +197,7 @@ INF_ERR.info(m()) INF_ERR.debug(m()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('INF.ERR', 'CRITICAL', '1'), ('INF.ERR', 'ERROR', '2'), ]) @@ -228,7 +228,7 @@ INF_ERR_UNDEF.info(m()) INF_ERR_UNDEF.debug(m()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('INF.UNDEF', 'CRITICAL', '1'), ('INF.UNDEF', 'ERROR', '2'), ('INF.UNDEF', 'WARNING', '3'), @@ -256,7 +256,7 @@ GRANDCHILD.debug(m()) CHILD.debug(m()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('INF.BADPARENT.UNDEF', 'CRITICAL', '1'), ('INF.BADPARENT.UNDEF', 'INFO', '2'), ('INF.BADPARENT', 'CRITICAL', '3'), @@ -285,7 +285,7 @@ spam_eggs_fish.info(self.next_message()) # Good. spam_bakedbeans.info(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('spam.eggs', 'INFO', '2'), ('spam.eggs.fish', 'INFO', '3'), ]) @@ -367,7 +367,7 @@ self.root_logger.setLevel(VERBOSE) # Levels >= 'Verbose' are good. self.log_at_all_levels(self.root_logger) - self.assert_log_lines([ + self.assertTruelog_lines([ ('Verbose', '5'), ('Sociable', '6'), ('Effusive', '7'), @@ -382,7 +382,7 @@ try: # Levels >= 'Sociable' are good. self.log_at_all_levels(self.root_logger) - self.assert_log_lines([ + self.assertTruelog_lines([ ('Sociable', '6'), ('Effusive', '7'), ('Terse', '8'), @@ -413,12 +413,12 @@ ('Taciturn', '9'), ('Silent', '10'), ] - self.assert_log_lines(first_lines) + self.assertTruelog_lines(first_lines) specific_filter = VerySpecificFilter() self.root_logger.addFilter(specific_filter) self.log_at_all_levels(self.root_logger) - self.assert_log_lines(first_lines + [ + self.assertTruelog_lines(first_lines + [ # Not only 'Garrulous' is still missing, but also 'Sociable' # and 'Taciturn' ('Boring', '11'), @@ -458,9 +458,9 @@ # The memory handler flushes to its target handler based on specific # criteria (message count and message level). self.mem_logger.debug(self.next_message()) - self.assert_log_lines([]) + self.assertTruelog_lines([]) self.mem_logger.info(self.next_message()) - self.assert_log_lines([]) + self.assertTruelog_lines([]) # This will flush because the level is >= logging.WARNING self.mem_logger.warn(self.next_message()) lines = [ @@ -468,19 +468,19 @@ ('INFO', '2'), ('WARNING', '3'), ] - self.assert_log_lines(lines) + self.assertTruelog_lines(lines) for n in (4, 14): for i in range(9): self.mem_logger.debug(self.next_message()) - self.assert_log_lines(lines) + self.assertTruelog_lines(lines) # This will flush because it's the 10th message since the last # flush. self.mem_logger.debug(self.next_message()) lines = lines + [('DEBUG', str(i)) for i in range(n, n + 10)] - self.assert_log_lines(lines) + self.assertTruelog_lines(lines) self.mem_logger.debug(self.next_message()) - self.assert_log_lines(lines) + self.assertTruelog_lines(lines) class ExceptionFormatter(logging.Formatter): @@ -650,11 +650,11 @@ logger.info(self.next_message()) # Outputs a message logger.error(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('ERROR', '2'), ], stream=output) # Original logger output is empty. - self.assert_log_lines([]) + self.assertTruelog_lines([]) def test_config1_ok(self, config=config1): # A config file defining a sub-parser as well. @@ -664,12 +664,12 @@ # Both will output a message logger.info(self.next_message()) logger.error(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('INFO', '1'), ('ERROR', '2'), ], stream=output) # Original logger output is empty. - self.assert_log_lines([]) + self.assertTruelog_lines([]) def test_config2_failure(self): # A simple config file which overrides the default settings. @@ -692,7 +692,7 @@ self.assertEquals(output.getvalue(), "ERROR:root:just testing\nGot a [RuntimeError]\n") # Original logger output is empty - self.assert_log_lines([]) + self.assertTruelog_lines([]) def test_config5_ok(self): self.test_config1_ok(config=self.config5) @@ -826,7 +826,7 @@ key = id(obj), repr(obj) self._survivors[key] = weakref.ref(obj) - def _assert_survival(self): + def _assertTruesurvival(self): """Assert that all objects watched for survival have survived.""" # Trigger cycle breaking. gc.collect() @@ -847,16 +847,16 @@ foo.setLevel(logging.DEBUG) self.root_logger.debug(self.next_message()) foo.debug(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('foo', 'DEBUG', '2'), ]) del foo # foo has survived. - self._assert_survival() + self._assertTruesurvival() # foo has retained its settings. bar = logging.getLogger("foo") bar.debug(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('foo', 'DEBUG', '2'), ('foo', 'DEBUG', '3'), ]) @@ -881,7 +881,7 @@ # check we wrote exactly those bytes, ignoring trailing \n etc f = open(fn) try: - self.failUnlessEqual(f.read().rstrip(), data) + self.assertEqual(f.read().rstrip(), data) finally: f.close() finally: Modified: python/trunk/Lib/test/test_long.py ============================================================================== --- python/trunk/Lib/test/test_long.py (original) +++ python/trunk/Lib/test/test_long.py Wed Jul 1 00:57:08 2009 @@ -88,7 +88,7 @@ # The sign of the number is also random. def getran(self, ndigits): - self.assert_(ndigits > 0) + self.assertTrue(ndigits > 0) nbits_hi = ndigits * SHIFT nbits_lo = nbits_hi - SHIFT + 1 answer = 0L @@ -97,13 +97,13 @@ while nbits < nbits_lo: bits = (r >> 1) + 1 bits = min(bits, nbits_hi - nbits) - self.assert_(1 <= bits <= SHIFT) + self.assertTrue(1 <= bits <= SHIFT) nbits = nbits + bits answer = answer << bits if r & 1: answer = answer | ((1 << bits) - 1) r = int(random.random() * (SHIFT * 2)) - self.assert_(nbits_lo <= nbits <= nbits_hi) + self.assertTrue(nbits_lo <= nbits <= nbits_hi) if random.random() < 0.5: answer = -answer return answer @@ -129,9 +129,9 @@ eq(r, r2, Frm("divmod returns different mod than %% for %r and %r", x, y)) eq(x, q*y + r, Frm("x != q*y + r after divmod on x=%r, y=%r", x, y)) if y > 0: - self.assert_(0 <= r < y, Frm("bad mod from divmod on %r and %r", x, y)) + self.assertTrue(0 <= r < y, Frm("bad mod from divmod on %r and %r", x, y)) else: - self.assert_(y < r <= 0, Frm("bad mod from divmod on %r and %r", x, y)) + self.assertTrue(y < r <= 0, Frm("bad mod from divmod on %r and %r", x, y)) def test_division(self): digits = range(1, MAXDIGITS+1) + range(KARATSUBA_CUTOFF, @@ -552,7 +552,7 @@ y = int(x) except OverflowError: self.fail("int(long(sys.maxint) + 1) mustn't overflow") - self.assert_(isinstance(y, long), + self.assertTrue(isinstance(y, long), "int(long(sys.maxint) + 1) should have returned long") x = hugeneg_aslong - 1 @@ -560,14 +560,14 @@ y = int(x) except OverflowError: self.fail("int(long(-sys.maxint-1) - 1) mustn't overflow") - self.assert_(isinstance(y, long), + self.assertTrue(isinstance(y, long), "int(long(-sys.maxint-1) - 1) should have returned long") class long2(long): pass x = long2(1L<<100) y = int(x) - self.assert_(type(y) is long, + self.assertTrue(type(y) is long, "overflowing int conversion must return long not long subtype") # long -> Py_ssize_t conversion @@ -850,7 +850,7 @@ self.assertEqual(k, len(bin(x).lstrip('-0b'))) # Behaviour as specified in the docs if x != 0: - self.assert_(2**(k-1) <= abs(x) < 2**k) + self.assertTrue(2**(k-1) <= abs(x) < 2**k) else: self.assertEqual(k, 0) # Alternative definition: x.bit_length() == 1 + floor(log_2(x)) Modified: python/trunk/Lib/test/test_macpath.py ============================================================================== --- python/trunk/Lib/test/test_macpath.py (original) +++ python/trunk/Lib/test/test_macpath.py Wed Jul 1 00:57:08 2009 @@ -6,26 +6,26 @@ class MacPathTestCase(unittest.TestCase): def test_abspath(self): - self.assert_(macpath.abspath("xx:yy") == "xx:yy") + self.assertTrue(macpath.abspath("xx:yy") == "xx:yy") def test_isabs(self): isabs = macpath.isabs - self.assert_(isabs("xx:yy")) - self.assert_(isabs("xx:yy:")) - self.assert_(isabs("xx:")) - self.failIf(isabs("foo")) - self.failIf(isabs(":foo")) - self.failIf(isabs(":foo:bar")) - self.failIf(isabs(":foo:bar:")) + self.assertTrue(isabs("xx:yy")) + self.assertTrue(isabs("xx:yy:")) + self.assertTrue(isabs("xx:")) + self.assertFalse(isabs("foo")) + self.assertFalse(isabs(":foo")) + self.assertFalse(isabs(":foo:bar")) + self.assertFalse(isabs(":foo:bar:")) def test_commonprefix(self): commonprefix = macpath.commonprefix - self.assert_(commonprefix(["home:swenson:spam", "home:swen:spam"]) + self.assertTrue(commonprefix(["home:swenson:spam", "home:swen:spam"]) == "home:swen") - self.assert_(commonprefix([":home:swen:spam", ":home:swen:eggs"]) + self.assertTrue(commonprefix([":home:swen:spam", ":home:swen:eggs"]) == ":home:swen:") - self.assert_(commonprefix([":home:swen:spam", ":home:swen:spam"]) + self.assertTrue(commonprefix([":home:swen:spam", ":home:swen:spam"]) == ":home:swen:spam") def test_split(self): Modified: python/trunk/Lib/test/test_mailbox.py ============================================================================== --- python/trunk/Lib/test/test_mailbox.py (original) +++ python/trunk/Lib/test/test_mailbox.py Wed Jul 1 00:57:08 2009 @@ -22,17 +22,17 @@ def _check_sample(self, msg): # Inspect a mailbox.Message representation of the sample message - self.assert_(isinstance(msg, email.message.Message)) - self.assert_(isinstance(msg, mailbox.Message)) + self.assertTrue(isinstance(msg, email.message.Message)) + self.assertTrue(isinstance(msg, mailbox.Message)) for key, value in _sample_headers.iteritems(): - self.assert_(value in msg.get_all(key)) - self.assert_(msg.is_multipart()) - self.assert_(len(msg.get_payload()) == len(_sample_payloads)) + self.assertTrue(value in msg.get_all(key)) + self.assertTrue(msg.is_multipart()) + self.assertTrue(len(msg.get_payload()) == len(_sample_payloads)) for i, payload in enumerate(_sample_payloads): part = msg.get_payload(i) - self.assert_(isinstance(part, email.message.Message)) - self.assert_(not isinstance(part, mailbox.Message)) - self.assert_(part.get_payload() == payload) + self.assertTrue(isinstance(part, email.message.Message)) + self.assertTrue(not isinstance(part, mailbox.Message)) + self.assertTrue(part.get_payload() == payload) def _delete_recursively(self, target): # Delete a file or delete a directory recursively @@ -65,16 +65,16 @@ # Add copies of a sample message keys = [] keys.append(self._box.add(self._template % 0)) - self.assert_(len(self._box) == 1) + self.assertTrue(len(self._box) == 1) keys.append(self._box.add(mailbox.Message(_sample_message))) - self.assert_(len(self._box) == 2) + self.assertTrue(len(self._box) == 2) keys.append(self._box.add(email.message_from_string(_sample_message))) - self.assert_(len(self._box) == 3) + self.assertTrue(len(self._box) == 3) keys.append(self._box.add(StringIO.StringIO(_sample_message))) - self.assert_(len(self._box) == 4) + self.assertTrue(len(self._box) == 4) keys.append(self._box.add(_sample_message)) - self.assert_(len(self._box) == 5) - self.assert_(self._box.get_string(keys[0]) == self._template % 0) + self.assertTrue(len(self._box) == 5) + self.assertTrue(self._box.get_string(keys[0]) == self._template % 0) for i in (1, 2, 3, 4): self._check_sample(self._box[keys[i]]) @@ -90,23 +90,23 @@ # (Used by test_remove() and test_delitem().) key0 = self._box.add(self._template % 0) key1 = self._box.add(self._template % 1) - self.assert_(len(self._box) == 2) + self.assertTrue(len(self._box) == 2) method(key0) l = len(self._box) - self.assert_(l == 1, "actual l: %s" % l) + self.assertTrue(l == 1, "actual l: %s" % l) self.assertRaises(KeyError, lambda: self._box[key0]) self.assertRaises(KeyError, lambda: method(key0)) - self.assert_(self._box.get_string(key1) == self._template % 1) + self.assertTrue(self._box.get_string(key1) == self._template % 1) key2 = self._box.add(self._template % 2) - self.assert_(len(self._box) == 2) + self.assertTrue(len(self._box) == 2) method(key2) l = len(self._box) - self.assert_(l == 1, "actual l: %s" % l) + self.assertTrue(l == 1, "actual l: %s" % l) self.assertRaises(KeyError, lambda: self._box[key2]) self.assertRaises(KeyError, lambda: method(key2)) - self.assert_(self._box.get_string(key1) == self._template % 1) + self.assertTrue(self._box.get_string(key1) == self._template % 1) method(key1) - self.assert_(len(self._box) == 0) + self.assertTrue(len(self._box) == 0) self.assertRaises(KeyError, lambda: self._box[key1]) self.assertRaises(KeyError, lambda: method(key1)) @@ -114,35 +114,35 @@ # Discard messages key0 = self._box.add(self._template % 0) key1 = self._box.add(self._template % 1) - self.assert_(len(self._box) == 2) + self.assertTrue(len(self._box) == 2) self._box.discard(key0) - self.assert_(len(self._box) == 1) + self.assertTrue(len(self._box) == 1) self.assertRaises(KeyError, lambda: self._box[key0]) self._box.discard(key0) - self.assert_(len(self._box) == 1) + self.assertTrue(len(self._box) == 1) self.assertRaises(KeyError, lambda: self._box[key0]) def test_get(self): # Retrieve messages using get() key0 = self._box.add(self._template % 0) msg = self._box.get(key0) - self.assert_(msg['from'] == 'foo') - self.assert_(msg.get_payload() == '0') - self.assert_(self._box.get('foo') is None) - self.assert_(self._box.get('foo', False) is False) + self.assertTrue(msg['from'] == 'foo') + self.assertTrue(msg.get_payload() == '0') + self.assertTrue(self._box.get('foo') is None) + self.assertTrue(self._box.get('foo', False) is False) self._box.close() self._box = self._factory(self._path, factory=rfc822.Message) key1 = self._box.add(self._template % 1) msg = self._box.get(key1) - self.assert_(msg['from'] == 'foo') - self.assert_(msg.fp.read() == '1') + self.assertTrue(msg['from'] == 'foo') + self.assertTrue(msg.fp.read() == '1') def test_getitem(self): # Retrieve message using __getitem__() key0 = self._box.add(self._template % 0) msg = self._box[key0] - self.assert_(msg['from'] == 'foo') - self.assert_(msg.get_payload() == '0') + self.assertTrue(msg['from'] == 'foo') + self.assertTrue(msg.get_payload() == '0') self.assertRaises(KeyError, lambda: self._box['foo']) self._box.discard(key0) self.assertRaises(KeyError, lambda: self._box[key0]) @@ -152,25 +152,25 @@ key0 = self._box.add(self._template % 0) key1 = self._box.add(_sample_message) msg0 = self._box.get_message(key0) - self.assert_(isinstance(msg0, mailbox.Message)) - self.assert_(msg0['from'] == 'foo') - self.assert_(msg0.get_payload() == '0') + self.assertTrue(isinstance(msg0, mailbox.Message)) + self.assertTrue(msg0['from'] == 'foo') + self.assertTrue(msg0.get_payload() == '0') self._check_sample(self._box.get_message(key1)) def test_get_string(self): # Get string representations of messages key0 = self._box.add(self._template % 0) key1 = self._box.add(_sample_message) - self.assert_(self._box.get_string(key0) == self._template % 0) - self.assert_(self._box.get_string(key1) == _sample_message) + self.assertTrue(self._box.get_string(key0) == self._template % 0) + self.assertTrue(self._box.get_string(key1) == _sample_message) def test_get_file(self): # Get file representations of messages key0 = self._box.add(self._template % 0) key1 = self._box.add(_sample_message) - self.assert_(self._box.get_file(key0).read().replace(os.linesep, '\n') + self.assertTrue(self._box.get_file(key0).read().replace(os.linesep, '\n') == self._template % 0) - self.assert_(self._box.get_file(key1).read().replace(os.linesep, '\n') + self.assertTrue(self._box.get_file(key1).read().replace(os.linesep, '\n') == _sample_message) def test_iterkeys(self): @@ -221,15 +221,15 @@ returned_keys.append(key) returned_values.append(value) if do_keys: - self.assert_(len(keys) == len(returned_keys)) - self.assert_(set(keys) == set(returned_keys)) + self.assertTrue(len(keys) == len(returned_keys)) + self.assertTrue(set(keys) == set(returned_keys)) if do_values: count = 0 for value in returned_values: - self.assert_(value['from'] == 'foo') - self.assert_(int(value.get_payload()) < repetitions) + self.assertTrue(value['from'] == 'foo') + self.assertTrue(int(value.get_payload()) < repetitions) count += 1 - self.assert_(len(values) == count) + self.assertTrue(len(values) == count) def test_has_key(self): # Check existence of keys using has_key() @@ -241,61 +241,61 @@ def _test_has_key_or_contains(self, method): # (Used by test_has_key() and test_contains().) - self.assert_(not method('foo')) + self.assertTrue(not method('foo')) key0 = self._box.add(self._template % 0) - self.assert_(method(key0)) - self.assert_(not method('foo')) + self.assertTrue(method(key0)) + self.assertTrue(not method('foo')) key1 = self._box.add(self._template % 1) - self.assert_(method(key1)) - self.assert_(method(key0)) - self.assert_(not method('foo')) + self.assertTrue(method(key1)) + self.assertTrue(method(key0)) + self.assertTrue(not method('foo')) self._box.remove(key0) - self.assert_(not method(key0)) - self.assert_(method(key1)) - self.assert_(not method('foo')) + self.assertTrue(not method(key0)) + self.assertTrue(method(key1)) + self.assertTrue(not method('foo')) self._box.remove(key1) - self.assert_(not method(key1)) - self.assert_(not method(key0)) - self.assert_(not method('foo')) + self.assertTrue(not method(key1)) + self.assertTrue(not method(key0)) + self.assertTrue(not method('foo')) def test_len(self, repetitions=10): # Get message count keys = [] for i in xrange(repetitions): - self.assert_(len(self._box) == i) + self.assertTrue(len(self._box) == i) keys.append(self._box.add(self._template % i)) - self.assert_(len(self._box) == i + 1) + self.assertTrue(len(self._box) == i + 1) for i in xrange(repetitions): - self.assert_(len(self._box) == repetitions - i) + self.assertTrue(len(self._box) == repetitions - i) self._box.remove(keys[i]) - self.assert_(len(self._box) == repetitions - i - 1) + self.assertTrue(len(self._box) == repetitions - i - 1) def test_set_item(self): # Modify messages using __setitem__() key0 = self._box.add(self._template % 'original 0') - self.assert_(self._box.get_string(key0) == \ + self.assertTrue(self._box.get_string(key0) == \ self._template % 'original 0') key1 = self._box.add(self._template % 'original 1') - self.assert_(self._box.get_string(key1) == \ + self.assertTrue(self._box.get_string(key1) == \ self._template % 'original 1') self._box[key0] = self._template % 'changed 0' - self.assert_(self._box.get_string(key0) == \ + self.assertTrue(self._box.get_string(key0) == \ self._template % 'changed 0') self._box[key1] = self._template % 'changed 1' - self.assert_(self._box.get_string(key1) == \ + self.assertTrue(self._box.get_string(key1) == \ self._template % 'changed 1') self._box[key0] = _sample_message self._check_sample(self._box[key0]) self._box[key1] = self._box[key0] self._check_sample(self._box[key1]) self._box[key0] = self._template % 'original 0' - self.assert_(self._box.get_string(key0) == + self.assertTrue(self._box.get_string(key0) == self._template % 'original 0') self._check_sample(self._box[key1]) self.assertRaises(KeyError, lambda: self._box.__setitem__('foo', 'bar')) self.assertRaises(KeyError, lambda: self._box['foo']) - self.assert_(len(self._box) == 2) + self.assertTrue(len(self._box) == 2) def test_clear(self, iterations=10): # Remove all messages using clear() @@ -303,29 +303,29 @@ for i in xrange(iterations): self._box.add(self._template % i) for i, key in enumerate(keys): - self.assert_(self._box.get_string(key) == self._template % i) + self.assertTrue(self._box.get_string(key) == self._template % i) self._box.clear() - self.assert_(len(self._box) == 0) + self.assertTrue(len(self._box) == 0) for i, key in enumerate(keys): self.assertRaises(KeyError, lambda: self._box.get_string(key)) def test_pop(self): # Get and remove a message using pop() key0 = self._box.add(self._template % 0) - self.assert_(key0 in self._box) + self.assertTrue(key0 in self._box) key1 = self._box.add(self._template % 1) - self.assert_(key1 in self._box) - self.assert_(self._box.pop(key0).get_payload() == '0') - self.assert_(key0 not in self._box) - self.assert_(key1 in self._box) + self.assertTrue(key1 in self._box) + self.assertTrue(self._box.pop(key0).get_payload() == '0') + self.assertTrue(key0 not in self._box) + self.assertTrue(key1 in self._box) key2 = self._box.add(self._template % 2) - self.assert_(key2 in self._box) - self.assert_(self._box.pop(key2).get_payload() == '2') - self.assert_(key2 not in self._box) - self.assert_(key1 in self._box) - self.assert_(self._box.pop(key1).get_payload() == '1') - self.assert_(key1 not in self._box) - self.assert_(len(self._box) == 0) + self.assertTrue(key2 in self._box) + self.assertTrue(self._box.pop(key2).get_payload() == '2') + self.assertTrue(key2 not in self._box) + self.assertTrue(key1 in self._box) + self.assertTrue(self._box.pop(key1).get_payload() == '1') + self.assertTrue(key1 not in self._box) + self.assertTrue(len(self._box) == 0) def test_popitem(self, iterations=10): # Get and remove an arbitrary (key, message) using popitem() @@ -335,11 +335,11 @@ seen = [] for i in xrange(10): key, msg = self._box.popitem() - self.assert_(key in keys) - self.assert_(key not in seen) + self.assertTrue(key in keys) + self.assertTrue(key not in seen) seen.append(key) - self.assert_(int(msg.get_payload()) == keys.index(key)) - self.assert_(len(self._box) == 0) + self.assertTrue(int(msg.get_payload()) == keys.index(key)) + self.assertTrue(len(self._box) == 0) for key in keys: self.assertRaises(KeyError, lambda: self._box[key]) @@ -350,31 +350,31 @@ key2 = self._box.add(self._template % 'original 2') self._box.update({key0: self._template % 'changed 0', key2: _sample_message}) - self.assert_(len(self._box) == 3) - self.assert_(self._box.get_string(key0) == + self.assertTrue(len(self._box) == 3) + self.assertTrue(self._box.get_string(key0) == self._template % 'changed 0') - self.assert_(self._box.get_string(key1) == + self.assertTrue(self._box.get_string(key1) == self._template % 'original 1') self._check_sample(self._box[key2]) self._box.update([(key2, self._template % 'changed 2'), (key1, self._template % 'changed 1'), (key0, self._template % 'original 0')]) - self.assert_(len(self._box) == 3) - self.assert_(self._box.get_string(key0) == + self.assertTrue(len(self._box) == 3) + self.assertTrue(self._box.get_string(key0) == self._template % 'original 0') - self.assert_(self._box.get_string(key1) == + self.assertTrue(self._box.get_string(key1) == self._template % 'changed 1') - self.assert_(self._box.get_string(key2) == + self.assertTrue(self._box.get_string(key2) == self._template % 'changed 2') self.assertRaises(KeyError, lambda: self._box.update({'foo': 'bar', key0: self._template % "changed 0"})) - self.assert_(len(self._box) == 3) - self.assert_(self._box.get_string(key0) == + self.assertTrue(len(self._box) == 3) + self.assertTrue(self._box.get_string(key0) == self._template % "changed 0") - self.assert_(self._box.get_string(key1) == + self.assertTrue(self._box.get_string(key1) == self._template % "changed 1") - self.assert_(self._box.get_string(key2) == + self.assertTrue(self._box.get_string(key2) == self._template % "changed 2") def test_flush(self): @@ -383,11 +383,11 @@ def test_lock_unlock(self): # Lock and unlock the mailbox - self.assert_(not os.path.exists(self._get_lock_path())) + self.assertTrue(not os.path.exists(self._get_lock_path())) self._box.lock() - self.assert_(os.path.exists(self._get_lock_path())) + self.assertTrue(os.path.exists(self._get_lock_path())) self._box.unlock() - self.assert_(not os.path.exists(self._get_lock_path())) + self.assertTrue(not os.path.exists(self._get_lock_path())) def test_close(self): # Close mailbox and flush changes to disk @@ -403,9 +403,9 @@ self._box.close() self._box = self._factory(self._path) keys = self._box.keys() - self.assert_(len(keys) == 3) + self.assertTrue(len(keys) == 3) for key in keys: - self.assert_(self._box.get_string(key) in contents) + self.assertTrue(self._box.get_string(key) in contents) def test_dump_message(self): # Write message representations to disk @@ -413,7 +413,7 @@ _sample_message, StringIO.StringIO(_sample_message)): output = StringIO.StringIO() self._box._dump_message(input, output) - self.assert_(output.getvalue() == + self.assertTrue(output.getvalue() == _sample_message.replace('\n', os.linesep)) output = StringIO.StringIO() self.assertRaises(TypeError, @@ -474,7 +474,7 @@ msg.set_subdir('cur') msg.set_info('foo') key = self._box.add(msg) - self.assert_(os.path.exists(os.path.join(self._path, 'cur', '%s%sfoo' % + self.assertTrue(os.path.exists(os.path.join(self._path, 'cur', '%s%sfoo' % (key, self._box.colon)))) def test_get_MM(self): @@ -484,9 +484,9 @@ msg.set_flags('RF') key = self._box.add(msg) msg_returned = self._box.get_message(key) - self.assert_(isinstance(msg_returned, mailbox.MaildirMessage)) - self.assert_(msg_returned.get_subdir() == 'cur') - self.assert_(msg_returned.get_flags() == 'FR') + self.assertTrue(isinstance(msg_returned, mailbox.MaildirMessage)) + self.assertTrue(msg_returned.get_subdir() == 'cur') + self.assertTrue(msg_returned.get_flags() == 'FR') def test_set_MM(self): # Set with a MaildirMessage instance @@ -494,22 +494,22 @@ msg0.set_flags('TP') key = self._box.add(msg0) msg_returned = self._box.get_message(key) - self.assert_(msg_returned.get_subdir() == 'new') - self.assert_(msg_returned.get_flags() == 'PT') + self.assertTrue(msg_returned.get_subdir() == 'new') + self.assertTrue(msg_returned.get_flags() == 'PT') msg1 = mailbox.MaildirMessage(self._template % 1) self._box[key] = msg1 msg_returned = self._box.get_message(key) - self.assert_(msg_returned.get_subdir() == 'new') - self.assert_(msg_returned.get_flags() == '') - self.assert_(msg_returned.get_payload() == '1') + self.assertTrue(msg_returned.get_subdir() == 'new') + self.assertTrue(msg_returned.get_flags() == '') + self.assertTrue(msg_returned.get_payload() == '1') msg2 = mailbox.MaildirMessage(self._template % 2) msg2.set_info('2,S') self._box[key] = msg2 self._box[key] = self._template % 3 msg_returned = self._box.get_message(key) - self.assert_(msg_returned.get_subdir() == 'new') - self.assert_(msg_returned.get_flags() == 'S') - self.assert_(msg_returned.get_payload() == '3') + self.assertTrue(msg_returned.get_subdir() == 'new') + self.assertTrue(msg_returned.get_flags() == 'S') + self.assertTrue(msg_returned.get_payload() == '3') def test_consistent_factory(self): # Add a message. @@ -524,7 +524,7 @@ box = mailbox.Maildir(self._path, factory=FakeMessage) box.colon = self._box.colon msg2 = box.get_message(key) - self.assert_(isinstance(msg2, FakeMessage)) + self.assertTrue(isinstance(msg2, FakeMessage)) def test_initialize_new(self): # Initialize a non-existent mailbox @@ -552,15 +552,15 @@ for subdir in '', 'tmp', 'new', 'cur': path = os.path.join(self._path, subdir) mode = os.stat(path)[stat.ST_MODE] - self.assert_(stat.S_ISDIR(mode), "Not a directory: '%s'" % path) + self.assertTrue(stat.S_ISDIR(mode), "Not a directory: '%s'" % path) def test_list_folders(self): # List folders self._box.add_folder('one') self._box.add_folder('two') self._box.add_folder('three') - self.assert_(len(self._box.list_folders()) == 3) - self.assert_(set(self._box.list_folders()) == + self.assertTrue(len(self._box.list_folders()) == 3) + self.assertTrue(set(self._box.list_folders()) == set(('one', 'two', 'three'))) def test_get_folder(self): @@ -568,29 +568,29 @@ self._box.add_folder('foo.bar') folder0 = self._box.get_folder('foo.bar') folder0.add(self._template % 'bar') - self.assert_(os.path.isdir(os.path.join(self._path, '.foo.bar'))) + self.assertTrue(os.path.isdir(os.path.join(self._path, '.foo.bar'))) folder1 = self._box.get_folder('foo.bar') - self.assert_(folder1.get_string(folder1.keys()[0]) == \ + self.assertTrue(folder1.get_string(folder1.keys()[0]) == \ self._template % 'bar') def test_add_and_remove_folders(self): # Delete folders self._box.add_folder('one') self._box.add_folder('two') - self.assert_(len(self._box.list_folders()) == 2) - self.assert_(set(self._box.list_folders()) == set(('one', 'two'))) + self.assertTrue(len(self._box.list_folders()) == 2) + self.assertTrue(set(self._box.list_folders()) == set(('one', 'two'))) self._box.remove_folder('one') - self.assert_(len(self._box.list_folders()) == 1) - self.assert_(set(self._box.list_folders()) == set(('two',))) + self.assertTrue(len(self._box.list_folders()) == 1) + self.assertTrue(set(self._box.list_folders()) == set(('two',))) self._box.add_folder('three') - self.assert_(len(self._box.list_folders()) == 2) - self.assert_(set(self._box.list_folders()) == set(('two', 'three'))) + self.assertTrue(len(self._box.list_folders()) == 2) + self.assertTrue(set(self._box.list_folders()) == set(('two', 'three'))) self._box.remove_folder('three') - self.assert_(len(self._box.list_folders()) == 1) - self.assert_(set(self._box.list_folders()) == set(('two',))) + self.assertTrue(len(self._box.list_folders()) == 1) + self.assertTrue(set(self._box.list_folders()) == set(('two',))) self._box.remove_folder('two') - self.assert_(len(self._box.list_folders()) == 0) - self.assert_(self._box.list_folders() == []) + self.assertTrue(len(self._box.list_folders()) == 0) + self.assertTrue(self._box.list_folders() == []) def test_clean(self): # Remove old files from 'tmp' @@ -603,14 +603,14 @@ f.write("@") f.close() self._box.clean() - self.assert_(os.path.exists(foo_path)) - self.assert_(os.path.exists(bar_path)) + self.assertTrue(os.path.exists(foo_path)) + self.assertTrue(os.path.exists(bar_path)) foo_stat = os.stat(foo_path) os.utime(foo_path, (time.time() - 129600 - 2, foo_stat.st_mtime)) self._box.clean() - self.assert_(not os.path.exists(foo_path)) - self.assert_(os.path.exists(bar_path)) + self.assertTrue(not os.path.exists(foo_path)) + self.assertTrue(os.path.exists(bar_path)) def test_create_tmp(self, repetitions=10): # Create files in tmp directory @@ -630,49 +630,49 @@ "tmp")), "File in wrong location: '%s'" % head) match = pattern.match(tail) - self.assert_(match is not None, "Invalid file name: '%s'" % tail) + self.assertTrue(match is not None, "Invalid file name: '%s'" % tail) groups = match.groups() if previous_groups is not None: - self.assert_(int(groups[0] >= previous_groups[0]), + self.assertTrue(int(groups[0] >= previous_groups[0]), "Non-monotonic seconds: '%s' before '%s'" % (previous_groups[0], groups[0])) - self.assert_(int(groups[1] >= previous_groups[1]) or + self.assertTrue(int(groups[1] >= previous_groups[1]) or groups[0] != groups[1], "Non-monotonic milliseconds: '%s' before '%s'" % (previous_groups[1], groups[1])) - self.assert_(int(groups[2]) == pid, + self.assertTrue(int(groups[2]) == pid, "Process ID mismatch: '%s' should be '%s'" % (groups[2], pid)) - self.assert_(int(groups[3]) == int(previous_groups[3]) + 1, + self.assertTrue(int(groups[3]) == int(previous_groups[3]) + 1, "Non-sequential counter: '%s' before '%s'" % (previous_groups[3], groups[3])) - self.assert_(groups[4] == hostname, + self.assertTrue(groups[4] == hostname, "Host name mismatch: '%s' should be '%s'" % (groups[4], hostname)) previous_groups = groups tmp_file.write(_sample_message) tmp_file.seek(0) - self.assert_(tmp_file.read() == _sample_message) + self.assertTrue(tmp_file.read() == _sample_message) tmp_file.close() file_count = len(os.listdir(os.path.join(self._path, "tmp"))) - self.assert_(file_count == repetitions, + self.assertTrue(file_count == repetitions, "Wrong file count: '%s' should be '%s'" % (file_count, repetitions)) def test_refresh(self): # Update the table of contents - self.assert_(self._box._toc == {}) + self.assertTrue(self._box._toc == {}) key0 = self._box.add(self._template % 0) key1 = self._box.add(self._template % 1) - self.assert_(self._box._toc == {}) + self.assertTrue(self._box._toc == {}) self._box._refresh() - self.assert_(self._box._toc == {key0: os.path.join('new', key0), + self.assertTrue(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1)}) key2 = self._box.add(self._template % 2) - self.assert_(self._box._toc == {key0: os.path.join('new', key0), + self.assertTrue(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1)}) self._box._refresh() - self.assert_(self._box._toc == {key0: os.path.join('new', key0), + self.assertTrue(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1), key2: os.path.join('new', key2)}) @@ -680,11 +680,11 @@ # Look up message subpaths in the TOC self.assertRaises(KeyError, lambda: self._box._lookup('foo')) key0 = self._box.add(self._template % 0) - self.assert_(self._box._lookup(key0) == os.path.join('new', key0)) + self.assertTrue(self._box._lookup(key0) == os.path.join('new', key0)) os.remove(os.path.join(self._path, 'new', key0)) - self.assert_(self._box._toc == {key0: os.path.join('new', key0)}) + self.assertTrue(self._box._toc == {key0: os.path.join('new', key0)}) self.assertRaises(KeyError, lambda: self._box._lookup(key0)) - self.assert_(self._box._toc == {}) + self.assertTrue(self._box._toc == {}) def test_lock_unlock(self): # Lock and unlock the mailbox. For Maildir, this does nothing. @@ -698,10 +698,10 @@ return None box = self._factory(self._path, factory=dummy_factory) folder = box.add_folder('folder1') - self.assert_(folder._factory is dummy_factory) + self.assertTrue(folder._factory is dummy_factory) folder1_alias = box.get_folder('folder1') - self.assert_(folder1_alias._factory is dummy_factory) + self.assertTrue(folder1_alias._factory is dummy_factory) def test_directory_in_folder (self): # Test that mailboxes still work if there's a stray extra directory @@ -728,7 +728,7 @@ os.umask(orig_umask) path = os.path.join(self._path, self._box._lookup(key)) mode = os.stat(path).st_mode - self.assert_(mode & 0111 == 0) + self.assertTrue(mode & 0111 == 0) def test_folder_file_perms(self): # From bug #3228, we want to verify that the file created inside a Maildir @@ -790,8 +790,8 @@ def test_add_from_string(self): # Add a string starting with 'From ' to the mailbox key = self._box.add('From foo at bar blah\nFrom: foo\n\n0') - self.assert_(self._box[key].get_from() == 'foo at bar blah') - self.assert_(self._box[key].get_payload() == '0') + self.assertTrue(self._box[key].get_from() == 'foo at bar blah') + self.assertTrue(self._box[key].get_payload() == '0') def test_add_mbox_or_mmdf_message(self): # Add an mboxMessage or MMDFMessage @@ -807,11 +807,11 @@ self._box.close() mtime = os.path.getmtime(self._path) self._box = self._factory(self._path) - self.assert_(len(self._box) == 3) + self.assertTrue(len(self._box) == 3) for key in self._box.iterkeys(): - self.assert_(self._box.get_string(key) in values) + self.assertTrue(self._box.get_string(key) in values) self._box.close() - self.assert_(mtime == os.path.getmtime(self._path)) + self.assertTrue(mtime == os.path.getmtime(self._path)) def test_add_and_close(self): # Verifying that closing a mailbox doesn't change added items @@ -823,7 +823,7 @@ self._box._file.seek(0) contents = self._box._file.read() self._box.close() - self.assert_(contents == open(self._path, 'rb').read()) + self.assertTrue(contents == open(self._path, 'rb').read()) self._box = self._factory(self._path) def test_lock_conflict(self): @@ -864,7 +864,7 @@ self._box.lock() key2 = self._box.add(msg) self._box.flush() - self.assert_(self._box._locked) + self.assertTrue(self._box._locked) self._box.close() @@ -905,8 +905,8 @@ self._box.add_folder('one') self._box.add_folder('two') self._box.add_folder('three') - self.assert_(len(self._box.list_folders()) == 3) - self.assert_(set(self._box.list_folders()) == + self.assertTrue(len(self._box.list_folders()) == 3) + self.assertTrue(set(self._box.list_folders()) == set(('one', 'two', 'three'))) def test_get_folder(self): @@ -918,54 +918,54 @@ new_folder = self._box.add_folder('foo.bar') folder0 = self._box.get_folder('foo.bar') folder0.add(self._template % 'bar') - self.assert_(os.path.isdir(os.path.join(self._path, 'foo.bar'))) + self.assertTrue(os.path.isdir(os.path.join(self._path, 'foo.bar'))) folder1 = self._box.get_folder('foo.bar') - self.assert_(folder1.get_string(folder1.keys()[0]) == \ + self.assertTrue(folder1.get_string(folder1.keys()[0]) == \ self._template % 'bar') # Test for bug #1569790: verify that folders returned by .get_folder() # use the same factory function. - self.assert_(new_folder._factory is self._box._factory) - self.assert_(folder0._factory is self._box._factory) + self.assertTrue(new_folder._factory is self._box._factory) + self.assertTrue(folder0._factory is self._box._factory) def test_add_and_remove_folders(self): # Delete folders self._box.add_folder('one') self._box.add_folder('two') - self.assert_(len(self._box.list_folders()) == 2) - self.assert_(set(self._box.list_folders()) == set(('one', 'two'))) + self.assertTrue(len(self._box.list_folders()) == 2) + self.assertTrue(set(self._box.list_folders()) == set(('one', 'two'))) self._box.remove_folder('one') - self.assert_(len(self._box.list_folders()) == 1) - self.assert_(set(self._box.list_folders()) == set(('two',))) + self.assertTrue(len(self._box.list_folders()) == 1) + self.assertTrue(set(self._box.list_folders()) == set(('two',))) self._box.add_folder('three') - self.assert_(len(self._box.list_folders()) == 2) - self.assert_(set(self._box.list_folders()) == set(('two', 'three'))) + self.assertTrue(len(self._box.list_folders()) == 2) + self.assertTrue(set(self._box.list_folders()) == set(('two', 'three'))) self._box.remove_folder('three') - self.assert_(len(self._box.list_folders()) == 1) - self.assert_(set(self._box.list_folders()) == set(('two',))) + self.assertTrue(len(self._box.list_folders()) == 1) + self.assertTrue(set(self._box.list_folders()) == set(('two',))) self._box.remove_folder('two') - self.assert_(len(self._box.list_folders()) == 0) - self.assert_(self._box.list_folders() == []) + self.assertTrue(len(self._box.list_folders()) == 0) + self.assertTrue(self._box.list_folders() == []) def test_sequences(self): # Get and set sequences - self.assert_(self._box.get_sequences() == {}) + self.assertTrue(self._box.get_sequences() == {}) msg0 = mailbox.MHMessage(self._template % 0) msg0.add_sequence('foo') key0 = self._box.add(msg0) - self.assert_(self._box.get_sequences() == {'foo':[key0]}) + self.assertTrue(self._box.get_sequences() == {'foo':[key0]}) msg1 = mailbox.MHMessage(self._template % 1) msg1.set_sequences(['bar', 'replied', 'foo']) key1 = self._box.add(msg1) - self.assert_(self._box.get_sequences() == + self.assertTrue(self._box.get_sequences() == {'foo':[key0, key1], 'bar':[key1], 'replied':[key1]}) msg0.set_sequences(['flagged']) self._box[key0] = msg0 - self.assert_(self._box.get_sequences() == + self.assertTrue(self._box.get_sequences() == {'foo':[key1], 'bar':[key1], 'replied':[key1], 'flagged':[key0]}) self._box.remove(key1) - self.assert_(self._box.get_sequences() == {'flagged':[key0]}) + self.assertTrue(self._box.get_sequences() == {'flagged':[key0]}) def test_issue2625(self): msg0 = mailbox.MHMessage(self._template % 0) @@ -987,19 +987,19 @@ key1 = self._box.add(msg1) key2 = self._box.add(msg2) key3 = self._box.add(msg3) - self.assert_(self._box.get_sequences() == + self.assertTrue(self._box.get_sequences() == {'foo':[key0,key1,key2,key3], 'unseen':[key0], 'flagged':[key2], 'bar':[key3], 'replied':[key3]}) self._box.remove(key2) - self.assert_(self._box.get_sequences() == + self.assertTrue(self._box.get_sequences() == {'foo':[key0,key1,key3], 'unseen':[key0], 'bar':[key3], 'replied':[key3]}) self._box.pack() - self.assert_(self._box.keys() == [1, 2, 3]) + self.assertTrue(self._box.keys() == [1, 2, 3]) key0 = key0 key1 = key0 + 1 key2 = key1 + 1 - self.assert_(self._box.get_sequences() == + self.assertTrue(self._box.get_sequences() == {'foo':[1, 2, 3], 'unseen':[1], 'bar':[3], 'replied':[3]}) # Test case for packing while holding the mailbox locked. @@ -1013,7 +1013,7 @@ self._box.lock() self._box.pack() self._box.unlock() - self.assert_(self._box.get_sequences() == + self.assertTrue(self._box.get_sequences() == {'foo':[1, 2, 3, 4, 5], 'unseen':[1], 'bar':[3], 'replied':[3]}) @@ -1033,21 +1033,21 @@ def test_labels(self): # Get labels from the mailbox - self.assert_(self._box.get_labels() == []) + self.assertTrue(self._box.get_labels() == []) msg0 = mailbox.BabylMessage(self._template % 0) msg0.add_label('foo') key0 = self._box.add(msg0) - self.assert_(self._box.get_labels() == ['foo']) + self.assertTrue(self._box.get_labels() == ['foo']) msg1 = mailbox.BabylMessage(self._template % 1) msg1.set_labels(['bar', 'answered', 'foo']) key1 = self._box.add(msg1) - self.assert_(set(self._box.get_labels()) == set(['foo', 'bar'])) + self.assertTrue(set(self._box.get_labels()) == set(['foo', 'bar'])) msg0.set_labels(['blah', 'filed']) self._box[key0] = msg0 - self.assert_(set(self._box.get_labels()) == + self.assertTrue(set(self._box.get_labels()) == set(['foo', 'bar', 'blah'])) self._box.remove(key1) - self.assert_(set(self._box.get_labels()) == set(['blah'])) + self.assertTrue(set(self._box.get_labels()) == set(['blah'])) class TestMessage(TestBase): @@ -1087,12 +1087,12 @@ # Initialize without arguments msg = self._factory() self._post_initialize_hook(msg) - self.assert_(isinstance(msg, email.message.Message)) - self.assert_(isinstance(msg, mailbox.Message)) - self.assert_(isinstance(msg, self._factory)) - self.assert_(msg.keys() == []) - self.assert_(not msg.is_multipart()) - self.assert_(msg.get_payload() == None) + self.assertTrue(isinstance(msg, email.message.Message)) + self.assertTrue(isinstance(msg, mailbox.Message)) + self.assertTrue(isinstance(msg, self._factory)) + self.assertTrue(msg.keys() == []) + self.assertTrue(not msg.is_multipart()) + self.assertTrue(msg.get_payload() == None) def test_initialize_incorrectly(self): # Initialize with invalid argument @@ -1127,72 +1127,72 @@ _factory = mailbox.MaildirMessage def _post_initialize_hook(self, msg): - self.assert_(msg._subdir == 'new') - self.assert_(msg._info == '') + self.assertTrue(msg._subdir == 'new') + self.assertTrue(msg._info == '') def test_subdir(self): # Use get_subdir() and set_subdir() msg = mailbox.MaildirMessage(_sample_message) - self.assert_(msg.get_subdir() == 'new') + self.assertTrue(msg.get_subdir() == 'new') msg.set_subdir('cur') - self.assert_(msg.get_subdir() == 'cur') + self.assertTrue(msg.get_subdir() == 'cur') msg.set_subdir('new') - self.assert_(msg.get_subdir() == 'new') + self.assertTrue(msg.get_subdir() == 'new') self.assertRaises(ValueError, lambda: msg.set_subdir('tmp')) - self.assert_(msg.get_subdir() == 'new') + self.assertTrue(msg.get_subdir() == 'new') msg.set_subdir('new') - self.assert_(msg.get_subdir() == 'new') + self.assertTrue(msg.get_subdir() == 'new') self._check_sample(msg) def test_flags(self): # Use get_flags(), set_flags(), add_flag(), remove_flag() msg = mailbox.MaildirMessage(_sample_message) - self.assert_(msg.get_flags() == '') - self.assert_(msg.get_subdir() == 'new') + self.assertTrue(msg.get_flags() == '') + self.assertTrue(msg.get_subdir() == 'new') msg.set_flags('F') - self.assert_(msg.get_subdir() == 'new') - self.assert_(msg.get_flags() == 'F') + self.assertTrue(msg.get_subdir() == 'new') + self.assertTrue(msg.get_flags() == 'F') msg.set_flags('SDTP') - self.assert_(msg.get_flags() == 'DPST') + self.assertTrue(msg.get_flags() == 'DPST') msg.add_flag('FT') - self.assert_(msg.get_flags() == 'DFPST') + self.assertTrue(msg.get_flags() == 'DFPST') msg.remove_flag('TDRP') - self.assert_(msg.get_flags() == 'FS') - self.assert_(msg.get_subdir() == 'new') + self.assertTrue(msg.get_flags() == 'FS') + self.assertTrue(msg.get_subdir() == 'new') self._check_sample(msg) def test_date(self): # Use get_date() and set_date() msg = mailbox.MaildirMessage(_sample_message) - self.assert_(abs(msg.get_date() - time.time()) < 60) + self.assertTrue(abs(msg.get_date() - time.time()) < 60) msg.set_date(0.0) - self.assert_(msg.get_date() == 0.0) + self.assertTrue(msg.get_date() == 0.0) def test_info(self): # Use get_info() and set_info() msg = mailbox.MaildirMessage(_sample_message) - self.assert_(msg.get_info() == '') + self.assertTrue(msg.get_info() == '') msg.set_info('1,foo=bar') - self.assert_(msg.get_info() == '1,foo=bar') + self.assertTrue(msg.get_info() == '1,foo=bar') self.assertRaises(TypeError, lambda: msg.set_info(None)) self._check_sample(msg) def test_info_and_flags(self): # Test interaction of info and flag methods msg = mailbox.MaildirMessage(_sample_message) - self.assert_(msg.get_info() == '') + self.assertTrue(msg.get_info() == '') msg.set_flags('SF') - self.assert_(msg.get_flags() == 'FS') - self.assert_(msg.get_info() == '2,FS') + self.assertTrue(msg.get_flags() == 'FS') + self.assertTrue(msg.get_info() == '2,FS') msg.set_info('1,') - self.assert_(msg.get_flags() == '') - self.assert_(msg.get_info() == '1,') + self.assertTrue(msg.get_flags() == '') + self.assertTrue(msg.get_info() == '1,') msg.remove_flag('RPT') - self.assert_(msg.get_flags() == '') - self.assert_(msg.get_info() == '1,') + self.assertTrue(msg.get_flags() == '') + self.assertTrue(msg.get_info() == '1,') msg.add_flag('D') - self.assert_(msg.get_flags() == 'D') - self.assert_(msg.get_info() == '2,D') + self.assertTrue(msg.get_flags() == 'D') + self.assertTrue(msg.get_info() == '2,D') self._check_sample(msg) @@ -1208,14 +1208,14 @@ msg = mailbox.Message(_sample_message) msg.set_unixfrom('From foo at bar blah') msg = mailbox.mboxMessage(msg) - self.assert_(msg.get_from() == 'foo at bar blah', msg.get_from()) + self.assertTrue(msg.get_from() == 'foo at bar blah', msg.get_from()) def test_from(self): # Get and set "From " line msg = mailbox.mboxMessage(_sample_message) self._check_from(msg) msg.set_from('foo bar') - self.assert_(msg.get_from() == 'foo bar') + self.assertTrue(msg.get_from() == 'foo bar') msg.set_from('foo at bar', True) self._check_from(msg, 'foo at bar') msg.set_from('blah at temp', time.localtime()) @@ -1224,22 +1224,22 @@ def test_flags(self): # Use get_flags(), set_flags(), add_flag(), remove_flag() msg = mailbox.mboxMessage(_sample_message) - self.assert_(msg.get_flags() == '') + self.assertTrue(msg.get_flags() == '') msg.set_flags('F') - self.assert_(msg.get_flags() == 'F') + self.assertTrue(msg.get_flags() == 'F') msg.set_flags('XODR') - self.assert_(msg.get_flags() == 'RODX') + self.assertTrue(msg.get_flags() == 'RODX') msg.add_flag('FA') - self.assert_(msg.get_flags() == 'RODFAX') + self.assertTrue(msg.get_flags() == 'RODFAX') msg.remove_flag('FDXA') - self.assert_(msg.get_flags() == 'RO') + self.assertTrue(msg.get_flags() == 'RO') self._check_sample(msg) def _check_from(self, msg, sender=None): # Check contents of "From " line if sender is None: sender = "MAILER-DAEMON" - self.assert_(re.match(sender + r" \w{3} \w{3} [\d ]\d [\d ]\d:\d{2}:" + self.assertTrue(re.match(sender + r" \w{3} \w{3} [\d ]\d [\d ]\d:\d{2}:" r"\d{2} \d{4}", msg.get_from()) is not None) @@ -1253,30 +1253,30 @@ _factory = mailbox.MHMessage def _post_initialize_hook(self, msg): - self.assert_(msg._sequences == []) + self.assertTrue(msg._sequences == []) def test_sequences(self): # Get, set, join, and leave sequences msg = mailbox.MHMessage(_sample_message) - self.assert_(msg.get_sequences() == []) + self.assertTrue(msg.get_sequences() == []) msg.set_sequences(['foobar']) - self.assert_(msg.get_sequences() == ['foobar']) + self.assertTrue(msg.get_sequences() == ['foobar']) msg.set_sequences([]) - self.assert_(msg.get_sequences() == []) + self.assertTrue(msg.get_sequences() == []) msg.add_sequence('unseen') - self.assert_(msg.get_sequences() == ['unseen']) + self.assertTrue(msg.get_sequences() == ['unseen']) msg.add_sequence('flagged') - self.assert_(msg.get_sequences() == ['unseen', 'flagged']) + self.assertTrue(msg.get_sequences() == ['unseen', 'flagged']) msg.add_sequence('flagged') - self.assert_(msg.get_sequences() == ['unseen', 'flagged']) + self.assertTrue(msg.get_sequences() == ['unseen', 'flagged']) msg.remove_sequence('unseen') - self.assert_(msg.get_sequences() == ['flagged']) + self.assertTrue(msg.get_sequences() == ['flagged']) msg.add_sequence('foobar') - self.assert_(msg.get_sequences() == ['flagged', 'foobar']) + self.assertTrue(msg.get_sequences() == ['flagged', 'foobar']) msg.remove_sequence('replied') - self.assert_(msg.get_sequences() == ['flagged', 'foobar']) + self.assertTrue(msg.get_sequences() == ['flagged', 'foobar']) msg.set_sequences(['foobar', 'replied']) - self.assert_(msg.get_sequences() == ['foobar', 'replied']) + self.assertTrue(msg.get_sequences() == ['foobar', 'replied']) class TestBabylMessage(TestMessage): @@ -1284,54 +1284,54 @@ _factory = mailbox.BabylMessage def _post_initialize_hook(self, msg): - self.assert_(msg._labels == []) + self.assertTrue(msg._labels == []) def test_labels(self): # Get, set, join, and leave labels msg = mailbox.BabylMessage(_sample_message) - self.assert_(msg.get_labels() == []) + self.assertTrue(msg.get_labels() == []) msg.set_labels(['foobar']) - self.assert_(msg.get_labels() == ['foobar']) + self.assertTrue(msg.get_labels() == ['foobar']) msg.set_labels([]) - self.assert_(msg.get_labels() == []) + self.assertTrue(msg.get_labels() == []) msg.add_label('filed') - self.assert_(msg.get_labels() == ['filed']) + self.assertTrue(msg.get_labels() == ['filed']) msg.add_label('resent') - self.assert_(msg.get_labels() == ['filed', 'resent']) + self.assertTrue(msg.get_labels() == ['filed', 'resent']) msg.add_label('resent') - self.assert_(msg.get_labels() == ['filed', 'resent']) + self.assertTrue(msg.get_labels() == ['filed', 'resent']) msg.remove_label('filed') - self.assert_(msg.get_labels() == ['resent']) + self.assertTrue(msg.get_labels() == ['resent']) msg.add_label('foobar') - self.assert_(msg.get_labels() == ['resent', 'foobar']) + self.assertTrue(msg.get_labels() == ['resent', 'foobar']) msg.remove_label('unseen') - self.assert_(msg.get_labels() == ['resent', 'foobar']) + self.assertTrue(msg.get_labels() == ['resent', 'foobar']) msg.set_labels(['foobar', 'answered']) - self.assert_(msg.get_labels() == ['foobar', 'answered']) + self.assertTrue(msg.get_labels() == ['foobar', 'answered']) def test_visible(self): # Get, set, and update visible headers msg = mailbox.BabylMessage(_sample_message) visible = msg.get_visible() - self.assert_(visible.keys() == []) - self.assert_(visible.get_payload() is None) + self.assertTrue(visible.keys() == []) + self.assertTrue(visible.get_payload() is None) visible['User-Agent'] = 'FooBar 1.0' visible['X-Whatever'] = 'Blah' - self.assert_(msg.get_visible().keys() == []) + self.assertTrue(msg.get_visible().keys() == []) msg.set_visible(visible) visible = msg.get_visible() - self.assert_(visible.keys() == ['User-Agent', 'X-Whatever']) - self.assert_(visible['User-Agent'] == 'FooBar 1.0') - self.assert_(visible['X-Whatever'] == 'Blah') - self.assert_(visible.get_payload() is None) + self.assertTrue(visible.keys() == ['User-Agent', 'X-Whatever']) + self.assertTrue(visible['User-Agent'] == 'FooBar 1.0') + self.assertTrue(visible['X-Whatever'] == 'Blah') + self.assertTrue(visible.get_payload() is None) msg.update_visible() - self.assert_(visible.keys() == ['User-Agent', 'X-Whatever']) - self.assert_(visible.get_payload() is None) + self.assertTrue(visible.keys() == ['User-Agent', 'X-Whatever']) + self.assertTrue(visible.get_payload() is None) visible = msg.get_visible() - self.assert_(visible.keys() == ['User-Agent', 'Date', 'From', 'To', + self.assertTrue(visible.keys() == ['User-Agent', 'Date', 'From', 'To', 'Subject']) for header in ('User-Agent', 'Date', 'From', 'To', 'Subject'): - self.assert_(visible[header] == msg[header]) + self.assertTrue(visible[header] == msg[header]) class TestMMDFMessage(_TestMboxMMDFMessage): @@ -1374,9 +1374,9 @@ date = msg_maildir.get_date() msg = mailbox.MaildirMessage(msg_maildir) self._check_sample(msg) - self.assert_(msg.get_flags() == 'DFPRST') - self.assert_(msg.get_subdir() == 'cur') - self.assert_(msg.get_date() == date) + self.assertTrue(msg.get_flags() == 'DFPRST') + self.assertTrue(msg.get_subdir() == 'cur') + self.assertTrue(msg.get_date() == date) def test_maildir_to_mboxmmdf(self): # Convert MaildirMessage to mboxmessage and MMDFMessage @@ -1388,11 +1388,11 @@ for setting, result in pairs: msg_maildir.set_flags(setting) msg = class_(msg_maildir) - self.assert_(msg.get_flags() == result) - self.assert_(msg.get_from() == 'MAILER-DAEMON %s' % + self.assertTrue(msg.get_flags() == result) + self.assertTrue(msg.get_from() == 'MAILER-DAEMON %s' % time.asctime(time.gmtime(0.0))) msg_maildir.set_subdir('cur') - self.assert_(class_(msg_maildir).get_flags() == 'RODFA') + self.assertTrue(class_(msg_maildir).get_flags() == 'RODFA') def test_maildir_to_mh(self): # Convert MaildirMessage to MHMessage @@ -1402,7 +1402,7 @@ ('T', ['unseen']), ('DFPRST', ['replied', 'flagged'])) for setting, result in pairs: msg_maildir.set_flags(setting) - self.assert_(mailbox.MHMessage(msg_maildir).get_sequences() == \ + self.assertTrue(mailbox.MHMessage(msg_maildir).get_sequences() == \ result) def test_maildir_to_babyl(self): @@ -1414,7 +1414,7 @@ ('DFPRST', ['deleted', 'answered', 'forwarded'])) for setting, result in pairs: msg_maildir.set_flags(setting) - self.assert_(mailbox.BabylMessage(msg_maildir).get_labels() == \ + self.assertTrue(mailbox.BabylMessage(msg_maildir).get_labels() == \ result) def test_mboxmmdf_to_maildir(self): @@ -1427,10 +1427,10 @@ for setting, result in pairs: msg_mboxMMDF.set_flags(setting) msg = mailbox.MaildirMessage(msg_mboxMMDF) - self.assert_(msg.get_flags() == result) - self.assert_(msg.get_date() == 0.0, msg.get_date()) + self.assertTrue(msg.get_flags() == result) + self.assertTrue(msg.get_date() == 0.0, msg.get_date()) msg_mboxMMDF.set_flags('O') - self.assert_(mailbox.MaildirMessage(msg_mboxMMDF).get_subdir() == \ + self.assertTrue(mailbox.MaildirMessage(msg_mboxMMDF).get_subdir() == \ 'cur') def test_mboxmmdf_to_mboxmmdf(self): @@ -1441,8 +1441,8 @@ msg_mboxMMDF.set_from('foo at bar') for class2_ in (mailbox.mboxMessage, mailbox.MMDFMessage): msg2 = class2_(msg_mboxMMDF) - self.assert_(msg2.get_flags() == 'RODFA') - self.assert_(msg2.get_from() == 'foo at bar') + self.assertTrue(msg2.get_flags() == 'RODFA') + self.assertTrue(msg2.get_from() == 'foo at bar') def test_mboxmmdf_to_mh(self): # Convert mboxMessage and MMDFMessage to MHMessage @@ -1454,7 +1454,7 @@ ('RODFA', ['replied', 'flagged'])) for setting, result in pairs: msg_mboxMMDF.set_flags(setting) - self.assert_(mailbox.MHMessage(msg_mboxMMDF).get_sequences() \ + self.assertTrue(mailbox.MHMessage(msg_mboxMMDF).get_sequences() \ == result) def test_mboxmmdf_to_babyl(self): @@ -1467,7 +1467,7 @@ ('RODFA', ['deleted', 'answered'])) for setting, result in pairs: msg.set_flags(setting) - self.assert_(mailbox.BabylMessage(msg).get_labels() == result) + self.assertTrue(mailbox.BabylMessage(msg).get_labels() == result) def test_mh_to_maildir(self): # Convert MHMessage to MaildirMessage @@ -1475,14 +1475,14 @@ for setting, result in pairs: msg = mailbox.MHMessage(_sample_message) msg.add_sequence(setting) - self.assert_(mailbox.MaildirMessage(msg).get_flags() == result) - self.assert_(mailbox.MaildirMessage(msg).get_subdir() == 'cur') + self.assertTrue(mailbox.MaildirMessage(msg).get_flags() == result) + self.assertTrue(mailbox.MaildirMessage(msg).get_subdir() == 'cur') msg = mailbox.MHMessage(_sample_message) msg.add_sequence('unseen') msg.add_sequence('replied') msg.add_sequence('flagged') - self.assert_(mailbox.MaildirMessage(msg).get_flags() == 'FR') - self.assert_(mailbox.MaildirMessage(msg).get_subdir() == 'cur') + self.assertTrue(mailbox.MaildirMessage(msg).get_flags() == 'FR') + self.assertTrue(mailbox.MaildirMessage(msg).get_subdir() == 'cur') def test_mh_to_mboxmmdf(self): # Convert MHMessage to mboxMessage and MMDFMessage @@ -1491,13 +1491,13 @@ msg = mailbox.MHMessage(_sample_message) msg.add_sequence(setting) for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage): - self.assert_(class_(msg).get_flags() == result) + self.assertTrue(class_(msg).get_flags() == result) msg = mailbox.MHMessage(_sample_message) msg.add_sequence('unseen') msg.add_sequence('replied') msg.add_sequence('flagged') for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage): - self.assert_(class_(msg).get_flags() == 'OFA') + self.assertTrue(class_(msg).get_flags() == 'OFA') def test_mh_to_mh(self): # Convert MHMessage to MHMessage @@ -1505,7 +1505,7 @@ msg.add_sequence('unseen') msg.add_sequence('replied') msg.add_sequence('flagged') - self.assert_(mailbox.MHMessage(msg).get_sequences() == \ + self.assertTrue(mailbox.MHMessage(msg).get_sequences() == \ ['unseen', 'replied', 'flagged']) def test_mh_to_babyl(self): @@ -1515,12 +1515,12 @@ for setting, result in pairs: msg = mailbox.MHMessage(_sample_message) msg.add_sequence(setting) - self.assert_(mailbox.BabylMessage(msg).get_labels() == result) + self.assertTrue(mailbox.BabylMessage(msg).get_labels() == result) msg = mailbox.MHMessage(_sample_message) msg.add_sequence('unseen') msg.add_sequence('replied') msg.add_sequence('flagged') - self.assert_(mailbox.BabylMessage(msg).get_labels() == \ + self.assertTrue(mailbox.BabylMessage(msg).get_labels() == \ ['unseen', 'answered']) def test_babyl_to_maildir(self): @@ -1531,14 +1531,14 @@ for setting, result in pairs: msg = mailbox.BabylMessage(_sample_message) msg.add_label(setting) - self.assert_(mailbox.MaildirMessage(msg).get_flags() == result) - self.assert_(mailbox.MaildirMessage(msg).get_subdir() == 'cur') + self.assertTrue(mailbox.MaildirMessage(msg).get_flags() == result) + self.assertTrue(mailbox.MaildirMessage(msg).get_subdir() == 'cur') msg = mailbox.BabylMessage(_sample_message) for label in ('unseen', 'deleted', 'filed', 'answered', 'forwarded', 'edited', 'resent'): msg.add_label(label) - self.assert_(mailbox.MaildirMessage(msg).get_flags() == 'PRT') - self.assert_(mailbox.MaildirMessage(msg).get_subdir() == 'cur') + self.assertTrue(mailbox.MaildirMessage(msg).get_flags() == 'PRT') + self.assertTrue(mailbox.MaildirMessage(msg).get_subdir() == 'cur') def test_babyl_to_mboxmmdf(self): # Convert BabylMessage to mboxMessage and MMDFMessage @@ -1549,13 +1549,13 @@ for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage): msg = mailbox.BabylMessage(_sample_message) msg.add_label(setting) - self.assert_(class_(msg).get_flags() == result) + self.assertTrue(class_(msg).get_flags() == result) msg = mailbox.BabylMessage(_sample_message) for label in ('unseen', 'deleted', 'filed', 'answered', 'forwarded', 'edited', 'resent'): msg.add_label(label) for class_ in (mailbox.mboxMessage, mailbox.MMDFMessage): - self.assert_(class_(msg).get_flags() == 'ODA') + self.assertTrue(class_(msg).get_flags() == 'ODA') def test_babyl_to_mh(self): # Convert BabylMessage to MHMessage @@ -1565,12 +1565,12 @@ for setting, result in pairs: msg = mailbox.BabylMessage(_sample_message) msg.add_label(setting) - self.assert_(mailbox.MHMessage(msg).get_sequences() == result) + self.assertTrue(mailbox.MHMessage(msg).get_sequences() == result) msg = mailbox.BabylMessage(_sample_message) for label in ('unseen', 'deleted', 'filed', 'answered', 'forwarded', 'edited', 'resent'): msg.add_label(label) - self.assert_(mailbox.MHMessage(msg).get_sequences() == \ + self.assertTrue(mailbox.MHMessage(msg).get_sequences() == \ ['unseen', 'replied']) def test_babyl_to_babyl(self): @@ -1581,12 +1581,12 @@ 'edited', 'resent'): msg.add_label(label) msg2 = mailbox.BabylMessage(msg) - self.assert_(msg2.get_labels() == ['unseen', 'deleted', 'filed', + self.assertTrue(msg2.get_labels() == ['unseen', 'deleted', 'filed', 'answered', 'forwarded', 'edited', 'resent']) - self.assert_(msg.get_visible().keys() == msg2.get_visible().keys()) + self.assertTrue(msg.get_visible().keys() == msg2.get_visible().keys()) for key in msg.get_visible().keys(): - self.assert_(msg.get_visible()[key] == msg2.get_visible()[key]) + self.assertTrue(msg.get_visible()[key] == msg2.get_visible()[key]) class TestProxyFileBase(TestBase): @@ -1594,69 +1594,69 @@ def _test_read(self, proxy): # Read by byte proxy.seek(0) - self.assert_(proxy.read() == 'bar') + self.assertTrue(proxy.read() == 'bar') proxy.seek(1) - self.assert_(proxy.read() == 'ar') + self.assertTrue(proxy.read() == 'ar') proxy.seek(0) - self.assert_(proxy.read(2) == 'ba') + self.assertTrue(proxy.read(2) == 'ba') proxy.seek(1) - self.assert_(proxy.read(-1) == 'ar') + self.assertTrue(proxy.read(-1) == 'ar') proxy.seek(2) - self.assert_(proxy.read(1000) == 'r') + self.assertTrue(proxy.read(1000) == 'r') def _test_readline(self, proxy): # Read by line proxy.seek(0) - self.assert_(proxy.readline() == 'foo' + os.linesep) - self.assert_(proxy.readline() == 'bar' + os.linesep) - self.assert_(proxy.readline() == 'fred' + os.linesep) - self.assert_(proxy.readline() == 'bob') + self.assertTrue(proxy.readline() == 'foo' + os.linesep) + self.assertTrue(proxy.readline() == 'bar' + os.linesep) + self.assertTrue(proxy.readline() == 'fred' + os.linesep) + self.assertTrue(proxy.readline() == 'bob') proxy.seek(2) - self.assert_(proxy.readline() == 'o' + os.linesep) + self.assertTrue(proxy.readline() == 'o' + os.linesep) proxy.seek(6 + 2 * len(os.linesep)) - self.assert_(proxy.readline() == 'fred' + os.linesep) + self.assertTrue(proxy.readline() == 'fred' + os.linesep) proxy.seek(6 + 2 * len(os.linesep)) - self.assert_(proxy.readline(2) == 'fr') - self.assert_(proxy.readline(-10) == 'ed' + os.linesep) + self.assertTrue(proxy.readline(2) == 'fr') + self.assertTrue(proxy.readline(-10) == 'ed' + os.linesep) def _test_readlines(self, proxy): # Read multiple lines proxy.seek(0) - self.assert_(proxy.readlines() == ['foo' + os.linesep, + self.assertTrue(proxy.readlines() == ['foo' + os.linesep, 'bar' + os.linesep, 'fred' + os.linesep, 'bob']) proxy.seek(0) - self.assert_(proxy.readlines(2) == ['foo' + os.linesep]) + self.assertTrue(proxy.readlines(2) == ['foo' + os.linesep]) proxy.seek(3 + len(os.linesep)) - self.assert_(proxy.readlines(4 + len(os.linesep)) == + self.assertTrue(proxy.readlines(4 + len(os.linesep)) == ['bar' + os.linesep, 'fred' + os.linesep]) proxy.seek(3) - self.assert_(proxy.readlines(1000) == [os.linesep, 'bar' + os.linesep, + self.assertTrue(proxy.readlines(1000) == [os.linesep, 'bar' + os.linesep, 'fred' + os.linesep, 'bob']) def _test_iteration(self, proxy): # Iterate by line proxy.seek(0) iterator = iter(proxy) - self.assert_(iterator.next() == 'foo' + os.linesep) - self.assert_(iterator.next() == 'bar' + os.linesep) - self.assert_(iterator.next() == 'fred' + os.linesep) - self.assert_(iterator.next() == 'bob') + self.assertTrue(iterator.next() == 'foo' + os.linesep) + self.assertTrue(iterator.next() == 'bar' + os.linesep) + self.assertTrue(iterator.next() == 'fred' + os.linesep) + self.assertTrue(iterator.next() == 'bob') self.assertRaises(StopIteration, lambda: iterator.next()) def _test_seek_and_tell(self, proxy): # Seek and use tell to check position proxy.seek(3) - self.assert_(proxy.tell() == 3) - self.assert_(proxy.read(len(os.linesep)) == os.linesep) + self.assertTrue(proxy.tell() == 3) + self.assertTrue(proxy.read(len(os.linesep)) == os.linesep) proxy.seek(2, 1) - self.assert_(proxy.read(1 + len(os.linesep)) == 'r' + os.linesep) + self.assertTrue(proxy.read(1 + len(os.linesep)) == 'r' + os.linesep) proxy.seek(-3 - len(os.linesep), 2) - self.assert_(proxy.read(3) == 'bar') + self.assertTrue(proxy.read(3) == 'bar') proxy.seek(2, 0) - self.assert_(proxy.read() == 'o' + os.linesep + 'bar' + os.linesep) + self.assertTrue(proxy.read() == 'o' + os.linesep + 'bar' + os.linesep) proxy.seek(100) - self.assert_(proxy.read() == '') + self.assertTrue(proxy.read() == '') def _test_close(self, proxy): # Close a file @@ -1679,11 +1679,11 @@ self._file.write('foo') pos = self._file.tell() proxy0 = mailbox._ProxyFile(self._file) - self.assert_(proxy0.tell() == pos) - self.assert_(self._file.tell() == pos) + self.assertTrue(proxy0.tell() == pos) + self.assertTrue(self._file.tell() == pos) proxy1 = mailbox._ProxyFile(self._file, 0) - self.assert_(proxy1.tell() == 0) - self.assert_(self._file.tell() == pos) + self.assertTrue(proxy1.tell() == 0) + self.assertTrue(self._file.tell() == pos) def test_read(self): self._file.write('bar') @@ -1728,8 +1728,8 @@ self._file.write('foo' + os.linesep + 'bar') pos = self._file.tell() proxy = mailbox._PartialFile(self._file, 2, 5) - self.assert_(proxy.tell() == 0) - self.assert_(self._file.tell() == pos) + self.assertTrue(proxy.tell() == 0) + self.assertTrue(self._file.tell() == pos) def test_read(self): self._file.write('***bar***') @@ -1821,36 +1821,36 @@ # Test for regression on bug #117490: # Make sure the boxes attribute actually gets set. self.mbox = mailbox.Maildir(test_support.TESTFN) - #self.assert_(hasattr(self.mbox, "boxes")) - #self.assert_(len(self.mbox.boxes) == 0) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + #self.assertTrue(hasattr(self.mbox, "boxes")) + #self.assertTrue(len(self.mbox.boxes) == 0) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_cur(self): self.createMessage("cur") self.mbox = mailbox.Maildir(test_support.TESTFN) - #self.assert_(len(self.mbox.boxes) == 1) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + #self.assertTrue(len(self.mbox.boxes) == 1) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_new(self): self.createMessage("new") self.mbox = mailbox.Maildir(test_support.TESTFN) - #self.assert_(len(self.mbox.boxes) == 1) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + #self.assertTrue(len(self.mbox.boxes) == 1) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_both(self): self.createMessage("cur") self.createMessage("new") self.mbox = mailbox.Maildir(test_support.TESTFN) - #self.assert_(len(self.mbox.boxes) == 2) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + #self.assertTrue(len(self.mbox.boxes) == 2) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_unix_mbox(self): ### should be better! Modified: python/trunk/Lib/test/test_marshal.py ============================================================================== --- python/trunk/Lib/test/test_marshal.py (original) +++ python/trunk/Lib/test/test_marshal.py Wed Jul 1 00:57:08 2009 @@ -189,7 +189,7 @@ t = constructor(self.d.keys()) new = marshal.loads(marshal.dumps(t)) self.assertEqual(t, new) - self.assert_(isinstance(new, constructor)) + self.assertTrue(isinstance(new, constructor)) self.assertNotEqual(id(t), id(new)) marshal.dump(t, file(test_support.TESTFN, "wb")) new = marshal.load(file(test_support.TESTFN, "rb")) Modified: python/trunk/Lib/test/test_math.py ============================================================================== --- python/trunk/Lib/test/test_math.py (original) +++ python/trunk/Lib/test/test_math.py Wed Jul 1 00:57:08 2009 @@ -72,7 +72,7 @@ self.ftest('acos(1)', math.acos(1), 0) self.assertRaises(ValueError, math.acos, INF) self.assertRaises(ValueError, math.acos, NINF) - self.assert_(math.isnan(math.acos(NAN))) + self.assertTrue(math.isnan(math.acos(NAN))) def testAcosh(self): self.assertRaises(TypeError, math.acosh) @@ -82,7 +82,7 @@ self.assertRaises(ValueError, math.acosh, -1) self.assertEquals(math.acosh(INF), INF) self.assertRaises(ValueError, math.acosh, NINF) - self.assert_(math.isnan(math.acosh(NAN))) + self.assertTrue(math.isnan(math.acosh(NAN))) def testAsin(self): self.assertRaises(TypeError, math.asin) @@ -91,7 +91,7 @@ self.ftest('asin(1)', math.asin(1), math.pi/2) self.assertRaises(ValueError, math.asin, INF) self.assertRaises(ValueError, math.asin, NINF) - self.assert_(math.isnan(math.asin(NAN))) + self.assertTrue(math.isnan(math.asin(NAN))) def testAsinh(self): self.assertRaises(TypeError, math.asinh) @@ -100,7 +100,7 @@ self.ftest('asinh(-1)', math.asinh(-1), -0.88137358701954305) self.assertEquals(math.asinh(INF), INF) self.assertEquals(math.asinh(NINF), NINF) - self.assert_(math.isnan(math.asinh(NAN))) + self.assertTrue(math.isnan(math.asinh(NAN))) def testAtan(self): self.assertRaises(TypeError, math.atan) @@ -109,7 +109,7 @@ self.ftest('atan(1)', math.atan(1), math.pi/4) self.ftest('atan(inf)', math.atan(INF), math.pi/2) self.ftest('atan(-inf)', math.atan(NINF), -math.pi/2) - self.assert_(math.isnan(math.atan(NAN))) + self.assertTrue(math.isnan(math.atan(NAN))) def testAtanh(self): self.assertRaises(TypeError, math.atan) @@ -120,7 +120,7 @@ self.assertRaises(ValueError, math.atanh, -1) self.assertRaises(ValueError, math.atanh, INF) self.assertRaises(ValueError, math.atanh, NINF) - self.assert_(math.isnan(math.atanh(NAN))) + self.assertTrue(math.isnan(math.atanh(NAN))) def testAtan2(self): self.assertRaises(TypeError, math.atan2) @@ -137,7 +137,7 @@ self.assertEqual(math.atan2(0., 0.), 0.) self.assertEqual(math.atan2(0., 2.3), 0.) self.assertEqual(math.atan2(0., INF), 0.) - self.assert_(math.isnan(math.atan2(0., NAN))) + self.assertTrue(math.isnan(math.atan2(0., NAN))) # math.atan2(-0, x) self.ftest('atan2(-0., -inf)', math.atan2(-0., NINF), -math.pi) self.ftest('atan2(-0., -2.3)', math.atan2(-0., -2.3), -math.pi) @@ -145,7 +145,7 @@ self.assertEqual(math.atan2(-0., 0.), -0.) self.assertEqual(math.atan2(-0., 2.3), -0.) self.assertEqual(math.atan2(-0., INF), -0.) - self.assert_(math.isnan(math.atan2(-0., NAN))) + self.assertTrue(math.isnan(math.atan2(-0., NAN))) # math.atan2(INF, x) self.ftest('atan2(inf, -inf)', math.atan2(INF, NINF), math.pi*3/4) self.ftest('atan2(inf, -2.3)', math.atan2(INF, -2.3), math.pi/2) @@ -153,7 +153,7 @@ self.ftest('atan2(inf, 0.)', math.atan2(INF, 0.0), math.pi/2) self.ftest('atan2(inf, 2.3)', math.atan2(INF, 2.3), math.pi/2) self.ftest('atan2(inf, inf)', math.atan2(INF, INF), math.pi/4) - self.assert_(math.isnan(math.atan2(INF, NAN))) + self.assertTrue(math.isnan(math.atan2(INF, NAN))) # math.atan2(NINF, x) self.ftest('atan2(-inf, -inf)', math.atan2(NINF, NINF), -math.pi*3/4) self.ftest('atan2(-inf, -2.3)', math.atan2(NINF, -2.3), -math.pi/2) @@ -161,27 +161,27 @@ self.ftest('atan2(-inf, 0.)', math.atan2(NINF, 0.0), -math.pi/2) self.ftest('atan2(-inf, 2.3)', math.atan2(NINF, 2.3), -math.pi/2) self.ftest('atan2(-inf, inf)', math.atan2(NINF, INF), -math.pi/4) - self.assert_(math.isnan(math.atan2(NINF, NAN))) + self.assertTrue(math.isnan(math.atan2(NINF, NAN))) # math.atan2(+finite, x) self.ftest('atan2(2.3, -inf)', math.atan2(2.3, NINF), math.pi) self.ftest('atan2(2.3, -0.)', math.atan2(2.3, -0.), math.pi/2) self.ftest('atan2(2.3, 0.)', math.atan2(2.3, 0.), math.pi/2) self.assertEqual(math.atan2(2.3, INF), 0.) - self.assert_(math.isnan(math.atan2(2.3, NAN))) + self.assertTrue(math.isnan(math.atan2(2.3, NAN))) # math.atan2(-finite, x) self.ftest('atan2(-2.3, -inf)', math.atan2(-2.3, NINF), -math.pi) self.ftest('atan2(-2.3, -0.)', math.atan2(-2.3, -0.), -math.pi/2) self.ftest('atan2(-2.3, 0.)', math.atan2(-2.3, 0.), -math.pi/2) self.assertEqual(math.atan2(-2.3, INF), -0.) - self.assert_(math.isnan(math.atan2(-2.3, NAN))) + self.assertTrue(math.isnan(math.atan2(-2.3, NAN))) # math.atan2(NAN, x) - self.assert_(math.isnan(math.atan2(NAN, NINF))) - self.assert_(math.isnan(math.atan2(NAN, -2.3))) - self.assert_(math.isnan(math.atan2(NAN, -0.))) - self.assert_(math.isnan(math.atan2(NAN, 0.))) - self.assert_(math.isnan(math.atan2(NAN, 2.3))) - self.assert_(math.isnan(math.atan2(NAN, INF))) - self.assert_(math.isnan(math.atan2(NAN, NAN))) + self.assertTrue(math.isnan(math.atan2(NAN, NINF))) + self.assertTrue(math.isnan(math.atan2(NAN, -2.3))) + self.assertTrue(math.isnan(math.atan2(NAN, -0.))) + self.assertTrue(math.isnan(math.atan2(NAN, 0.))) + self.assertTrue(math.isnan(math.atan2(NAN, 2.3))) + self.assertTrue(math.isnan(math.atan2(NAN, INF))) + self.assertTrue(math.isnan(math.atan2(NAN, NAN))) def testCeil(self): self.assertRaises(TypeError, math.ceil) @@ -197,7 +197,7 @@ self.ftest('ceil(-1.5)', math.ceil(-1.5), -1) self.assertEquals(math.ceil(INF), INF) self.assertEquals(math.ceil(NINF), NINF) - self.assert_(math.isnan(math.ceil(NAN))) + self.assertTrue(math.isnan(math.ceil(NAN))) class TestCeil(object): def __float__(self): @@ -229,14 +229,14 @@ self.assertEquals(copysign(INF, NINF), NINF) self.assertEquals(copysign(NINF, INF), INF) self.assertEquals(copysign(NINF, NINF), NINF) - self.assert_(math.isnan(copysign(NAN, 1.))) - self.assert_(math.isnan(copysign(NAN, INF))) - self.assert_(math.isnan(copysign(NAN, NINF))) - self.assert_(math.isnan(copysign(NAN, NAN))) + self.assertTrue(math.isnan(copysign(NAN, 1.))) + self.assertTrue(math.isnan(copysign(NAN, INF))) + self.assertTrue(math.isnan(copysign(NAN, NINF))) + self.assertTrue(math.isnan(copysign(NAN, NAN))) # copysign(INF, NAN) may be INF or it may be NINF, since # we don't know whether the sign bit of NAN is set on any # given platform. - self.assert_(math.isinf(copysign(INF, NAN))) + self.assertTrue(math.isinf(copysign(INF, NAN))) # similarly, copysign(2., NAN) could be 2. or -2. self.assertEquals(abs(copysign(2., NAN)), 2.) @@ -247,12 +247,12 @@ self.ftest('cos(pi/2)', math.cos(math.pi/2), 0) self.ftest('cos(pi)', math.cos(math.pi), -1) try: - self.assert_(math.isnan(math.cos(INF))) - self.assert_(math.isnan(math.cos(NINF))) + self.assertTrue(math.isnan(math.cos(INF))) + self.assertTrue(math.isnan(math.cos(NINF))) except ValueError: self.assertRaises(ValueError, math.cos, INF) self.assertRaises(ValueError, math.cos, NINF) - self.assert_(math.isnan(math.cos(NAN))) + self.assertTrue(math.isnan(math.cos(NAN))) def testCosh(self): self.assertRaises(TypeError, math.cosh) @@ -260,7 +260,7 @@ self.ftest('cosh(2)-2*cosh(1)**2', math.cosh(2)-2*math.cosh(1)**2, -1) # Thanks to Lambert self.assertEquals(math.cosh(INF), INF) self.assertEquals(math.cosh(NINF), INF) - self.assert_(math.isnan(math.cosh(NAN))) + self.assertTrue(math.isnan(math.cosh(NAN))) def testDegrees(self): self.assertRaises(TypeError, math.degrees) @@ -275,7 +275,7 @@ self.ftest('exp(1)', math.exp(1), math.e) self.assertEquals(math.exp(INF), INF) self.assertEquals(math.exp(NINF), 0.) - self.assert_(math.isnan(math.exp(NAN))) + self.assertTrue(math.isnan(math.exp(NAN))) def testFabs(self): self.assertRaises(TypeError, math.fabs) @@ -315,7 +315,7 @@ self.ftest('floor(-1.23e167)', math.floor(-1.23e167), -1.23e167) self.assertEquals(math.ceil(INF), INF) self.assertEquals(math.ceil(NINF), NINF) - self.assert_(math.isnan(math.floor(NAN))) + self.assertTrue(math.isnan(math.floor(NAN))) class TestFloor(object): def __float__(self): @@ -338,9 +338,9 @@ self.ftest('fmod(-10,1)', math.fmod(-10,1), 0) self.ftest('fmod(-10,0.5)', math.fmod(-10,0.5), 0) self.ftest('fmod(-10,1.5)', math.fmod(-10,1.5), -1) - self.assert_(math.isnan(math.fmod(NAN, 1.))) - self.assert_(math.isnan(math.fmod(1., NAN))) - self.assert_(math.isnan(math.fmod(NAN, NAN))) + self.assertTrue(math.isnan(math.fmod(NAN, 1.))) + self.assertTrue(math.isnan(math.fmod(1., NAN))) + self.assertTrue(math.isnan(math.fmod(NAN, NAN))) self.assertRaises(ValueError, math.fmod, 1., 0.) self.assertRaises(ValueError, math.fmod, INF, 1.) self.assertRaises(ValueError, math.fmod, NINF, 1.) @@ -367,7 +367,7 @@ self.assertEquals(math.frexp(INF)[0], INF) self.assertEquals(math.frexp(NINF)[0], NINF) - self.assert_(math.isnan(math.frexp(NAN)[0])) + self.assertTrue(math.isnan(math.frexp(NAN)[0])) @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"), "test requires IEEE 754 doubles") @@ -469,8 +469,8 @@ self.assertEqual(math.hypot(INF, NAN), INF) self.assertEqual(math.hypot(NAN, NINF), INF) self.assertEqual(math.hypot(NINF, NAN), INF) - self.assert_(math.isnan(math.hypot(1.0, NAN))) - self.assert_(math.isnan(math.hypot(NAN, -2.0))) + self.assertTrue(math.isnan(math.hypot(1.0, NAN))) + self.assertTrue(math.isnan(math.hypot(NAN, -2.0))) def testLdexp(self): self.assertRaises(TypeError, math.ldexp) @@ -484,7 +484,7 @@ self.assertEquals(math.ldexp(-1., -1000000), -0.) self.assertEquals(math.ldexp(INF, 30), INF) self.assertEquals(math.ldexp(NINF, -213), NINF) - self.assert_(math.isnan(math.ldexp(NAN, 0))) + self.assertTrue(math.isnan(math.ldexp(NAN, 0))) # large second argument for n in [10**5, 10L**5, 10**10, 10L**10, 10**20, 10**40]: @@ -494,7 +494,7 @@ self.assertEquals(math.ldexp(-1., -n), -0.) self.assertEquals(math.ldexp(0., -n), 0.) self.assertEquals(math.ldexp(-0., -n), -0.) - self.assert_(math.isnan(math.ldexp(NAN, -n))) + self.assertTrue(math.isnan(math.ldexp(NAN, -n))) self.assertRaises(OverflowError, math.ldexp, 1., n) self.assertRaises(OverflowError, math.ldexp, -1., n) @@ -502,7 +502,7 @@ self.assertEquals(math.ldexp(-0., n), -0.) self.assertEquals(math.ldexp(INF, n), INF) self.assertEquals(math.ldexp(NINF, n), NINF) - self.assert_(math.isnan(math.ldexp(NAN, n))) + self.assertTrue(math.isnan(math.ldexp(NAN, n))) def testLog(self): self.assertRaises(TypeError, math.log) @@ -514,7 +514,7 @@ self.ftest('log(10**40, 10**20)', math.log(10**40, 10**20), 2) self.assertEquals(math.log(INF), INF) self.assertRaises(ValueError, math.log, NINF) - self.assert_(math.isnan(math.log(NAN))) + self.assertTrue(math.isnan(math.log(NAN))) def testLog1p(self): self.assertRaises(TypeError, math.log1p) @@ -524,7 +524,7 @@ self.ftest('log1p(1)', math.log1p(1), math.log(2)) self.assertEquals(math.log1p(INF), INF) self.assertRaises(ValueError, math.log1p, NINF) - self.assert_(math.isnan(math.log1p(NAN))) + self.assertTrue(math.isnan(math.log1p(NAN))) n= 2**90 self.assertAlmostEquals(math.log1p(n), 62.383246250395075) self.assertAlmostEquals(math.log1p(n), math.log1p(float(n))) @@ -536,7 +536,7 @@ self.ftest('log10(10)', math.log10(10), 1) self.assertEquals(math.log(INF), INF) self.assertRaises(ValueError, math.log10, NINF) - self.assert_(math.isnan(math.log10(NAN))) + self.assertTrue(math.isnan(math.log10(NAN))) def testModf(self): self.assertRaises(TypeError, math.modf) @@ -553,8 +553,8 @@ self.assertEquals(math.modf(NINF), (-0.0, NINF)) modf_nan = math.modf(NAN) - self.assert_(math.isnan(modf_nan[0])) - self.assert_(math.isnan(modf_nan[1])) + self.assertTrue(math.isnan(modf_nan[0])) + self.assertTrue(math.isnan(modf_nan[1])) def testPow(self): self.assertRaises(TypeError, math.pow) @@ -566,9 +566,9 @@ self.assertEqual(math.pow(NINF, 1), NINF) self.assertEqual((math.pow(1, INF)), 1.) self.assertEqual((math.pow(1, NINF)), 1.) - self.assert_(math.isnan(math.pow(NAN, 1))) - self.assert_(math.isnan(math.pow(2, NAN))) - self.assert_(math.isnan(math.pow(0, NAN))) + self.assertTrue(math.isnan(math.pow(NAN, 1))) + self.assertTrue(math.isnan(math.pow(2, NAN))) + self.assertTrue(math.isnan(math.pow(0, NAN))) self.assertEqual(math.pow(1, NAN), 1) # pow(0., x) @@ -582,7 +582,7 @@ self.assertRaises(ValueError, math.pow, 0., -2.3) self.assertRaises(ValueError, math.pow, 0., -3.) self.assertRaises(ValueError, math.pow, 0., NINF) - self.assert_(math.isnan(math.pow(0., NAN))) + self.assertTrue(math.isnan(math.pow(0., NAN))) # pow(INF, x) self.assertEqual(math.pow(INF, INF), INF) @@ -595,7 +595,7 @@ self.assertEqual(math.pow(INF, -2.3), 0.) self.assertEqual(math.pow(INF, -3.), 0.) self.assertEqual(math.pow(INF, NINF), 0.) - self.assert_(math.isnan(math.pow(INF, NAN))) + self.assertTrue(math.isnan(math.pow(INF, NAN))) # pow(-0., x) self.assertEqual(math.pow(-0., INF), 0.) @@ -608,7 +608,7 @@ self.assertRaises(ValueError, math.pow, -0., -2.3) self.assertRaises(ValueError, math.pow, -0., -3.) self.assertRaises(ValueError, math.pow, -0., NINF) - self.assert_(math.isnan(math.pow(-0., NAN))) + self.assertTrue(math.isnan(math.pow(-0., NAN))) # pow(NINF, x) self.assertEqual(math.pow(NINF, INF), INF) @@ -621,7 +621,7 @@ self.assertEqual(math.pow(NINF, -2.3), 0.) self.assertEqual(math.pow(NINF, -3.), -0.) self.assertEqual(math.pow(NINF, NINF), 0.) - self.assert_(math.isnan(math.pow(NINF, NAN))) + self.assertTrue(math.isnan(math.pow(NINF, NAN))) # pow(-1, x) self.assertEqual(math.pow(-1., INF), 1.) @@ -634,7 +634,7 @@ self.assertRaises(ValueError, math.pow, -1., -2.3) self.assertEqual(math.pow(-1., -3.), -1.) self.assertEqual(math.pow(-1., NINF), 1.) - self.assert_(math.isnan(math.pow(-1., NAN))) + self.assertTrue(math.isnan(math.pow(-1., NAN))) # pow(1, x) self.assertEqual(math.pow(1., INF), 1.) @@ -717,12 +717,12 @@ self.ftest('sin(pi/2)', math.sin(math.pi/2), 1) self.ftest('sin(-pi/2)', math.sin(-math.pi/2), -1) try: - self.assert_(math.isnan(math.sin(INF))) - self.assert_(math.isnan(math.sin(NINF))) + self.assertTrue(math.isnan(math.sin(INF))) + self.assertTrue(math.isnan(math.sin(NINF))) except ValueError: self.assertRaises(ValueError, math.sin, INF) self.assertRaises(ValueError, math.sin, NINF) - self.assert_(math.isnan(math.sin(NAN))) + self.assertTrue(math.isnan(math.sin(NAN))) def testSinh(self): self.assertRaises(TypeError, math.sinh) @@ -731,7 +731,7 @@ self.ftest('sinh(1)+sinh(-1)', math.sinh(1)+math.sinh(-1), 0) self.assertEquals(math.sinh(INF), INF) self.assertEquals(math.sinh(NINF), NINF) - self.assert_(math.isnan(math.sinh(NAN))) + self.assertTrue(math.isnan(math.sinh(NAN))) def testSqrt(self): self.assertRaises(TypeError, math.sqrt) @@ -740,7 +740,7 @@ self.ftest('sqrt(4)', math.sqrt(4), 2) self.assertEquals(math.sqrt(INF), INF) self.assertRaises(ValueError, math.sqrt, NINF) - self.assert_(math.isnan(math.sqrt(NAN))) + self.assertTrue(math.isnan(math.sqrt(NAN))) def testTan(self): self.assertRaises(TypeError, math.tan) @@ -748,12 +748,12 @@ self.ftest('tan(pi/4)', math.tan(math.pi/4), 1) self.ftest('tan(-pi/4)', math.tan(-math.pi/4), -1) try: - self.assert_(math.isnan(math.tan(INF))) - self.assert_(math.isnan(math.tan(NINF))) + self.assertTrue(math.isnan(math.tan(INF))) + self.assertTrue(math.isnan(math.tan(NINF))) except: self.assertRaises(ValueError, math.tan, INF) self.assertRaises(ValueError, math.tan, NINF) - self.assert_(math.isnan(math.tan(NAN))) + self.assertTrue(math.isnan(math.tan(NAN))) def testTanh(self): self.assertRaises(TypeError, math.tanh) @@ -761,7 +761,7 @@ self.ftest('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) self.ftest('tanh(inf)', math.tanh(INF), 1) self.ftest('tanh(-inf)', math.tanh(NINF), -1) - self.assert_(math.isnan(math.tanh(NAN))) + self.assertTrue(math.isnan(math.tanh(NAN))) # check that tanh(-0.) == -0. on IEEE 754 systems if float.__getformat__("double").startswith("IEEE"): self.assertEqual(math.tanh(-0.), -0.) @@ -807,20 +807,20 @@ self.assertEqual(math.copysign(4., -0.), -4.0) def testIsnan(self): - self.assert_(math.isnan(float("nan"))) - self.assert_(math.isnan(float("inf")* 0.)) - self.failIf(math.isnan(float("inf"))) - self.failIf(math.isnan(0.)) - self.failIf(math.isnan(1.)) + self.assertTrue(math.isnan(float("nan"))) + self.assertTrue(math.isnan(float("inf")* 0.)) + self.assertFalse(math.isnan(float("inf"))) + self.assertFalse(math.isnan(0.)) + self.assertFalse(math.isnan(1.)) def testIsinf(self): - self.assert_(math.isinf(float("inf"))) - self.assert_(math.isinf(float("-inf"))) - self.assert_(math.isinf(1E400)) - self.assert_(math.isinf(-1E400)) - self.failIf(math.isinf(float("nan"))) - self.failIf(math.isinf(0.)) - self.failIf(math.isinf(1.)) + self.assertTrue(math.isinf(float("inf"))) + self.assertTrue(math.isinf(float("-inf"))) + self.assertTrue(math.isinf(1E400)) + self.assertTrue(math.isinf(-1E400)) + self.assertFalse(math.isinf(float("nan"))) + self.assertFalse(math.isinf(0.)) + self.assertFalse(math.isinf(1.)) # RED_FLAG 16-Oct-2000 Tim # While 2.0 is more consistent about exceptions than previous releases, it Modified: python/trunk/Lib/test/test_memoryio.py ============================================================================== --- python/trunk/Lib/test/test_memoryio.py (original) +++ python/trunk/Lib/test/test_memoryio.py Wed Jul 1 00:57:08 2009 @@ -225,8 +225,8 @@ memio = self.ioclass(buf * 10) self.assertEqual(iter(memio), memio) - self.failUnless(hasattr(memio, '__iter__')) - self.failUnless(hasattr(memio, 'next')) + self.assertTrue(hasattr(memio, '__iter__')) + self.assertTrue(hasattr(memio, 'next')) i = 0 for line in memio: self.assertEqual(line, buf) Modified: python/trunk/Lib/test/test_memoryview.py ============================================================================== --- python/trunk/Lib/test/test_memoryview.py (original) +++ python/trunk/Lib/test/test_memoryview.py Wed Jul 1 00:57:08 2009 @@ -28,7 +28,7 @@ oldrefcount = sys.getrefcount(b) m = self._view(b) self.assertEquals(m[0], item(b"a")) - self.assert_(isinstance(m[0], bytes), type(m[0])) + self.assertTrue(isinstance(m[0], bytes), type(m[0])) self.assertEquals(m[5], item(b"f")) self.assertEquals(m[-1], item(b"f")) self.assertEquals(m[-6], item(b"a")) @@ -119,7 +119,7 @@ expected = b"".join( self.getitem_type(c) for c in b"abcdef") self.assertEquals(b, expected) - self.assert_(isinstance(b, bytes), type(b)) + self.assertTrue(isinstance(b, bytes), type(b)) def test_tolist(self): for tp in self._types: @@ -212,7 +212,7 @@ b = m = o = None # The cycle must be broken gc.collect() - self.assert_(wr() is None, wr()) + self.assertTrue(wr() is None, wr()) # Variations on source objects for the buffer: bytes-like objects, then arrays @@ -291,8 +291,8 @@ def test_constructor(self): for tp in self._types: ob = tp(self._source) - self.assert_(memoryview(ob)) - self.assert_(memoryview(object=ob)) + self.assertTrue(memoryview(ob)) + self.assertTrue(memoryview(object=ob)) self.assertRaises(TypeError, memoryview) self.assertRaises(TypeError, memoryview, ob, ob) self.assertRaises(TypeError, memoryview, argument=ob) Modified: python/trunk/Lib/test/test_mhlib.py ============================================================================== --- python/trunk/Lib/test/test_mhlib.py (original) +++ python/trunk/Lib/test/test_mhlib.py Wed Jul 1 00:57:08 2009 @@ -256,9 +256,9 @@ eq = self.assertEquals mh.makefolder("dummy1") - self.assert_("dummy1" in mh.listfolders()) + self.assertTrue("dummy1" in mh.listfolders()) path = os.path.join(_mhpath, "dummy1") - self.assert_(os.path.exists(path)) + self.assertTrue(os.path.exists(path)) f = mh.openfolder('dummy1') def create(n): @@ -310,8 +310,8 @@ mh.deletefolder('dummy1') mh.deletefolder('dummy2') - self.assert_('dummy1' not in mh.listfolders()) - self.assert_(not os.path.exists(path)) + self.assertTrue('dummy1' not in mh.listfolders()) + self.assertTrue(not os.path.exists(path)) def test_read(self): mh = getMH() Modified: python/trunk/Lib/test/test_mimetools.py ============================================================================== --- python/trunk/Lib/test/test_mimetools.py (original) +++ python/trunk/Lib/test/test_mimetools.py Wed Jul 1 00:57:08 2009 @@ -31,7 +31,7 @@ s = set([""]) for i in xrange(100): nb = mimetools.choose_boundary() - self.assert_(nb not in s) + self.assertTrue(nb not in s) s.add(nb) def test_message(self): Modified: python/trunk/Lib/test/test_mimetypes.py ============================================================================== --- python/trunk/Lib/test/test_mimetypes.py (original) +++ python/trunk/Lib/test/test_mimetypes.py Wed Jul 1 00:57:08 2009 @@ -47,7 +47,7 @@ def test_guess_all_types(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue # First try strict. Use a set here for testing the results because if # test_urllib2 is run before test_mimetypes, global state is modified # such that the 'all' set will have more items in it. Modified: python/trunk/Lib/test/test_minidom.py ============================================================================== --- python/trunk/Lib/test/test_minidom.py (original) +++ python/trunk/Lib/test/test_minidom.py Wed Jul 1 00:57:08 2009 @@ -734,7 +734,7 @@ def check_clone_attribute(self, deep, testName): doc = parseString("") attr = doc.documentElement.getAttributeNode("attr") - self.failIfEqual(attr, None) + self.assertNotEqual(attr, None) clone = attr.cloneNode(deep) self.confirm(not clone.isSameNode(attr)) self.confirm(not attr.isSameNode(clone)) Modified: python/trunk/Lib/test/test_mmap.py ============================================================================== --- python/trunk/Lib/test/test_mmap.py (original) +++ python/trunk/Lib/test/test_mmap.py Wed Jul 1 00:57:08 2009 @@ -501,8 +501,8 @@ f.close() def test_error(self): - self.assert_(issubclass(mmap.error, EnvironmentError)) - self.assert_("mmap.error" in str(mmap.error)) + self.assertTrue(issubclass(mmap.error, EnvironmentError)) + self.assertTrue("mmap.error" in str(mmap.error)) def test_io_methods(self): data = "0123456789" Modified: python/trunk/Lib/test/test_module.py ============================================================================== --- python/trunk/Lib/test/test_module.py (original) +++ python/trunk/Lib/test/test_module.py Wed Jul 1 00:57:08 2009 @@ -10,7 +10,7 @@ # An uninitialized module has no __dict__ or __name__, # and __doc__ is None foo = ModuleType.__new__(ModuleType) - self.failUnless(foo.__dict__ is None) + self.assertTrue(foo.__dict__ is None) try: s = foo.__name__ self.fail("__name__ = %s" % repr(s)) @@ -52,7 +52,7 @@ self.assertEqual(foo.bar, 42) self.assertEqual(foo.__dict__, {"__name__": "foo", "__doc__": "foodoc", "bar": 42}) - self.failUnless(foo.__dict__ is d) + self.assertTrue(foo.__dict__ is d) def test_main(): run_unittest(ModuleTests) Modified: python/trunk/Lib/test/test_modulefinder.py ============================================================================== --- python/trunk/Lib/test/test_modulefinder.py (original) +++ python/trunk/Lib/test/test_modulefinder.py Wed Jul 1 00:57:08 2009 @@ -240,12 +240,12 @@ more = list(found - modules) less = list(modules - found) # check if we found what we expected, not more, not less - self.failUnlessEqual((more, less), ([], [])) + self.assertEqual((more, less), ([], [])) # check for missing and maybe missing modules bad, maybe = mf.any_missing_maybe() - self.failUnlessEqual(bad, missing) - self.failUnlessEqual(maybe, maybe_missing) + self.assertEqual(bad, missing) + self.assertEqual(maybe, maybe_missing) finally: distutils.dir_util.remove_tree(TEST_DIR) Modified: python/trunk/Lib/test/test_multibytecodec.py ============================================================================== --- python/trunk/Lib/test/test_multibytecodec.py (original) +++ python/trunk/Lib/test/test_multibytecodec.py Wed Jul 1 00:57:08 2009 @@ -222,10 +222,10 @@ self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni) def test_iso2022_jp_g0(self): - self.failIf('\x0e' in u'\N{SOFT HYPHEN}'.encode('iso-2022-jp-2')) + self.assertFalse('\x0e' in u'\N{SOFT HYPHEN}'.encode('iso-2022-jp-2')) for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'): e = u'\u3406'.encode(encoding) - self.failIf(filter(lambda x: x >= '\x80', e)) + self.assertFalse(filter(lambda x: x >= '\x80', e)) def test_bug1572832(self): if sys.maxunicode >= 0x10000: Modified: python/trunk/Lib/test/test_mutex.py ============================================================================== --- python/trunk/Lib/test/test_mutex.py (original) +++ python/trunk/Lib/test/test_mutex.py Wed Jul 1 00:57:08 2009 @@ -9,14 +9,14 @@ def called_by_mutex(some_data): self.assertEqual(some_data, "spam") - self.assert_(m.test(), "mutex not held") + self.assertTrue(m.test(), "mutex not held") # Nested locking m.lock(called_by_mutex2, "eggs") def called_by_mutex2(some_data): self.assertEquals(some_data, "eggs") - self.assert_(m.test(), "mutex not held") - self.assert_(ready_for_2, + self.assertTrue(m.test(), "mutex not held") + self.assertTrue(ready_for_2, "called_by_mutex2 called too soon") m = mutex.mutex() @@ -26,7 +26,7 @@ # unlock both locks m.unlock() m.unlock() - self.failIf(m.test(), "mutex still held") + self.assertFalse(m.test(), "mutex still held") def test_main(): test.test_support.run_unittest(MutexTest) Modified: python/trunk/Lib/test/test_netrc.py ============================================================================== --- python/trunk/Lib/test/test_netrc.py (original) +++ python/trunk/Lib/test/test_netrc.py Wed Jul 1 00:57:08 2009 @@ -35,11 +35,11 @@ os.unlink(temp_filename) def test_case_1(self): - self.assert_(self.netrc.macros == {'macro1':['line1\n', 'line2\n'], + self.assertTrue(self.netrc.macros == {'macro1':['line1\n', 'line2\n'], 'macro2':['line3\n', 'line4\n']} ) - self.assert_(self.netrc.hosts['foo'] == ('log1', 'acct1', 'pass1')) - self.assert_(self.netrc.hosts['default'] == ('log2', None, 'pass2')) + self.assertTrue(self.netrc.hosts['foo'] == ('log1', 'acct1', 'pass1')) + self.assertTrue(self.netrc.hosts['default'] == ('log2', None, 'pass2')) def test_main(): test_support.run_unittest(NetrcTestCase) Modified: python/trunk/Lib/test/test_new.py ============================================================================== --- python/trunk/Lib/test/test_new.py (original) +++ python/trunk/Lib/test/test_new.py Wed Jul 1 00:57:08 2009 @@ -154,7 +154,7 @@ d = new.code(argcount, nlocals, stacksize, flags, codestring, constants, t, varnames, filename, name, firstlineno, lnotab) - self.assert_(type(t[0]) is S, "eek, tuple changed under us!") + self.assertTrue(type(t[0]) is S, "eek, tuple changed under us!") def test_main(): test_support.run_unittest(NewTest) Modified: python/trunk/Lib/test/test_normalization.py ============================================================================== --- python/trunk/Lib/test/test_normalization.py (original) +++ python/trunk/Lib/test/test_normalization.py Wed Jul 1 00:57:08 2009 @@ -67,14 +67,14 @@ continue # Perform tests - self.failUnless(c2 == NFC(c1) == NFC(c2) == NFC(c3), line) - self.failUnless(c4 == NFC(c4) == NFC(c5), line) - self.failUnless(c3 == NFD(c1) == NFD(c2) == NFD(c3), line) - self.failUnless(c5 == NFD(c4) == NFD(c5), line) - self.failUnless(c4 == NFKC(c1) == NFKC(c2) == \ + self.assertTrue(c2 == NFC(c1) == NFC(c2) == NFC(c3), line) + self.assertTrue(c4 == NFC(c4) == NFC(c5), line) + self.assertTrue(c3 == NFD(c1) == NFD(c2) == NFD(c3), line) + self.assertTrue(c5 == NFD(c4) == NFD(c5), line) + self.assertTrue(c4 == NFKC(c1) == NFKC(c2) == \ NFKC(c3) == NFKC(c4) == NFKC(c5), line) - self.failUnless(c5 == NFKD(c1) == NFKD(c2) == \ + self.assertTrue(c5 == NFKD(c1) == NFKD(c2) == \ NFKD(c3) == NFKD(c4) == NFKD(c5), line) @@ -87,7 +87,7 @@ X = unichr(c) if X in part1_data: continue - self.failUnless(X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X), c) + self.assertTrue(X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X), c) def test_bug_834676(self): # Check for bug 834676 Modified: python/trunk/Lib/test/test_old_mailbox.py ============================================================================== --- python/trunk/Lib/test/test_old_mailbox.py (original) +++ python/trunk/Lib/test/test_old_mailbox.py Wed Jul 1 00:57:08 2009 @@ -67,35 +67,35 @@ """Test an empty maildir mailbox""" # Test for regression on bug #117490: self.mbox = mailbox.Maildir(test_support.TESTFN) - self.assert_(len(self.mbox) == 0) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + self.assertTrue(len(self.mbox) == 0) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_cur(self): self.createMessage("cur") self.mbox = mailbox.Maildir(test_support.TESTFN) - self.assert_(len(self.mbox) == 1) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + self.assertTrue(len(self.mbox) == 1) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_new(self): self.createMessage("new") self.mbox = mailbox.Maildir(test_support.TESTFN) - self.assert_(len(self.mbox) == 1) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + self.assertTrue(len(self.mbox) == 1) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_both(self): self.createMessage("cur") self.createMessage("new") self.mbox = mailbox.Maildir(test_support.TESTFN) - self.assert_(len(self.mbox) == 2) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + self.assertTrue(len(self.mbox) == 2) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_unix_mbox(self): ### should be better! @@ -139,7 +139,7 @@ """) f.close() box = mailbox.UnixMailbox(open(self._path, 'r')) - self.assert_(len(list(iter(box))) == 4) + self.assertTrue(len(list(iter(box))) == 4) # XXX We still need more tests! Modified: python/trunk/Lib/test/test_opcodes.py ============================================================================== --- python/trunk/Lib/test/test_opcodes.py (original) +++ python/trunk/Lib/test/test_opcodes.py Wed Jul 1 00:57:08 2009 @@ -64,7 +64,7 @@ try: raise DClass, a except DClass, v: - self.assert_(isinstance(v, DClass)) + self.assertTrue(isinstance(v, DClass)) else: self.fail("no exception") Modified: python/trunk/Lib/test/test_operator.py ============================================================================== --- python/trunk/Lib/test/test_operator.py (original) +++ python/trunk/Lib/test/test_operator.py Wed Jul 1 00:57:08 2009 @@ -34,332 +34,332 @@ class OperatorTestCase(unittest.TestCase): def test_lt(self): - self.failUnlessRaises(TypeError, operator.lt) - self.failUnlessRaises(TypeError, operator.lt, 1j, 2j) - self.failIf(operator.lt(1, 0)) - self.failIf(operator.lt(1, 0.0)) - self.failIf(operator.lt(1, 1)) - self.failIf(operator.lt(1, 1.0)) - self.failUnless(operator.lt(1, 2)) - self.failUnless(operator.lt(1, 2.0)) + self.assertRaises(TypeError, operator.lt) + self.assertRaises(TypeError, operator.lt, 1j, 2j) + self.assertFalse(operator.lt(1, 0)) + self.assertFalse(operator.lt(1, 0.0)) + self.assertFalse(operator.lt(1, 1)) + self.assertFalse(operator.lt(1, 1.0)) + self.assertTrue(operator.lt(1, 2)) + self.assertTrue(operator.lt(1, 2.0)) def test_le(self): - self.failUnlessRaises(TypeError, operator.le) - self.failUnlessRaises(TypeError, operator.le, 1j, 2j) - self.failIf(operator.le(1, 0)) - self.failIf(operator.le(1, 0.0)) - self.failUnless(operator.le(1, 1)) - self.failUnless(operator.le(1, 1.0)) - self.failUnless(operator.le(1, 2)) - self.failUnless(operator.le(1, 2.0)) + self.assertRaises(TypeError, operator.le) + self.assertRaises(TypeError, operator.le, 1j, 2j) + self.assertFalse(operator.le(1, 0)) + self.assertFalse(operator.le(1, 0.0)) + self.assertTrue(operator.le(1, 1)) + self.assertTrue(operator.le(1, 1.0)) + self.assertTrue(operator.le(1, 2)) + self.assertTrue(operator.le(1, 2.0)) def test_eq(self): class C(object): def __eq__(self, other): raise SyntaxError __hash__ = None # Silence Py3k warning - self.failUnlessRaises(TypeError, operator.eq) - self.failUnlessRaises(SyntaxError, operator.eq, C(), C()) - self.failIf(operator.eq(1, 0)) - self.failIf(operator.eq(1, 0.0)) - self.failUnless(operator.eq(1, 1)) - self.failUnless(operator.eq(1, 1.0)) - self.failIf(operator.eq(1, 2)) - self.failIf(operator.eq(1, 2.0)) + self.assertRaises(TypeError, operator.eq) + self.assertRaises(SyntaxError, operator.eq, C(), C()) + self.assertFalse(operator.eq(1, 0)) + self.assertFalse(operator.eq(1, 0.0)) + self.assertTrue(operator.eq(1, 1)) + self.assertTrue(operator.eq(1, 1.0)) + self.assertFalse(operator.eq(1, 2)) + self.assertFalse(operator.eq(1, 2.0)) def test_ne(self): class C(object): def __ne__(self, other): raise SyntaxError - self.failUnlessRaises(TypeError, operator.ne) - self.failUnlessRaises(SyntaxError, operator.ne, C(), C()) - self.failUnless(operator.ne(1, 0)) - self.failUnless(operator.ne(1, 0.0)) - self.failIf(operator.ne(1, 1)) - self.failIf(operator.ne(1, 1.0)) - self.failUnless(operator.ne(1, 2)) - self.failUnless(operator.ne(1, 2.0)) + self.assertRaises(TypeError, operator.ne) + self.assertRaises(SyntaxError, operator.ne, C(), C()) + self.assertTrue(operator.ne(1, 0)) + self.assertTrue(operator.ne(1, 0.0)) + self.assertFalse(operator.ne(1, 1)) + self.assertFalse(operator.ne(1, 1.0)) + self.assertTrue(operator.ne(1, 2)) + self.assertTrue(operator.ne(1, 2.0)) def test_ge(self): - self.failUnlessRaises(TypeError, operator.ge) - self.failUnlessRaises(TypeError, operator.ge, 1j, 2j) - self.failUnless(operator.ge(1, 0)) - self.failUnless(operator.ge(1, 0.0)) - self.failUnless(operator.ge(1, 1)) - self.failUnless(operator.ge(1, 1.0)) - self.failIf(operator.ge(1, 2)) - self.failIf(operator.ge(1, 2.0)) + self.assertRaises(TypeError, operator.ge) + self.assertRaises(TypeError, operator.ge, 1j, 2j) + self.assertTrue(operator.ge(1, 0)) + self.assertTrue(operator.ge(1, 0.0)) + self.assertTrue(operator.ge(1, 1)) + self.assertTrue(operator.ge(1, 1.0)) + self.assertFalse(operator.ge(1, 2)) + self.assertFalse(operator.ge(1, 2.0)) def test_gt(self): - self.failUnlessRaises(TypeError, operator.gt) - self.failUnlessRaises(TypeError, operator.gt, 1j, 2j) - self.failUnless(operator.gt(1, 0)) - self.failUnless(operator.gt(1, 0.0)) - self.failIf(operator.gt(1, 1)) - self.failIf(operator.gt(1, 1.0)) - self.failIf(operator.gt(1, 2)) - self.failIf(operator.gt(1, 2.0)) + self.assertRaises(TypeError, operator.gt) + self.assertRaises(TypeError, operator.gt, 1j, 2j) + self.assertTrue(operator.gt(1, 0)) + self.assertTrue(operator.gt(1, 0.0)) + self.assertFalse(operator.gt(1, 1)) + self.assertFalse(operator.gt(1, 1.0)) + self.assertFalse(operator.gt(1, 2)) + self.assertFalse(operator.gt(1, 2.0)) def test_abs(self): - self.failUnlessRaises(TypeError, operator.abs) - self.failUnlessRaises(TypeError, operator.abs, None) - self.failUnless(operator.abs(-1) == 1) - self.failUnless(operator.abs(1) == 1) + self.assertRaises(TypeError, operator.abs) + self.assertRaises(TypeError, operator.abs, None) + self.assertTrue(operator.abs(-1) == 1) + self.assertTrue(operator.abs(1) == 1) def test_add(self): - self.failUnlessRaises(TypeError, operator.add) - self.failUnlessRaises(TypeError, operator.add, None, None) - self.failUnless(operator.add(3, 4) == 7) + self.assertRaises(TypeError, operator.add) + self.assertRaises(TypeError, operator.add, None, None) + self.assertTrue(operator.add(3, 4) == 7) def test_bitwise_and(self): - self.failUnlessRaises(TypeError, operator.and_) - self.failUnlessRaises(TypeError, operator.and_, None, None) - self.failUnless(operator.and_(0xf, 0xa) == 0xa) + self.assertRaises(TypeError, operator.and_) + self.assertRaises(TypeError, operator.and_, None, None) + self.assertTrue(operator.and_(0xf, 0xa) == 0xa) def test_concat(self): - self.failUnlessRaises(TypeError, operator.concat) - self.failUnlessRaises(TypeError, operator.concat, None, None) - self.failUnless(operator.concat('py', 'thon') == 'python') - self.failUnless(operator.concat([1, 2], [3, 4]) == [1, 2, 3, 4]) - self.failUnless(operator.concat(Seq1([5, 6]), Seq1([7])) == [5, 6, 7]) - self.failUnless(operator.concat(Seq2([5, 6]), Seq2([7])) == [5, 6, 7]) - self.failUnlessRaises(TypeError, operator.concat, 13, 29) + self.assertRaises(TypeError, operator.concat) + self.assertRaises(TypeError, operator.concat, None, None) + self.assertTrue(operator.concat('py', 'thon') == 'python') + self.assertTrue(operator.concat([1, 2], [3, 4]) == [1, 2, 3, 4]) + self.assertTrue(operator.concat(Seq1([5, 6]), Seq1([7])) == [5, 6, 7]) + self.assertTrue(operator.concat(Seq2([5, 6]), Seq2([7])) == [5, 6, 7]) + self.assertRaises(TypeError, operator.concat, 13, 29) def test_countOf(self): - self.failUnlessRaises(TypeError, operator.countOf) - self.failUnlessRaises(TypeError, operator.countOf, None, None) - self.failUnless(operator.countOf([1, 2, 1, 3, 1, 4], 3) == 1) - self.failUnless(operator.countOf([1, 2, 1, 3, 1, 4], 5) == 0) + self.assertRaises(TypeError, operator.countOf) + self.assertRaises(TypeError, operator.countOf, None, None) + self.assertTrue(operator.countOf([1, 2, 1, 3, 1, 4], 3) == 1) + self.assertTrue(operator.countOf([1, 2, 1, 3, 1, 4], 5) == 0) def test_delitem(self): a = [4, 3, 2, 1] - self.failUnlessRaises(TypeError, operator.delitem, a) - self.failUnlessRaises(TypeError, operator.delitem, a, None) - self.failUnless(operator.delitem(a, 1) is None) - self.assert_(a == [4, 2, 1]) + self.assertRaises(TypeError, operator.delitem, a) + self.assertRaises(TypeError, operator.delitem, a, None) + self.assertTrue(operator.delitem(a, 1) is None) + self.assertTrue(a == [4, 2, 1]) def test_delslice(self): a = range(10) - self.failUnlessRaises(TypeError, operator.delslice, a) - self.failUnlessRaises(TypeError, operator.delslice, a, None, None) - self.failUnless(operator.delslice(a, 2, 8) is None) - self.assert_(a == [0, 1, 8, 9]) + self.assertRaises(TypeError, operator.delslice, a) + self.assertRaises(TypeError, operator.delslice, a, None, None) + self.assertTrue(operator.delslice(a, 2, 8) is None) + self.assertTrue(a == [0, 1, 8, 9]) operator.delslice(a, 0, test_support.MAX_Py_ssize_t) - self.assert_(a == []) + self.assertTrue(a == []) def test_div(self): - self.failUnlessRaises(TypeError, operator.div, 5) - self.failUnlessRaises(TypeError, operator.div, None, None) - self.failUnless(operator.floordiv(5, 2) == 2) + self.assertRaises(TypeError, operator.div, 5) + self.assertRaises(TypeError, operator.div, None, None) + self.assertTrue(operator.floordiv(5, 2) == 2) def test_floordiv(self): - self.failUnlessRaises(TypeError, operator.floordiv, 5) - self.failUnlessRaises(TypeError, operator.floordiv, None, None) - self.failUnless(operator.floordiv(5, 2) == 2) + self.assertRaises(TypeError, operator.floordiv, 5) + self.assertRaises(TypeError, operator.floordiv, None, None) + self.assertTrue(operator.floordiv(5, 2) == 2) def test_truediv(self): - self.failUnlessRaises(TypeError, operator.truediv, 5) - self.failUnlessRaises(TypeError, operator.truediv, None, None) - self.failUnless(operator.truediv(5, 2) == 2.5) + self.assertRaises(TypeError, operator.truediv, 5) + self.assertRaises(TypeError, operator.truediv, None, None) + self.assertTrue(operator.truediv(5, 2) == 2.5) def test_getitem(self): a = range(10) - self.failUnlessRaises(TypeError, operator.getitem) - self.failUnlessRaises(TypeError, operator.getitem, a, None) - self.failUnless(operator.getitem(a, 2) == 2) + self.assertRaises(TypeError, operator.getitem) + self.assertRaises(TypeError, operator.getitem, a, None) + self.assertTrue(operator.getitem(a, 2) == 2) def test_getslice(self): a = range(10) - self.failUnlessRaises(TypeError, operator.getslice) - self.failUnlessRaises(TypeError, operator.getslice, a, None, None) - self.failUnless(operator.getslice(a, 4, 6) == [4, 5]) + self.assertRaises(TypeError, operator.getslice) + self.assertRaises(TypeError, operator.getslice, a, None, None) + self.assertTrue(operator.getslice(a, 4, 6) == [4, 5]) b = operator.getslice(a, 0, test_support.MAX_Py_ssize_t) - self.assert_(b == a) + self.assertTrue(b == a) def test_indexOf(self): - self.failUnlessRaises(TypeError, operator.indexOf) - self.failUnlessRaises(TypeError, operator.indexOf, None, None) - self.failUnless(operator.indexOf([4, 3, 2, 1], 3) == 1) + self.assertRaises(TypeError, operator.indexOf) + self.assertRaises(TypeError, operator.indexOf, None, None) + self.assertTrue(operator.indexOf([4, 3, 2, 1], 3) == 1) self.assertRaises(ValueError, operator.indexOf, [4, 3, 2, 1], 0) def test_invert(self): - self.failUnlessRaises(TypeError, operator.invert) - self.failUnlessRaises(TypeError, operator.invert, None) - self.failUnless(operator.inv(4) == -5) + self.assertRaises(TypeError, operator.invert) + self.assertRaises(TypeError, operator.invert, None) + self.assertTrue(operator.inv(4) == -5) def test_isCallable(self): - self.failUnlessRaises(TypeError, operator.isCallable) + self.assertRaises(TypeError, operator.isCallable) class C: pass def check(self, o, v): - self.assert_(operator.isCallable(o) == callable(o) == v) + self.assertTrue(operator.isCallable(o) == callable(o) == v) check(self, 4, 0) check(self, operator.isCallable, 1) check(self, C, 1) check(self, C(), 0) def test_isMappingType(self): - self.failUnlessRaises(TypeError, operator.isMappingType) - self.failIf(operator.isMappingType(1)) - self.failIf(operator.isMappingType(operator.isMappingType)) - self.failUnless(operator.isMappingType(operator.__dict__)) - self.failUnless(operator.isMappingType({})) + self.assertRaises(TypeError, operator.isMappingType) + self.assertFalse(operator.isMappingType(1)) + self.assertFalse(operator.isMappingType(operator.isMappingType)) + self.assertTrue(operator.isMappingType(operator.__dict__)) + self.assertTrue(operator.isMappingType({})) def test_isNumberType(self): - self.failUnlessRaises(TypeError, operator.isNumberType) - self.failUnless(operator.isNumberType(8)) - self.failUnless(operator.isNumberType(8j)) - self.failUnless(operator.isNumberType(8L)) - self.failUnless(operator.isNumberType(8.3)) - self.failIf(operator.isNumberType(dir())) + self.assertRaises(TypeError, operator.isNumberType) + self.assertTrue(operator.isNumberType(8)) + self.assertTrue(operator.isNumberType(8j)) + self.assertTrue(operator.isNumberType(8L)) + self.assertTrue(operator.isNumberType(8.3)) + self.assertFalse(operator.isNumberType(dir())) def test_isSequenceType(self): - self.failUnlessRaises(TypeError, operator.isSequenceType) - self.failUnless(operator.isSequenceType(dir())) - self.failUnless(operator.isSequenceType(())) - self.failUnless(operator.isSequenceType(xrange(10))) - self.failUnless(operator.isSequenceType('yeahbuddy')) - self.failIf(operator.isSequenceType(3)) + self.assertRaises(TypeError, operator.isSequenceType) + self.assertTrue(operator.isSequenceType(dir())) + self.assertTrue(operator.isSequenceType(())) + self.assertTrue(operator.isSequenceType(xrange(10))) + self.assertTrue(operator.isSequenceType('yeahbuddy')) + self.assertFalse(operator.isSequenceType(3)) class Dict(dict): pass - self.failIf(operator.isSequenceType(Dict())) + self.assertFalse(operator.isSequenceType(Dict())) def test_lshift(self): - self.failUnlessRaises(TypeError, operator.lshift) - self.failUnlessRaises(TypeError, operator.lshift, None, 42) - self.failUnless(operator.lshift(5, 1) == 10) - self.failUnless(operator.lshift(5, 0) == 5) + self.assertRaises(TypeError, operator.lshift) + self.assertRaises(TypeError, operator.lshift, None, 42) + self.assertTrue(operator.lshift(5, 1) == 10) + self.assertTrue(operator.lshift(5, 0) == 5) self.assertRaises(ValueError, operator.lshift, 2, -1) def test_mod(self): - self.failUnlessRaises(TypeError, operator.mod) - self.failUnlessRaises(TypeError, operator.mod, None, 42) - self.failUnless(operator.mod(5, 2) == 1) + self.assertRaises(TypeError, operator.mod) + self.assertRaises(TypeError, operator.mod, None, 42) + self.assertTrue(operator.mod(5, 2) == 1) def test_mul(self): - self.failUnlessRaises(TypeError, operator.mul) - self.failUnlessRaises(TypeError, operator.mul, None, None) - self.failUnless(operator.mul(5, 2) == 10) + self.assertRaises(TypeError, operator.mul) + self.assertRaises(TypeError, operator.mul, None, None) + self.assertTrue(operator.mul(5, 2) == 10) def test_neg(self): - self.failUnlessRaises(TypeError, operator.neg) - self.failUnlessRaises(TypeError, operator.neg, None) - self.failUnless(operator.neg(5) == -5) - self.failUnless(operator.neg(-5) == 5) - self.failUnless(operator.neg(0) == 0) - self.failUnless(operator.neg(-0) == 0) + self.assertRaises(TypeError, operator.neg) + self.assertRaises(TypeError, operator.neg, None) + self.assertTrue(operator.neg(5) == -5) + self.assertTrue(operator.neg(-5) == 5) + self.assertTrue(operator.neg(0) == 0) + self.assertTrue(operator.neg(-0) == 0) def test_bitwise_or(self): - self.failUnlessRaises(TypeError, operator.or_) - self.failUnlessRaises(TypeError, operator.or_, None, None) - self.failUnless(operator.or_(0xa, 0x5) == 0xf) + self.assertRaises(TypeError, operator.or_) + self.assertRaises(TypeError, operator.or_, None, None) + self.assertTrue(operator.or_(0xa, 0x5) == 0xf) def test_pos(self): - self.failUnlessRaises(TypeError, operator.pos) - self.failUnlessRaises(TypeError, operator.pos, None) - self.failUnless(operator.pos(5) == 5) - self.failUnless(operator.pos(-5) == -5) - self.failUnless(operator.pos(0) == 0) - self.failUnless(operator.pos(-0) == 0) + self.assertRaises(TypeError, operator.pos) + self.assertRaises(TypeError, operator.pos, None) + self.assertTrue(operator.pos(5) == 5) + self.assertTrue(operator.pos(-5) == -5) + self.assertTrue(operator.pos(0) == 0) + self.assertTrue(operator.pos(-0) == 0) def test_pow(self): - self.failUnlessRaises(TypeError, operator.pow) - self.failUnlessRaises(TypeError, operator.pow, None, None) - self.failUnless(operator.pow(3,5) == 3**5) - self.failUnless(operator.__pow__(3,5) == 3**5) + self.assertRaises(TypeError, operator.pow) + self.assertRaises(TypeError, operator.pow, None, None) + self.assertTrue(operator.pow(3,5) == 3**5) + self.assertTrue(operator.__pow__(3,5) == 3**5) self.assertRaises(TypeError, operator.pow, 1) self.assertRaises(TypeError, operator.pow, 1, 2, 3) def test_repeat(self): a = range(3) - self.failUnlessRaises(TypeError, operator.repeat) - self.failUnlessRaises(TypeError, operator.repeat, a, None) - self.failUnless(operator.repeat(a, 2) == a+a) - self.failUnless(operator.repeat(a, 1) == a) - self.failUnless(operator.repeat(a, 0) == []) + self.assertRaises(TypeError, operator.repeat) + self.assertRaises(TypeError, operator.repeat, a, None) + self.assertTrue(operator.repeat(a, 2) == a+a) + self.assertTrue(operator.repeat(a, 1) == a) + self.assertTrue(operator.repeat(a, 0) == []) a = (1, 2, 3) - self.failUnless(operator.repeat(a, 2) == a+a) - self.failUnless(operator.repeat(a, 1) == a) - self.failUnless(operator.repeat(a, 0) == ()) + self.assertTrue(operator.repeat(a, 2) == a+a) + self.assertTrue(operator.repeat(a, 1) == a) + self.assertTrue(operator.repeat(a, 0) == ()) a = '123' - self.failUnless(operator.repeat(a, 2) == a+a) - self.failUnless(operator.repeat(a, 1) == a) - self.failUnless(operator.repeat(a, 0) == '') + self.assertTrue(operator.repeat(a, 2) == a+a) + self.assertTrue(operator.repeat(a, 1) == a) + self.assertTrue(operator.repeat(a, 0) == '') a = Seq1([4, 5, 6]) - self.failUnless(operator.repeat(a, 2) == [4, 5, 6, 4, 5, 6]) - self.failUnless(operator.repeat(a, 1) == [4, 5, 6]) - self.failUnless(operator.repeat(a, 0) == []) + self.assertTrue(operator.repeat(a, 2) == [4, 5, 6, 4, 5, 6]) + self.assertTrue(operator.repeat(a, 1) == [4, 5, 6]) + self.assertTrue(operator.repeat(a, 0) == []) a = Seq2([4, 5, 6]) - self.failUnless(operator.repeat(a, 2) == [4, 5, 6, 4, 5, 6]) - self.failUnless(operator.repeat(a, 1) == [4, 5, 6]) - self.failUnless(operator.repeat(a, 0) == []) - self.failUnlessRaises(TypeError, operator.repeat, 6, 7) + self.assertTrue(operator.repeat(a, 2) == [4, 5, 6, 4, 5, 6]) + self.assertTrue(operator.repeat(a, 1) == [4, 5, 6]) + self.assertTrue(operator.repeat(a, 0) == []) + self.assertRaises(TypeError, operator.repeat, 6, 7) def test_rshift(self): - self.failUnlessRaises(TypeError, operator.rshift) - self.failUnlessRaises(TypeError, operator.rshift, None, 42) - self.failUnless(operator.rshift(5, 1) == 2) - self.failUnless(operator.rshift(5, 0) == 5) + self.assertRaises(TypeError, operator.rshift) + self.assertRaises(TypeError, operator.rshift, None, 42) + self.assertTrue(operator.rshift(5, 1) == 2) + self.assertTrue(operator.rshift(5, 0) == 5) self.assertRaises(ValueError, operator.rshift, 2, -1) def test_contains(self): - self.failUnlessRaises(TypeError, operator.contains) - self.failUnlessRaises(TypeError, operator.contains, None, None) - self.failUnless(operator.contains(range(4), 2)) - self.failIf(operator.contains(range(4), 5)) - self.failUnless(operator.sequenceIncludes(range(4), 2)) - self.failIf(operator.sequenceIncludes(range(4), 5)) + self.assertRaises(TypeError, operator.contains) + self.assertRaises(TypeError, operator.contains, None, None) + self.assertTrue(operator.contains(range(4), 2)) + self.assertFalse(operator.contains(range(4), 5)) + self.assertTrue(operator.sequenceIncludes(range(4), 2)) + self.assertFalse(operator.sequenceIncludes(range(4), 5)) def test_setitem(self): a = range(3) - self.failUnlessRaises(TypeError, operator.setitem, a) - self.failUnlessRaises(TypeError, operator.setitem, a, None, None) - self.failUnless(operator.setitem(a, 0, 2) is None) - self.assert_(a == [2, 1, 2]) + self.assertRaises(TypeError, operator.setitem, a) + self.assertRaises(TypeError, operator.setitem, a, None, None) + self.assertTrue(operator.setitem(a, 0, 2) is None) + self.assertTrue(a == [2, 1, 2]) self.assertRaises(IndexError, operator.setitem, a, 4, 2) def test_setslice(self): a = range(4) - self.failUnlessRaises(TypeError, operator.setslice, a) - self.failUnlessRaises(TypeError, operator.setslice, a, None, None, None) - self.failUnless(operator.setslice(a, 1, 3, [2, 1]) is None) - self.assert_(a == [0, 2, 1, 3]) + self.assertRaises(TypeError, operator.setslice, a) + self.assertRaises(TypeError, operator.setslice, a, None, None, None) + self.assertTrue(operator.setslice(a, 1, 3, [2, 1]) is None) + self.assertTrue(a == [0, 2, 1, 3]) operator.setslice(a, 0, test_support.MAX_Py_ssize_t, []) - self.assert_(a == []) + self.assertTrue(a == []) def test_sub(self): - self.failUnlessRaises(TypeError, operator.sub) - self.failUnlessRaises(TypeError, operator.sub, None, None) - self.failUnless(operator.sub(5, 2) == 3) + self.assertRaises(TypeError, operator.sub) + self.assertRaises(TypeError, operator.sub, None, None) + self.assertTrue(operator.sub(5, 2) == 3) def test_truth(self): class C(object): def __nonzero__(self): raise SyntaxError - self.failUnlessRaises(TypeError, operator.truth) - self.failUnlessRaises(SyntaxError, operator.truth, C()) - self.failUnless(operator.truth(5)) - self.failUnless(operator.truth([0])) - self.failIf(operator.truth(0)) - self.failIf(operator.truth([])) + self.assertRaises(TypeError, operator.truth) + self.assertRaises(SyntaxError, operator.truth, C()) + self.assertTrue(operator.truth(5)) + self.assertTrue(operator.truth([0])) + self.assertFalse(operator.truth(0)) + self.assertFalse(operator.truth([])) def test_bitwise_xor(self): - self.failUnlessRaises(TypeError, operator.xor) - self.failUnlessRaises(TypeError, operator.xor, None, None) - self.failUnless(operator.xor(0xb, 0xc) == 0x7) + self.assertRaises(TypeError, operator.xor) + self.assertRaises(TypeError, operator.xor, None, None) + self.assertTrue(operator.xor(0xb, 0xc) == 0x7) def test_is(self): a = b = 'xyzpdq' c = a[:3] + b[3:] - self.failUnlessRaises(TypeError, operator.is_) - self.failUnless(operator.is_(a, b)) - self.failIf(operator.is_(a,c)) + self.assertRaises(TypeError, operator.is_) + self.assertTrue(operator.is_(a, b)) + self.assertFalse(operator.is_(a,c)) def test_is_not(self): a = b = 'xyzpdq' c = a[:3] + b[3:] - self.failUnlessRaises(TypeError, operator.is_not) - self.failIf(operator.is_not(a, b)) - self.failUnless(operator.is_not(a,c)) + self.assertRaises(TypeError, operator.is_not) + self.assertFalse(operator.is_not(a, b)) + self.assertTrue(operator.is_not(a,c)) def test_attrgetter(self): class A: @@ -385,7 +385,7 @@ class C(object): def __getattr__(self, name): raise SyntaxError - self.failUnlessRaises(SyntaxError, operator.attrgetter('foo'), C()) + self.assertRaises(SyntaxError, operator.attrgetter('foo'), C()) # recursive gets a = A() @@ -417,7 +417,7 @@ class C(object): def __getitem__(self, name): raise SyntaxError - self.failUnlessRaises(SyntaxError, operator.itemgetter(42), C()) + self.assertRaises(SyntaxError, operator.itemgetter(42), C()) f = operator.itemgetter('name') self.assertRaises(TypeError, f, a) Modified: python/trunk/Lib/test/test_optparse.py ============================================================================== --- python/trunk/Lib/test/test_optparse.py (original) +++ python/trunk/Lib/test/test_optparse.py Wed Jul 1 00:57:08 2009 @@ -116,7 +116,7 @@ except expected_exception, err: actual_message = str(err) if isinstance(expected_message, retype): - self.assert_(expected_message.search(actual_message), + self.assertTrue(expected_message.search(actual_message), """\ expected exception message pattern: /%s/ @@ -175,7 +175,7 @@ sys.stdout = save_stdout except InterceptedError, err: - self.assert_( + self.assertTrue( type(output) is types.StringType, "expected output to be an ordinary string, not %r" % type(output)) @@ -348,7 +348,7 @@ def test_get_option(self): opt1 = self.parser.get_option("-v") - self.assert_(isinstance(opt1, Option)) + self.assertTrue(isinstance(opt1, Option)) self.assertEqual(opt1._short_opts, ["-v", "-n"]) self.assertEqual(opt1._long_opts, ["--verbose", "--noisy"]) self.assertEqual(opt1.action, "store_true") @@ -359,33 +359,33 @@ opt2 = self.parser.get_option("--verbose") opt3 = self.parser.get_option("-n") opt4 = self.parser.get_option("--noisy") - self.assert_(opt1 is opt2 is opt3 is opt4) + self.assertTrue(opt1 is opt2 is opt3 is opt4) def test_has_option(self): - self.assert_(self.parser.has_option("-v")) - self.assert_(self.parser.has_option("--verbose")) + self.assertTrue(self.parser.has_option("-v")) + self.assertTrue(self.parser.has_option("--verbose")) - def assert_removed(self): - self.assert_(self.parser.get_option("-v") is None) - self.assert_(self.parser.get_option("--verbose") is None) - self.assert_(self.parser.get_option("-n") is None) - self.assert_(self.parser.get_option("--noisy") is None) - - self.failIf(self.parser.has_option("-v")) - self.failIf(self.parser.has_option("--verbose")) - self.failIf(self.parser.has_option("-n")) - self.failIf(self.parser.has_option("--noisy")) + def assertTrueremoved(self): + self.assertTrue(self.parser.get_option("-v") is None) + self.assertTrue(self.parser.get_option("--verbose") is None) + self.assertTrue(self.parser.get_option("-n") is None) + self.assertTrue(self.parser.get_option("--noisy") is None) + + self.assertFalse(self.parser.has_option("-v")) + self.assertFalse(self.parser.has_option("--verbose")) + self.assertFalse(self.parser.has_option("-n")) + self.assertFalse(self.parser.has_option("--noisy")) - self.assert_(self.parser.has_option("-q")) - self.assert_(self.parser.has_option("--silent")) + self.assertTrue(self.parser.has_option("-q")) + self.assertTrue(self.parser.has_option("--silent")) def test_remove_short_opt(self): self.parser.remove_option("-n") - self.assert_removed() + self.assertTrueremoved() def test_remove_long_opt(self): self.parser.remove_option("--verbose") - self.assert_removed() + self.assertTrueremoved() def test_remove_nonexistent(self): self.assertRaises(self.parser.remove_option, ('foo',), None, @@ -795,14 +795,14 @@ {'verbose': 0}, []) if hasattr(__builtins__, 'False'): - self.failUnless(options.verbose is False) + self.assertTrue(options.verbose is False) def test_bool_true(self): (options, args) = self.assertParseOK(["-v"], {'verbose': 1}, []) if hasattr(__builtins__, 'True'): - self.failUnless(options.verbose is True) + self.assertTrue(options.verbose is True) def test_bool_flicker_on_and_off(self): self.assertParseOK(["-qvq", "-q", "-v"], @@ -1008,7 +1008,7 @@ description="Some more options") group.set_title("Bacon") group.add_option("--bacon", type="int") - self.assert_(self.parser.get_option_group("--bacon"), group) + self.assertTrue(self.parser.get_option_group("--bacon"), group) # -- Test extending and parser.parse_args() ---------------------------- @@ -1104,15 +1104,15 @@ if opt == "-x": self.assertEqual(option._short_opts, ["-x"]) self.assertEqual(option._long_opts, []) - self.assert_(parser_ is self.parser) - self.assert_(value is None) + self.assertTrue(parser_ is self.parser) + self.assertTrue(value is None) self.assertEqual(vars(parser_.values), {'filename': None}) parser_.values.x = 42 elif opt == "--file": self.assertEqual(option._short_opts, ["-f"]) self.assertEqual(option._long_opts, ["--file"]) - self.assert_(parser_ is self.parser) + self.assertTrue(parser_ is self.parser) self.assertEqual(value, "foo") self.assertEqual(vars(parser_.values), {'filename': None, 'x': 42}) @@ -1150,7 +1150,7 @@ def process_tuple(self, option, opt, value, parser_, len, type): self.assertEqual(len, 3) - self.assert_(type is int) + self.assertTrue(type is int) if opt == "-p": self.assertEqual(value, "1,2,3") @@ -1241,7 +1241,7 @@ option_list=options) def variable_args(self, option, opt, value, parser): - self.assert_(value is None) + self.assertTrue(value is None) done = 0 value = [] rargs = parser.rargs @@ -1297,7 +1297,7 @@ class TestConflict(ConflictBase): """Use the default conflict resolution for Optik 1.2: error.""" - def assert_conflict_error(self, func): + def assertTrueconflict_error(self, func): err = self.assertRaises( func, ("-v", "--version"), {'action' : "callback", 'callback' : self.show_version, @@ -1309,11 +1309,11 @@ self.assertEqual(err.option_id, "-v/--version") def test_conflict_error(self): - self.assert_conflict_error(self.parser.add_option) + self.assertTrueconflict_error(self.parser.add_option) def test_conflict_error_group(self): group = OptionGroup(self.parser, "Group 1") - self.assert_conflict_error(group.add_option) + self.assertTrueconflict_error(group.add_option) def test_no_such_conflict_handler(self): self.assertRaises( @@ -1333,8 +1333,8 @@ verbose_opt = self.parser.get_option("--verbose") version_opt = self.parser.get_option("--version") - self.assert_(v_opt is version_opt) - self.assert_(v_opt is not verbose_opt) + self.assertTrue(v_opt is version_opt) + self.assertTrue(v_opt is not verbose_opt) self.assertEqual(v_opt._long_opts, ["--version"]) self.assertEqual(version_opt._short_opts, ["-v"]) self.assertEqual(version_opt._long_opts, ["--version"]) Modified: python/trunk/Lib/test/test_os.py ============================================================================== --- python/trunk/Lib/test/test_os.py (original) +++ python/trunk/Lib/test/test_os.py Wed Jul 1 00:57:08 2009 @@ -22,7 +22,7 @@ def test_access(self): f = os.open(test_support.TESTFN, os.O_CREAT|os.O_RDWR) os.close(f) - self.assert_(os.access(test_support.TESTFN, os.W_OK)) + self.assertTrue(os.access(test_support.TESTFN, os.W_OK)) def test_closerange(self): first = os.open(test_support.TESTFN, os.O_CREAT|os.O_RDWR) @@ -65,7 +65,7 @@ def check_tempfile(self, name): # make sure it doesn't already exist: - self.failIf(os.path.exists(name), + self.assertFalse(os.path.exists(name), "file already exists for temporary file") # make sure we can create the file open(name, "w") @@ -82,7 +82,7 @@ self.check_tempfile(name) name = os.tempnam(test_support.TESTFN, "pfx") - self.assert_(os.path.basename(name)[:3] == "pfx") + self.assertTrue(os.path.basename(name)[:3] == "pfx") self.check_tempfile(name) def test_tmpfile(self): @@ -131,7 +131,7 @@ fp.seek(0,0) s = fp.read() fp.close() - self.assert_(s == "foobar") + self.assertTrue(s == "foobar") def test_tmpnam(self): import sys @@ -156,7 +156,7 @@ # the root of the current drive. That's a terrible place to # put temp files, and, depending on privileges, the user # may not even be able to open a file in the root directory. - self.failIf(os.path.exists(name), + self.assertFalse(os.path.exists(name), "file already exists for temporary file") else: self.check_tempfile(name) @@ -198,7 +198,7 @@ def trunc(x): return x self.assertEquals(trunc(getattr(result, attr)), result[getattr(stat, name)]) - self.assert_(attr in members) + self.assertTrue(attr in members) try: result[200] @@ -464,7 +464,7 @@ os.makedirs(path) # Try paths with a '.' in them - self.failUnlessRaises(OSError, os.makedirs, os.curdir) + self.assertRaises(OSError, os.makedirs, os.curdir) path = os.path.join(base, 'dir1', 'dir2', 'dir3', 'dir4', 'dir5', os.curdir) os.makedirs(path) path = os.path.join(base, 'dir1', os.curdir, 'dir2', 'dir3', 'dir4', Modified: python/trunk/Lib/test/test_ossaudiodev.py ============================================================================== --- python/trunk/Lib/test/test_ossaudiodev.py (original) +++ python/trunk/Lib/test/test_ossaudiodev.py Wed Jul 1 00:57:08 2009 @@ -57,7 +57,7 @@ dsp.fileno() # Make sure the read-only attributes work. - self.failIf(dsp.closed) + self.assertFalse(dsp.closed) self.assertEqual(dsp.name, "/dev/dsp") self.assertEqual(dsp.mode, "w", "bad dsp.mode: %r" % dsp.mode) @@ -83,7 +83,7 @@ elapsed_time = t2 - t1 percent_diff = (abs(elapsed_time - expected_time) / expected_time) * 100 - self.failUnless(percent_diff <= 10.0, + self.assertTrue(percent_diff <= 10.0, "elapsed time > 10% off of expected time") def set_parameters(self, dsp): @@ -131,7 +131,7 @@ ]: (fmt, channels, rate) = config result = dsp.setparameters(fmt, channels, rate, False) - self.failIfEqual(result, config, + self.assertNotEqual(result, config, "unexpectedly got requested configuration") try: @@ -155,7 +155,7 @@ #self.set_bad_parameters(dsp) finally: dsp.close() - self.failUnless(dsp.closed) + self.assertTrue(dsp.closed) def test_main(): Modified: python/trunk/Lib/test/test_peepholer.py ============================================================================== --- python/trunk/Lib/test/test_peepholer.py (original) +++ python/trunk/Lib/test/test_peepholer.py Wed Jul 1 00:57:08 2009 @@ -25,8 +25,8 @@ del x asm = disassemble(unot) for elem in ('UNARY_NOT', 'POP_JUMP_IF_FALSE'): - self.assert_(elem not in asm) - self.assert_('POP_JUMP_IF_TRUE' in asm) + self.assertTrue(elem not in asm) + self.assertTrue('POP_JUMP_IF_TRUE' in asm) def test_elim_inversion_of_is_or_in(self): for line, elem in ( @@ -36,7 +36,7 @@ ('not a not in b', '(in)',), ): asm = dis_single(line) - self.assert_(elem in asm) + self.assertTrue(elem in asm) def test_none_as_constant(self): # LOAD_GLOBAL None --> LOAD_CONST None @@ -45,14 +45,14 @@ return x asm = disassemble(f) for elem in ('LOAD_GLOBAL',): - self.assert_(elem not in asm) + self.assertTrue(elem not in asm) for elem in ('LOAD_CONST', '(None)'): - self.assert_(elem in asm) + self.assertTrue(elem in asm) def f(): 'Adding a docstring made this test fail in Py2.5.0' return None - self.assert_('LOAD_CONST' in disassemble(f)) - self.assert_('LOAD_GLOBAL' not in disassemble(f)) + self.assertTrue('LOAD_CONST' in disassemble(f)) + self.assertTrue('LOAD_GLOBAL' not in disassemble(f)) def test_while_one(self): # Skip over: LOAD_CONST trueconst POP_JUMP_IF_FALSE xx @@ -62,9 +62,9 @@ return list asm = disassemble(f) for elem in ('LOAD_CONST', 'POP_JUMP_IF_FALSE'): - self.assert_(elem not in asm) + self.assertTrue(elem not in asm) for elem in ('JUMP_ABSOLUTE',): - self.assert_(elem in asm) + self.assertTrue(elem in asm) def test_pack_unpack(self): for line, elem in ( @@ -73,9 +73,9 @@ ('a, b, c = a, b, c', 'ROT_THREE',), ): asm = dis_single(line) - self.assert_(elem in asm) - self.assert_('BUILD_TUPLE' not in asm) - self.assert_('UNPACK_TUPLE' not in asm) + self.assertTrue(elem in asm) + self.assertTrue('BUILD_TUPLE' not in asm) + self.assertTrue('UNPACK_TUPLE' not in asm) def test_folding_of_tuples_of_constants(self): for line, elem in ( @@ -86,8 +86,8 @@ ('((1, 2), 3, 4)', '(((1, 2), 3, 4))'), ): asm = dis_single(line) - self.assert_(elem in asm) - self.assert_('BUILD_TUPLE' not in asm) + self.assertTrue(elem in asm) + self.assertTrue('BUILD_TUPLE' not in asm) # Bug 1053819: Tuple of constants misidentified when presented with: # . . . opcode_with_arg 100 unary_opcode BUILD_TUPLE 1 . . . @@ -125,17 +125,17 @@ ('a = 13 | 7', '(15)'), # binary or ): asm = dis_single(line) - self.assert_(elem in asm, asm) - self.assert_('BINARY_' not in asm) + self.assertTrue(elem in asm, asm) + self.assertTrue('BINARY_' not in asm) # Verify that unfoldables are skipped asm = dis_single('a=2+"b"') - self.assert_('(2)' in asm) - self.assert_("('b')" in asm) + self.assertTrue('(2)' in asm) + self.assertTrue("('b')" in asm) # Verify that large sequences do not result from folding asm = dis_single('a="x"*1000') - self.assert_('(1000)' in asm) + self.assertTrue('(1000)' in asm) def test_folding_of_unaryops_on_constants(self): for line, elem in ( @@ -144,8 +144,8 @@ ('~-2', '(1)'), # unary invert ): asm = dis_single(line) - self.assert_(elem in asm, asm) - self.assert_('UNARY_' not in asm) + self.assertTrue(elem in asm, asm) + self.assertTrue('UNARY_' not in asm) # Verify that unfoldables are skipped for line, elem in ( @@ -153,16 +153,16 @@ ('~"abc"', "('abc')"), # unary invert ): asm = dis_single(line) - self.assert_(elem in asm, asm) - self.assert_('UNARY_' in asm) + self.assertTrue(elem in asm, asm) + self.assertTrue('UNARY_' in asm) def test_elim_extra_return(self): # RETURN LOAD_CONST None RETURN --> RETURN def f(x): return x asm = disassemble(f) - self.assert_('LOAD_CONST' not in asm) - self.assert_('(None)' not in asm) + self.assertTrue('LOAD_CONST' not in asm) + self.assertTrue('(None)' not in asm) self.assertEqual(asm.split().count('RETURN_VALUE'), 1) def test_elim_jump_to_return(self): @@ -170,8 +170,8 @@ def f(cond, true_value, false_value): return true_value if cond else false_value asm = disassemble(f) - self.assert_('JUMP_FORWARD' not in asm) - self.assert_('JUMP_ABSOLUTE' not in asm) + self.assertTrue('JUMP_FORWARD' not in asm) + self.assertTrue('JUMP_ABSOLUTE' not in asm) self.assertEqual(asm.split().count('RETURN_VALUE'), 2) def test_elim_jump_after_return1(self): @@ -186,8 +186,8 @@ return 5 return 6 asm = disassemble(f) - self.assert_('JUMP_FORWARD' not in asm) - self.assert_('JUMP_ABSOLUTE' not in asm) + self.assertTrue('JUMP_FORWARD' not in asm) + self.assertTrue('JUMP_ABSOLUTE' not in asm) self.assertEqual(asm.split().count('RETURN_VALUE'), 6) def test_elim_jump_after_return2(self): @@ -196,7 +196,7 @@ while 1: if cond1: return 4 asm = disassemble(f) - self.assert_('JUMP_FORWARD' not in asm) + self.assertTrue('JUMP_FORWARD' not in asm) # There should be one jump for the while loop. self.assertEqual(asm.split().count('JUMP_ABSOLUTE'), 1) self.assertEqual(asm.split().count('RETURN_VALUE'), 2) Modified: python/trunk/Lib/test/test_pep247.py ============================================================================== --- python/trunk/Lib/test/test_pep247.py (original) +++ python/trunk/Lib/test/test_pep247.py Wed Jul 1 00:57:08 2009 @@ -19,8 +19,8 @@ class Pep247Test(unittest.TestCase): def check_module(self, module, key=None): - self.assert_(hasattr(module, 'digest_size')) - self.assert_(module.digest_size is None or module.digest_size > 0) + self.assertTrue(hasattr(module, 'digest_size')) + self.assertTrue(module.digest_size is None or module.digest_size > 0) if not key is None: obj1 = module.new(key) @@ -41,7 +41,7 @@ self.assertEquals(h1, h2) - self.assert_(hasattr(obj1, 'digest_size')) + self.assertTrue(hasattr(obj1, 'digest_size')) if not module.digest_size is None: self.assertEquals(obj1.digest_size, module.digest_size) Modified: python/trunk/Lib/test/test_pep277.py ============================================================================== --- python/trunk/Lib/test/test_pep277.py (original) +++ python/trunk/Lib/test/test_pep277.py Wed Jul 1 00:57:08 2009 @@ -82,8 +82,8 @@ sys.getfilesystemencoding())) sf2 = set(u"\\".join((unicode(test_support.TESTFN), f)) for f in f2) - self.failUnlessEqual(len(f1), len(self.files)) - self.failUnlessEqual(sf2, set(self.files)) + self.assertEqual(len(f1), len(self.files)) + self.assertEqual(sf2, set(self.files)) def test_rename(self): for name in self.files: Modified: python/trunk/Lib/test/test_pep352.py ============================================================================== --- python/trunk/Lib/test/test_pep352.py (original) +++ python/trunk/Lib/test/test_pep352.py Wed Jul 1 00:57:08 2009 @@ -19,7 +19,7 @@ inheritance hierarchy)""" def test_builtins_new_style(self): - self.failUnless(issubclass(Exception, object)) + self.assertTrue(issubclass(Exception, object)) def verify_instance_interface(self, ins): with warnings.catch_warnings(): @@ -41,7 +41,7 @@ last_exc = getattr(__builtin__, superclass_name) except AttributeError: self.fail("base class %s not a built-in" % superclass_name) - self.failUnless(superclass_name in exc_set) + self.assertTrue(superclass_name in exc_set) exc_set.discard(superclass_name) superclasses = [] # Loop will insert base exception last_depth = 0 @@ -68,20 +68,20 @@ elif last_depth > depth: while superclasses[-1][0] >= depth: superclasses.pop() - self.failUnless(issubclass(exc, superclasses[-1][1]), + self.assertTrue(issubclass(exc, superclasses[-1][1]), "%s is not a subclass of %s" % (exc.__name__, superclasses[-1][1].__name__)) try: # Some exceptions require arguments; just skip them self.verify_instance_interface(exc()) except TypeError: pass - self.failUnless(exc_name in exc_set) + self.assertTrue(exc_name in exc_set) exc_set.discard(exc_name) last_exc = exc last_depth = depth finally: inheritance_tree.close() - self.failUnlessEqual(len(exc_set), 0, "%s not accounted for" % exc_set) + self.assertEqual(len(exc_set), 0, "%s not accounted for" % exc_set) interface_tests = ("length", "args", "message", "str", "unicode", "repr", "indexing") Modified: python/trunk/Lib/test/test_pkg.py ============================================================================== --- python/trunk/Lib/test/test_pkg.py (original) +++ python/trunk/Lib/test/test_pkg.py Wed Jul 1 00:57:08 2009 @@ -126,7 +126,7 @@ self.assertEqual(subsub.__name__, "t2.sub.subsub") self.assertEqual(sub.subsub.__name__, "t2.sub.subsub") for name in ['spam', 'sub', 'subsub', 't2']: - self.failUnless(locals()["name"], "Failed to import %s" % name) + self.assertTrue(locals()["name"], "Failed to import %s" % name) import t2.sub import t2.sub.subsub @@ -136,7 +136,7 @@ s = """ from t2 import * - self.failUnless(dir(), ['self', 'sub']) + self.assertTrue(dir(), ['self', 'sub']) """ self.run_code(s) @@ -254,25 +254,25 @@ self.assertEqual(fixdir(dir(tas)), ['__doc__', '__file__', '__name__', '__package__', '__path__']) - self.failIf(t7) + self.assertFalse(t7) from t7 import sub as subpar self.assertEqual(fixdir(dir(subpar)), ['__doc__', '__file__', '__name__', '__package__', '__path__']) - self.failIf(t7) - self.failIf(sub) + self.assertFalse(t7) + self.assertFalse(sub) from t7.sub import subsub as subsubsub self.assertEqual(fixdir(dir(subsubsub)), ['__doc__', '__file__', '__name__', '__package__', '__path__', 'spam']) - self.failIf(t7) - self.failIf(sub) - self.failIf(subsub) + self.assertFalse(t7) + self.assertFalse(sub) + self.assertFalse(subsub) from t7.sub.subsub import spam as ham self.assertEqual(ham, 1) - self.failIf(t7) - self.failIf(sub) - self.failIf(subsub) + self.assertFalse(t7) + self.assertFalse(sub) + self.assertFalse(subsub) def test_main(): Modified: python/trunk/Lib/test/test_pkgimport.py ============================================================================== --- python/trunk/Lib/test/test_pkgimport.py (original) +++ python/trunk/Lib/test/test_pkgimport.py Wed Jul 1 00:57:08 2009 @@ -52,7 +52,7 @@ try: __import__(self.module_name) except SyntaxError: pass else: raise RuntimeError, 'Failed to induce SyntaxError' - self.assert_(not sys.modules.has_key(self.module_name) and + self.assertTrue(not sys.modules.has_key(self.module_name) and not hasattr(sys.modules[self.package_name], 'foo')) # ...make up a variable name that isn't bound in __builtins__ Modified: python/trunk/Lib/test/test_platform.py ============================================================================== --- python/trunk/Lib/test/test_platform.py (original) +++ python/trunk/Lib/test/test_platform.py Wed Jul 1 00:57:08 2009 @@ -125,12 +125,12 @@ def test_uname(self): res = platform.uname() - self.assert_(any(res)) + self.assertTrue(any(res)) def test_java_ver(self): res = platform.java_ver() if sys.platform == 'java': - self.assert_(all(res)) + self.assertTrue(all(res)) def test_win32_ver(self): res = platform.win32_ver() @@ -155,7 +155,7 @@ real_ver = ln.strip().split()[-1] break fd.close() - self.failIf(real_ver is None) + self.assertFalse(real_ver is None) self.assertEquals(res[0], real_ver) # res[1] claims to contain Modified: python/trunk/Lib/test/test_poplib.py ============================================================================== --- python/trunk/Lib/test/test_poplib.py (original) +++ python/trunk/Lib/test/test_poplib.py Wed Jul 1 00:57:08 2009 @@ -246,7 +246,7 @@ self.client = poplib.POP3_SSL(self.server.host, self.server.port) def test__all__(self): - self.assert_('POP3_SSL' in poplib.__all__) + self.assertTrue('POP3_SSL' in poplib.__all__) class TestTimeouts(TestCase): Modified: python/trunk/Lib/test/test_posix.py ============================================================================== --- python/trunk/Lib/test/test_posix.py (original) +++ python/trunk/Lib/test/test_posix.py Wed Jul 1 00:57:08 2009 @@ -43,13 +43,13 @@ def test_statvfs(self): if hasattr(posix, 'statvfs'): - self.assert_(posix.statvfs(os.curdir)) + self.assertTrue(posix.statvfs(os.curdir)) def test_fstatvfs(self): if hasattr(posix, 'fstatvfs'): fp = open(test_support.TESTFN) try: - self.assert_(posix.fstatvfs(fp.fileno())) + self.assertTrue(posix.fstatvfs(fp.fileno())) finally: fp.close() @@ -69,7 +69,7 @@ fp = open(test_support.TESTFN) try: fd = posix.dup(fp.fileno()) - self.assert_(isinstance(fd, int)) + self.assertTrue(isinstance(fd, int)) os.close(fd) finally: fp.close() @@ -135,13 +135,13 @@ if hasattr(posix, 'fstat'): fp = open(test_support.TESTFN) try: - self.assert_(posix.fstat(fp.fileno())) + self.assertTrue(posix.fstat(fp.fileno())) finally: fp.close() def test_stat(self): if hasattr(posix, 'stat'): - self.assert_(posix.stat(test_support.TESTFN)) + self.assertTrue(posix.stat(test_support.TESTFN)) if hasattr(posix, 'chown'): def test_chown(self): @@ -177,21 +177,21 @@ def test_lsdir(self): if hasattr(posix, 'lsdir'): - self.assert_(test_support.TESTFN in posix.lsdir(os.curdir)) + self.assertTrue(test_support.TESTFN in posix.lsdir(os.curdir)) def test_access(self): if hasattr(posix, 'access'): - self.assert_(posix.access(test_support.TESTFN, os.R_OK)) + self.assertTrue(posix.access(test_support.TESTFN, os.R_OK)) def test_umask(self): if hasattr(posix, 'umask'): old_mask = posix.umask(0) - self.assert_(isinstance(old_mask, int)) + self.assertTrue(isinstance(old_mask, int)) posix.umask(old_mask) def test_strerror(self): if hasattr(posix, 'strerror'): - self.assert_(posix.strerror(0)) + self.assertTrue(posix.strerror(0)) def test_pipe(self): if hasattr(posix, 'pipe'): @@ -201,9 +201,9 @@ def test_tempnam(self): if hasattr(posix, 'tempnam'): - self.assert_(posix.tempnam()) - self.assert_(posix.tempnam(os.curdir)) - self.assert_(posix.tempnam(os.curdir, 'blah')) + self.assertTrue(posix.tempnam()) + self.assertTrue(posix.tempnam(os.curdir)) + self.assertTrue(posix.tempnam(os.curdir, 'blah')) def test_tmpfile(self): if hasattr(posix, 'tmpfile'): Modified: python/trunk/Lib/test/test_posixpath.py ============================================================================== --- python/trunk/Lib/test/test_posixpath.py (original) +++ python/trunk/Lib/test/test_posixpath.py Wed Jul 1 00:57:08 2009 @@ -26,7 +26,7 @@ safe_rmdir(test_support.TESTFN + suffix) def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def test_normcase(self): # Check that normcase() is idempotent @@ -134,8 +134,8 @@ for s1 in testlist: for s2 in testlist: p = posixpath.commonprefix([s1, s2]) - self.assert_(s1.startswith(p)) - self.assert_(s2.startswith(p)) + self.assertTrue(s1.startswith(p)) + self.assertTrue(s2.startswith(p)) if s1 != s2: n = len(p) self.assertNotEqual(s1[n:n+1], s2[n:n+1]) @@ -163,7 +163,7 @@ f.close() self.assertEqual(d, "foobar") - self.assert_( + self.assertTrue( posixpath.getctime(test_support.TESTFN) <= posixpath.getmtime(test_support.TESTFN) ) @@ -335,15 +335,15 @@ except ImportError: pass else: - self.assert_(isinstance(posixpath.expanduser("~/"), basestring)) + self.assertTrue(isinstance(posixpath.expanduser("~/"), basestring)) # if home directory == root directory, this test makes no sense if posixpath.expanduser("~") != '/': self.assertEqual( posixpath.expanduser("~") + "/", posixpath.expanduser("~/") ) - self.assert_(isinstance(posixpath.expanduser("~root/"), basestring)) - self.assert_(isinstance(posixpath.expanduser("~foo/"), basestring)) + self.assertTrue(isinstance(posixpath.expanduser("~root/"), basestring)) + self.assertTrue(isinstance(posixpath.expanduser("~foo/"), basestring)) with test_support.EnvironmentVarGuard() as env: env['HOME'] = '/' @@ -384,12 +384,12 @@ self.assertRaises(TypeError, posixpath.normpath) def test_abspath(self): - self.assert_("foo" in posixpath.abspath("foo")) + self.assertTrue("foo" in posixpath.abspath("foo")) self.assertRaises(TypeError, posixpath.abspath) def test_realpath(self): - self.assert_("foo" in realpath("foo")) + self.assertTrue("foo" in realpath("foo")) self.assertRaises(TypeError, posixpath.realpath) if hasattr(os, "symlink"): Modified: python/trunk/Lib/test/test_pprint.py ============================================================================== --- python/trunk/Lib/test/test_pprint.py (original) +++ python/trunk/Lib/test/test_pprint.py Wed Jul 1 00:57:08 2009 @@ -40,7 +40,7 @@ def test_basic(self): # Verify .isrecursive() and .isreadable() w/o recursion - verify = self.assert_ + verify = self.assertTrue pp = pprint.PrettyPrinter() for safe in (2, 2.0, 2j, "abc", [3], (2,2), {3: 3}, uni("yaddayadda"), self.a, self.b): @@ -63,7 +63,7 @@ self.d = {} self.d[0] = self.d[1] = self.d[2] = self.d - verify = self.assert_ + verify = self.assertTrue pp = pprint.PrettyPrinter() for icky in self.a, self.b, self.d, (self.d, self.d): @@ -91,7 +91,7 @@ def test_unreadable(self): # Not recursive but not readable anyway - verify = self.assert_ + verify = self.assertTrue pp = pprint.PrettyPrinter() for unreadable in type(3), pprint, pprint.isrecursive: # module-level convenience functions @@ -114,7 +114,7 @@ # it sorted a dict display if and only if the display required # multiple lines. For that reason, dicts with more than one element # aren't tested here. - verify = self.assert_ + verify = self.assertTrue for simple in (0, 0L, 0+0j, 0.0, "", uni(""), (), tuple2(), tuple3(), [], list2(), list3(), Modified: python/trunk/Lib/test/test_property.py ============================================================================== --- python/trunk/Lib/test/test_property.py (original) +++ python/trunk/Lib/test/test_property.py Wed Jul 1 00:57:08 2009 @@ -86,8 +86,8 @@ self.assertEqual(base.spam, 10) self.assertEqual(base._spam, 10) delattr(base, "spam") - self.assert_(not hasattr(base, "spam")) - self.assert_(not hasattr(base, "_spam")) + self.assertTrue(not hasattr(base, "spam")) + self.assertTrue(not hasattr(base, "_spam")) base.spam = 20 self.assertEqual(base.spam, 20) self.assertEqual(base._spam, 20) Modified: python/trunk/Lib/test/test_pwd.py ============================================================================== --- python/trunk/Lib/test/test_pwd.py (original) +++ python/trunk/Lib/test/test_pwd.py Wed Jul 1 00:57:08 2009 @@ -13,19 +13,19 @@ for e in entries: self.assertEqual(len(e), 7) self.assertEqual(e[0], e.pw_name) - self.assert_(isinstance(e.pw_name, basestring)) + self.assertTrue(isinstance(e.pw_name, basestring)) self.assertEqual(e[1], e.pw_passwd) - self.assert_(isinstance(e.pw_passwd, basestring)) + self.assertTrue(isinstance(e.pw_passwd, basestring)) self.assertEqual(e[2], e.pw_uid) - self.assert_(isinstance(e.pw_uid, int)) + self.assertTrue(isinstance(e.pw_uid, int)) self.assertEqual(e[3], e.pw_gid) - self.assert_(isinstance(e.pw_gid, int)) + self.assertTrue(isinstance(e.pw_gid, int)) self.assertEqual(e[4], e.pw_gecos) - self.assert_(isinstance(e.pw_gecos, basestring)) + self.assertTrue(isinstance(e.pw_gecos, basestring)) self.assertEqual(e[5], e.pw_dir) - self.assert_(isinstance(e.pw_dir, basestring)) + self.assertTrue(isinstance(e.pw_dir, basestring)) self.assertEqual(e[6], e.pw_shell) - self.assert_(isinstance(e.pw_shell, basestring)) + self.assertTrue(isinstance(e.pw_shell, basestring)) # The following won't work, because of duplicate entries # for one uid @@ -43,8 +43,8 @@ for e in entries: if not e[0] or e[0] == '+': continue # skip NIS entries etc. - self.assert_(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name]) - self.assert_(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid]) + self.assertTrue(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name]) + self.assertTrue(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid]) def test_errors(self): self.assertRaises(TypeError, pwd.getpwuid) Modified: python/trunk/Lib/test/test_py3kwarn.py ============================================================================== --- python/trunk/Lib/test/test_py3kwarn.py (original) +++ python/trunk/Lib/test/test_py3kwarn.py Wed Jul 1 00:57:08 2009 @@ -317,7 +317,7 @@ try: __import__(module_name, level=0) except DeprecationWarning as exc: - self.assert_(module_name in exc.args[0], + self.assertTrue(module_name in exc.args[0], "%s warning didn't contain module name" % module_name) except ImportError: Modified: python/trunk/Lib/test/test_pyclbr.py ============================================================================== --- python/trunk/Lib/test/test_pyclbr.py (original) +++ python/trunk/Lib/test/test_pyclbr.py Wed Jul 1 00:57:08 2009 @@ -35,7 +35,7 @@ ''' succeed iff hasattr(obj,attr) or attr in ignore. ''' if attr in ignore: return if not hasattr(obj, attr): print "???", attr - self.failUnless(hasattr(obj, attr), + self.assertTrue(hasattr(obj, attr), 'expected hasattr(%r, %r)' % (obj, attr)) @@ -44,7 +44,7 @@ if key in ignore: return if not obj.has_key(key): print >>sys.stderr, "***",key - self.failUnless(obj.has_key(key)) + self.assertTrue(obj.has_key(key)) def assertEqualsOrIgnored(self, a, b, ignore): ''' succeed iff a == b or a in ignore or b in ignore ''' @@ -92,12 +92,12 @@ self.assertHasattr(module, name, ignore) py_item = getattr(module, name) if isinstance(value, pyclbr.Function): - self.assert_(isinstance(py_item, (FunctionType, BuiltinFunctionType))) + self.assertTrue(isinstance(py_item, (FunctionType, BuiltinFunctionType))) if py_item.__module__ != moduleName: continue # skip functions that came from somewhere else self.assertEquals(py_item.__module__, value.module) else: - self.failUnless(isinstance(py_item, (ClassType, type))) + self.assertTrue(isinstance(py_item, (ClassType, type))) if py_item.__module__ != moduleName: continue # skip classes that came from somewhere else Modified: python/trunk/Lib/test/test_pydoc.py ============================================================================== --- python/trunk/Lib/test/test_pydoc.py (original) +++ python/trunk/Lib/test/test_pydoc.py Wed Jul 1 00:57:08 2009 @@ -294,7 +294,7 @@ # Check that pydocfodder module can be described from test import pydocfodder doc = pydoc.render_doc(pydocfodder) - self.assert_("pydocfodder" in doc) + self.assertTrue("pydocfodder" in doc) def test_classic_class(self): class C: "Classic class" @@ -302,7 +302,7 @@ self.assertEqual(pydoc.describe(C), 'class C') self.assertEqual(pydoc.describe(c), 'instance of C') expected = 'instance of C in module %s' % __name__ - self.assert_(expected in pydoc.render_doc(c)) + self.assertTrue(expected in pydoc.render_doc(c)) def test_class(self): class C(object): "New-style class" @@ -311,7 +311,7 @@ self.assertEqual(pydoc.describe(C), 'class C') self.assertEqual(pydoc.describe(c), 'C') expected = 'C in module %s object' % __name__ - self.assert_(expected in pydoc.render_doc(c)) + self.assertTrue(expected in pydoc.render_doc(c)) def test_main(): Modified: python/trunk/Lib/test/test_queue.py ============================================================================== --- python/trunk/Lib/test/test_queue.py (original) +++ python/trunk/Lib/test/test_queue.py Wed Jul 1 00:57:08 2009 @@ -100,10 +100,10 @@ "Didn't seem to queue the correct data!") for i in range(QUEUE_SIZE-1): q.put(i) - self.assert_(not q.empty(), "Queue should not be empty") - self.assert_(not q.full(), "Queue should not be full") + self.assertTrue(not q.empty(), "Queue should not be empty") + self.assertTrue(not q.full(), "Queue should not be full") q.put("last") - self.assert_(q.full(), "Queue should be full") + self.assertTrue(q.full(), "Queue should be full") try: q.put("full", block=0) self.fail("Didn't appear to block with a full queue") @@ -120,7 +120,7 @@ # Empty it for i in range(QUEUE_SIZE): q.get() - self.assert_(q.empty(), "Queue should be empty") + self.assertTrue(q.empty(), "Queue should be empty") try: q.get(block=0) self.fail("Didn't appear to block with an empty queue") @@ -242,7 +242,7 @@ except FailingQueueException: pass q.put("last") - self.assert_(q.full(), "Queue should be full") + self.assertTrue(q.full(), "Queue should be full") # Test a failing blocking put q.fail_next_put = True try: @@ -264,17 +264,17 @@ # Check the Queue isn't damaged. # put failed, but get succeeded - re-add q.put("last") - self.assert_(q.full(), "Queue should be full") + self.assertTrue(q.full(), "Queue should be full") q.get() - self.assert_(not q.full(), "Queue should not be full") + self.assertTrue(not q.full(), "Queue should not be full") q.put("last") - self.assert_(q.full(), "Queue should be full") + self.assertTrue(q.full(), "Queue should be full") # Test a blocking put self.do_blocking_test(q.put, ("full",), q.get, ()) # Empty it for i in range(QUEUE_SIZE): q.get() - self.assert_(q.empty(), "Queue should be empty") + self.assertTrue(q.empty(), "Queue should be empty") q.put("first") q.fail_next_get = True try: @@ -282,16 +282,16 @@ self.fail("The queue didn't fail when it should have") except FailingQueueException: pass - self.assert_(not q.empty(), "Queue should not be empty") + self.assertTrue(not q.empty(), "Queue should not be empty") q.fail_next_get = True try: q.get(timeout=0.1) self.fail("The queue didn't fail when it should have") except FailingQueueException: pass - self.assert_(not q.empty(), "Queue should not be empty") + self.assertTrue(not q.empty(), "Queue should not be empty") q.get() - self.assert_(q.empty(), "Queue should be empty") + self.assertTrue(q.empty(), "Queue should be empty") q.fail_next_get = True try: self.do_exceptional_blocking_test(q.get, (), q.put, ('empty',), @@ -300,9 +300,9 @@ except FailingQueueException: pass # put succeeded, but get failed. - self.assert_(not q.empty(), "Queue should not be empty") + self.assertTrue(not q.empty(), "Queue should not be empty") q.get() - self.assert_(q.empty(), "Queue should be empty") + self.assertTrue(q.empty(), "Queue should be empty") def test_failing_queue(self): # Test to make sure a queue is functioning correctly. Modified: python/trunk/Lib/test/test_quopri.py ============================================================================== --- python/trunk/Lib/test/test_quopri.py (original) +++ python/trunk/Lib/test/test_quopri.py Wed Jul 1 00:57:08 2009 @@ -130,17 +130,17 @@ @withpythonimplementation def test_encodestring(self): for p, e in self.STRINGS: - self.assert_(quopri.encodestring(p) == e) + self.assertTrue(quopri.encodestring(p) == e) @withpythonimplementation def test_decodestring(self): for p, e in self.STRINGS: - self.assert_(quopri.decodestring(e) == p) + self.assertTrue(quopri.decodestring(e) == p) @withpythonimplementation def test_idempotent_string(self): for p, e in self.STRINGS: - self.assert_(quopri.decodestring(quopri.encodestring(e)) == e) + self.assertTrue(quopri.decodestring(quopri.encodestring(e)) == e) @withpythonimplementation def test_encode(self): @@ -148,7 +148,7 @@ infp = cStringIO.StringIO(p) outfp = cStringIO.StringIO() quopri.encode(infp, outfp, quotetabs=False) - self.assert_(outfp.getvalue() == e) + self.assertTrue(outfp.getvalue() == e) @withpythonimplementation def test_decode(self): @@ -156,23 +156,23 @@ infp = cStringIO.StringIO(e) outfp = cStringIO.StringIO() quopri.decode(infp, outfp) - self.assert_(outfp.getvalue() == p) + self.assertTrue(outfp.getvalue() == p) @withpythonimplementation def test_embedded_ws(self): for p, e in self.ESTRINGS: - self.assert_(quopri.encodestring(p, quotetabs=True) == e) - self.assert_(quopri.decodestring(e) == p) + self.assertTrue(quopri.encodestring(p, quotetabs=True) == e) + self.assertTrue(quopri.decodestring(e) == p) @withpythonimplementation def test_encode_header(self): for p, e in self.HSTRINGS: - self.assert_(quopri.encodestring(p, header=True) == e) + self.assertTrue(quopri.encodestring(p, header=True) == e) @withpythonimplementation def test_decode_header(self): for p, e in self.HSTRINGS: - self.assert_(quopri.decodestring(e, header=True) == p) + self.assertTrue(quopri.decodestring(e, header=True) == p) def test_scriptencode(self): (p, e) = self.STRINGS[-1] Modified: python/trunk/Lib/test/test_random.py ============================================================================== --- python/trunk/Lib/test/test_random.py (original) +++ python/trunk/Lib/test/test_random.py Wed Jul 1 00:57:08 2009 @@ -67,7 +67,7 @@ self.assertEqual(len(s), k) uniq = set(s) self.assertEqual(len(uniq), k) - self.failUnless(uniq <= set(population)) + self.assertTrue(uniq <= set(population)) self.assertEqual(self.gen.sample([], 0), []) # test edge case N==k==0 def test_sample_distribution(self): @@ -112,7 +112,7 @@ samp = self.gen.sample(d, k) # Verify that we got ints back (keys); the values are complex. for x in samp: - self.assert_(type(x) is int) + self.assertTrue(type(x) is int) samp.sort() self.assertEqual(samp, range(N)) @@ -237,7 +237,7 @@ cum = 0 for i in xrange(100): r = self.gen.randrange(span) - self.assert_(0 <= r < span) + self.assertTrue(0 <= r < span) cum |= r self.assertEqual(cum, span-1) @@ -247,7 +247,7 @@ stop = self.gen.randrange(2 ** (i-2)) if stop <= start: return - self.assert_(start <= self.gen.randrange(start, stop) < stop) + self.assertTrue(start <= self.gen.randrange(start, stop) < stop) def test_rangelimits(self): for start, stop in [(-2,0), (-(2**60)-2,-(2**60)), (2**60,2**60+2)]: @@ -257,7 +257,7 @@ def test_genrandbits(self): # Verify ranges for k in xrange(1, 1000): - self.assert_(0 <= self.gen.getrandbits(k) < 2**k) + self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k) # Verify all bits active getbits = self.gen.getrandbits @@ -283,17 +283,17 @@ numbits = i+1 k = int(1.00001 + _log(n, 2)) self.assertEqual(k, numbits) - self.assert_(n == 2**(k-1)) + self.assertTrue(n == 2**(k-1)) n += n - 1 # check 1 below the next power of two k = int(1.00001 + _log(n, 2)) - self.assert_(k in [numbits, numbits+1]) - self.assert_(2**k > n > 2**(k-2)) + self.assertTrue(k in [numbits, numbits+1]) + self.assertTrue(2**k > n > 2**(k-2)) n -= n >> 15 # check a little farther below the next power of two k = int(1.00001 + _log(n, 2)) self.assertEqual(k, numbits) # note the stronger assertion - self.assert_(2**k > n > 2**(k-1)) # note the stronger assertion + self.assertTrue(2**k > n > 2**(k-1)) # note the stronger assertion class MersenneTwister_TestBasicOps(TestBasicOps): @@ -389,7 +389,7 @@ cum = 0 for i in xrange(100): r = self.gen.randrange(span) - self.assert_(0 <= r < span) + self.assertTrue(0 <= r < span) cum |= r self.assertEqual(cum, span-1) @@ -399,7 +399,7 @@ stop = self.gen.randrange(2 ** (i-2)) if stop <= start: return - self.assert_(start <= self.gen.randrange(start, stop) < stop) + self.assertTrue(start <= self.gen.randrange(start, stop) < stop) def test_rangelimits(self): for start, stop in [(-2,0), (-(2**60)-2,-(2**60)), (2**60,2**60+2)]: @@ -413,7 +413,7 @@ 97904845777343510404718956115L) # Verify ranges for k in xrange(1, 1000): - self.assert_(0 <= self.gen.getrandbits(k) < 2**k) + self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k) # Verify all bits active getbits = self.gen.getrandbits @@ -439,24 +439,24 @@ numbits = i+1 k = int(1.00001 + _log(n, 2)) self.assertEqual(k, numbits) - self.assert_(n == 2**(k-1)) + self.assertTrue(n == 2**(k-1)) n += n - 1 # check 1 below the next power of two k = int(1.00001 + _log(n, 2)) - self.assert_(k in [numbits, numbits+1]) - self.assert_(2**k > n > 2**(k-2)) + self.assertTrue(k in [numbits, numbits+1]) + self.assertTrue(2**k > n > 2**(k-2)) n -= n >> 15 # check a little farther below the next power of two k = int(1.00001 + _log(n, 2)) self.assertEqual(k, numbits) # note the stronger assertion - self.assert_(2**k > n > 2**(k-1)) # note the stronger assertion + self.assertTrue(2**k > n > 2**(k-1)) # note the stronger assertion def test_randrange_bug_1590891(self): start = 1000000000000 stop = -100000000000000000000 step = -200 x = self.gen.randrange(start, stop, step) - self.assert_(stop < x <= start) + self.assertTrue(stop < x <= start) self.assertEqual((x+stop)%step, 0) def gamma(z, sqrt2pi=(2.0*pi)**0.5): @@ -534,7 +534,7 @@ def test__all__(self): # tests validity but not completeness of the __all__ list - self.failUnless(set(random.__all__) <= set(dir(random))) + self.assertTrue(set(random.__all__) <= set(dir(random))) def test_random_subclass_with_kwargs(self): # SF bug #1486663 -- this used to erroneously raise a TypeError Modified: python/trunk/Lib/test/test_re.py ============================================================================== --- python/trunk/Lib/test/test_re.py (original) +++ python/trunk/Lib/test/test_re.py Wed Jul 1 00:57:08 2009 @@ -609,7 +609,7 @@ unicode except NameError: return # no problem if we have no unicode - self.assert_(re.compile('bug_926075') is not + self.assertTrue(re.compile('bug_926075') is not re.compile(eval("u'bug_926075'"))) def test_bug_931848(self): Modified: python/trunk/Lib/test/test_repr.py ============================================================================== --- python/trunk/Lib/test/test_repr.py (original) +++ python/trunk/Lib/test/test_repr.py Wed Jul 1 00:57:08 2009 @@ -123,20 +123,20 @@ eq(r(i3), (""%id(i3))) s = r(ClassWithFailingRepr) - self.failUnless(s.startswith("")) - self.failUnless(s.find("...") == 8) + self.assertTrue(s.startswith("")) + self.assertTrue(s.find("...") == 8) def test_file(self): fp = open(unittest.__file__) - self.failUnless(repr(fp).startswith( + self.assertTrue(repr(fp).startswith( "') # Methods - self.failUnless(repr(''.split).startswith( + self.assertTrue(repr(''.split).startswith( '') # Bound method next iqux = qux.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() - self.failUnless(repr(iqux.amethod).startswith( + self.assertTrue(repr(iqux.amethod).startswith( '\n\ntest\n') - self.assert_(msg.get("to") == '"last, first" ') - self.assert_(msg.get("TO") == '"last, first" ') - self.assert_(msg.get("No-Such-Header") is None) - self.assert_(msg.get("No-Such-Header", "No-Such-Value") + self.assertTrue(msg.get("to") == '"last, first" ') + self.assertTrue(msg.get("TO") == '"last, first" ') + self.assertTrue(msg.get("No-Such-Header") is None) + self.assertTrue(msg.get("No-Such-Header", "No-Such-Value") == "No-Such-Value") def test_setdefault(self): msg = self.create_message( 'To: "last, first" \n\ntest\n') - self.assert_(not msg.has_key("New-Header")) - self.assert_(msg.setdefault("New-Header", "New-Value") == "New-Value") - self.assert_(msg.setdefault("New-Header", "Different-Value") + self.assertTrue(not msg.has_key("New-Header")) + self.assertTrue(msg.setdefault("New-Header", "New-Value") == "New-Value") + self.assertTrue(msg.setdefault("New-Header", "Different-Value") == "New-Value") - self.assert_(msg["new-header"] == "New-Value") + self.assertTrue(msg["new-header"] == "New-Value") - self.assert_(msg.setdefault("Another-Header") == "") - self.assert_(msg["another-header"] == "") + self.assertTrue(msg.setdefault("Another-Header") == "") + self.assertTrue(msg["another-header"] == "") def check(self, msg, results): """Check addresses and the date.""" Modified: python/trunk/Lib/test/test_richcmp.py ============================================================================== --- python/trunk/Lib/test/test_richcmp.py (original) +++ python/trunk/Lib/test/test_richcmp.py Wed Jul 1 00:57:08 2009 @@ -106,7 +106,7 @@ self.assertEqual(len(realres), len(expres)) for i in xrange(len(realres)): # results are bool, so we can use "is" here - self.assert_(realres[i] is expres[i]) + self.assertTrue(realres[i] is expres[i]) def test_mixed(self): # check that comparisons involving Vector objects @@ -163,7 +163,7 @@ for op in opmap[opname]: realres = op(ta, tb) realres = getattr(realres, "x", realres) - self.assert_(realres is expres) + self.assertTrue(realres is expres) def test_values(self): # check all operators and all comparison results @@ -239,8 +239,8 @@ b.append(17) # Even recursive lists of different lengths are different, # but they cannot be ordered - self.assert_(not (a == b)) - self.assert_(a != b) + self.assertTrue(not (a == b)) + self.assertTrue(a != b) self.assertRaises(RuntimeError, operator.lt, a, b) self.assertRaises(RuntimeError, operator.le, a, b) self.assertRaises(RuntimeError, operator.gt, a, b) @@ -250,9 +250,9 @@ self.assertRaises(RuntimeError, operator.ne, a, b) a.insert(0, 11) b.insert(0, 12) - self.assert_(not (a == b)) - self.assert_(a != b) - self.assert_(a < b) + self.assertTrue(not (a == b)) + self.assertTrue(a != b) + self.assertTrue(a < b) class DictTest(unittest.TestCase): @@ -271,10 +271,10 @@ imag1b[k] = v imag2 = imag1b.copy() imag2[k] = v + 1.0 - self.assert_(imag1a == imag1a) - self.assert_(imag1a == imag1b) - self.assert_(imag2 == imag2) - self.assert_(imag1a != imag2) + self.assertTrue(imag1a == imag1a) + self.assertTrue(imag1a == imag1b) + self.assertTrue(imag2 == imag2) + self.assertTrue(imag1a != imag2) for opname in ("lt", "le", "gt", "ge"): for op in opmap[opname]: self.assertRaises(TypeError, op, imag1a, imag2) @@ -282,7 +282,7 @@ class ListTest(unittest.TestCase): def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def test_coverage(self): # exercise all comparisons for lists Modified: python/trunk/Lib/test/test_robotparser.py ============================================================================== --- python/trunk/Lib/test/test_robotparser.py (original) +++ python/trunk/Lib/test/test_robotparser.py Wed Jul 1 00:57:08 2009 @@ -20,9 +20,9 @@ url = self.url agent = self.agent if self.good: - self.failUnless(self.parser.can_fetch(agent, url)) + self.assertTrue(self.parser.can_fetch(agent, url)) else: - self.failIf(self.parser.can_fetch(agent, url)) + self.assertFalse(self.parser.can_fetch(agent, url)) def __str__(self): return self.str Modified: python/trunk/Lib/test/test_runpy.py ============================================================================== --- python/trunk/Lib/test/test_runpy.py (original) +++ python/trunk/Lib/test/test_runpy.py Wed Jul 1 00:57:08 2009 @@ -37,14 +37,14 @@ def test_run_code(self): saved_argv0 = sys.argv[0] d = _run_code(self.test_source, {}) - self.failUnless(d["result"] == self.expected_result) - self.failUnless(d["__name__"] is None) - self.failUnless(d["__file__"] is None) - self.failUnless(d["__loader__"] is None) - self.failUnless(d["__package__"] is None) - self.failUnless(d["run_argv0"] is saved_argv0) - self.failUnless("run_name" not in d) - self.failUnless(sys.argv[0] is saved_argv0) + self.assertTrue(d["result"] == self.expected_result) + self.assertTrue(d["__name__"] is None) + self.assertTrue(d["__file__"] is None) + self.assertTrue(d["__loader__"] is None) + self.assertTrue(d["__package__"] is None) + self.assertTrue(d["run_argv0"] is saved_argv0) + self.assertTrue("run_name" not in d) + self.assertTrue(sys.argv[0] is saved_argv0) def test_run_module_code(self): initial = object() @@ -60,19 +60,19 @@ file, loader, package) - self.failUnless("result" not in d1) - self.failUnless(d2["initial"] is initial) - self.failUnless(d2["result"] == self.expected_result) - self.failUnless(d2["nested"]["x"] == 1) - self.failUnless(d2["__name__"] is name) - self.failUnless(d2["run_name_in_sys_modules"]) - self.failUnless(d2["module_in_sys_modules"]) - self.failUnless(d2["__file__"] is file) - self.failUnless(d2["run_argv0"] is file) - self.failUnless(d2["__loader__"] is loader) - self.failUnless(d2["__package__"] is package) - self.failUnless(sys.argv[0] is saved_argv0) - self.failUnless(name not in sys.modules) + self.assertTrue("result" not in d1) + self.assertTrue(d2["initial"] is initial) + self.assertTrue(d2["result"] == self.expected_result) + self.assertTrue(d2["nested"]["x"] == 1) + self.assertTrue(d2["__name__"] is name) + self.assertTrue(d2["run_name_in_sys_modules"]) + self.assertTrue(d2["module_in_sys_modules"]) + self.assertTrue(d2["__file__"] is file) + self.assertTrue(d2["run_argv0"] is file) + self.assertTrue(d2["__loader__"] is loader) + self.assertTrue(d2["__package__"] is package) + self.assertTrue(sys.argv[0] is saved_argv0) + self.assertTrue(name not in sys.modules) class RunModuleTest(unittest.TestCase): @@ -159,15 +159,15 @@ try: if verbose: print "Running from source:", mod_name d1 = run_module(mod_name) # Read from source - self.failUnless("x" in d1) - self.failUnless(d1["x"] == 1) + self.assertTrue("x" in d1) + self.assertTrue(d1["x"] == 1) del d1 # Ensure __loader__ entry doesn't keep file open __import__(mod_name) os.remove(mod_fname) if verbose: print "Running from compiled:", mod_name d2 = run_module(mod_name) # Read from bytecode - self.failUnless("x" in d2) - self.failUnless(d2["x"] == 1) + self.assertTrue("x" in d2) + self.assertTrue(d2["x"] == 1) del d2 # Ensure __loader__ entry doesn't keep file open finally: self._del_pkg(pkg_dir, depth, mod_name) @@ -211,19 +211,19 @@ pkg_name = mod_name.rpartition('.')[0] if verbose: print "Running from source:", mod_name d1 = run_module(mod_name, run_name=run_name) # Read from source - self.failUnless("__package__" in d1) - self.failUnless(d1["__package__"] == pkg_name) - self.failUnless("sibling" in d1) - self.failUnless("nephew" in d1) + self.assertTrue("__package__" in d1) + self.assertTrue(d1["__package__"] == pkg_name) + self.assertTrue("sibling" in d1) + self.assertTrue("nephew" in d1) del d1 # Ensure __loader__ entry doesn't keep file open __import__(mod_name) os.remove(mod_fname) if verbose: print "Running from compiled:", mod_name d2 = run_module(mod_name, run_name=run_name) # Read from bytecode - self.failUnless("__package__" in d2) - self.failUnless(d2["__package__"] == pkg_name) - self.failUnless("sibling" in d2) - self.failUnless("nephew" in d2) + self.assertTrue("__package__" in d2) + self.assertTrue(d2["__package__"] == pkg_name) + self.assertTrue("sibling" in d2) + self.assertTrue("nephew" in d2) del d2 # Ensure __loader__ entry doesn't keep file open finally: self._del_pkg(pkg_dir, depth, mod_name) Modified: python/trunk/Lib/test/test_scope.py ============================================================================== --- python/trunk/Lib/test/test_scope.py (original) +++ python/trunk/Lib/test/test_scope.py Wed Jul 1 00:57:08 2009 @@ -467,7 +467,7 @@ locals()['looked_up_by_load_name'] = True passed = looked_up_by_load_name -self.assert_(X.passed) +self.assertTrue(X.passed) """ def testLocalsFunction(self): @@ -482,7 +482,7 @@ return g d = f(2)(4) - self.assert_(d.has_key('h')) + self.assertTrue(d.has_key('h')) del d['h'] self.assertEqual(d, {'x': 2, 'y': 7, 'w': 6}) @@ -516,8 +516,8 @@ return C varnames = f(1).z - self.assert_("x" not in varnames) - self.assert_("y" in varnames) + self.assertTrue("x" not in varnames) + self.assertTrue("y" in varnames) def testLocalsClass_WithTrace(self): # Issue23728: after the trace function returns, the locals() Modified: python/trunk/Lib/test/test_set.py ============================================================================== --- python/trunk/Lib/test/test_set.py (original) +++ python/trunk/Lib/test/test_set.py Wed Jul 1 00:57:08 2009 @@ -64,7 +64,7 @@ self.assertEqual(c in self.s, c in self.d) self.assertRaises(TypeError, self.s.__contains__, [[]]) s = self.thetype([frozenset(self.letters)]) - self.assert_(self.thetype(self.letters) in s) + self.assertTrue(self.thetype(self.letters) in s) def test_union(self): u = self.s.union(self.otherword) @@ -124,7 +124,7 @@ actual = s1.isdisjoint(s2) expected = f(s1, s2) self.assertEqual(actual, expected) - self.assert_(actual is True or actual is False) + self.assertTrue(actual is True or actual is False) def test_and(self): i = self.s.intersection(self.otherword) @@ -207,19 +207,19 @@ def test_sub_and_super(self): p, q, r = map(self.thetype, ['ab', 'abcde', 'def']) - self.assert_(p < q) - self.assert_(p <= q) - self.assert_(q <= q) - self.assert_(q > p) - self.assert_(q >= p) - self.failIf(q < r) - self.failIf(q <= r) - self.failIf(q > r) - self.failIf(q >= r) - self.assert_(set('a').issubset('abc')) - self.assert_(set('abc').issuperset('a')) - self.failIf(set('a').issubset('cbs')) - self.failIf(set('cbs').issuperset('a')) + self.assertTrue(p < q) + self.assertTrue(p <= q) + self.assertTrue(q <= q) + self.assertTrue(q > p) + self.assertTrue(q >= p) + self.assertFalse(q < r) + self.assertFalse(q <= r) + self.assertFalse(q > r) + self.assertFalse(q >= r) + self.assertTrue(set('a').issubset('abc')) + self.assertTrue(set('abc').issuperset('a')) + self.assertFalse(set('a').issubset('cbs')) + self.assertFalse(set('cbs').issuperset('a')) def test_pickling(self): for i in range(pickle.HIGHEST_PROTOCOL + 1): @@ -267,7 +267,7 @@ s=H() f=set() f.add(s) - self.assert_(s in f) + self.assertTrue(s in f) f.remove(s) f.add(s) f.discard(s) @@ -333,7 +333,7 @@ obj.x = iter(container) del obj, container gc.collect() - self.assert_(ref() is None, "Cycle was not collected") + self.assertTrue(ref() is None, "Cycle was not collected") class TestSet(TestJointOps): thetype = set @@ -367,7 +367,7 @@ def test_add(self): self.s.add('Q') - self.assert_('Q' in self.s) + self.assertTrue('Q' in self.s) dup = self.s.copy() self.s.add('Q') self.assertEqual(self.s, dup) @@ -375,13 +375,13 @@ def test_remove(self): self.s.remove('a') - self.assert_('a' not in self.s) + self.assertTrue('a' not in self.s) self.assertRaises(KeyError, self.s.remove, 'Q') self.assertRaises(TypeError, self.s.remove, []) s = self.thetype([frozenset(self.word)]) - self.assert_(self.thetype(self.word) in s) + self.assertTrue(self.thetype(self.word) in s) s.remove(self.thetype(self.word)) - self.assert_(self.thetype(self.word) not in s) + self.assertTrue(self.thetype(self.word) not in s) self.assertRaises(KeyError, self.s.remove, self.thetype(self.word)) def test_remove_keyerror_unpacking(self): @@ -400,7 +400,7 @@ try: self.s.remove(key) except KeyError as e: - self.assert_(e.args[0] is key, + self.assertTrue(e.args[0] is key, "KeyError should be {0}, not {1}".format(key, e.args[0])) else: @@ -408,26 +408,26 @@ def test_discard(self): self.s.discard('a') - self.assert_('a' not in self.s) + self.assertTrue('a' not in self.s) self.s.discard('Q') self.assertRaises(TypeError, self.s.discard, []) s = self.thetype([frozenset(self.word)]) - self.assert_(self.thetype(self.word) in s) + self.assertTrue(self.thetype(self.word) in s) s.discard(self.thetype(self.word)) - self.assert_(self.thetype(self.word) not in s) + self.assertTrue(self.thetype(self.word) not in s) s.discard(self.thetype(self.word)) def test_pop(self): for i in xrange(len(self.s)): elem = self.s.pop() - self.assert_(elem not in self.s) + self.assertTrue(elem not in self.s) self.assertRaises(KeyError, self.s.pop) def test_update(self): retval = self.s.update(self.otherword) self.assertEqual(retval, None) for c in (self.word + self.otherword): - self.assert_(c in self.s) + self.assertTrue(c in self.s) self.assertRaises(PassThru, self.s.update, check_pass_thru()) self.assertRaises(TypeError, self.s.update, [[]]) for p, q in (('cdc', 'abcd'), ('efgfe', 'abcefg'), ('ccb', 'abc'), ('ef', 'abcef')): @@ -445,16 +445,16 @@ def test_ior(self): self.s |= set(self.otherword) for c in (self.word + self.otherword): - self.assert_(c in self.s) + self.assertTrue(c in self.s) def test_intersection_update(self): retval = self.s.intersection_update(self.otherword) self.assertEqual(retval, None) for c in (self.word + self.otherword): if c in self.otherword and c in self.word: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(PassThru, self.s.intersection_update, check_pass_thru()) self.assertRaises(TypeError, self.s.intersection_update, [[]]) for p, q in (('cdc', 'c'), ('efgfe', ''), ('ccb', 'bc'), ('ef', '')): @@ -472,18 +472,18 @@ self.s &= set(self.otherword) for c in (self.word + self.otherword): if c in self.otherword and c in self.word: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_difference_update(self): retval = self.s.difference_update(self.otherword) self.assertEqual(retval, None) for c in (self.word + self.otherword): if c in self.word and c not in self.otherword: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(PassThru, self.s.difference_update, check_pass_thru()) self.assertRaises(TypeError, self.s.difference_update, [[]]) self.assertRaises(TypeError, self.s.symmetric_difference_update, [[]]) @@ -509,18 +509,18 @@ self.s -= set(self.otherword) for c in (self.word + self.otherword): if c in self.word and c not in self.otherword: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_symmetric_difference_update(self): retval = self.s.symmetric_difference_update(self.otherword) self.assertEqual(retval, None) for c in (self.word + self.otherword): if (c in self.word) ^ (c in self.otherword): - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(PassThru, self.s.symmetric_difference_update, check_pass_thru()) self.assertRaises(TypeError, self.s.symmetric_difference_update, [[]]) for p, q in (('cdc', 'abd'), ('efgfe', 'abcefg'), ('ccb', 'a'), ('ef', 'abcef')): @@ -533,9 +533,9 @@ self.s ^= set(self.otherword) for c in (self.word + self.otherword): if (c in self.word) ^ (c in self.otherword): - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_inplace_on_self(self): t = self.s.copy() @@ -763,7 +763,7 @@ def test_iteration(self): for v in self.set: - self.assert_(v in self.values) + self.assertTrue(v in self.values) setiter = iter(self.set) # note: __length_hint__ is an internal undocumented API, # don't rely on it in your own programs @@ -798,10 +798,10 @@ self.repr = "set([3])" def test_in(self): - self.failUnless(3 in self.set) + self.assertTrue(3 in self.set) def test_not_in(self): - self.failUnless(2 not in self.set) + self.assertTrue(2 not in self.set) #------------------------------------------------------------------------------ @@ -815,10 +815,10 @@ self.repr = "set([(0, 'zero')])" def test_in(self): - self.failUnless((0, "zero") in self.set) + self.assertTrue((0, "zero") in self.set) def test_not_in(self): - self.failUnless(9 not in self.set) + self.assertTrue(9 not in self.set) #------------------------------------------------------------------------------ @@ -1110,7 +1110,7 @@ popped[self.set.pop()] = None self.assertEqual(len(popped), len(self.values)) for v in self.values: - self.failUnless(v in popped) + self.assertTrue(v in popped) def test_update_empty_tuple(self): self.set.update(()) @@ -1379,7 +1379,7 @@ set_list = list(self.set); set_list.sort() self.assertEqual(len(dup_list), len(set_list)) for i in range(len(dup_list)): - self.failUnless(dup_list[i] is set_list[i]) + self.assertTrue(dup_list[i] is set_list[i]) def test_deep_copy(self): dup = copy.deepcopy(self.set) @@ -1429,13 +1429,13 @@ def test_binopsVsSubsets(self): a, b = self.a, self.b - self.assert_(a - b < a) - self.assert_(b - a < b) - self.assert_(a & b < a) - self.assert_(a & b < b) - self.assert_(a | b > a) - self.assert_(a | b > b) - self.assert_(a ^ b < a | b) + self.assertTrue(a - b < a) + self.assertTrue(b - a < b) + self.assertTrue(a & b < a) + self.assertTrue(a & b < b) + self.assertTrue(a | b > a) + self.assertTrue(a | b > b) + self.assertTrue(a ^ b < a | b) def test_commutativity(self): a, b = self.a, self.b @@ -1684,7 +1684,7 @@ edge = vertex # Cuboctahedron vertices are edges in Cube self.assertEqual(len(edge), 2) # Two cube vertices define an edge for cubevert in edge: - self.assert_(cubevert in g) + self.assertTrue(cubevert in g) #============================================================================== Modified: python/trunk/Lib/test/test_sets.py ============================================================================== --- python/trunk/Lib/test/test_sets.py (original) +++ python/trunk/Lib/test/test_sets.py Wed Jul 1 00:57:08 2009 @@ -76,7 +76,7 @@ def test_iteration(self): for v in self.set: - self.assert_(v in self.values) + self.assertTrue(v in self.values) def test_pickling(self): p = pickle.dumps(self.set) @@ -107,10 +107,10 @@ self.repr = "Set([3])" def test_in(self): - self.failUnless(3 in self.set) + self.assertTrue(3 in self.set) def test_not_in(self): - self.failUnless(2 not in self.set) + self.assertTrue(2 not in self.set) #------------------------------------------------------------------------------ @@ -124,10 +124,10 @@ self.repr = "Set([(0, 'zero')])" def test_in(self): - self.failUnless((0, "zero") in self.set) + self.assertTrue((0, "zero") in self.set) def test_not_in(self): - self.failUnless(9 not in self.set) + self.assertTrue(9 not in self.set) #------------------------------------------------------------------------------ @@ -406,7 +406,7 @@ popped[self.set.pop()] = None self.assertEqual(len(popped), len(self.values)) for v in self.values: - self.failUnless(v in popped) + self.assertTrue(v in popped) def test_update_empty_tuple(self): self.set.union_update(()) @@ -683,7 +683,7 @@ set_list = list(self.set); set_list.sort() self.assertEqual(len(dup_list), len(set_list)) for i in range(len(dup_list)): - self.failUnless(dup_list[i] is set_list[i]) + self.assertTrue(dup_list[i] is set_list[i]) def test_deep_copy(self): dup = copy.deepcopy(self.set) @@ -733,13 +733,13 @@ def test_binopsVsSubsets(self): a, b = self.a, self.b - self.assert_(a - b <= a) - self.assert_(b - a <= b) - self.assert_(a & b <= a) - self.assert_(a & b <= b) - self.assert_(a | b >= a) - self.assert_(a | b >= b) - self.assert_(a ^ b <= a | b) + self.assertTrue(a - b <= a) + self.assertTrue(b - a <= b) + self.assertTrue(a & b <= a) + self.assertTrue(a & b <= b) + self.assertTrue(a | b >= a) + self.assertTrue(a | b >= b) + self.assertTrue(a ^ b <= a | b) def test_commutativity(self): a, b = self.a, self.b @@ -755,9 +755,9 @@ self.assertEqual(a - a, zero) self.assertEqual(a | a, a) self.assertEqual(a & a, a) - self.assert_(a <= a) - self.assert_(a >= a) - self.assert_(a == a) + self.assertTrue(a <= a) + self.assertTrue(a >= a) + self.assertTrue(a == a) def test_summations(self): # check that sums of parts equal the whole Modified: python/trunk/Lib/test/test_sha.py ============================================================================== --- python/trunk/Lib/test/test_sha.py (original) +++ python/trunk/Lib/test/test_sha.py Wed Jul 1 00:57:08 2009 @@ -18,19 +18,19 @@ # Check digest matches the expected value obj = sha.new(data) computed = obj.hexdigest() - self.assert_(computed == digest) + self.assertTrue(computed == digest) # Verify that the value doesn't change between two consecutive # digest operations. computed_again = obj.hexdigest() - self.assert_(computed == computed_again) + self.assertTrue(computed == computed_again) # Check hexdigest() output matches digest()'s output digest = obj.digest() hexd = "" for c in digest: hexd += '%02x' % ord(c) - self.assert_(computed == hexd) + self.assertTrue(computed == hexd) def test_case_1(self): self.check("abc", Modified: python/trunk/Lib/test/test_shutil.py ============================================================================== --- python/trunk/Lib/test/test_shutil.py (original) +++ python/trunk/Lib/test/test_shutil.py Wed Jul 1 00:57:08 2009 @@ -63,12 +63,12 @@ self.assertIs(func, os.listdir, "func must be either os.remove or os.listdir") self.assertEqual(arg, TESTFN) - self.failUnless(issubclass(exc[0], OSError)) + self.assertTrue(issubclass(exc[0], OSError)) self.errorState = 1 else: self.assertEqual(func, os.rmdir) self.assertEqual(arg, TESTFN) - self.failUnless(issubclass(exc[0], OSError)) + self.assertTrue(issubclass(exc[0], OSError)) self.errorState = 2 def test_rmtree_dont_delete_file(self): @@ -158,9 +158,9 @@ patterns = shutil.ignore_patterns('*.tmp', 'test_dir2') shutil.copytree(src_dir, dst_dir, ignore=patterns) # checking the result: some elements should not be copied - self.assert_(exists(join(dst_dir, 'test.txt'))) - self.assert_(not exists(join(dst_dir, 'test.tmp'))) - self.assert_(not exists(join(dst_dir, 'test_dir2'))) + self.assertTrue(exists(join(dst_dir, 'test.txt'))) + self.assertTrue(not exists(join(dst_dir, 'test.tmp'))) + self.assertTrue(not exists(join(dst_dir, 'test_dir2'))) finally: if os.path.exists(dst_dir): shutil.rmtree(dst_dir) @@ -168,9 +168,9 @@ patterns = shutil.ignore_patterns('*.tmp', 'subdir*') shutil.copytree(src_dir, dst_dir, ignore=patterns) # checking the result: some elements should not be copied - self.assert_(not exists(join(dst_dir, 'test.tmp'))) - self.assert_(not exists(join(dst_dir, 'test_dir2', 'subdir2'))) - self.assert_(not exists(join(dst_dir, 'test_dir2', 'subdir'))) + self.assertTrue(not exists(join(dst_dir, 'test.tmp'))) + self.assertTrue(not exists(join(dst_dir, 'test_dir2', 'subdir2'))) + self.assertTrue(not exists(join(dst_dir, 'test_dir2', 'subdir'))) finally: if os.path.exists(dst_dir): shutil.rmtree(dst_dir) @@ -192,9 +192,9 @@ shutil.copytree(src_dir, dst_dir, ignore=_filter) # checking the result: some elements should not be copied - self.assert_(not exists(join(dst_dir, 'test_dir2', 'subdir2', + self.assertTrue(not exists(join(dst_dir, 'test_dir2', 'subdir2', 'test.py'))) - self.assert_(not exists(join(dst_dir, 'test_dir2', 'subdir'))) + self.assertTrue(not exists(join(dst_dir, 'test_dir2', 'subdir'))) finally: if os.path.exists(dst_dir): @@ -393,7 +393,7 @@ for src, dst in [('srcdir', 'srcdir/dest')]: src = os.path.join(TESTFN, src) dst = os.path.join(TESTFN, dst) - self.assert_(shutil._destinsrc(src, dst), + self.assertTrue(shutil._destinsrc(src, dst), msg='_destinsrc() wrongly concluded that ' 'dst (%s) is not in src (%s)' % (dst, src)) finally: @@ -405,7 +405,7 @@ for src, dst in [('srcdir', 'src/dest'), ('srcdir', 'srcdir.new')]: src = os.path.join(TESTFN, src) dst = os.path.join(TESTFN, dst) - self.failIf(shutil._destinsrc(src, dst), + self.assertFalse(shutil._destinsrc(src, dst), msg='_destinsrc() wrongly concluded that ' 'dst (%s) is in src (%s)' % (dst, src)) finally: Modified: python/trunk/Lib/test/test_signal.py ============================================================================== --- python/trunk/Lib/test/test_signal.py (original) +++ python/trunk/Lib/test/test_signal.py Wed Jul 1 00:57:08 2009 @@ -217,10 +217,10 @@ # before select is called time.sleep(self.TIMEOUT_FULL) mid_time = time.time() - self.assert_(mid_time - before_time < self.TIMEOUT_HALF) + self.assertTrue(mid_time - before_time < self.TIMEOUT_HALF) select.select([self.read], [], [], self.TIMEOUT_FULL) after_time = time.time() - self.assert_(after_time - mid_time < self.TIMEOUT_HALF) + self.assertTrue(after_time - mid_time < self.TIMEOUT_HALF) def test_wakeup_fd_during(self): import select @@ -231,7 +231,7 @@ self.assertRaises(select.error, select.select, [self.read], [], [], self.TIMEOUT_FULL) after_time = time.time() - self.assert_(after_time - before_time < self.TIMEOUT_HALF) + self.assertTrue(after_time - before_time < self.TIMEOUT_HALF) def setUp(self): import fcntl Modified: python/trunk/Lib/test/test_site.py ============================================================================== --- python/trunk/Lib/test/test_site.py (original) +++ python/trunk/Lib/test/test_site.py Wed Jul 1 00:57:08 2009 @@ -47,26 +47,26 @@ path_parts = ("Beginning", "End") original_dir = os.path.join(*path_parts) abs_dir, norm_dir = site.makepath(*path_parts) - self.failUnlessEqual(os.path.abspath(original_dir), abs_dir) + self.assertEqual(os.path.abspath(original_dir), abs_dir) if original_dir == os.path.normcase(original_dir): - self.failUnlessEqual(abs_dir, norm_dir) + self.assertEqual(abs_dir, norm_dir) else: - self.failUnlessEqual(os.path.normcase(abs_dir), norm_dir) + self.assertEqual(os.path.normcase(abs_dir), norm_dir) def test_init_pathinfo(self): dir_set = site._init_pathinfo() for entry in [site.makepath(path)[1] for path in sys.path if path and os.path.isdir(path)]: - self.failUnless(entry in dir_set, + self.assertTrue(entry in dir_set, "%s from sys.path not found in set returned " "by _init_pathinfo(): %s" % (entry, dir_set)) def pth_file_tests(self, pth_file): """Contain common code for testing results of reading a .pth file""" - self.failUnless(pth_file.imported in sys.modules, + self.assertTrue(pth_file.imported in sys.modules, "%s not in sys.path" % pth_file.imported) - self.failUnless(site.makepath(pth_file.good_dir_path)[0] in sys.path) - self.failUnless(not os.path.exists(pth_file.bad_dir_path)) + self.assertTrue(site.makepath(pth_file.good_dir_path)[0] in sys.path) + self.assertTrue(not os.path.exists(pth_file.bad_dir_path)) def test_addpackage(self): # Make sure addpackage() imports if the line starts with 'import', @@ -98,7 +98,7 @@ def test_s_option(self): usersite = site.USER_SITE - self.assert_(usersite in sys.path) + self.assertTrue(usersite in sys.path) rc = subprocess.call([sys.executable, '-c', 'import sys; sys.exit(%r in sys.path)' % usersite]) @@ -197,7 +197,7 @@ site.abs__file__() for module in (sys, os, __builtin__): try: - self.failUnless(os.path.isabs(module.__file__), `module`) + self.assertTrue(os.path.isabs(module.__file__), `module`) except AttributeError: continue # We could try everything in sys.modules; however, when regrtest.py @@ -210,7 +210,7 @@ site.removeduppaths() seen_paths = set() for path in sys.path: - self.failUnless(path not in seen_paths) + self.assertTrue(path not in seen_paths) seen_paths.add(path) def test_add_build_dir(self): @@ -221,17 +221,17 @@ def test_setting_quit(self): # 'quit' and 'exit' should be injected into __builtin__ - self.failUnless(hasattr(__builtin__, "quit")) - self.failUnless(hasattr(__builtin__, "exit")) + self.assertTrue(hasattr(__builtin__, "quit")) + self.assertTrue(hasattr(__builtin__, "exit")) def test_setting_copyright(self): # 'copyright' and 'credits' should be in __builtin__ - self.failUnless(hasattr(__builtin__, "copyright")) - self.failUnless(hasattr(__builtin__, "credits")) + self.assertTrue(hasattr(__builtin__, "copyright")) + self.assertTrue(hasattr(__builtin__, "credits")) def test_setting_help(self): # 'help' should be set in __builtin__ - self.failUnless(hasattr(__builtin__, "help")) + self.assertTrue(hasattr(__builtin__, "help")) def test_aliasing_mbcs(self): if sys.platform == "win32": @@ -245,7 +245,7 @@ def test_setdefaultencoding_removed(self): # Make sure sys.setdefaultencoding is gone - self.failUnless(not hasattr(sys, "setdefaultencoding")) + self.assertTrue(not hasattr(sys, "setdefaultencoding")) def test_sitecustomize_executed(self): # If sitecustomize is available, it should have been imported. Modified: python/trunk/Lib/test/test_slice.py ============================================================================== --- python/trunk/Lib/test/test_slice.py (original) +++ python/trunk/Lib/test/test_slice.py Wed Jul 1 00:57:08 2009 @@ -71,7 +71,7 @@ obj = AnyClass() s = slice(obj) - self.assert_(s.stop is obj) + self.assertTrue(s.stop is obj) def test_indices(self): self.assertEqual(slice(None ).indices(10), (0, 10, 1)) Modified: python/trunk/Lib/test/test_socket.py ============================================================================== --- python/trunk/Lib/test/test_socket.py (original) +++ python/trunk/Lib/test/test_socket.py Wed Jul 1 00:57:08 2009 @@ -237,11 +237,11 @@ raise socket.herror def raise_gaierror(*args, **kwargs): raise socket.gaierror - self.failUnlessRaises(socket.error, raise_error, + self.assertRaises(socket.error, raise_error, "Error raising socket exception.") - self.failUnlessRaises(socket.error, raise_herror, + self.assertRaises(socket.error, raise_herror, "Error raising socket exception.") - self.failUnlessRaises(socket.error, raise_gaierror, + self.assertRaises(socket.error, raise_gaierror, "Error raising socket exception.") def testCrucialConstants(self): @@ -263,7 +263,7 @@ except socket.error: # Probably name lookup wasn't set up right; skip this test return - self.assert_(ip.find('.') >= 0, "Error resolving host to ip.") + self.assertTrue(ip.find('.') >= 0, "Error resolving host to ip.") try: hname, aliases, ipaddrs = socket.gethostbyaddr(ip) except socket.error: @@ -491,7 +491,7 @@ # it reasonable to get the host's addr in addition to 0.0.0.0. # At least for eCos. This is required for the S/390 to pass. my_ip_addr = socket.gethostbyname(socket.gethostname()) - self.assert_(name[0] in ("0.0.0.0", my_ip_addr), '%s invalid' % name[0]) + self.assertTrue(name[0] in ("0.0.0.0", my_ip_addr), '%s invalid' % name[0]) self.assertEqual(name[1], port) def testGetSockOpt(self): @@ -499,14 +499,14 @@ # We know a socket should start without reuse==0 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) reuse = sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) - self.failIf(reuse != 0, "initial mode is reuse") + self.assertFalse(reuse != 0, "initial mode is reuse") def testSetSockOpt(self): # Testing setsockopt() sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) reuse = sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) - self.failIf(reuse == 0, "failed to set reuse mode") + self.assertFalse(reuse == 0, "failed to set reuse mode") def testSendAfterClose(self): # testing send() after close() with timeout @@ -539,10 +539,10 @@ def test_sock_ioctl(self): if os.name != "nt": return - self.assert_(hasattr(socket.socket, 'ioctl')) - self.assert_(hasattr(socket, 'SIO_RCVALL')) - self.assert_(hasattr(socket, 'RCVALL_ON')) - self.assert_(hasattr(socket, 'RCVALL_OFF')) + self.assertTrue(hasattr(socket.socket, 'ioctl')) + self.assertTrue(hasattr(socket, 'SIO_RCVALL')) + self.assertTrue(hasattr(socket, 'RCVALL_ON')) + self.assertTrue(hasattr(socket, 'RCVALL_OFF')) class BasicTCPTest(SocketConnectedTest): @@ -701,7 +701,7 @@ except socket.error: pass end = time.time() - self.assert_((end - start) < 1.0, "Error setting non-blocking mode.") + self.assertTrue((end - start) < 1.0, "Error setting non-blocking mode.") def _testSetBlocking(self): pass @@ -768,7 +768,7 @@ def tearDown(self): self.serv_file.close() - self.assert_(self.serv_file.closed) + self.assertTrue(self.serv_file.closed) self.serv_file = None SocketConnectedTest.tearDown(self) @@ -778,7 +778,7 @@ def clientTearDown(self): self.cli_file.close() - self.assert_(self.cli_file.closed) + self.assertTrue(self.cli_file.closed) self.cli_file = None SocketConnectedTest.clientTearDown(self) @@ -853,10 +853,10 @@ self.cli_file.write("End Of Line") def testClosedAttr(self): - self.assert_(not self.serv_file.closed) + self.assertTrue(not self.serv_file.closed) def _testClosedAttr(self): - self.assert_(not self.cli_file.closed) + self.assertTrue(not self.cli_file.closed) class UnbufferedFileObjectClassTestCase(FileObjectClassTestCase): @@ -908,7 +908,7 @@ class NetworkConnectionNoServer(unittest.TestCase): def testWithoutServer(self): port = test_support.find_unused_port() - self.failUnlessRaises( + self.assertRaises( socket.error, lambda: socket.create_connection((HOST, port)) ) @@ -938,7 +938,7 @@ testTimeoutDefault = _justAccept def _testTimeoutDefault(self): # passing no explicit timeout uses socket's global default - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(42) try: self.cli = socket.create_connection((HOST, self.port)) @@ -949,7 +949,7 @@ testTimeoutNone = _justAccept def _testTimeoutNone(self): # None timeout means the same as sock.settimeout(None) - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(30) try: self.cli = socket.create_connection((HOST, self.port), timeout=None) @@ -994,7 +994,7 @@ def _testOutsideTimeout(self): self.cli = sock = socket.create_connection((HOST, self.port), timeout=1) - self.failUnlessRaises(socket.timeout, lambda: sock.recv(5)) + self.assertRaises(socket.timeout, lambda: sock.recv(5)) class Urllib2FileobjectTest(unittest.TestCase): @@ -1014,12 +1014,12 @@ s = MockSocket() f = socket._fileobject(s) f.close() - self.assert_(not s.closed) + self.assertTrue(not s.closed) s = MockSocket() f = socket._fileobject(s, close=True) f.close() - self.assert_(s.closed) + self.assertTrue(s.closed) class TCPTimeoutTest(SocketTCPTest): @@ -1027,7 +1027,7 @@ def raise_timeout(*args, **kwargs): self.serv.settimeout(1.0) self.serv.accept() - self.failUnlessRaises(socket.timeout, raise_timeout, + self.assertRaises(socket.timeout, raise_timeout, "Error generating a timeout exception (TCP)") def testTimeoutZero(self): @@ -1084,7 +1084,7 @@ def raise_timeout(*args, **kwargs): self.serv.settimeout(1.0) self.serv.recv(1024) - self.failUnlessRaises(socket.timeout, raise_timeout, + self.assertRaises(socket.timeout, raise_timeout, "Error generating a timeout exception (UDP)") def testTimeoutZero(self): @@ -1104,10 +1104,10 @@ class TestExceptions(unittest.TestCase): def testExceptionTree(self): - self.assert_(issubclass(socket.error, Exception)) - self.assert_(issubclass(socket.herror, socket.error)) - self.assert_(issubclass(socket.gaierror, socket.error)) - self.assert_(issubclass(socket.timeout, socket.error)) + self.assertTrue(issubclass(socket.error, Exception)) + self.assertTrue(issubclass(socket.herror, socket.error)) + self.assertTrue(issubclass(socket.gaierror, socket.error)) + self.assertTrue(issubclass(socket.timeout, socket.error)) class TestLinuxAbstractNamespace(unittest.TestCase): Modified: python/trunk/Lib/test/test_str.py ============================================================================== --- python/trunk/Lib/test/test_str.py (original) +++ python/trunk/Lib/test/test_str.py Wed Jul 1 00:57:08 2009 @@ -86,7 +86,7 @@ def __unicode__(self): return "not unicode" - self.assert_(str(Foo0()).startswith("<")) # this is different from __unicode__ + self.assertTrue(str(Foo0()).startswith("<")) # this is different from __unicode__ self.assertEqual(str(Foo1()), "foo") self.assertEqual(str(Foo2()), "foo") self.assertEqual(str(Foo3()), "foo") Modified: python/trunk/Lib/test/test_string.py ============================================================================== --- python/trunk/Lib/test/test_string.py (original) +++ python/trunk/Lib/test/test_string.py Wed Jul 1 00:57:08 2009 @@ -199,13 +199,13 @@ class BytesAliasTest(unittest.TestCase): def test_builtin(self): - self.assert_(str is bytes) + self.assertTrue(str is bytes) def test_syntax(self): self.assertEqual(b"spam", "spam") self.assertEqual(br"egg\foo", "egg\\foo") - self.assert_(type(b""), str) - self.assert_(type(br""), str) + self.assertTrue(type(b""), str) + self.assertTrue(type(br""), str) def test_main(): test_support.run_unittest(StringTest, ModuleTest, BytesAliasTest) Modified: python/trunk/Lib/test/test_stringprep.py ============================================================================== --- python/trunk/Lib/test/test_stringprep.py (original) +++ python/trunk/Lib/test/test_stringprep.py Wed Jul 1 00:57:08 2009 @@ -8,66 +8,66 @@ class StringprepTests(unittest.TestCase): def test(self): - self.failUnless(in_table_a1(u"\u0221")) - self.failIf(in_table_a1(u"\u0222")) + self.assertTrue(in_table_a1(u"\u0221")) + self.assertFalse(in_table_a1(u"\u0222")) - self.failUnless(in_table_b1(u"\u00ad")) - self.failIf(in_table_b1(u"\u00ae")) + self.assertTrue(in_table_b1(u"\u00ad")) + self.assertFalse(in_table_b1(u"\u00ae")) - self.failUnless(map_table_b2(u"\u0041"), u"\u0061") - self.failUnless(map_table_b2(u"\u0061"), u"\u0061") + self.assertTrue(map_table_b2(u"\u0041"), u"\u0061") + self.assertTrue(map_table_b2(u"\u0061"), u"\u0061") - self.failUnless(map_table_b3(u"\u0041"), u"\u0061") - self.failUnless(map_table_b3(u"\u0061"), u"\u0061") + self.assertTrue(map_table_b3(u"\u0041"), u"\u0061") + self.assertTrue(map_table_b3(u"\u0061"), u"\u0061") - self.failUnless(in_table_c11(u"\u0020")) - self.failIf(in_table_c11(u"\u0021")) + self.assertTrue(in_table_c11(u"\u0020")) + self.assertFalse(in_table_c11(u"\u0021")) - self.failUnless(in_table_c12(u"\u00a0")) - self.failIf(in_table_c12(u"\u00a1")) + self.assertTrue(in_table_c12(u"\u00a0")) + self.assertFalse(in_table_c12(u"\u00a1")) - self.failUnless(in_table_c12(u"\u00a0")) - self.failIf(in_table_c12(u"\u00a1")) + self.assertTrue(in_table_c12(u"\u00a0")) + self.assertFalse(in_table_c12(u"\u00a1")) - self.failUnless(in_table_c11_c12(u"\u00a0")) - self.failIf(in_table_c11_c12(u"\u00a1")) + self.assertTrue(in_table_c11_c12(u"\u00a0")) + self.assertFalse(in_table_c11_c12(u"\u00a1")) - self.failUnless(in_table_c21(u"\u001f")) - self.failIf(in_table_c21(u"\u0020")) + self.assertTrue(in_table_c21(u"\u001f")) + self.assertFalse(in_table_c21(u"\u0020")) - self.failUnless(in_table_c22(u"\u009f")) - self.failIf(in_table_c22(u"\u00a0")) + self.assertTrue(in_table_c22(u"\u009f")) + self.assertFalse(in_table_c22(u"\u00a0")) - self.failUnless(in_table_c21_c22(u"\u009f")) - self.failIf(in_table_c21_c22(u"\u00a0")) + self.assertTrue(in_table_c21_c22(u"\u009f")) + self.assertFalse(in_table_c21_c22(u"\u00a0")) - self.failUnless(in_table_c3(u"\ue000")) - self.failIf(in_table_c3(u"\uf900")) + self.assertTrue(in_table_c3(u"\ue000")) + self.assertFalse(in_table_c3(u"\uf900")) - self.failUnless(in_table_c4(u"\uffff")) - self.failIf(in_table_c4(u"\u0000")) + self.assertTrue(in_table_c4(u"\uffff")) + self.assertFalse(in_table_c4(u"\u0000")) - self.failUnless(in_table_c5(u"\ud800")) - self.failIf(in_table_c5(u"\ud7ff")) + self.assertTrue(in_table_c5(u"\ud800")) + self.assertFalse(in_table_c5(u"\ud7ff")) - self.failUnless(in_table_c6(u"\ufff9")) - self.failIf(in_table_c6(u"\ufffe")) + self.assertTrue(in_table_c6(u"\ufff9")) + self.assertFalse(in_table_c6(u"\ufffe")) - self.failUnless(in_table_c7(u"\u2ff0")) - self.failIf(in_table_c7(u"\u2ffc")) + self.assertTrue(in_table_c7(u"\u2ff0")) + self.assertFalse(in_table_c7(u"\u2ffc")) - self.failUnless(in_table_c8(u"\u0340")) - self.failIf(in_table_c8(u"\u0342")) + self.assertTrue(in_table_c8(u"\u0340")) + self.assertFalse(in_table_c8(u"\u0342")) # C.9 is not in the bmp - # self.failUnless(in_table_c9(u"\U000E0001")) - # self.failIf(in_table_c8(u"\U000E0002")) + # self.assertTrue(in_table_c9(u"\U000E0001")) + # self.assertFalse(in_table_c8(u"\U000E0002")) - self.failUnless(in_table_d1(u"\u05be")) - self.failIf(in_table_d1(u"\u05bf")) + self.assertTrue(in_table_d1(u"\u05be")) + self.assertFalse(in_table_d1(u"\u05bf")) - self.failUnless(in_table_d2(u"\u0041")) - self.failIf(in_table_d2(u"\u0040")) + self.assertTrue(in_table_d2(u"\u0041")) + self.assertFalse(in_table_d2(u"\u0040")) # This would generate a hash of all predicates. However, running # it is quite expensive, and only serves to detect changes in the Modified: python/trunk/Lib/test/test_strop.py ============================================================================== --- python/trunk/Lib/test/test_strop.py (original) +++ python/trunk/Lib/test/test_strop.py Wed Jul 1 00:57:08 2009 @@ -10,104 +10,104 @@ class StropFunctionTestCase(unittest.TestCase): def test_atoi(self): - self.assert_(strop.atoi(" 1 ") == 1) + self.assertTrue(strop.atoi(" 1 ") == 1) self.assertRaises(ValueError, strop.atoi, " 1x") self.assertRaises(ValueError, strop.atoi, " x1 ") def test_atol(self): - self.assert_(strop.atol(" 1 ") == 1L) + self.assertTrue(strop.atol(" 1 ") == 1L) self.assertRaises(ValueError, strop.atol, " 1x") self.assertRaises(ValueError, strop.atol, " x1 ") def test_atof(self): - self.assert_(strop.atof(" 1 ") == 1.0) + self.assertTrue(strop.atof(" 1 ") == 1.0) self.assertRaises(ValueError, strop.atof, " 1x") self.assertRaises(ValueError, strop.atof, " x1 ") def test_capitalize(self): - self.assert_(strop.capitalize(" hello ") == " hello ") - self.assert_(strop.capitalize("hello ") == "Hello ") + self.assertTrue(strop.capitalize(" hello ") == " hello ") + self.assertTrue(strop.capitalize("hello ") == "Hello ") def test_find(self): - self.assert_(strop.find("abcdefghiabc", "abc") == 0) - self.assert_(strop.find("abcdefghiabc", "abc", 1) == 9) - self.assert_(strop.find("abcdefghiabc", "def", 4) == -1) + self.assertTrue(strop.find("abcdefghiabc", "abc") == 0) + self.assertTrue(strop.find("abcdefghiabc", "abc", 1) == 9) + self.assertTrue(strop.find("abcdefghiabc", "def", 4) == -1) def test_rfind(self): - self.assert_(strop.rfind("abcdefghiabc", "abc") == 9) + self.assertTrue(strop.rfind("abcdefghiabc", "abc") == 9) def test_lower(self): - self.assert_(strop.lower("HeLLo") == "hello") + self.assertTrue(strop.lower("HeLLo") == "hello") def test_upper(self): - self.assert_(strop.upper("HeLLo") == "HELLO") + self.assertTrue(strop.upper("HeLLo") == "HELLO") def test_swapcase(self): - self.assert_(strop.swapcase("HeLLo cOmpUteRs") == "hEllO CoMPuTErS") + self.assertTrue(strop.swapcase("HeLLo cOmpUteRs") == "hEllO CoMPuTErS") def test_strip(self): - self.assert_(strop.strip(" \t\n hello \t\n ") == "hello") + self.assertTrue(strop.strip(" \t\n hello \t\n ") == "hello") def test_lstrip(self): - self.assert_(strop.lstrip(" \t\n hello \t\n ") == "hello \t\n ") + self.assertTrue(strop.lstrip(" \t\n hello \t\n ") == "hello \t\n ") def test_rstrip(self): - self.assert_(strop.rstrip(" \t\n hello \t\n ") == " \t\n hello") + self.assertTrue(strop.rstrip(" \t\n hello \t\n ") == " \t\n hello") def test_replace(self): replace = strop.replace - self.assert_(replace("one!two!three!", '!', '@', 1) + self.assertTrue(replace("one!two!three!", '!', '@', 1) == "one at two!three!") - self.assert_(replace("one!two!three!", '!', '@', 2) + self.assertTrue(replace("one!two!three!", '!', '@', 2) == "one at two@three!") - self.assert_(replace("one!two!three!", '!', '@', 3) + self.assertTrue(replace("one!two!three!", '!', '@', 3) == "one at two@three@") - self.assert_(replace("one!two!three!", '!', '@', 4) + self.assertTrue(replace("one!two!three!", '!', '@', 4) == "one at two@three@") # CAUTION: a replace count of 0 means infinity only to strop, # not to the string .replace() method or to the # string.replace() function. - self.assert_(replace("one!two!three!", '!', '@', 0) + self.assertTrue(replace("one!two!three!", '!', '@', 0) == "one at two@three@") - self.assert_(replace("one!two!three!", '!', '@') + self.assertTrue(replace("one!two!three!", '!', '@') == "one at two@three@") - self.assert_(replace("one!two!three!", 'x', '@') + self.assertTrue(replace("one!two!three!", 'x', '@') == "one!two!three!") - self.assert_(replace("one!two!three!", 'x', '@', 2) + self.assertTrue(replace("one!two!three!", 'x', '@', 2) == "one!two!three!") def test_split(self): split = strop.split - self.assert_(split("this is the split function") + self.assertTrue(split("this is the split function") == ['this', 'is', 'the', 'split', 'function']) - self.assert_(split("a|b|c|d", '|') == ['a', 'b', 'c', 'd']) - self.assert_(split("a|b|c|d", '|', 2) == ['a', 'b', 'c|d']) - self.assert_(split("a b c d", None, 1) == ['a', 'b c d']) - self.assert_(split("a b c d", None, 2) == ['a', 'b', 'c d']) - self.assert_(split("a b c d", None, 3) == ['a', 'b', 'c', 'd']) - self.assert_(split("a b c d", None, 4) == ['a', 'b', 'c', 'd']) - self.assert_(split("a b c d", None, 0) == ['a', 'b', 'c', 'd']) - self.assert_(split("a b c d", None, 2) == ['a', 'b', 'c d']) + self.assertTrue(split("a|b|c|d", '|') == ['a', 'b', 'c', 'd']) + self.assertTrue(split("a|b|c|d", '|', 2) == ['a', 'b', 'c|d']) + self.assertTrue(split("a b c d", None, 1) == ['a', 'b c d']) + self.assertTrue(split("a b c d", None, 2) == ['a', 'b', 'c d']) + self.assertTrue(split("a b c d", None, 3) == ['a', 'b', 'c', 'd']) + self.assertTrue(split("a b c d", None, 4) == ['a', 'b', 'c', 'd']) + self.assertTrue(split("a b c d", None, 0) == ['a', 'b', 'c', 'd']) + self.assertTrue(split("a b c d", None, 2) == ['a', 'b', 'c d']) def test_join(self): - self.assert_(strop.join(['a', 'b', 'c', 'd']) == 'a b c d') - self.assert_(strop.join(('a', 'b', 'c', 'd'), '') == 'abcd') - self.assert_(strop.join(Sequence()) == 'w x y z') + self.assertTrue(strop.join(['a', 'b', 'c', 'd']) == 'a b c d') + self.assertTrue(strop.join(('a', 'b', 'c', 'd'), '') == 'abcd') + self.assertTrue(strop.join(Sequence()) == 'w x y z') # try a few long ones - self.assert_(strop.join(['x' * 100] * 100, ':') + self.assertTrue(strop.join(['x' * 100] * 100, ':') == (('x' * 100) + ":") * 99 + "x" * 100) - self.assert_(strop.join(('x' * 100,) * 100, ':') + self.assertTrue(strop.join(('x' * 100,) * 100, ':') == (('x' * 100) + ":") * 99 + "x" * 100) def test_maketrans(self): - self.assert_(strop.maketrans("abc", "xyz") == transtable) + self.assertTrue(strop.maketrans("abc", "xyz") == transtable) self.assertRaises(ValueError, strop.maketrans, "abc", "xyzq") def test_translate(self): - self.assert_(strop.translate("xyzabcdef", transtable, "def") + self.assertTrue(strop.translate("xyzabcdef", transtable, "def") == "xyzxyz") def test_data_attributes(self): Modified: python/trunk/Lib/test/test_strptime.py ============================================================================== --- python/trunk/Lib/test/test_strptime.py (original) +++ python/trunk/Lib/test/test_strptime.py Wed Jul 1 00:57:08 2009 @@ -13,7 +13,7 @@ class getlang_Tests(unittest.TestCase): """Test _getlang""" def test_basic(self): - self.failUnlessEqual(_strptime._getlang(), locale.getlocale(locale.LC_TIME)) + self.assertEqual(_strptime._getlang(), locale.getlocale(locale.LC_TIME)) class LocaleTime_Tests(unittest.TestCase): """Tests for _strptime.LocaleTime. @@ -36,9 +36,9 @@ """ strftime_output = time.strftime(directive, self.time_tuple).lower() comparison = testing[self.time_tuple[tuple_position]] - self.failUnless(strftime_output in testing, "%s: not found in tuple" % + self.assertTrue(strftime_output in testing, "%s: not found in tuple" % error_msg) - self.failUnless(comparison == strftime_output, + self.assertTrue(comparison == strftime_output, "%s: position within tuple incorrect; %s != %s" % (error_msg, comparison, strftime_output)) @@ -61,18 +61,18 @@ def test_am_pm(self): # Make sure AM/PM representation done properly strftime_output = time.strftime("%p", self.time_tuple).lower() - self.failUnless(strftime_output in self.LT_ins.am_pm, + self.assertTrue(strftime_output in self.LT_ins.am_pm, "AM/PM representation not in tuple") if self.time_tuple[3] < 12: position = 0 else: position = 1 - self.failUnless(strftime_output == self.LT_ins.am_pm[position], + self.assertTrue(strftime_output == self.LT_ins.am_pm[position], "AM/PM representation in the wrong position within the tuple") def test_timezone(self): # Make sure timezone is correct timezone = time.strftime("%Z", self.time_tuple).lower() if timezone: - self.failUnless(timezone in self.LT_ins.timezone[0] or \ + self.assertTrue(timezone in self.LT_ins.timezone[0] or \ timezone in self.LT_ins.timezone[1], "timezone %s not found in %s" % (timezone, self.LT_ins.timezone)) @@ -86,26 +86,26 @@ # output. magic_date = (1999, 3, 17, 22, 44, 55, 2, 76, 0) strftime_output = time.strftime("%c", magic_date) - self.failUnless(strftime_output == time.strftime(self.LT_ins.LC_date_time, + self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_date_time, magic_date), "LC_date_time incorrect") strftime_output = time.strftime("%x", magic_date) - self.failUnless(strftime_output == time.strftime(self.LT_ins.LC_date, + self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_date, magic_date), "LC_date incorrect") strftime_output = time.strftime("%X", magic_date) - self.failUnless(strftime_output == time.strftime(self.LT_ins.LC_time, + self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_time, magic_date), "LC_time incorrect") LT = _strptime.LocaleTime() LT.am_pm = ('', '') - self.failUnless(LT.LC_time, "LocaleTime's LC directives cannot handle " + self.assertTrue(LT.LC_time, "LocaleTime's LC directives cannot handle " "empty strings") def test_lang(self): # Make sure lang is set to what _getlang() returns # Assuming locale has not changed between now and when self.LT_ins was created - self.failUnlessEqual(self.LT_ins.lang, _strptime._getlang()) + self.assertEqual(self.LT_ins.lang, _strptime._getlang()) class TimeRETests(unittest.TestCase): @@ -119,13 +119,13 @@ def test_pattern(self): # Test TimeRE.pattern pattern_string = self.time_re.pattern(r"%a %A %d") - self.failUnless(pattern_string.find(self.locale_time.a_weekday[2]) != -1, + self.assertTrue(pattern_string.find(self.locale_time.a_weekday[2]) != -1, "did not find abbreviated weekday in pattern string '%s'" % pattern_string) - self.failUnless(pattern_string.find(self.locale_time.f_weekday[4]) != -1, + self.assertTrue(pattern_string.find(self.locale_time.f_weekday[4]) != -1, "did not find full weekday in pattern string '%s'" % pattern_string) - self.failUnless(pattern_string.find(self.time_re['d']) != -1, + self.assertTrue(pattern_string.find(self.time_re['d']) != -1, "did not find 'd' directive pattern string '%s'" % pattern_string) @@ -133,23 +133,23 @@ # Make sure any characters in the format string that might be taken as # regex syntax is escaped. pattern_string = self.time_re.pattern("\d+") - self.failUnless(r"\\d\+" in pattern_string, + self.assertTrue(r"\\d\+" in pattern_string, "%s does not have re characters escaped properly" % pattern_string) def test_compile(self): # Check that compiled regex is correct found = self.time_re.compile(r"%A").match(self.locale_time.f_weekday[6]) - self.failUnless(found and found.group('A') == self.locale_time.f_weekday[6], + self.assertTrue(found and found.group('A') == self.locale_time.f_weekday[6], "re object for '%A' failed") compiled = self.time_re.compile(r"%a %b") found = compiled.match("%s %s" % (self.locale_time.a_weekday[4], self.locale_time.a_month[4])) - self.failUnless(found, + self.assertTrue(found, "Match failed with '%s' regex and '%s' string" % (compiled.pattern, "%s %s" % (self.locale_time.a_weekday[4], self.locale_time.a_month[4]))) - self.failUnless(found.group('a') == self.locale_time.a_weekday[4] and + self.assertTrue(found.group('a') == self.locale_time.a_weekday[4] and found.group('b') == self.locale_time.a_month[4], "re object couldn't find the abbreviated weekday month in " "'%s' using '%s'; group 'a' = '%s', group 'b' = %s'" % @@ -159,7 +159,7 @@ 'U','w','W','x','X','y','Y','Z','%'): compiled = self.time_re.compile("%" + directive) found = compiled.match(time.strftime("%" + directive)) - self.failUnless(found, "Matching failed on '%s' using '%s' regex" % + self.assertTrue(found, "Matching failed on '%s' using '%s' regex" % (time.strftime("%" + directive), compiled.pattern)) @@ -168,14 +168,14 @@ # Fixes bug #661354 test_locale = _strptime.LocaleTime() test_locale.timezone = (frozenset(), frozenset()) - self.failUnless(_strptime.TimeRE(test_locale).pattern("%Z") == '', + self.assertTrue(_strptime.TimeRE(test_locale).pattern("%Z") == '', "with timezone == ('',''), TimeRE().pattern('%Z') != ''") def test_matching_with_escapes(self): # Make sure a format that requires escaping of characters works compiled_re = self.time_re.compile("\w+ %m") found = compiled_re.match("\w+ 10") - self.failUnless(found, "Escaping failed of format '\w+ 10'") + self.assertTrue(found, "Escaping failed of format '\w+ 10'") def test_locale_data_w_regex_metacharacters(self): # Check that if locale data contains regex metacharacters they are @@ -186,7 +186,7 @@ "Tokyo (standard time)")), frozenset("Tokyo (daylight time)")) time_re = _strptime.TimeRE(locale_time) - self.failUnless(time_re.compile("%Z").match("Tokyo (standard time)"), + self.assertTrue(time_re.compile("%Z").match("Tokyo (standard time)"), "locale data that contains regex metacharacters is not" " properly escaped") @@ -195,8 +195,8 @@ # 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")) + self.assertTrue(not re.match(pattern, "180")) + self.assertTrue(re.match(pattern, "18 0")) class StrptimeTests(unittest.TestCase): @@ -229,7 +229,7 @@ """Helper fxn in testing.""" strf_output = time.strftime("%" + directive, self.time_tuple) strp_output = _strptime._strptime_time(strf_output, "%" + directive) - self.failUnless(strp_output[position] == self.time_tuple[position], + self.assertTrue(strp_output[position] == self.time_tuple[position], "testing of '%s' directive failed; '%s' -> %s != %s" % (directive, strf_output, strp_output[position], self.time_tuple[position])) @@ -243,7 +243,7 @@ for bound in bounds: strp_output = _strptime._strptime_time(bound, '%y') expected_result = century + int(bound) - self.failUnless(strp_output[0] == expected_result, + self.assertTrue(strp_output[0] == expected_result, "'y' test failed; passed in '%s' " "and returned '%s'" % (bound, strp_output[0])) @@ -261,7 +261,7 @@ self.helper('H', 3) strf_output = time.strftime("%I %p", self.time_tuple) strp_output = _strptime._strptime_time(strf_output, "%I %p") - self.failUnless(strp_output[3] == self.time_tuple[3], + self.assertTrue(strp_output[3] == self.time_tuple[3], "testing of '%%I %%p' directive failed; '%s' -> %s != %s" % (strf_output, strp_output[3], self.time_tuple[3])) @@ -294,9 +294,9 @@ # Check for equal timezone names deals with bad locale info when this # occurs; first found in FreeBSD 4.4. strp_output = _strptime._strptime_time("UTC", "%Z") - self.failUnlessEqual(strp_output.tm_isdst, 0) + self.assertEqual(strp_output.tm_isdst, 0) strp_output = _strptime._strptime_time("GMT", "%Z") - self.failUnlessEqual(strp_output.tm_isdst, 0) + self.assertEqual(strp_output.tm_isdst, 0) if sys.platform == "mac": # Timezones don't really work on MacOS9 return @@ -305,11 +305,11 @@ strp_output = _strptime._strptime_time(strf_output, "%Z") locale_time = _strptime.LocaleTime() if time.tzname[0] != time.tzname[1] or not time.daylight: - self.failUnless(strp_output[8] == time_tuple[8], + self.assertTrue(strp_output[8] == time_tuple[8], "timezone check failed; '%s' -> %s != %s" % (strf_output, strp_output[8], time_tuple[8])) else: - self.failUnless(strp_output[8] == -1, + self.assertTrue(strp_output[8] == -1, "LocaleTime().timezone has duplicate values and " "time.daylight but timezone value not set to -1") @@ -327,7 +327,7 @@ time.tzname = (tz_name, tz_name) time.daylight = 1 tz_value = _strptime._strptime_time(tz_name, "%Z")[8] - self.failUnlessEqual(tz_value, -1, + self.assertEqual(tz_value, -1, "%s lead to a timezone value of %s instead of -1 when " "time.daylight set to %s and passing in %s" % (time.tzname, tz_value, time.daylight, tz_name)) @@ -354,25 +354,25 @@ # Make sure % signs are handled properly strf_output = time.strftime("%m %% %Y", self.time_tuple) strp_output = _strptime._strptime_time(strf_output, "%m %% %Y") - self.failUnless(strp_output[0] == self.time_tuple[0] and + self.assertTrue(strp_output[0] == self.time_tuple[0] and strp_output[1] == self.time_tuple[1], "handling of percent sign failed") def test_caseinsensitive(self): # Should handle names case-insensitively. strf_output = time.strftime("%B", self.time_tuple) - self.failUnless(_strptime._strptime_time(strf_output.upper(), "%B"), + self.assertTrue(_strptime._strptime_time(strf_output.upper(), "%B"), "strptime does not handle ALL-CAPS names properly") - self.failUnless(_strptime._strptime_time(strf_output.lower(), "%B"), + self.assertTrue(_strptime._strptime_time(strf_output.lower(), "%B"), "strptime does not handle lowercase names properly") - self.failUnless(_strptime._strptime_time(strf_output.capitalize(), "%B"), + self.assertTrue(_strptime._strptime_time(strf_output.capitalize(), "%B"), "strptime does not handle capword names properly") def test_defaults(self): # Default return value should be (1900, 1, 1, 0, 0, 0, 0, 1, 0) defaults = (1900, 1, 1, 0, 0, 0, 0, 1, -1) strp_output = _strptime._strptime_time('1', '%m') - self.failUnless(strp_output == defaults, + self.assertTrue(strp_output == defaults, "Default values for strptime() are incorrect;" " %s != %s" % (strp_output, defaults)) @@ -383,7 +383,7 @@ # escaped. # Test instigated by bug #796149 . need_escaping = ".^$*+?{}\[]|)(" - self.failUnless(_strptime._strptime_time(need_escaping, need_escaping)) + self.assertTrue(_strptime._strptime_time(need_escaping, need_escaping)) class Strptime12AMPMTests(unittest.TestCase): """Test a _strptime regression in '%I %p' at 12 noon (12 PM)""" @@ -416,7 +416,7 @@ format_string = "%Y %m %d %H %M %S %w %Z" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) - self.failUnless(result.tm_yday == self.time_tuple.tm_yday, + self.assertTrue(result.tm_yday == self.time_tuple.tm_yday, "Calculation of tm_yday failed; %s != %s" % (result.tm_yday, self.time_tuple.tm_yday)) @@ -425,7 +425,7 @@ format_string = "%Y %H %M %S %w %j %Z" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) - self.failUnless(result.tm_year == self.time_tuple.tm_year and + self.assertTrue(result.tm_year == self.time_tuple.tm_year and result.tm_mon == self.time_tuple.tm_mon and result.tm_mday == self.time_tuple.tm_mday, "Calculation of Gregorian date failed;" @@ -439,7 +439,7 @@ format_string = "%Y %m %d %H %S %j %Z" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) - self.failUnless(result.tm_wday == self.time_tuple.tm_wday, + self.assertTrue(result.tm_wday == self.time_tuple.tm_wday, "Calculation of day of the week failed;" "%s != %s" % (result.tm_wday, self.time_tuple.tm_wday)) @@ -452,7 +452,7 @@ dt_date = datetime_date(*ymd_tuple) strp_input = dt_date.strftime(format_string) strp_output = _strptime._strptime_time(strp_input, format_string) - self.failUnless(strp_output[:3] == ymd_tuple, + self.assertTrue(strp_output[:3] == ymd_tuple, "%s(%s) test failed w/ '%s': %s != %s (%s != %s)" % (test_reason, directive, strp_input, strp_output[:3], ymd_tuple, @@ -495,8 +495,8 @@ _strptime._TimeRE_cache.locale_time.lang = "Ni" original_time_re = id(_strptime._TimeRE_cache) _strptime._strptime_time("10", "%d") - self.failIfEqual(original_time_re, id(_strptime._TimeRE_cache)) - self.failUnlessEqual(len(_strptime._regex_cache), 1) + self.assertNotEqual(original_time_re, id(_strptime._TimeRE_cache)) + self.assertEqual(len(_strptime._regex_cache), 1) def test_regex_cleanup(self): # Make sure cached regexes are discarded when cache becomes "full". @@ -509,7 +509,7 @@ _strptime._regex_cache[bogus_key] = None bogus_key += 1 _strptime._strptime_time("10", "%d") - self.failUnlessEqual(len(_strptime._regex_cache), 1) + self.assertEqual(len(_strptime._regex_cache), 1) def test_new_localetime(self): # A new LocaleTime instance should be created when a new TimeRE object @@ -517,7 +517,7 @@ locale_time_id = id(_strptime._TimeRE_cache.locale_time) _strptime._TimeRE_cache.locale_time.lang = "Ni" _strptime._strptime_time("10", "%d") - self.failIfEqual(locale_time_id, + self.assertNotEqual(locale_time_id, id(_strptime._TimeRE_cache.locale_time)) def test_TimeRE_recreation(self): @@ -538,7 +538,7 @@ # Get the new cache object's id. second_time_re_id = id(_strptime._TimeRE_cache) # They should not be equal. - self.failIfEqual(first_time_re_id, second_time_re_id) + self.assertNotEqual(first_time_re_id, second_time_re_id) # Possible test locale is not supported while initial locale is. # If this is the case just suppress the exception and fall-through # to the reseting to the original locale. Modified: python/trunk/Lib/test/test_struct.py ============================================================================== --- python/trunk/Lib/test/test_struct.py (original) +++ python/trunk/Lib/test/test_struct.py Wed Jul 1 00:57:08 2009 @@ -181,7 +181,7 @@ self.assertEqual(struct.calcsize(xfmt), len(res)) rev = struct.unpack(xfmt, res)[0] if rev != arg: - self.assert_(asy) + self.assertTrue(asy) def test_native_qQ(self): # can't pack -1 as unsigned regardless @@ -252,7 +252,7 @@ expected = long(x) if x < 0: expected += 1L << self.bitsize - self.assert_(expected > 0) + self.assertTrue(expected > 0) expected = hex(expected)[2:-1] # chop "0x" and trailing 'L' if len(expected) & 1: expected = "0" + expected Modified: python/trunk/Lib/test/test_structseq.py ============================================================================== --- python/trunk/Lib/test/test_structseq.py (original) +++ python/trunk/Lib/test/test_structseq.py Wed Jul 1 00:57:08 2009 @@ -28,7 +28,7 @@ def test_repr(self): t = time.gmtime() - self.assert_(repr(t)) + self.assertTrue(repr(t)) t = time.gmtime(0) self.assertEqual(repr(t), "time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, " @@ -50,8 +50,8 @@ def test_contains(self): t1 = time.gmtime() for item in t1: - self.assert_(item in t1) - self.assert_(-42 not in t1) + self.assertTrue(item in t1) + self.assertTrue(-42 not in t1) def test_hash(self): t1 = time.gmtime() @@ -61,11 +61,11 @@ t1 = time.gmtime() t2 = type(t1)(t1) self.assertEqual(t1, t2) - self.assert_(not (t1 < t2)) - self.assert_(t1 <= t2) - self.assert_(not (t1 > t2)) - self.assert_(t1 >= t2) - self.assert_(not (t1 != t2)) + self.assertTrue(not (t1 < t2)) + self.assertTrue(t1 <= t2) + self.assertTrue(not (t1 > t2)) + self.assertTrue(t1 >= t2) + self.assertTrue(not (t1 != t2)) def test_fields(self): t = time.gmtime() Modified: python/trunk/Lib/test/test_subprocess.py ============================================================================== --- python/trunk/Lib/test/test_subprocess.py (original) +++ python/trunk/Lib/test/test_subprocess.py Wed Jul 1 00:57:08 2009 @@ -497,7 +497,7 @@ # but, based on system scheduling we can't control, it's possible # poll() never returned None. It "should be" very rare that it # didn't go around at least twice. - self.assert_(count >= 2) + self.assertTrue(count >= 2) # Subsequent invocations should just return the returncode self.assertEqual(p.poll(), 0) @@ -652,7 +652,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.send_signal(signal.SIGINT) self.assertNotEqual(p.wait(), 0) @@ -660,7 +660,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.kill() self.assertEqual(p.wait(), -signal.SIGKILL) @@ -668,7 +668,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.terminate() self.assertEqual(p.wait(), -signal.SIGTERM) @@ -746,7 +746,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.send_signal(signal.SIGTERM) self.assertNotEqual(p.wait(), 0) @@ -754,7 +754,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.kill() self.assertNotEqual(p.wait(), 0) @@ -762,7 +762,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.terminate() self.assertNotEqual(p.wait(), 0) Modified: python/trunk/Lib/test/test_support.py ============================================================================== --- python/trunk/Lib/test/test_support.py (original) +++ python/trunk/Lib/test/test_support.py Wed Jul 1 00:57:08 2009 @@ -741,7 +741,7 @@ # to make sure they work. We still want to avoid using # too much memory, though, but we do that noisily. maxsize = 5147 - self.failIf(maxsize * memuse + overhead > 20 * _1M) + self.assertFalse(maxsize * memuse + overhead > 20 * _1M) else: maxsize = int((max_memuse - overhead) / memuse) if maxsize < minsize: Modified: python/trunk/Lib/test/test_symtable.py ============================================================================== --- python/trunk/Lib/test/test_symtable.py (original) +++ python/trunk/Lib/test/test_symtable.py Wed Jul 1 00:57:08 2009 @@ -132,7 +132,7 @@ self.assertTrue(self.top.lookup("namespace_test").is_namespace()) self.assertFalse(self.spam.lookup("x").is_namespace()) - self.assert_(self.top.lookup("spam").get_namespace() is self.spam) + self.assertTrue(self.top.lookup("spam").get_namespace() is self.spam) ns_test = self.top.lookup("namespace_test") self.assertEqual(len(ns_test.get_namespaces()), 2) self.assertRaises(ValueError, ns_test.get_namespace) Modified: python/trunk/Lib/test/test_sys.py ============================================================================== --- python/trunk/Lib/test/test_sys.py (original) +++ python/trunk/Lib/test/test_sys.py Wed Jul 1 00:57:08 2009 @@ -19,7 +19,7 @@ dh(None) self.assertEqual(out.getvalue(), "") - self.assert_(not hasattr(__builtin__, "_")) + self.assertTrue(not hasattr(__builtin__, "_")) dh(42) self.assertEqual(out.getvalue(), "42\n") self.assertEqual(__builtin__._, 42) @@ -59,7 +59,7 @@ eh(*sys.exc_info()) sys.stderr = savestderr - self.assert_(err.getvalue().endswith("ValueError: 42\n")) + self.assertTrue(err.getvalue().endswith("ValueError: 42\n")) # FIXME: testing the code for a lost or replaced excepthook in # Python/pythonrun.c::PyErr_PrintEx() is tricky. @@ -71,16 +71,16 @@ # 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) + self.assertTrue(typ is not None) + self.assertTrue(value is exc) + self.assertTrue(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) + self.assertTrue(typ is None) + self.assertTrue(value is None) + self.assertTrue(traceback is None) def clear(): try: @@ -100,10 +100,10 @@ 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) + self.assertTrue(typ1 is typ2) + self.assertTrue(value1 is exc) + self.assertTrue(value1 is value2) + self.assertTrue(traceback1 is traceback2) # Check that an exception can be cleared outside of an except block clear_check(exc) @@ -178,7 +178,7 @@ if test.test_support.have_unicode: self.assertRaises(TypeError, sys.getdefaultencoding, 42) # can't check more than the type, as the user might have changed it - self.assert_(isinstance(sys.getdefaultencoding(), str)) + self.assertTrue(isinstance(sys.getdefaultencoding(), str)) # testing sys.settrace() is done in test_trace.py # testing sys.setprofile() is done in test_profile.py @@ -202,17 +202,17 @@ def test_getwindowsversion(self): if hasattr(sys, "getwindowsversion"): v = sys.getwindowsversion() - self.assert_(isinstance(v, tuple)) + self.assertTrue(isinstance(v, tuple)) self.assertEqual(len(v), 5) - self.assert_(isinstance(v[0], int)) - self.assert_(isinstance(v[1], int)) - self.assert_(isinstance(v[2], int)) - self.assert_(isinstance(v[3], int)) - self.assert_(isinstance(v[4], str)) + self.assertTrue(isinstance(v[0], int)) + self.assertTrue(isinstance(v[1], int)) + self.assertTrue(isinstance(v[2], int)) + self.assertTrue(isinstance(v[3], int)) + self.assertTrue(isinstance(v[4], str)) def test_dlopenflags(self): if hasattr(sys, "setdlopenflags"): - self.assert_(hasattr(sys, "getdlopenflags")) + self.assertTrue(hasattr(sys, "getdlopenflags")) self.assertRaises(TypeError, sys.getdlopenflags, 42) oldflags = sys.getdlopenflags() self.assertRaises(TypeError, sys.setdlopenflags) @@ -233,12 +233,12 @@ del n self.assertEqual(sys.getrefcount(None), c) if hasattr(sys, "gettotalrefcount"): - self.assert_(isinstance(sys.gettotalrefcount(), int)) + self.assertTrue(isinstance(sys.gettotalrefcount(), int)) def test_getframe(self): self.assertRaises(TypeError, sys._getframe, 42, 42) self.assertRaises(ValueError, sys._getframe, 2000000000) - self.assert_( + self.assertTrue( SysModuleTest.test_getframe.im_func.func_code \ is sys._getframe().f_code ) @@ -289,12 +289,12 @@ d = sys._current_frames() main_id = thread.get_ident() - self.assert_(main_id in d) - self.assert_(thread_id in d) + self.assertTrue(main_id in d) + self.assertTrue(thread_id in d) # Verify that the captured main-thread frame is _this_ frame. frame = d.pop(main_id) - self.assert_(frame is sys._getframe()) + self.assertTrue(frame is sys._getframe()) # Verify that the captured thread frame is blocked in g456, called # from f123. This is a litte tricky, since various bits of @@ -312,7 +312,7 @@ # And the next record must be for g456(). filename, lineno, funcname, sourceline = stack[i+1] self.assertEqual(funcname, "g456") - self.assert_(sourceline in ["leave_g.wait()", "entered_g.set()"]) + self.assertTrue(sourceline in ["leave_g.wait()", "entered_g.set()"]) # Reap the spawned thread. leave_g.set() @@ -324,67 +324,67 @@ # "thread id" 0. d = sys._current_frames() self.assertEqual(len(d), 1) - self.assert_(0 in d) - self.assert_(d[0] is sys._getframe()) + self.assertTrue(0 in d) + self.assertTrue(d[0] is sys._getframe()) def test_attributes(self): - self.assert_(isinstance(sys.api_version, int)) - self.assert_(isinstance(sys.argv, list)) - self.assert_(sys.byteorder in ("little", "big")) - self.assert_(isinstance(sys.builtin_module_names, tuple)) - self.assert_(isinstance(sys.copyright, basestring)) - self.assert_(isinstance(sys.exec_prefix, basestring)) - self.assert_(isinstance(sys.executable, basestring)) + self.assertTrue(isinstance(sys.api_version, int)) + self.assertTrue(isinstance(sys.argv, list)) + self.assertTrue(sys.byteorder in ("little", "big")) + self.assertTrue(isinstance(sys.builtin_module_names, tuple)) + self.assertTrue(isinstance(sys.copyright, basestring)) + self.assertTrue(isinstance(sys.exec_prefix, basestring)) + self.assertTrue(isinstance(sys.executable, basestring)) self.assertEqual(len(sys.float_info), 11) self.assertEqual(sys.float_info.radix, 2) self.assertEqual(len(sys.long_info), 2) - self.assert_(sys.long_info.bits_per_digit % 5 == 0) - self.assert_(sys.long_info.sizeof_digit >= 1) + self.assertTrue(sys.long_info.bits_per_digit % 5 == 0) + self.assertTrue(sys.long_info.sizeof_digit >= 1) self.assertEqual(type(sys.long_info.bits_per_digit), int) self.assertEqual(type(sys.long_info.sizeof_digit), int) - self.assert_(isinstance(sys.hexversion, int)) - self.assert_(isinstance(sys.maxint, int)) + self.assertTrue(isinstance(sys.hexversion, int)) + self.assertTrue(isinstance(sys.maxint, int)) if test.test_support.have_unicode: - self.assert_(isinstance(sys.maxunicode, int)) - self.assert_(isinstance(sys.platform, basestring)) - self.assert_(isinstance(sys.prefix, basestring)) - self.assert_(isinstance(sys.version, basestring)) + self.assertTrue(isinstance(sys.maxunicode, int)) + self.assertTrue(isinstance(sys.platform, basestring)) + self.assertTrue(isinstance(sys.prefix, basestring)) + self.assertTrue(isinstance(sys.version, basestring)) vi = sys.version_info - self.assert_(isinstance(vi[:], tuple)) + self.assertTrue(isinstance(vi[:], tuple)) self.assertEqual(len(vi), 5) - self.assert_(isinstance(vi[0], int)) - self.assert_(isinstance(vi[1], int)) - self.assert_(isinstance(vi[2], int)) - self.assert_(vi[3] in ("alpha", "beta", "candidate", "final")) - self.assert_(isinstance(vi[4], int)) - self.assert_(isinstance(vi.major, int)) - self.assert_(isinstance(vi.minor, int)) - self.assert_(isinstance(vi.micro, int)) - self.assert_(vi.releaselevel in + self.assertTrue(isinstance(vi[0], int)) + self.assertTrue(isinstance(vi[1], int)) + self.assertTrue(isinstance(vi[2], int)) + self.assertTrue(vi[3] in ("alpha", "beta", "candidate", "final")) + self.assertTrue(isinstance(vi[4], int)) + self.assertTrue(isinstance(vi.major, int)) + self.assertTrue(isinstance(vi.minor, int)) + self.assertTrue(isinstance(vi.micro, int)) + self.assertTrue(vi.releaselevel in ("alpha", "beta", "candidate", "final")) - self.assert_(isinstance(vi.serial, int)) + self.assertTrue(isinstance(vi.serial, int)) self.assertEqual(vi[0], vi.major) self.assertEqual(vi[1], vi.minor) self.assertEqual(vi[2], vi.micro) self.assertEqual(vi[3], vi.releaselevel) self.assertEqual(vi[4], vi.serial) - self.assert_(vi > (1,0,0)) + self.assertTrue(vi > (1,0,0)) def test_43581(self): # Can't use sys.stdout, as this is a cStringIO object when # the test runs under regrtest. - self.assert_(sys.__stdout__.encoding == sys.__stderr__.encoding) + self.assertTrue(sys.__stdout__.encoding == sys.__stderr__.encoding) def test_sys_flags(self): - self.failUnless(sys.flags) + self.assertTrue(sys.flags) attrs = ("debug", "py3k_warning", "division_warning", "division_new", "inspect", "interactive", "optimize", "dont_write_bytecode", "no_site", "ignore_environment", "tabcheck", "verbose", "unicode", "bytes_warning") for attr in attrs: - self.assert_(hasattr(sys.flags, attr), attr) + self.assertTrue(hasattr(sys.flags, attr), attr) self.assertEqual(type(getattr(sys.flags, attr)), int, attr) - self.assert_(repr(sys.flags)) + self.assertTrue(repr(sys.flags)) def test_clear_type_cache(self): sys._clear_type_cache() Modified: python/trunk/Lib/test/test_tarfile.py ============================================================================== --- python/trunk/Lib/test/test_tarfile.py (original) +++ python/trunk/Lib/test/test_tarfile.py Wed Jul 1 00:57:08 2009 @@ -58,7 +58,7 @@ tarinfo = self.tar.getmember("ustar/regtype") fobj = self.tar.extractfile(tarinfo) data = fobj.read() - self.assert_((len(data), md5sum(data)) == (tarinfo.size, md5_regtype), + self.assertTrue((len(data), md5sum(data)) == (tarinfo.size, md5_regtype), "regular file extraction failed") def test_fileobj_readlines(self): @@ -69,11 +69,11 @@ lines1 = fobj1.readlines() lines2 = fobj2.readlines() - self.assert_(lines1 == lines2, + self.assertTrue(lines1 == lines2, "fileobj.readlines() failed") - self.assert_(len(lines2) == 114, + self.assertTrue(len(lines2) == 114, "fileobj.readlines() failed") - self.assert_(lines2[83] == \ + self.assertTrue(lines2[83] == \ "I will gladly admit that Python is not the fastest running scripting language.\n", "fileobj.readlines() failed") @@ -84,7 +84,7 @@ fobj2 = self.tar.extractfile(tarinfo) lines1 = fobj1.readlines() lines2 = [line for line in fobj2] - self.assert_(lines1 == lines2, + self.assertTrue(lines1 == lines2, "fileobj.__iter__() failed") def test_fileobj_seek(self): @@ -98,43 +98,43 @@ text = fobj.read() fobj.seek(0) - self.assert_(0 == fobj.tell(), + self.assertTrue(0 == fobj.tell(), "seek() to file's start failed") fobj.seek(2048, 0) - self.assert_(2048 == fobj.tell(), + self.assertTrue(2048 == fobj.tell(), "seek() to absolute position failed") fobj.seek(-1024, 1) - self.assert_(1024 == fobj.tell(), + self.assertTrue(1024 == fobj.tell(), "seek() to negative relative position failed") fobj.seek(1024, 1) - self.assert_(2048 == fobj.tell(), + self.assertTrue(2048 == fobj.tell(), "seek() to positive relative position failed") s = fobj.read(10) - self.assert_(s == data[2048:2058], + self.assertTrue(s == data[2048:2058], "read() after seek failed") fobj.seek(0, 2) - self.assert_(tarinfo.size == fobj.tell(), + self.assertTrue(tarinfo.size == fobj.tell(), "seek() to file's end failed") - self.assert_(fobj.read() == "", + self.assertTrue(fobj.read() == "", "read() at file's end did not return empty string") fobj.seek(-tarinfo.size, 2) - self.assert_(0 == fobj.tell(), + self.assertTrue(0 == fobj.tell(), "relative seek() to file's start failed") fobj.seek(512) s1 = fobj.readlines() fobj.seek(512) s2 = fobj.readlines() - self.assert_(s1 == s2, + self.assertTrue(s1 == s2, "readlines() after seek failed") fobj.seek(0) - self.assert_(len(fobj.readline()) == fobj.tell(), + self.assertTrue(len(fobj.readline()) == fobj.tell(), "tell() after readline() failed") fobj.seek(512) - self.assert_(len(fobj.readline()) + 512 == fobj.tell(), + self.assertTrue(len(fobj.readline()) + 512 == fobj.tell(), "tell() after seek() and readline() failed") fobj.seek(0) line = fobj.readline() - self.assert_(fobj.read() == data[len(line):], + self.assertTrue(fobj.read() == data[len(line):], "read() after readline() failed") fobj.close() @@ -205,7 +205,7 @@ # Old V7 tars create directory members using an AREGTYPE # header with a "/" appended to the filename field. tarinfo = self.tar.getmember("misc/dirtype-old-v7") - self.assert_(tarinfo.type == tarfile.DIRTYPE, + self.assertTrue(tarinfo.type == tarfile.DIRTYPE, "v7 dirtype failed") def test_xstar_type(self): @@ -219,15 +219,15 @@ def test_check_members(self): for tarinfo in self.tar: - self.assert_(int(tarinfo.mtime) == 07606136617, + self.assertTrue(int(tarinfo.mtime) == 07606136617, "wrong mtime for %s" % tarinfo.name) if not tarinfo.name.startswith("ustar/"): continue - self.assert_(tarinfo.uname == "tarfile", + self.assertTrue(tarinfo.uname == "tarfile", "wrong uname for %s" % tarinfo.name) def test_find_members(self): - self.assert_(self.tar.getmembers()[-1].name == "misc/eof", + self.assertTrue(self.tar.getmembers()[-1].name == "misc/eof", "could not find all members") def test_extract_hardlink(self): @@ -276,7 +276,7 @@ tarinfo = self.tar.next() # get "regtype" (can't use getmember) fobj = self.tar.extractfile(tarinfo) data = fobj.read() - self.assert_((len(data), md5sum(data)) == (tarinfo.size, md5_regtype), + self.assertTrue((len(data), md5sum(data)) == (tarinfo.size, md5_regtype), "regular file extraction failed") def test_provoke_stream_error(self): @@ -293,7 +293,7 @@ t2 = tar2.next() if t1 is None: break - self.assert_(t2 is not None, "stream.next() failed.") + self.assertTrue(t2 is not None, "stream.next() failed.") if t2.islnk() or t2.issym(): self.assertRaises(tarfile.StreamError, tar2.extractfile, t2) @@ -303,8 +303,8 @@ v2 = tar2.extractfile(t2) if v1 is None: continue - self.assert_(v2 is not None, "stream.extractfile() failed") - self.assert_(v1.read() == v2.read(), "stream extraction failed") + self.assertTrue(v2 is not None, "stream.extractfile() failed") + self.assertTrue(v1.read() == v2.read(), "stream extraction failed") tar1.close() @@ -365,7 +365,7 @@ def _test_member(self, tarinfo, chksum=None, **kwargs): if chksum is not None: - self.assert_(md5sum(self.tar.extractfile(tarinfo).read()) == chksum, + self.assertTrue(md5sum(self.tar.extractfile(tarinfo).read()) == chksum, "wrong md5sum for %s" % tarinfo.name) kwargs["mtime"] = 07606136617 @@ -376,7 +376,7 @@ kwargs["uname"] = "tarfile" kwargs["gname"] = "tarfile" for k, v in kwargs.iteritems(): - self.assert_(getattr(tarinfo, k) == v, + self.assertTrue(getattr(tarinfo, k) == v, "wrong value in %s field of %s" % (k, tarinfo.name)) def test_find_regtype(self): @@ -425,7 +425,7 @@ def test_find_ustar_longname(self): name = "ustar/" + "12345/" * 39 + "1234567/longname" - self.assert_(name in self.tar.getnames()) + self.assertTrue(name in self.tar.getnames()) def test_find_regtype_oldv7(self): tarinfo = self.tar.getmember("misc/regtype-old-v7") @@ -446,7 +446,7 @@ tarinfo = self.tar.getmember(longname) except KeyError: self.fail("longname not found") - self.assert_(tarinfo.type != tarfile.DIRTYPE, "read longname as dirtype") + self.assertTrue(tarinfo.type != tarfile.DIRTYPE, "read longname as dirtype") def test_read_longlink(self): longname = self.subdir + "/" + "123/" * 125 + "longname" @@ -455,7 +455,7 @@ tarinfo = self.tar.getmember(longlink) except KeyError: self.fail("longlink not found") - self.assert_(tarinfo.linkname == longname, "linkname wrong") + self.assertTrue(tarinfo.linkname == longname, "linkname wrong") def test_truncated_longname(self): longname = self.subdir + "/" + "123/" * 125 + "longname" @@ -486,7 +486,7 @@ fobj1 = self.tar.extractfile(tarinfo1) tarinfo2 = self.tar.getmember("gnu/sparse") fobj2 = self.tar.extractfile(tarinfo2) - self.assert_(fobj1.read() == fobj2.read(), + self.assertTrue(fobj1.read() == fobj2.read(), "sparse file extraction failed") @@ -535,7 +535,7 @@ tar = tarfile.open(fileobj=fobj, mode=self.mode) tar.addfile(tarfile.TarInfo("foo")) tar.close() - self.assert_(fobj.closed is False, "external fileobjs must never closed") + self.assertTrue(fobj.closed is False, "external fileobjs must never closed") class WriteTest(WriteTestBase): @@ -554,7 +554,7 @@ tar.close() tar = tarfile.open(tmpname) - self.assert_(tar.getnames()[0] == name, + self.assertTrue(tar.getnames()[0] == name, "failed to store 100 char filename") tar.close() @@ -567,7 +567,7 @@ fobj.close() tar.add(path) tar.close() - self.assert_(os.path.getsize(tmpname) > 0, + self.assertTrue(os.path.getsize(tmpname) > 0, "tarfile is empty") # The test_*_size tests test for bug #1167128. @@ -628,16 +628,16 @@ dstname = os.path.abspath(tmpname) tar = tarfile.open(tmpname, self.mode) - self.assert_(tar.name == dstname, "archive name must be absolute") + self.assertTrue(tar.name == dstname, "archive name must be absolute") tar.add(dstname) - self.assert_(tar.getnames() == [], "added the archive to itself") + self.assertTrue(tar.getnames() == [], "added the archive to itself") cwd = os.getcwd() os.chdir(TEMPDIR) tar.add(dstname) os.chdir(cwd) - self.assert_(tar.getnames() == [], "added the archive to itself") + self.assertTrue(tar.getnames() == [], "added the archive to itself") def test_exclude(self): tempdir = os.path.join(TEMPDIR, "exclude") @@ -678,14 +678,14 @@ dec = bz2.BZ2Decompressor() data = open(tmpname, "rb").read() data = dec.decompress(data) - self.assert_(len(dec.unused_data) == 0, + self.assertTrue(len(dec.unused_data) == 0, "found trailing data") else: fobj = open(tmpname, "rb") data = fobj.read() fobj.close() - self.assert_(data.count("\0") == tarfile.RECORDSIZE, + self.assertTrue(data.count("\0") == tarfile.RECORDSIZE, "incorrect zero padding") @@ -725,14 +725,14 @@ v1 = self._calc_size(name, link) v2 = tar.offset - self.assert_(v1 == v2, "GNU longname/longlink creation failed") + self.assertTrue(v1 == v2, "GNU longname/longlink creation failed") tar.close() tar = tarfile.open(tmpname) member = tar.next() - self.failIf(member is None, "unable to read longname member") - self.assert_(tarinfo.name == member.name and \ + self.assertFalse(member is None, "unable to read longname member") + self.assertTrue(tarinfo.name == member.name and \ tarinfo.linkname == member.linkname, \ "unable to read longname member") @@ -792,18 +792,18 @@ # The same name will be added as a REGTYPE every # time regardless of st_nlink. tarinfo = self.tar.gettarinfo(self.foo) - self.assert_(tarinfo.type == tarfile.REGTYPE, + self.assertTrue(tarinfo.type == tarfile.REGTYPE, "add file as regular failed") def test_add_hardlink(self): tarinfo = self.tar.gettarinfo(self.bar) - self.assert_(tarinfo.type == tarfile.LNKTYPE, + self.assertTrue(tarinfo.type == tarfile.LNKTYPE, "add file as hardlink failed") def test_dereference_hardlink(self): self.tar.dereference = True tarinfo = self.tar.gettarinfo(self.bar) - self.assert_(tarinfo.type == tarfile.REGTYPE, + self.assertTrue(tarinfo.type == tarfile.REGTYPE, "dereferencing hardlink failed") @@ -823,10 +823,10 @@ tar = tarfile.open(tmpname) if link: l = tar.getmembers()[0].linkname - self.assert_(link == l, "PAX longlink creation failed") + self.assertTrue(link == l, "PAX longlink creation failed") else: n = tar.getmembers()[0].name - self.assert_(name == n, "PAX longname creation failed") + self.assertTrue(name == n, "PAX longname creation failed") def test_pax_global_header(self): pax_headers = { @@ -848,8 +848,8 @@ # Test if all the fields are unicode. for key, val in tar.pax_headers.iteritems(): - self.assert_(type(key) is unicode) - self.assert_(type(val) is unicode) + self.assertTrue(type(key) is unicode) + self.assertTrue(type(val) is unicode) if key in tarfile.PAX_NUMBER_FIELDS: try: tarfile.PAX_NUMBER_FIELDS[key](val) @@ -897,7 +897,7 @@ tar.close() tar = tarfile.open(tmpname, encoding=encoding) - self.assert_(type(tar.getnames()[0]) is not unicode) + self.assertTrue(type(tar.getnames()[0]) is not unicode) self.assertEqual(tar.getmembers()[0].name, name.encode(encoding)) tar.close() @@ -921,10 +921,10 @@ 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) + self.assertTrue(type(t.name) is str) + self.assertTrue(type(t.linkname) is str) + self.assertTrue(type(t.uname) is str) + self.assertTrue(type(t.gname) is str) tar.close() def test_uname_unicode(self): Modified: python/trunk/Lib/test/test_tempfile.py ============================================================================== --- python/trunk/Lib/test/test_tempfile.py (original) +++ python/trunk/Lib/test/test_tempfile.py Wed Jul 1 00:57:08 2009 @@ -59,7 +59,7 @@ "file '%s' does not end with '%s'" % (nbase, suf)) nbase = nbase[len(pre):len(nbase)-len(suf)] - self.assert_(self.str_check.match(nbase), + self.assertTrue(self.str_check.match(nbase), "random string '%s' does not match /^[a-zA-Z0-9_-]{6}$/" % nbase) @@ -88,7 +88,7 @@ for key in dict: if key[0] != '_' and key not in expected: unexp.append(key) - self.failUnless(len(unexp) == 0, + self.assertTrue(len(unexp) == 0, "unexpected keys: %s" % unexp) test_classes.append(test_exports) @@ -113,7 +113,7 @@ for i in xrange(TEST_FILES): s = r.next() self.nameCheck(s, '', '', '') - self.failIf(s in dict) + self.assertFalse(s in dict) dict[s] = 1 def test_supports_iter(self): @@ -140,9 +140,9 @@ cand = tempfile._candidate_tempdir_list() - self.failIf(len(cand) == 0) + self.assertFalse(len(cand) == 0) for c in cand: - self.assert_(isinstance(c, basestring), + self.assertTrue(isinstance(c, basestring), "%s is not a string" % c) def test_wanted_dirs(self): @@ -160,14 +160,14 @@ for envname in 'TMPDIR', 'TEMP', 'TMP': dirname = os.getenv(envname) if not dirname: raise ValueError - self.assert_(dirname in cand) + self.assertTrue(dirname in cand) try: dirname = os.getcwd() except (AttributeError, os.error): dirname = os.curdir - self.assert_(dirname in cand) + self.assertTrue(dirname in cand) # Not practical to try to verify the presence of OS-specific # paths in this list. @@ -184,14 +184,14 @@ def test_retval(self): # _get_candidate_names returns a _RandomNameSequence object obj = tempfile._get_candidate_names() - self.assert_(isinstance(obj, tempfile._RandomNameSequence)) + self.assertTrue(isinstance(obj, tempfile._RandomNameSequence)) def test_same_thing(self): # _get_candidate_names always returns the same object a = tempfile._get_candidate_names() b = tempfile._get_candidate_names() - self.assert_(a is b) + self.assertTrue(a is b) test_classes.append(test__get_candidate_names) @@ -300,9 +300,9 @@ decorated = sys.executable retval = os.spawnl(os.P_WAIT, sys.executable, decorated, tester, v, fd) - self.failIf(retval < 0, + self.assertFalse(retval < 0, "child process caught fatal signal %d" % -retval) - self.failIf(retval > 0, "child process reports failure %d"%retval) + self.assertFalse(retval > 0, "child process reports failure %d"%retval) def test_textmode(self): # _mkstemp_inner can create files in text mode @@ -322,8 +322,8 @@ # gettempprefix returns a nonempty prefix string p = tempfile.gettempprefix() - self.assert_(isinstance(p, basestring)) - self.assert_(len(p) > 0) + self.assertTrue(isinstance(p, basestring)) + self.assertTrue(len(p) > 0) def test_usable_template(self): # gettempprefix returns a usable prefix string @@ -354,9 +354,9 @@ # gettempdir returns a directory which exists dir = tempfile.gettempdir() - self.assert_(os.path.isabs(dir) or dir == os.curdir, + self.assertTrue(os.path.isabs(dir) or dir == os.curdir, "%s is not an absolute path" % dir) - self.assert_(os.path.isdir(dir), + self.assertTrue(os.path.isdir(dir), "%s is not a directory" % dir) def test_directory_writable(self): @@ -377,7 +377,7 @@ a = tempfile.gettempdir() b = tempfile.gettempdir() - self.assert_(a is b) + self.assertTrue(a is b) test_classes.append(test_gettempdir) @@ -580,7 +580,7 @@ def test_creates_named(self): # NamedTemporaryFile creates files with names f = tempfile.NamedTemporaryFile() - self.failUnless(os.path.exists(f.name), + self.assertTrue(os.path.exists(f.name), "NamedTemporaryFile %s does not exist" % f.name) def test_del_on_close(self): @@ -590,7 +590,7 @@ f = tempfile.NamedTemporaryFile(dir=dir) f.write('blat') f.close() - self.failIf(os.path.exists(f.name), + self.assertFalse(os.path.exists(f.name), "NamedTemporaryFile %s exists after close" % f.name) finally: os.rmdir(dir) @@ -604,7 +604,7 @@ tmp = f.name f.write('blat') f.close() - self.failUnless(os.path.exists(f.name), + self.assertTrue(os.path.exists(f.name), "NamedTemporaryFile %s missing after close" % f.name) finally: if tmp is not None: @@ -625,12 +625,12 @@ def test_context_manager(self): # A NamedTemporaryFile can be used as a context manager with tempfile.NamedTemporaryFile() as f: - self.failUnless(os.path.exists(f.name)) - self.failIf(os.path.exists(f.name)) + self.assertTrue(os.path.exists(f.name)) + self.assertFalse(os.path.exists(f.name)) def use_closed(): with f: pass - self.failUnlessRaises(ValueError, use_closed) + self.assertRaises(ValueError, use_closed) # How to test the mode and bufsize parameters? @@ -653,21 +653,21 @@ def test_basic(self): # SpooledTemporaryFile can create files f = self.do_create() - self.failIf(f._rolled) + self.assertFalse(f._rolled) f = self.do_create(max_size=100, pre="a", suf=".txt") - self.failIf(f._rolled) + self.assertFalse(f._rolled) def test_del_on_close(self): # A SpooledTemporaryFile is deleted when closed dir = tempfile.mkdtemp() try: f = tempfile.SpooledTemporaryFile(max_size=10, dir=dir) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write('blat ' * 5) - self.failUnless(f._rolled) + self.assertTrue(f._rolled) filename = f.name f.close() - self.failIf(os.path.exists(filename), + self.assertFalse(os.path.exists(filename), "SpooledTemporaryFile %s exists after close" % filename) finally: os.rmdir(dir) @@ -675,46 +675,46 @@ def test_rewrite_small(self): # A SpooledTemporaryFile can be written to multiple within the max_size f = self.do_create(max_size=30) - self.failIf(f._rolled) + self.assertFalse(f._rolled) for i in range(5): f.seek(0, 0) f.write('x' * 20) - self.failIf(f._rolled) + self.assertFalse(f._rolled) def test_write_sequential(self): # A SpooledTemporaryFile should hold exactly max_size bytes, and roll # over afterward f = self.do_create(max_size=30) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write('x' * 20) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write('x' * 10) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write('x') - self.failUnless(f._rolled) + self.assertTrue(f._rolled) def test_sparse(self): # A SpooledTemporaryFile that is written late in the file will extend # when that occurs f = self.do_create(max_size=30) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.seek(100, 0) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write('x') - self.failUnless(f._rolled) + self.assertTrue(f._rolled) def test_fileno(self): # A SpooledTemporaryFile should roll over to a real file on fileno() f = self.do_create(max_size=30) - self.failIf(f._rolled) - self.failUnless(f.fileno() > 0) - self.failUnless(f._rolled) + self.assertFalse(f._rolled) + self.assertTrue(f.fileno() > 0) + self.assertTrue(f._rolled) def test_multiple_close_before_rollover(self): # A SpooledTemporaryFile can be closed many times without error f = tempfile.SpooledTemporaryFile() f.write('abc\n') - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.close() try: f.close() @@ -726,7 +726,7 @@ # A SpooledTemporaryFile can be closed many times without error f = tempfile.SpooledTemporaryFile(max_size=1) f.write('abc\n') - self.failUnless(f._rolled) + self.assertTrue(f._rolled) f.close() try: f.close() @@ -746,46 +746,46 @@ write("a" * 35) write("b" * 35) seek(0, 0) - self.failUnless(read(70) == 'a'*35 + 'b'*35) + self.assertTrue(read(70) == 'a'*35 + 'b'*35) def test_context_manager_before_rollover(self): # A SpooledTemporaryFile can be used as a context manager with tempfile.SpooledTemporaryFile(max_size=1) as f: - self.failIf(f._rolled) - self.failIf(f.closed) - self.failUnless(f.closed) + self.assertFalse(f._rolled) + self.assertFalse(f.closed) + self.assertTrue(f.closed) def use_closed(): with f: pass - self.failUnlessRaises(ValueError, use_closed) + self.assertRaises(ValueError, use_closed) def test_context_manager_during_rollover(self): # A SpooledTemporaryFile can be used as a context manager with tempfile.SpooledTemporaryFile(max_size=1) as f: - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write('abc\n') f.flush() - self.failUnless(f._rolled) - self.failIf(f.closed) - self.failUnless(f.closed) + self.assertTrue(f._rolled) + self.assertFalse(f.closed) + self.assertTrue(f.closed) def use_closed(): with f: pass - self.failUnlessRaises(ValueError, use_closed) + self.assertRaises(ValueError, use_closed) def test_context_manager_after_rollover(self): # A SpooledTemporaryFile can be used as a context manager f = tempfile.SpooledTemporaryFile(max_size=1) f.write('abc\n') f.flush() - self.failUnless(f._rolled) + self.assertTrue(f._rolled) with f: - self.failIf(f.closed) - self.failUnless(f.closed) + self.assertFalse(f.closed) + self.assertTrue(f.closed) def use_closed(): with f: pass - self.failUnlessRaises(ValueError, use_closed) + self.assertRaises(ValueError, use_closed) test_classes.append(test_SpooledTemporaryFile) Modified: python/trunk/Lib/test/test_threading.py ============================================================================== --- python/trunk/Lib/test/test_threading.py (original) +++ python/trunk/Lib/test/test_threading.py Wed Jul 1 00:57:08 2009 @@ -41,7 +41,7 @@ self.nrunning.inc() if verbose: print self.nrunning.get(), 'tasks are running' - self.testcase.assert_(self.nrunning.get() <= 3) + self.testcase.assertTrue(self.nrunning.get() <= 3) time.sleep(delay) if verbose: @@ -49,7 +49,7 @@ with self.mutex: self.nrunning.dec() - self.testcase.assert_(self.nrunning.get() >= 0) + self.testcase.assertTrue(self.nrunning.get() >= 0) if verbose: print '%s is finished. %d tasks are running' % ( self.name, self.nrunning.get()) @@ -73,18 +73,18 @@ for i in range(NUMTASKS): t = TestThread(""%i, self, sema, mutex, numrunning) threads.append(t) - self.failUnlessEqual(t.ident, None) - self.assert_(re.match('', repr(t))) + self.assertEqual(t.ident, None) + self.assertTrue(re.match('', repr(t))) t.start() if verbose: print 'waiting for all tasks to complete' for t in threads: t.join(NUMTASKS) - self.assert_(not t.is_alive()) - self.failIfEqual(t.ident, 0) + self.assertTrue(not t.is_alive()) + self.assertNotEqual(t.ident, 0) self.assertFalse(t.ident is None) - self.assert_(re.match('', repr(t))) + self.assertTrue(re.match('', repr(t))) if verbose: print 'all tasks done' self.assertEqual(numrunning.get(), 0) @@ -142,8 +142,8 @@ tid = thread.start_new_thread(f, (mutex,)) # Wait for the thread to finish. mutex.acquire() - self.assert_(tid in threading._active) - self.assert_(isinstance(threading._active[tid], + self.assertTrue(tid in threading._active) + self.assertTrue(isinstance(threading._active[tid], threading._DummyThread)) del threading._active[tid] @@ -203,7 +203,7 @@ self.assertTrue(ret) if verbose: print " verifying worker hasn't exited" - self.assert_(not t.finished) + self.assertTrue(not t.finished) if verbose: print " attempting to raise asynch exception in worker" result = set_async_exc(ctypes.c_long(t.id), exception) @@ -211,7 +211,7 @@ if verbose: print " waiting for worker to say it caught the exception" worker_saw_exception.wait(timeout=10) - self.assert_(t.finished) + self.assertTrue(t.finished) if verbose: print " all OK -- joining worker" if t.finished: @@ -282,8 +282,8 @@ sys.settrace(func) """]) - self.failIf(rc == 2, "interpreted was blocked") - self.failUnless(rc == 0, "Unexpected error") + self.assertFalse(rc == 2, "interpreted was blocked") + self.assertTrue(rc == 0, "Unexpected error") def test_enumerate_after_join(self): @@ -354,8 +354,8 @@ rc = p.wait() data = p.stdout.read().replace('\r', '') self.assertEqual(data, "end of main\nend of thread\n") - self.failIf(rc == 2, "interpreter was blocked") - self.failUnless(rc == 0, "Unexpected error") + self.assertFalse(rc == 2, "interpreter was blocked") + self.assertTrue(rc == 0, "Unexpected error") def test_1_join_on_shutdown(self): # The usual case: on exit, wait for a non-daemon thread Modified: python/trunk/Lib/test/test_threading_local.py ============================================================================== --- python/trunk/Lib/test/test_threading_local.py (original) +++ python/trunk/Lib/test/test_threading_local.py Wed Jul 1 00:57:08 2009 @@ -40,7 +40,7 @@ local.someothervar = None gc.collect() deadlist = [weak for weak in weaklist if weak() is None] - self.assert_(len(deadlist) in (n-1, n), (n, len(deadlist))) + self.assertTrue(len(deadlist) in (n-1, n), (n, len(deadlist))) def test_derived(self): # Issue 3088: if there is a threads switch inside the __init__ Modified: python/trunk/Lib/test/test_time.py ============================================================================== --- python/trunk/Lib/test/test_time.py (original) +++ python/trunk/Lib/test/test_time.py Wed Jul 1 00:57:08 2009 @@ -18,9 +18,9 @@ time.clock() def test_conversions(self): - self.assert_(time.ctime(self.t) + self.assertTrue(time.ctime(self.t) == time.asctime(time.localtime(self.t))) - self.assert_(long(time.mktime(time.localtime(self.t))) + self.assertTrue(long(time.mktime(time.localtime(self.t))) == long(self.t)) def test_sleep(self): @@ -148,36 +148,36 @@ time.tzset() environ['TZ'] = utc time.tzset() - self.failUnlessEqual( + self.assertEqual( time.gmtime(xmas2002), time.localtime(xmas2002) ) - self.failUnlessEqual(time.daylight, 0) - self.failUnlessEqual(time.timezone, 0) - self.failUnlessEqual(time.localtime(xmas2002).tm_isdst, 0) + self.assertEqual(time.daylight, 0) + self.assertEqual(time.timezone, 0) + self.assertEqual(time.localtime(xmas2002).tm_isdst, 0) # Make sure we can switch to US/Eastern environ['TZ'] = eastern time.tzset() - self.failIfEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) - self.failUnlessEqual(time.tzname, ('EST', 'EDT')) - self.failUnlessEqual(len(time.tzname), 2) - self.failUnlessEqual(time.daylight, 1) - self.failUnlessEqual(time.timezone, 18000) - self.failUnlessEqual(time.altzone, 14400) - self.failUnlessEqual(time.localtime(xmas2002).tm_isdst, 0) - self.failUnlessEqual(len(time.tzname), 2) + self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) + self.assertEqual(time.tzname, ('EST', 'EDT')) + self.assertEqual(len(time.tzname), 2) + self.assertEqual(time.daylight, 1) + self.assertEqual(time.timezone, 18000) + self.assertEqual(time.altzone, 14400) + self.assertEqual(time.localtime(xmas2002).tm_isdst, 0) + self.assertEqual(len(time.tzname), 2) # Now go to the southern hemisphere. environ['TZ'] = victoria time.tzset() - self.failIfEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) - self.failUnless(time.tzname[0] == 'AEST', str(time.tzname[0])) - self.failUnless(time.tzname[1] == 'AEDT', str(time.tzname[1])) - self.failUnlessEqual(len(time.tzname), 2) - self.failUnlessEqual(time.daylight, 1) - self.failUnlessEqual(time.timezone, -36000) - self.failUnlessEqual(time.altzone, -39600) - self.failUnlessEqual(time.localtime(xmas2002).tm_isdst, 1) + self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) + self.assertTrue(time.tzname[0] == 'AEST', str(time.tzname[0])) + self.assertTrue(time.tzname[1] == 'AEDT', str(time.tzname[1])) + self.assertEqual(len(time.tzname), 2) + self.assertEqual(time.daylight, 1) + self.assertEqual(time.timezone, -36000) + self.assertEqual(time.altzone, -39600) + self.assertEqual(time.localtime(xmas2002).tm_isdst, 1) finally: # Repair TZ environment variable in case any other tests @@ -209,14 +209,14 @@ gt1 = time.gmtime(None) t0 = time.mktime(gt0) t1 = time.mktime(gt1) - self.assert_(0 <= (t1-t0) < 0.2) + self.assertTrue(0 <= (t1-t0) < 0.2) def test_localtime_without_arg(self): lt0 = time.localtime() lt1 = time.localtime(None) t0 = time.mktime(lt0) t1 = time.mktime(lt1) - self.assert_(0 <= (t1-t0) < 0.2) + self.assertTrue(0 <= (t1-t0) < 0.2) def test_main(): test_support.run_unittest(TimeTestCase) Modified: python/trunk/Lib/test/test_timeout.py ============================================================================== --- python/trunk/Lib/test/test_timeout.py (original) +++ python/trunk/Lib/test/test_timeout.py Wed Jul 1 00:57:08 2009 @@ -119,11 +119,11 @@ self.sock.settimeout(_timeout) _t1 = time.time() - self.failUnlessRaises(socket.error, self.sock.connect, addr) + self.assertRaises(socket.error, self.sock.connect, addr) _t2 = time.time() _delta = abs(_t1 - _t2) - self.assert_(_delta < _timeout + self.fuzz, + self.assertTrue(_delta < _timeout + self.fuzz, "timeout (%g) is more than %g seconds more than expected (%g)" %(_delta, self.fuzz, _timeout)) @@ -134,11 +134,11 @@ self.sock.settimeout(_timeout) _t1 = time.time() - self.failUnlessRaises(socket.error, self.sock.recv, 1024) + self.assertRaises(socket.error, self.sock.recv, 1024) _t2 = time.time() _delta = abs(_t1 - _t2) - self.assert_(_delta < _timeout + self.fuzz, + self.assertTrue(_delta < _timeout + self.fuzz, "timeout (%g) is %g seconds more than expected (%g)" %(_delta, self.fuzz, _timeout)) @@ -150,11 +150,11 @@ self.sock.listen(5) _t1 = time.time() - self.failUnlessRaises(socket.error, self.sock.accept) + self.assertRaises(socket.error, self.sock.accept) _t2 = time.time() _delta = abs(_t1 - _t2) - self.assert_(_delta < _timeout + self.fuzz, + self.assertTrue(_delta < _timeout + self.fuzz, "timeout (%g) is %g seconds more than expected (%g)" %(_delta, self.fuzz, _timeout)) @@ -166,11 +166,11 @@ self.sock.bind(self.addr_local) _t1 = time.time() - self.failUnlessRaises(socket.error, self.sock.recvfrom, 8192) + self.assertRaises(socket.error, self.sock.recvfrom, 8192) _t2 = time.time() _delta = abs(_t1 - _t2) - self.assert_(_delta < _timeout + self.fuzz, + self.assertTrue(_delta < _timeout + self.fuzz, "timeout (%g) is %g seconds more than expected (%g)" %(_delta, self.fuzz, _timeout)) Modified: python/trunk/Lib/test/test_traceback.py ============================================================================== --- python/trunk/Lib/test/test_traceback.py (original) +++ python/trunk/Lib/test/test_traceback.py Wed Jul 1 00:57:08 2009 @@ -37,16 +37,16 @@ def test_caret(self): err = self.get_exception_format(self.syntax_error_with_caret, SyntaxError) - self.assert_(len(err) == 4) - self.assert_(err[1].strip() == "return x!") - self.assert_("^" in err[2]) # third line has caret - self.assert_(err[1].find("!") == err[2].find("^")) # in the right place + self.assertTrue(len(err) == 4) + self.assertTrue(err[1].strip() == "return x!") + self.assertTrue("^" in err[2]) # third line has caret + self.assertTrue(err[1].find("!") == err[2].find("^")) # in the right place err = self.get_exception_format(self.syntax_error_with_caret_2, SyntaxError) - self.assert_("^" in err[2]) # third line has caret - self.assert_(err[2].count('\n') == 1) # and no additional newline - self.assert_(err[1].find("+") == err[2].find("^")) # in the right place + self.assertTrue("^" in err[2]) # third line has caret + self.assertTrue(err[2].count('\n') == 1) # and no additional newline + self.assertTrue(err[1].find("+") == err[2].find("^")) # in the right place def test_nocaret(self): if is_jython: @@ -54,16 +54,16 @@ return err = self.get_exception_format(self.syntax_error_without_caret, SyntaxError) - self.assert_(len(err) == 3) - self.assert_(err[1].strip() == "[x for x in x] = x") + self.assertTrue(len(err) == 3) + self.assertTrue(err[1].strip() == "[x for x in x] = x") def test_bad_indentation(self): err = self.get_exception_format(self.syntax_error_bad_indentation, IndentationError) - self.assert_(len(err) == 4) - self.assert_(err[1].strip() == "print 2") - self.assert_("^" in err[2]) - self.assert_(err[1].find("2") == err[2].find("^")) + self.assertTrue(len(err) == 4) + self.assertTrue(err[1].strip() == "print 2") + self.assertTrue("^" in err[2]) + self.assertTrue(err[1].find("2") == err[2].find("^")) def test_bug737473(self): import sys, os, tempfile, time @@ -103,7 +103,7 @@ test_bug737473.test() except NotImplementedError: src = traceback.extract_tb(sys.exc_traceback)[-1][-1] - self.failUnlessEqual(src, 'raise NotImplementedError') + self.assertEqual(src, 'raise NotImplementedError') finally: sys.path[:] = savedpath for f in os.listdir(testdir): @@ -181,9 +181,9 @@ tb_lines = python_fmt.splitlines() self.assertEquals(len(tb_lines), 3) banner, location, source_line = tb_lines - self.assert_(banner.startswith('Traceback')) - self.assert_(location.startswith(' File')) - self.assert_(source_line.startswith(' raise')) + self.assertTrue(banner.startswith('Traceback')) + self.assertTrue(location.startswith(' File')) + self.assertTrue(source_line.startswith(' raise')) def test_main(): Modified: python/trunk/Lib/test/test_tuple.py ============================================================================== --- python/trunk/Lib/test/test_tuple.py (original) +++ python/trunk/Lib/test/test_tuple.py Wed Jul 1 00:57:08 2009 @@ -11,7 +11,7 @@ self.assertEqual(tuple(), ()) t0_3 = (0, 1, 2, 3) t0_3_bis = tuple(t0_3) - self.assert_(t0_3 is t0_3_bis) + self.assertTrue(t0_3 is t0_3_bis) self.assertEqual(tuple([]), ()) self.assertEqual(tuple([0, 1, 2, 3]), (0, 1, 2, 3)) self.assertEqual(tuple(''), ()) @@ -19,8 +19,8 @@ def test_truth(self): super(TupleTest, self).test_truth() - self.assert_(not ()) - self.assert_((42, )) + self.assertTrue(not ()) + self.assertTrue((42, )) def test_len(self): super(TupleTest, self).test_len() @@ -33,14 +33,14 @@ u = (0, 1) u2 = u u += (2, 3) - self.assert_(u is not u2) + self.assertTrue(u is not u2) def test_imul(self): super(TupleTest, self).test_imul() u = (0, 1) u2 = u u *= 3 - self.assert_(u is not u2) + self.assertTrue(u is not u2) def test_tupleresizebug(self): # Check that a specific bug in _PyTuple_Resize() is squashed. @@ -71,7 +71,7 @@ inps = base + [(i, j) for i in base for j in xp] + \ [(i, j) for i in xp for j in base] + xp + zip(base) collisions = len(inps) - len(set(map(hash, inps))) - self.assert_(collisions <= 15) + self.assertTrue(collisions <= 15) def test_repr(self): l0 = tuple() Modified: python/trunk/Lib/test/test_unary.py ============================================================================== --- python/trunk/Lib/test/test_unary.py (original) +++ python/trunk/Lib/test/test_unary.py Wed Jul 1 00:57:08 2009 @@ -6,32 +6,32 @@ class UnaryOpTestCase(unittest.TestCase): def test_negative(self): - self.assert_(-2 == 0 - 2) - self.assert_(-0 == 0) - self.assert_(--2 == 2) - self.assert_(-2L == 0 - 2L) - self.assert_(-2.0 == 0 - 2.0) - self.assert_(-2j == 0 - 2j) + self.assertTrue(-2 == 0 - 2) + self.assertTrue(-0 == 0) + self.assertTrue(--2 == 2) + self.assertTrue(-2L == 0 - 2L) + self.assertTrue(-2.0 == 0 - 2.0) + self.assertTrue(-2j == 0 - 2j) def test_positive(self): - self.assert_(+2 == 2) - self.assert_(+0 == 0) - self.assert_(++2 == 2) - self.assert_(+2L == 2L) - self.assert_(+2.0 == 2.0) - self.assert_(+2j == 2j) + self.assertTrue(+2 == 2) + self.assertTrue(+0 == 0) + self.assertTrue(++2 == 2) + self.assertTrue(+2L == 2L) + self.assertTrue(+2.0 == 2.0) + self.assertTrue(+2j == 2j) def test_invert(self): - self.assert_(-2 == 0 - 2) - self.assert_(-0 == 0) - self.assert_(--2 == 2) - self.assert_(-2L == 0 - 2L) + self.assertTrue(-2 == 0 - 2) + self.assertTrue(-0 == 0) + self.assertTrue(--2 == 2) + self.assertTrue(-2L == 0 - 2L) def test_no_overflow(self): nines = "9" * 32 - self.assert_(eval("+" + nines) == eval("+" + nines + "L")) - self.assert_(eval("-" + nines) == eval("-" + nines + "L")) - self.assert_(eval("~" + nines) == eval("~" + nines + "L")) + self.assertTrue(eval("+" + nines) == eval("+" + nines + "L")) + self.assertTrue(eval("-" + nines) == eval("-" + nines + "L")) + self.assertTrue(eval("~" + nines) == eval("~" + nines + "L")) def test_negation_of_exponentiation(self): # Make sure '**' does the right thing; these form a Modified: python/trunk/Lib/test/test_unicode.py ============================================================================== --- python/trunk/Lib/test/test_unicode.py (original) +++ python/trunk/Lib/test/test_unicode.py Wed Jul 1 00:57:08 2009 @@ -38,7 +38,7 @@ method = getattr(object, methodname) realresult = method(*args) self.assertEqual(realresult, result) - self.assert_(type(realresult) is type(result)) + self.assertTrue(type(realresult) is type(result)) # if the original is returned make sure that # this doesn't happen with subclasses @@ -50,7 +50,7 @@ method = getattr(object, methodname) realresult = method(*args) self.assertEqual(realresult, result) - self.assert_(object is not realresult) + self.assertTrue(object is not realresult) def test_literals(self): self.assertEqual(u'\xff', u'\u00ff') @@ -200,25 +200,25 @@ self.assertEqual(u'abc', 'abc') self.assertEqual('abc', u'abc') self.assertEqual(u'abc', u'abc') - self.assert_(u'abcd' > 'abc') - self.assert_('abcd' > u'abc') - self.assert_(u'abcd' > u'abc') - self.assert_(u'abc' < 'abcd') - self.assert_('abc' < u'abcd') - self.assert_(u'abc' < u'abcd') + self.assertTrue(u'abcd' > 'abc') + self.assertTrue('abcd' > u'abc') + self.assertTrue(u'abcd' > u'abc') + self.assertTrue(u'abc' < 'abcd') + self.assertTrue('abc' < u'abcd') + self.assertTrue(u'abc' < u'abcd') if 0: # Move these tests to a Unicode collation module test... # Testing UTF-16 code point order comparisons... # No surrogates, no fixup required. - self.assert_(u'\u0061' < u'\u20ac') + self.assertTrue(u'\u0061' < u'\u20ac') # Non surrogate below surrogate value, no fixup required - self.assert_(u'\u0061' < u'\ud800\udc02') + self.assertTrue(u'\u0061' < u'\ud800\udc02') # Non surrogate above surrogate value, fixup required def test_lecmp(s, s2): - self.assert_(s < s2) + self.assertTrue(s < s2) def test_fixup(s): s2 = u'\ud800\udc01' @@ -258,7 +258,7 @@ test_fixup(u'\uff61') # Surrogates on both sides, no fixup required - self.assert_(u'\ud800\udc02' < u'\ud84d\udc56') + self.assertTrue(u'\ud800\udc02' < u'\ud84d\udc56') def test_islower(self): string_tests.MixinStrUnicodeUserStringTest.test_islower(self) @@ -316,63 +316,63 @@ def test_contains(self): # Testing Unicode contains method - self.assert_('a' in u'abdb') - self.assert_('a' in u'bdab') - self.assert_('a' in u'bdaba') - self.assert_('a' in u'bdba') - self.assert_('a' in u'bdba') - self.assert_(u'a' in u'bdba') - self.assert_(u'a' not in u'bdb') - self.assert_(u'a' not in 'bdb') - self.assert_(u'a' in 'bdba') - self.assert_(u'a' in ('a',1,None)) - self.assert_(u'a' in (1,None,'a')) - self.assert_(u'a' in (1,None,u'a')) - self.assert_('a' in ('a',1,None)) - self.assert_('a' in (1,None,'a')) - self.assert_('a' in (1,None,u'a')) - self.assert_('a' not in ('x',1,u'y')) - self.assert_('a' not in ('x',1,None)) - self.assert_(u'abcd' not in u'abcxxxx') - self.assert_(u'ab' in u'abcd') - self.assert_('ab' in u'abc') - self.assert_(u'ab' in 'abc') - self.assert_(u'ab' in (1,None,u'ab')) - self.assert_(u'' in u'abc') - self.assert_('' in u'abc') + self.assertTrue('a' in u'abdb') + self.assertTrue('a' in u'bdab') + self.assertTrue('a' in u'bdaba') + self.assertTrue('a' in u'bdba') + self.assertTrue('a' in u'bdba') + self.assertTrue(u'a' in u'bdba') + self.assertTrue(u'a' not in u'bdb') + self.assertTrue(u'a' not in 'bdb') + self.assertTrue(u'a' in 'bdba') + self.assertTrue(u'a' in ('a',1,None)) + self.assertTrue(u'a' in (1,None,'a')) + self.assertTrue(u'a' in (1,None,u'a')) + self.assertTrue('a' in ('a',1,None)) + self.assertTrue('a' in (1,None,'a')) + self.assertTrue('a' in (1,None,u'a')) + self.assertTrue('a' not in ('x',1,u'y')) + self.assertTrue('a' not in ('x',1,None)) + self.assertTrue(u'abcd' not in u'abcxxxx') + self.assertTrue(u'ab' in u'abcd') + self.assertTrue('ab' in u'abc') + self.assertTrue(u'ab' in 'abc') + self.assertTrue(u'ab' in (1,None,u'ab')) + self.assertTrue(u'' in u'abc') + self.assertTrue('' in u'abc') # If the following fails either # the contains operator does not propagate UnicodeErrors or # someone has changed the default encoding self.assertRaises(UnicodeError, 'g\xe2teau'.__contains__, u'\xe2') - self.assert_(u'' in '') - self.assert_('' in u'') - self.assert_(u'' in u'') - self.assert_(u'' in 'abc') - self.assert_('' in u'abc') - self.assert_(u'' in u'abc') - self.assert_(u'\0' not in 'abc') - self.assert_('\0' not in u'abc') - self.assert_(u'\0' not in u'abc') - self.assert_(u'\0' in '\0abc') - self.assert_('\0' in u'\0abc') - self.assert_(u'\0' in u'\0abc') - self.assert_(u'\0' in 'abc\0') - self.assert_('\0' in u'abc\0') - self.assert_(u'\0' in u'abc\0') - self.assert_(u'a' in '\0abc') - self.assert_('a' in u'\0abc') - self.assert_(u'a' in u'\0abc') - self.assert_(u'asdf' in 'asdf') - self.assert_('asdf' in u'asdf') - self.assert_(u'asdf' in u'asdf') - self.assert_(u'asdf' not in 'asd') - self.assert_('asdf' not in u'asd') - self.assert_(u'asdf' not in u'asd') - self.assert_(u'asdf' not in '') - self.assert_('asdf' not in u'') - self.assert_(u'asdf' not in u'') + self.assertTrue(u'' in '') + self.assertTrue('' in u'') + self.assertTrue(u'' in u'') + self.assertTrue(u'' in 'abc') + self.assertTrue('' in u'abc') + self.assertTrue(u'' in u'abc') + self.assertTrue(u'\0' not in 'abc') + self.assertTrue('\0' not in u'abc') + self.assertTrue(u'\0' not in u'abc') + self.assertTrue(u'\0' in '\0abc') + self.assertTrue('\0' in u'\0abc') + self.assertTrue(u'\0' in u'\0abc') + self.assertTrue(u'\0' in 'abc\0') + self.assertTrue('\0' in u'abc\0') + self.assertTrue(u'\0' in u'abc\0') + self.assertTrue(u'a' in '\0abc') + self.assertTrue('a' in u'\0abc') + self.assertTrue(u'a' in u'\0abc') + self.assertTrue(u'asdf' in 'asdf') + self.assertTrue('asdf' in u'asdf') + self.assertTrue(u'asdf' in u'asdf') + self.assertTrue(u'asdf' not in 'asd') + self.assertTrue('asdf' not in u'asd') + self.assertTrue(u'asdf' not in u'asd') + self.assertTrue(u'asdf' not in '') + self.assertTrue('asdf' not in u'') + self.assertTrue(u'asdf' not in u'') self.assertRaises(TypeError, u"abc".__contains__) Modified: python/trunk/Lib/test/test_unicode_file.py ============================================================================== --- python/trunk/Lib/test/test_unicode_file.py (original) +++ python/trunk/Lib/test/test_unicode_file.py Wed Jul 1 00:57:08 2009 @@ -42,19 +42,19 @@ # Do all the tests we can given only a single filename. The file should # exist. def _do_single(self, filename): - self.failUnless(os.path.exists(filename)) - self.failUnless(os.path.isfile(filename)) - self.failUnless(os.access(filename, os.R_OK)) - 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)) + self.assertTrue(os.path.exists(filename)) + self.assertTrue(os.path.isfile(filename)) + self.assertTrue(os.access(filename, os.R_OK)) + self.assertTrue(os.path.exists(os.path.abspath(filename))) + self.assertTrue(os.path.isfile(os.path.abspath(filename))) + self.assertTrue(os.access(os.path.abspath(filename), os.R_OK)) os.chmod(filename, 0777) os.utime(filename, None) os.utime(filename, (time.time(), time.time())) # Copy/rename etc tests using the same filename self._do_copyish(filename, filename) # Filename should appear in glob output - self.failUnless( + self.assertTrue( os.path.abspath(filename)==os.path.abspath(glob.glob(filename)[0])) # basename should appear in listdir. path, base = os.path.split(os.path.abspath(filename)) @@ -71,7 +71,7 @@ base = unicodedata.normalize("NFD", base) file_list = [unicodedata.normalize("NFD", f) for f in file_list] - self.failUnless(base in file_list) + self.assertTrue(base in file_list) # Do as many "equivalancy' tests as we can - ie, check that although we # have different types for the filename, they refer to the same file. @@ -79,12 +79,12 @@ # Note we only check "filename1 against filename2" - we don't bother # checking "filename2 against 1", as we assume we are called again with # the args reversed. - self.failUnless(type(filename1)!=type(filename2), + self.assertTrue(type(filename1)!=type(filename2), "No point checking equivalent filenames of the same type") # stat and lstat should return the same results. - self.failUnlessEqual(os.stat(filename1), + self.assertEqual(os.stat(filename1), os.stat(filename2)) - self.failUnlessEqual(os.lstat(filename1), + self.assertEqual(os.lstat(filename1), os.lstat(filename2)) # Copy/rename etc tests using equivalent filename self._do_copyish(filename1, filename2) @@ -92,19 +92,19 @@ # Tests that copy, move, etc one file to another. def _do_copyish(self, filename1, filename2): # Should be able to rename the file using either name. - self.failUnless(os.path.isfile(filename1)) # must exist. + self.assertTrue(os.path.isfile(filename1)) # must exist. os.rename(filename1, filename2 + ".new") - self.failUnless(os.path.isfile(filename1+".new")) + self.assertTrue(os.path.isfile(filename1+".new")) os.rename(filename1 + ".new", filename2) - self.failUnless(os.path.isfile(filename2)) + self.assertTrue(os.path.isfile(filename2)) shutil.copy(filename1, filename2 + ".new") os.unlink(filename1 + ".new") # remove using equiv name. # And a couple of moves, one using each name. shutil.move(filename1, filename2 + ".new") - self.failUnless(not os.path.exists(filename2)) + self.assertTrue(not os.path.exists(filename2)) shutil.move(filename1 + ".new", filename2) - self.failUnless(os.path.exists(filename1)) + self.assertTrue(os.path.exists(filename1)) # Note - due to the implementation of shutil.move, # it tries a rename first. This only fails on Windows when on # different file systems - and this test can't ensure that. @@ -131,7 +131,7 @@ cwd_result = unicodedata.normalize("NFD", cwd_result) name_result = unicodedata.normalize("NFD", name_result) - self.failUnlessEqual(os.path.basename(cwd_result),name_result) + self.assertEqual(os.path.basename(cwd_result),name_result) finally: os.chdir(cwd) finally: @@ -147,7 +147,7 @@ self._do_single(filename) finally: os.unlink(filename) - self.failUnless(not os.path.exists(filename)) + self.assertTrue(not os.path.exists(filename)) # and again with os.open. f = os.open(filename, os.O_CREAT) os.close(f) @@ -158,7 +158,7 @@ def _test_equivalent(self, filename1, filename2): remove_if_exists(filename1) - self.failUnless(not os.path.exists(filename2)) + self.assertTrue(not os.path.exists(filename2)) f = file(filename1, "w") f.close() try: Modified: python/trunk/Lib/test/test_unicodedata.py ============================================================================== --- python/trunk/Lib/test/test_unicodedata.py (original) +++ python/trunk/Lib/test/test_unicodedata.py Wed Jul 1 00:57:08 2009 @@ -230,7 +230,7 @@ if dec != -1: self.assertEqual(dec, self.db.numeric(c)) count += 1 - self.assert_(count >= 10) # should have tested at least the ASCII digits + self.assertTrue(count >= 10) # should have tested at least the ASCII digits def test_digit_numeric_consistent(self): # Test that digit and numeric are consistent, @@ -243,7 +243,7 @@ if dec != -1: self.assertEqual(dec, self.db.numeric(c)) count += 1 - self.assert_(count >= 10) # should have tested at least the ASCII digits + self.assertTrue(count >= 10) # should have tested at least the ASCII digits def test_bug_1704793(self): self.assertEquals(self.db.lookup("GOTHIC LETTER FAIHU"), u'\U00010346') @@ -251,13 +251,13 @@ def test_ucd_510(self): import unicodedata # In UCD 5.1.0, a mirrored property changed wrt. UCD 3.2.0 - self.assert_(unicodedata.mirrored(u"\u0f3a")) - self.assert_(not unicodedata.ucd_3_2_0.mirrored(u"\u0f3a")) + self.assertTrue(unicodedata.mirrored(u"\u0f3a")) + self.assertTrue(not unicodedata.ucd_3_2_0.mirrored(u"\u0f3a")) # Also, we now have two ways of representing # the upper-case mapping: as delta, or as absolute value - self.assert_(u"a".upper()==u'A') - self.assert_(u"\u1d79".upper()==u'\ua77d') - self.assert_(u".".upper()==u".") + self.assertTrue(u"a".upper()==u'A') + self.assertTrue(u"\u1d79".upper()==u'\ua77d') + self.assertTrue(u".".upper()==u".") def test_bug_5828(self): self.assertEqual(u"\u1d79".lower(), u"\u1d79") Modified: python/trunk/Lib/test/test_urllib.py ============================================================================== --- python/trunk/Lib/test/test_urllib.py (original) +++ python/trunk/Lib/test/test_urllib.py Wed Jul 1 00:57:08 2009 @@ -44,7 +44,7 @@ # Make sure object returned by urlopen() has the specified methods for attr in ("read", "readline", "readlines", "fileno", "close", "info", "geturl", "getcode", "__iter__"): - self.assert_(hasattr(self.returned_obj, attr), + self.assertTrue(hasattr(self.returned_obj, attr), "object returned by urlopen() lacks %s attribute" % attr) @@ -66,7 +66,7 @@ def test_fileno(self): file_num = self.returned_obj.fileno() - self.assert_(isinstance(file_num, int), + self.assertTrue(isinstance(file_num, int), "fileno() did not return an int") self.assertEqual(os.read(file_num, len(self.text)), self.text, "Reading on the file descriptor returned by fileno() " @@ -78,7 +78,7 @@ self.returned_obj.close() def test_info(self): - self.assert_(isinstance(self.returned_obj.info(), mimetools.Message)) + self.assertTrue(isinstance(self.returned_obj.info(), mimetools.Message)) def test_geturl(self): self.assertEqual(self.returned_obj.geturl(), self.pathname) @@ -229,7 +229,7 @@ # a headers value is returned. result = urllib.urlretrieve("file:%s" % test_support.TESTFN) self.assertEqual(result[0], test_support.TESTFN) - self.assert_(isinstance(result[1], mimetools.Message), + self.assertTrue(isinstance(result[1], mimetools.Message), "did not get a mimetools.Message instance as second " "returned value") @@ -240,7 +240,7 @@ result = urllib.urlretrieve(self.constructLocalFileUrl( test_support.TESTFN), second_temp) self.assertEqual(second_temp, result[0]) - self.assert_(os.path.exists(second_temp), "copy of the file was not " + self.assertTrue(os.path.exists(second_temp), "copy of the file was not " "made") FILE = file(second_temp, 'rb') try: @@ -254,9 +254,9 @@ def test_reporthook(self): # Make sure that the reporthook works. def hooktester(count, block_size, total_size, count_holder=[0]): - self.assert_(isinstance(count, int)) - self.assert_(isinstance(block_size, int)) - self.assert_(isinstance(total_size, int)) + self.assertTrue(isinstance(count, int)) + self.assertTrue(isinstance(block_size, int)) + self.assertTrue(isinstance(total_size, int)) self.assertEqual(count, count_holder[0]) count_holder[0] = count_holder[0] + 1 second_temp = "%s.2" % test_support.TESTFN @@ -487,7 +487,7 @@ expect_somewhere = ["1st=1", "2nd=2", "3rd=3"] result = urllib.urlencode(given) for expected in expect_somewhere: - self.assert_(expected in result, + self.assertTrue(expected in result, "testing %s: %s not found in %s" % (test_type, expected, result)) self.assertEqual(result.count('&'), 2, @@ -496,7 +496,7 @@ amp_location = result.index('&') on_amp_left = result[amp_location - 1] on_amp_right = result[amp_location + 1] - self.assert_(on_amp_left.isdigit() and on_amp_right.isdigit(), + self.assertTrue(on_amp_left.isdigit() and on_amp_right.isdigit(), "testing %s: '&' not located in proper place in %s" % (test_type, result)) self.assertEqual(len(result), (5 * 3) + 2, #5 chars per thing and amps @@ -534,7 +534,7 @@ result = urllib.urlencode(given, True) for value in given["sequence"]: expect = "sequence=%s" % value - self.assert_(expect in result, + self.assertTrue(expect in result, "%s not found in %s" % (expect, result)) self.assertEqual(result.count('&'), 2, "Expected 2 '&'s, got %s" % result.count('&')) @@ -661,7 +661,7 @@ # def testTimeoutNone(self): # # global default timeout is ignored # import socket -# self.assert_(socket.getdefaulttimeout() is None) +# self.assertTrue(socket.getdefaulttimeout() is None) # socket.setdefaulttimeout(30) # try: # ftp = urllib.ftpwrapper("myuser", "mypass", "localhost", 9093, []) @@ -673,7 +673,7 @@ # def testTimeoutDefault(self): # # global default timeout is used # import socket -# self.assert_(socket.getdefaulttimeout() is None) +# self.assertTrue(socket.getdefaulttimeout() is None) # socket.setdefaulttimeout(30) # try: # ftp = urllib.ftpwrapper("myuser", "mypass", "localhost", 9093, []) Modified: python/trunk/Lib/test/test_urllib2.py ============================================================================== --- python/trunk/Lib/test/test_urllib2.py (original) +++ python/trunk/Lib/test/test_urllib2.py Wed Jul 1 00:57:08 2009 @@ -521,15 +521,15 @@ # *_request self.assertEqual((handler, name), calls[i]) self.assertEqual(len(args), 1) - self.assert_(isinstance(args[0], Request)) + self.assertTrue(isinstance(args[0], Request)) else: # *_response self.assertEqual((handler, name), calls[i]) self.assertEqual(len(args), 2) - self.assert_(isinstance(args[0], Request)) + self.assertTrue(isinstance(args[0], Request)) # response from opener.open is None, because there's no # handler that defines http_open to handle it - self.assert_(args[1] is None or + self.assertTrue(args[1] is None or isinstance(args[1], MockResponse)) @@ -580,7 +580,7 @@ req.timeout = None r = h.ftp_open(req) # ftp authentication not yet implemented by FTPHandler - self.assert_(h.user == h.passwd == "") + self.assertTrue(h.user == h.passwd == "") self.assertEqual(h.host, socket.gethostbyname(host)) self.assertEqual(h.port, port) self.assertEqual(h.dirs, dirs) @@ -674,9 +674,9 @@ h.file_open(req) # XXXX remove OSError when bug fixed except (urllib2.URLError, OSError): - self.assert_(not ftp) + self.assertTrue(not ftp) else: - self.assert_(o.req is req) + self.assertTrue(o.req is req) self.assertEqual(req.type, "ftp") def test_http(self): @@ -751,8 +751,8 @@ r = MockResponse(200, "OK", {}, "") newreq = h.do_request_(req) if data is None: # GET - self.assert_("Content-length" not in req.unredirected_hdrs) - self.assert_("Content-type" not in req.unredirected_hdrs) + self.assertTrue("Content-length" not in req.unredirected_hdrs) + self.assertTrue("Content-type" not in req.unredirected_hdrs) else: # POST self.assertEqual(req.unredirected_hdrs["Content-length"], "0") self.assertEqual(req.unredirected_hdrs["Content-type"], @@ -807,19 +807,19 @@ # all 2xx are passed through r = MockResponse(200, "OK", {}, "", url) newr = h.http_response(req, r) - self.assert_(r is newr) - self.assert_(not hasattr(o, "proto")) # o.error not called + self.assertTrue(r is newr) + self.assertTrue(not hasattr(o, "proto")) # o.error not called r = MockResponse(202, "Accepted", {}, "", url) newr = h.http_response(req, r) - self.assert_(r is newr) - self.assert_(not hasattr(o, "proto")) # o.error not called + self.assertTrue(r is newr) + self.assertTrue(not hasattr(o, "proto")) # o.error not called r = MockResponse(206, "Partial content", {}, "", url) newr = h.http_response(req, r) - self.assert_(r is newr) - self.assert_(not hasattr(o, "proto")) # o.error not called + self.assertTrue(r is newr) + self.assertTrue(not hasattr(o, "proto")) # o.error not called # anything else calls o.error (and MockOpener returns None, here) r = MockResponse(502, "Bad gateway", {}, "", url) - self.assert_(h.http_response(req, r) is None) + self.assertTrue(h.http_response(req, r) is None) self.assertEqual(o.proto, "http") # o.error called self.assertEqual(o.args, (req, r, 502, "Bad gateway", {})) @@ -831,12 +831,12 @@ req = Request("http://example.com/") r = MockResponse(200, "OK", {}, "") newreq = h.http_request(req) - self.assert_(cj.ach_req is req is newreq) + self.assertTrue(cj.ach_req is req is newreq) self.assertEquals(req.get_origin_req_host(), "example.com") - self.assert_(not req.is_unverifiable()) + self.assertTrue(not req.is_unverifiable()) newr = h.http_response(req, r) - self.assert_(cj.ec_req is req) - self.assert_(cj.ec_r is r is newr) + self.assertTrue(cj.ec_req is req) + self.assertTrue(cj.ec_r is r is newr) def test_redirect(self): from_url = "http://example.com/a.html" @@ -858,12 +858,12 @@ MockHeaders({"location": to_url})) except urllib2.HTTPError: # 307 in response to POST requires user OK - self.assert_(code == 307 and data is not None) + self.assertTrue(code == 307 and data is not None) self.assertEqual(o.req.get_full_url(), to_url) try: self.assertEqual(o.req.get_method(), "GET") except AttributeError: - self.assert_(not o.req.has_data()) + self.assertTrue(not o.req.has_data()) # now it's a GET, there should not be headers regarding content # (possibly dragged from before being a POST) @@ -873,8 +873,8 @@ self.assertEqual(o.req.headers["Nonsense"], "viking=withhold") - self.assert_("Spam" not in o.req.headers) - self.assert_("Spam" not in o.req.unredirected_hdrs) + self.assertTrue("Spam" not in o.req.headers) + self.assertTrue("Spam" not in o.req.unredirected_hdrs) # loop detection req = Request(from_url) @@ -920,7 +920,7 @@ cp = urllib2.HTTPCookieProcessor(cj) o = build_test_opener(hh, hdeh, hrh, cp) o.open("http://www.example.com/") - self.assert_(not hh.req.has_header("Cookie")) + self.assertTrue(not hh.req.has_header("Cookie")) def test_proxy(self): o = OpenerDirector() @@ -1117,7 +1117,7 @@ if h.__class__ == handler_class: break else: - self.assert_(False) + self.assertTrue(False) class RequestTests(unittest.TestCase): @@ -1132,10 +1132,10 @@ self.assertEqual("GET", self.get.get_method()) def test_add_data(self): - self.assert_(not self.get.has_data()) + self.assertTrue(not self.get.has_data()) self.assertEqual("GET", self.get.get_method()) self.get.add_data("spam") - self.assert_(self.get.has_data()) + self.assertTrue(self.get.has_data()) self.assertEqual("POST", self.get.get_method()) def test_get_full_url(self): @@ -1158,9 +1158,9 @@ self.assertEqual("www.python.org", req.get_host()) def test_proxy(self): - self.assert_(not self.get.has_proxy()) + self.assertTrue(not self.get.has_proxy()) self.get.set_proxy("www.perl.org", "http") - self.assert_(self.get.has_proxy()) + self.assertTrue(self.get.has_proxy()) self.assertEqual("www.python.org", self.get.get_origin_req_host()) self.assertEqual("www.perl.org", self.get.get_host()) 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 Wed Jul 1 00:57:08 2009 @@ -434,10 +434,10 @@ try: open_url = urllib2.urlopen("http://localhost:%s" % handler.port) for attr in ("read", "close", "info", "geturl"): - self.assert_(hasattr(open_url, attr), "object returned from " + self.assertTrue(hasattr(open_url, attr), "object returned from " "urlopen lacks the %s attribute" % attr) try: - self.assert_(open_url.read(), "calling 'read' failed") + self.assertTrue(open_url.read(), "calling 'read' failed") finally: open_url.close() finally: @@ -449,7 +449,7 @@ try: open_url = urllib2.urlopen("http://localhost:%s" % handler.port) info_obj = open_url.info() - self.assert_(isinstance(info_obj, mimetools.Message), + self.assertTrue(isinstance(info_obj, mimetools.Message), "object returned by 'info' is not an instance of " "mimetools.Message") self.assertEqual(info_obj.getsubtype(), "plain") Modified: python/trunk/Lib/test/test_urllib2net.py ============================================================================== --- python/trunk/Lib/test/test_urllib2net.py (original) +++ python/trunk/Lib/test/test_urllib2net.py Wed Jul 1 00:57:08 2009 @@ -81,15 +81,15 @@ # delve deep into response to fetch socket._socketobject response = _urlopen_with_retry("http://www.python.org/") abused_fileobject = response.fp - self.assert_(abused_fileobject.__class__ is socket._fileobject) + self.assertTrue(abused_fileobject.__class__ is socket._fileobject) httpresponse = abused_fileobject._sock - self.assert_(httpresponse.__class__ is httplib.HTTPResponse) + self.assertTrue(httpresponse.__class__ is httplib.HTTPResponse) fileobject = httpresponse.fp - self.assert_(fileobject.__class__ is socket._fileobject) + self.assertTrue(fileobject.__class__ is socket._fileobject) - self.assert_(not fileobject.closed) + self.assertTrue(not fileobject.closed) response.close() - self.assert_(fileobject.closed) + self.assertTrue(fileobject.closed) class OtherNetworkTests(unittest.TestCase): def setUp(self): @@ -176,7 +176,7 @@ if expected_err: msg = ("Didn't get expected error(s) %s for %s %s, got %s: %s" % (expected_err, url, req, type(err), err)) - self.assert_(isinstance(err, expected_err), msg) + self.assertTrue(isinstance(err, expected_err), msg) else: with test_support.transient_internet(): buf = f.read() Modified: python/trunk/Lib/test/test_urllibnet.py ============================================================================== --- python/trunk/Lib/test/test_urllibnet.py (original) +++ python/trunk/Lib/test/test_urllibnet.py Wed Jul 1 00:57:08 2009 @@ -60,10 +60,10 @@ open_url = self.urlopen("http://www.python.org/") for attr in ("read", "readline", "readlines", "fileno", "close", "info", "geturl"): - self.assert_(hasattr(open_url, attr), "object returned from " + self.assertTrue(hasattr(open_url, attr), "object returned from " "urlopen lacks the %s attribute" % attr) try: - self.assert_(open_url.read(), "calling 'read' failed") + self.assertTrue(open_url.read(), "calling 'read' failed") finally: open_url.close() @@ -71,9 +71,9 @@ # Test both readline and readlines. open_url = self.urlopen("http://www.python.org/") try: - self.assert_(isinstance(open_url.readline(), basestring), + self.assertTrue(isinstance(open_url.readline(), basestring), "readline did not return a string") - self.assert_(isinstance(open_url.readlines(), list), + self.assertTrue(isinstance(open_url.readlines(), list), "readlines did not return a list") finally: open_url.close() @@ -85,7 +85,7 @@ info_obj = open_url.info() finally: open_url.close() - self.assert_(isinstance(info_obj, mimetools.Message), + self.assertTrue(isinstance(info_obj, mimetools.Message), "object returned by 'info' is not an instance of " "mimetools.Message") self.assertEqual(info_obj.getsubtype(), "html") @@ -121,7 +121,7 @@ fd = open_url.fileno() FILE = os.fdopen(fd) try: - self.assert_(FILE.read(), "reading from file created using fd " + self.assertTrue(FILE.read(), "reading from file created using fd " "returned by fileno failed") finally: FILE.close() @@ -148,11 +148,11 @@ def test_basic(self): # Test basic functionality. file_location,info = self.urlretrieve("http://www.python.org/") - self.assert_(os.path.exists(file_location), "file location returned by" + self.assertTrue(os.path.exists(file_location), "file location returned by" " urlretrieve is not a valid path") FILE = file(file_location) try: - self.assert_(FILE.read(), "reading from the file location returned" + self.assertTrue(FILE.read(), "reading from the file location returned" " by urlretrieve failed") finally: FILE.close() @@ -163,10 +163,10 @@ file_location,info = self.urlretrieve("http://www.python.org/", test_support.TESTFN) self.assertEqual(file_location, test_support.TESTFN) - self.assert_(os.path.exists(file_location)) + self.assertTrue(os.path.exists(file_location)) FILE = file(file_location) try: - self.assert_(FILE.read(), "reading from temporary file failed") + self.assertTrue(FILE.read(), "reading from temporary file failed") finally: FILE.close() os.unlink(file_location) @@ -175,7 +175,7 @@ # Make sure header returned as 2nd value from urlretrieve is good. file_location, header = self.urlretrieve("http://www.python.org/") os.unlink(file_location) - self.assert_(isinstance(header, mimetools.Message), + self.assertTrue(isinstance(header, mimetools.Message), "header is not an instance of mimetools.Message") Modified: python/trunk/Lib/test/test_userdict.py ============================================================================== --- python/trunk/Lib/test/test_userdict.py (original) +++ python/trunk/Lib/test/test_userdict.py Wed Jul 1 00:57:08 2009 @@ -38,9 +38,9 @@ self.assertEqual(UserDict.UserDict().fromkeys('one two'.split()), d4) self.assertEqual(UserDict.UserDict.fromkeys('one two'.split(), 1), d5) self.assertEqual(UserDict.UserDict().fromkeys('one two'.split(), 1), d5) - self.assert_(u1.fromkeys('one two'.split()) is not u1) - self.assert_(isinstance(u1.fromkeys('one two'.split()), UserDict.UserDict)) - self.assert_(isinstance(u2.fromkeys('one two'.split()), UserDict.IterableUserDict)) + self.assertTrue(u1.fromkeys('one two'.split()) is not u1) + self.assertTrue(isinstance(u1.fromkeys('one two'.split()), UserDict.UserDict)) + self.assertTrue(isinstance(u2.fromkeys('one two'.split()), UserDict.IterableUserDict)) # Test __repr__ self.assertEqual(str(u0), str(d0)) @@ -95,8 +95,8 @@ # Test has_key and "in". for i in u2.keys(): - self.assert_(u2.has_key(i)) - self.assert_(i in u2) + self.assertTrue(u2.has_key(i)) + self.assertTrue(i in u2) self.assertEqual(u1.has_key(i), d1.has_key(i)) self.assertEqual(i in u1, i in d1) self.assertEqual(u0.has_key(i), d0.has_key(i)) @@ -131,7 +131,7 @@ # Test setdefault t = UserDict.UserDict() self.assertEqual(t.setdefault("x", 42), 42) - self.assert_(t.has_key("x")) + self.assertTrue(t.has_key("x")) self.assertEqual(t.setdefault("x", 23), 42) # Test pop @@ -161,8 +161,8 @@ d = D({1: 2, 3: 4}) self.assertEqual(d[1], 2) self.assertEqual(d[3], 4) - self.assert_(2 not in d) - self.assert_(2 not in d.keys()) + self.assertTrue(2 not in d) + self.assertTrue(2 not in d.keys()) self.assertEqual(d[2], 42) class E(UserDict.UserDict): def __missing__(self, key): @@ -269,12 +269,12 @@ ## Now, test the DictMixin methods one by one # has_key - self.assert_(s.has_key(10)) - self.assert_(not s.has_key(20)) + self.assertTrue(s.has_key(10)) + self.assertTrue(not s.has_key(20)) # __contains__ - self.assert_(10 in s) - self.assert_(20 not in s) + self.assertTrue(10 in s) + self.assertTrue(20 not in s) # __iter__ self.assertEqual([k for k in s], [10, 30]) @@ -309,7 +309,7 @@ # pop self.assertEqual(s.pop(10), 'ten') - self.assert_(10 not in s) + self.assertTrue(10 not in s) s[10] = 'ten' self.assertEqual(s.pop("x", 1), 1) s["x"] = 42 @@ -317,7 +317,7 @@ # popitem k, v = s.popitem() - self.assert_(k not in s) + self.assertTrue(k not in s) s[k] = v # clear Modified: python/trunk/Lib/test/test_userstring.py ============================================================================== --- python/trunk/Lib/test/test_userstring.py (original) +++ python/trunk/Lib/test/test_userstring.py Wed Jul 1 00:57:08 2009 @@ -114,7 +114,7 @@ s = self.type2test("foobar") s2 = s.immutable() self.assertEqual(s, s2) - self.assert_(isinstance(s2, UserString)) + self.assertTrue(isinstance(s2, UserString)) def test_iadd(self): s = self.type2test("foo") Modified: python/trunk/Lib/test/test_uuid.py ============================================================================== --- python/trunk/Lib/test/test_uuid.py (original) +++ python/trunk/Lib/test/test_uuid.py Wed Jul 1 00:57:08 2009 @@ -288,8 +288,8 @@ self.assertEqual(universal_local_bit, 0, message) self.assertNotEqual(node, 0, message) self.assertNotEqual(node, 0xffffffffffffL, message) - self.assert_(0 <= node, message) - self.assert_(node < (1L << 48), message) + self.assertTrue(0 <= node, message) + self.assertTrue(node < (1L << 48), message) TestUUID.source2node[source] = node if TestUUID.last_node: @@ -331,8 +331,8 @@ def test_random_getnode(self): node = uuid._random_getnode() - self.assert_(0 <= node) - self.assert_(node < (1L <<48)) + self.assertTrue(0 <= node) + self.assertTrue(node < (1L <<48)) def test_unixdll_getnode(self): import sys Modified: python/trunk/Lib/test/test_warnings.py ============================================================================== --- python/trunk/Lib/test/test_warnings.py (original) +++ python/trunk/Lib/test/test_warnings.py Wed Jul 1 00:57:08 2009 @@ -83,9 +83,9 @@ self.module.filterwarnings("always", category=UserWarning) message = "FilterTests.test_always" self.module.warn(message, UserWarning) - self.assert_(message, w[-1].message) + self.assertTrue(message, w[-1].message) self.module.warn(message, UserWarning) - self.assert_(w[-1].message, message) + self.assertTrue(w[-1].message, message) def test_default(self): with original_warnings.catch_warnings(record=True, @@ -165,7 +165,7 @@ text = 'handle normally' self.module.warn(text) self.assertEqual(str(w[-1].message), text) - self.assert_(w[-1].category is UserWarning) + self.assertTrue(w[-1].category is UserWarning) self.module.filterwarnings("ignore", "", Warning, "", 0) text = 'filtered out' @@ -178,7 +178,7 @@ text = 'nonmatching text' self.module.warn(text) self.assertEqual(str(w[-1].message), text) - self.assert_(w[-1].category is UserWarning) + self.assertTrue(w[-1].category is UserWarning) class CFilterTests(BaseTest, FilterTests): module = c_warnings @@ -198,7 +198,7 @@ text = 'multi %d' %i # Different text on each call. self.module.warn(text) self.assertEqual(str(w[-1].message), text) - self.assert_(w[-1].category is UserWarning) + self.assertTrue(w[-1].category is UserWarning) def test_filename(self): with warnings_state(self.module): @@ -397,7 +397,7 @@ self.module.resetwarnings() self.module.filterwarnings("once", category=UserWarning) self.module.warn_explicit(message, UserWarning, "file", 42) - self.failUnlessEqual(w[-1].message, message) + self.assertEqual(w[-1].message, message) del w[:] self.module.warn_explicit(message, UserWarning, "file", 42) self.assertEquals(len(w), 0) @@ -405,7 +405,7 @@ self.module.onceregistry = {} __warningregistry__ = {} self.module.warn('onceregistry test') - self.failUnlessEqual(w[-1].message.args, message.args) + self.assertEqual(w[-1].message.args, message.args) # Removal of onceregistry is okay. del w[:] del self.module.onceregistry @@ -459,7 +459,7 @@ with test_support.captured_output('stderr') as stream: self.module.warn(text) result = stream.getvalue() - self.failUnless(text in result) + self.assertTrue(text in result) def test_showwarning_not_callable(self): with original_warnings.catch_warnings(module=self.module): @@ -480,19 +480,19 @@ with test_support.captured_output('stderr') as stream: warning_tests.inner(text) result = stream.getvalue() - self.failUnlessEqual(result.count('\n'), 2, + self.assertEqual(result.count('\n'), 2, "Too many newlines in %r" % result) first_line, second_line = result.split('\n', 1) expected_file = os.path.splitext(warning_tests.__file__)[0] + '.py' first_line_parts = first_line.rsplit(':', 3) path, line, warning_class, message = first_line_parts line = int(line) - self.failUnlessEqual(expected_file, path) - self.failUnlessEqual(warning_class, ' ' + UserWarning.__name__) - self.failUnlessEqual(message, ' ' + text) + self.assertEqual(expected_file, path) + self.assertEqual(warning_class, ' ' + UserWarning.__name__) + self.assertEqual(message, ' ' + text) expected_line = ' ' + linecache.getline(path, line).strip() + '\n' assert expected_line - self.failUnlessEqual(second_line, expected_line) + self.assertEqual(second_line, expected_line) class WarningsDisplayTests(unittest.TestCase): @@ -509,13 +509,13 @@ format = "%s:%s: %s: %s\n %s\n" expect = format % (file_name, line_num, category.__name__, message, file_line) - self.failUnlessEqual(expect, self.module.formatwarning(message, + self.assertEqual(expect, self.module.formatwarning(message, category, file_name, line_num)) # Test the 'line' argument. file_line += " for the win!" expect = format % (file_name, line_num, category.__name__, message, file_line) - self.failUnlessEqual(expect, self.module.formatwarning(message, + self.assertEqual(expect, self.module.formatwarning(message, category, file_name, line_num, file_line)) def test_showwarning(self): @@ -529,7 +529,7 @@ line_num) self.module.showwarning(message, category, file_name, line_num, file_object) - self.failUnlessEqual(file_object.getvalue(), expect) + self.assertEqual(file_object.getvalue(), expect) # Test 'line' argument. expected_file_line += "for the win!" expect = self.module.formatwarning(message, category, file_name, @@ -537,7 +537,7 @@ file_object = StringIO.StringIO() self.module.showwarning(message, category, file_name, line_num, file_object, expected_file_line) - self.failUnlessEqual(expect, file_object.getvalue()) + self.assertEqual(expect, file_object.getvalue()) class CWarningsDisplayTests(BaseTest, WarningsDisplayTests): module = c_warnings @@ -557,20 +557,20 @@ # Ensure both showwarning and filters are restored when recording with wmod.catch_warnings(module=wmod, record=True): wmod.filters = wmod.showwarning = object() - self.assert_(wmod.filters is orig_filters) - self.assert_(wmod.showwarning is orig_showwarning) + self.assertTrue(wmod.filters is orig_filters) + self.assertTrue(wmod.showwarning is orig_showwarning) # Same test, but with recording disabled with wmod.catch_warnings(module=wmod, record=False): wmod.filters = wmod.showwarning = object() - self.assert_(wmod.filters is orig_filters) - self.assert_(wmod.showwarning is orig_showwarning) + self.assertTrue(wmod.filters is orig_filters) + self.assertTrue(wmod.showwarning is orig_showwarning) def test_catch_warnings_recording(self): wmod = self.module # Ensure warnings are recorded when requested with wmod.catch_warnings(module=wmod, record=True) as w: self.assertEqual(w, []) - self.assert_(type(w) is list) + self.assertTrue(type(w) is list) wmod.simplefilter("always") wmod.warn("foo") self.assertEqual(str(w[-1].message), "foo") @@ -583,8 +583,8 @@ # Ensure warnings are not recorded when not requested orig_showwarning = wmod.showwarning with wmod.catch_warnings(module=wmod, record=False) as w: - self.assert_(w is None) - self.assert_(wmod.showwarning is orig_showwarning) + self.assertTrue(w is None) + self.assertTrue(wmod.showwarning is orig_showwarning) def test_catch_warnings_reentry_guard(self): wmod = self.module @@ -605,17 +605,17 @@ orig_showwarning = wmod.showwarning # Ensure default behaviour is not to record warnings with wmod.catch_warnings(module=wmod) as w: - self.assert_(w is None) - self.assert_(wmod.showwarning is orig_showwarning) - self.assert_(wmod.filters is not orig_filters) - self.assert_(wmod.filters is orig_filters) + self.assertTrue(w is None) + self.assertTrue(wmod.showwarning is orig_showwarning) + self.assertTrue(wmod.filters is not orig_filters) + self.assertTrue(wmod.filters is orig_filters) if wmod is sys.modules['warnings']: # Ensure the default module is this one with wmod.catch_warnings() as w: - self.assert_(w is None) - self.assert_(wmod.showwarning is orig_showwarning) - self.assert_(wmod.filters is not orig_filters) - self.assert_(wmod.filters is orig_filters) + self.assertTrue(w is None) + self.assertTrue(wmod.showwarning is orig_showwarning) + self.assertTrue(wmod.filters is not orig_filters) + self.assertTrue(wmod.filters is orig_filters) def test_check_warnings(self): # Explicit tests for the test_support convenience wrapper Modified: python/trunk/Lib/test/test_weakref.py ============================================================================== --- python/trunk/Lib/test/test_weakref.py (original) +++ python/trunk/Lib/test/test_weakref.py Wed Jul 1 00:57:08 2009 @@ -70,11 +70,11 @@ ref1 = weakref.ref(o, self.callback) ref2 = weakref.ref(o, self.callback) del o - self.assert_(ref1() is None, + self.assertTrue(ref1() is None, "expected reference to be invalidated") - self.assert_(ref2() is None, + self.assertTrue(ref2() is None, "expected reference to be invalidated") - self.assert_(self.cbcalled == 2, + self.assertTrue(self.cbcalled == 2, "callback not called the right number of times") def test_multiple_selfref_callbacks(self): @@ -108,15 +108,15 @@ self.assertRaises(weakref.ReferenceError, check, ref1) self.assertRaises(weakref.ReferenceError, check, ref2) self.assertRaises(weakref.ReferenceError, bool, weakref.proxy(C())) - self.assert_(self.cbcalled == 2) + self.assertTrue(self.cbcalled == 2) def check_basic_ref(self, factory): o = factory() ref = weakref.ref(o) - self.assert_(ref() is not None, + self.assertTrue(ref() is not None, "weak reference to live object should be live") o2 = ref() - self.assert_(o is o2, + self.assertTrue(o is o2, "() should return original object if live") def check_basic_callback(self, factory): @@ -124,9 +124,9 @@ o = factory() ref = weakref.ref(o, self.callback) del o - self.assert_(self.cbcalled == 1, + self.assertTrue(self.cbcalled == 1, "callback did not properly set 'cbcalled'") - self.assert_(ref() is None, + self.assertTrue(ref() is None, "ref2 should be dead after deleting object reference") def test_ref_reuse(self): @@ -136,19 +136,19 @@ # between these two; it should make no difference proxy = weakref.proxy(o) ref2 = weakref.ref(o) - self.assert_(ref1 is ref2, + self.assertTrue(ref1 is ref2, "reference object w/out callback should be re-used") o = C() proxy = weakref.proxy(o) ref1 = weakref.ref(o) ref2 = weakref.ref(o) - self.assert_(ref1 is ref2, + self.assertTrue(ref1 is ref2, "reference object w/out callback should be re-used") - self.assert_(weakref.getweakrefcount(o) == 2, + self.assertTrue(weakref.getweakrefcount(o) == 2, "wrong weak ref count for object") del proxy - self.assert_(weakref.getweakrefcount(o) == 1, + self.assertTrue(weakref.getweakrefcount(o) == 1, "wrong weak ref count for object after deleting proxy") def test_proxy_reuse(self): @@ -156,7 +156,7 @@ proxy1 = weakref.proxy(o) ref = weakref.ref(o) proxy2 = weakref.proxy(o) - self.assert_(proxy1 is proxy2, + self.assertTrue(proxy1 is proxy2, "proxy object w/out callback should have been re-used") def test_basic_proxy(self): @@ -165,14 +165,14 @@ L = UserList.UserList() p = weakref.proxy(L) - self.failIf(p, "proxy for empty UserList should be false") + self.assertFalse(p, "proxy for empty UserList should be false") p.append(12) self.assertEqual(len(L), 1) - self.failUnless(p, "proxy for non-empty UserList should be true") + self.assertTrue(p, "proxy for non-empty UserList should be true") p[:] = [2, 3] self.assertEqual(len(L), 2) self.assertEqual(len(p), 2) - self.failUnless(3 in p, + self.assertTrue(3 in p, "proxy didn't support __contains__() properly") p[1] = 5 self.assertEqual(L[1], 5) @@ -226,19 +226,19 @@ o = Object(1) p1 = makeref(o, None) p2 = makeref(o, None) - self.assert_(p1 is p2, "both callbacks were None in the C API") + self.assertTrue(p1 is p2, "both callbacks were None in the C API") del p1, p2 p1 = makeref(o) p2 = makeref(o, None) - self.assert_(p1 is p2, "callbacks were NULL, None in the C API") + self.assertTrue(p1 is p2, "callbacks were NULL, None in the C API") del p1, p2 p1 = makeref(o) p2 = makeref(o) - self.assert_(p1 is p2, "both callbacks were NULL in the C API") + self.assertTrue(p1 is p2, "both callbacks were NULL in the C API") del p1, p2 p1 = makeref(o, None) p2 = makeref(o) - self.assert_(p1 is p2, "callbacks were None, NULL in the C API") + self.assertTrue(p1 is p2, "callbacks were None, NULL in the C API") def test_callable_proxy(self): o = Callable() @@ -246,13 +246,13 @@ self.check_proxy(o, ref1) - self.assert_(type(ref1) is weakref.CallableProxyType, + self.assertTrue(type(ref1) is weakref.CallableProxyType, "proxy is not of callable type") ref1('twinkies!') - self.assert_(o.bar == 'twinkies!', + self.assertTrue(o.bar == 'twinkies!', "call through proxy not passed through to original") ref1(x='Splat.') - self.assert_(o.bar == 'Splat.', + self.assertTrue(o.bar == 'Splat.', "call through proxy not passed through to original") # expect due to too few args @@ -263,24 +263,24 @@ def check_proxy(self, o, proxy): o.foo = 1 - self.assert_(proxy.foo == 1, + self.assertTrue(proxy.foo == 1, "proxy does not reflect attribute addition") o.foo = 2 - self.assert_(proxy.foo == 2, + self.assertTrue(proxy.foo == 2, "proxy does not reflect attribute modification") del o.foo - self.assert_(not hasattr(proxy, 'foo'), + self.assertTrue(not hasattr(proxy, 'foo'), "proxy does not reflect attribute removal") proxy.foo = 1 - self.assert_(o.foo == 1, + self.assertTrue(o.foo == 1, "object does not reflect attribute addition via proxy") proxy.foo = 2 - self.assert_( + self.assertTrue( o.foo == 2, "object does not reflect attribute modification via proxy") del proxy.foo - self.assert_(not hasattr(o, 'foo'), + self.assertTrue(not hasattr(o, 'foo'), "object does not reflect attribute removal via proxy") def test_proxy_deletion(self): @@ -304,21 +304,21 @@ o = C() ref1 = weakref.ref(o) ref2 = weakref.ref(o, self.callback) - self.assert_(weakref.getweakrefcount(o) == 2, + self.assertTrue(weakref.getweakrefcount(o) == 2, "got wrong number of weak reference objects") proxy1 = weakref.proxy(o) proxy2 = weakref.proxy(o, self.callback) - self.assert_(weakref.getweakrefcount(o) == 4, + self.assertTrue(weakref.getweakrefcount(o) == 4, "got wrong number of weak reference objects") del ref1, ref2, proxy1, proxy2 - self.assert_(weakref.getweakrefcount(o) == 0, + self.assertTrue(weakref.getweakrefcount(o) == 0, "weak reference objects not unlinked from" " referent when discarded.") # assumes ints do not support weakrefs - self.assert_(weakref.getweakrefcount(1) == 0, + self.assertTrue(weakref.getweakrefcount(1) == 0, "got wrong number of weak reference objects for int") def test_getweakrefs(self): @@ -326,22 +326,22 @@ ref1 = weakref.ref(o, self.callback) ref2 = weakref.ref(o, self.callback) del ref1 - self.assert_(weakref.getweakrefs(o) == [ref2], + self.assertTrue(weakref.getweakrefs(o) == [ref2], "list of refs does not match") o = C() ref1 = weakref.ref(o, self.callback) ref2 = weakref.ref(o, self.callback) del ref2 - self.assert_(weakref.getweakrefs(o) == [ref1], + self.assertTrue(weakref.getweakrefs(o) == [ref1], "list of refs does not match") del ref1 - self.assert_(weakref.getweakrefs(o) == [], + self.assertTrue(weakref.getweakrefs(o) == [], "list of refs not cleared") # assumes ints do not support weakrefs - self.assert_(weakref.getweakrefs(1) == [], + self.assertTrue(weakref.getweakrefs(1) == [], "list of refs does not match for int") def test_newstyle_number_ops(self): @@ -349,8 +349,8 @@ pass f = F(2.0) p = weakref.proxy(f) - self.assert_(p + 1.0 == 3.0) - self.assert_(1.0 + p == 3.0) # this used to SEGV + self.assertTrue(p + 1.0 == 3.0) + self.assertTrue(1.0 + p == 3.0) # this used to SEGV def test_callbacks_protected(self): # Callbacks protected from already-set exceptions? @@ -603,7 +603,7 @@ c.wr = weakref.ref(d, callback) # this won't trigger d.wr = weakref.ref(callback, d.cb) # ditto external_wr = weakref.ref(callback, safe_callback) # but this will - self.assert_(external_wr() is callback) + self.assertTrue(external_wr() is callback) # The weakrefs attached to c and d should get cleared, so that # C.cb is never called. But external_wr isn't part of the cyclic @@ -686,12 +686,12 @@ return super(MyRef, self).__call__() o = Object("foo") mr = MyRef(o, value=24) - self.assert_(mr() is o) - self.assert_(mr.called) + self.assertTrue(mr() is o) + self.assertTrue(mr.called) self.assertEqual(mr.value, 24) del o - self.assert_(mr() is None) - self.assert_(mr.called) + self.assertTrue(mr() is None) + self.assertTrue(mr.called) def test_subclass_refs_dont_replace_standard_refs(self): class MyRef(weakref.ref): @@ -699,16 +699,16 @@ o = Object(42) r1 = MyRef(o) r2 = weakref.ref(o) - self.assert_(r1 is not r2) + self.assertTrue(r1 is not r2) self.assertEqual(weakref.getweakrefs(o), [r2, r1]) self.assertEqual(weakref.getweakrefcount(o), 2) r3 = MyRef(o) self.assertEqual(weakref.getweakrefcount(o), 3) refs = weakref.getweakrefs(o) self.assertEqual(len(refs), 3) - self.assert_(r2 is refs[0]) - self.assert_(r1 in refs[1:]) - self.assert_(r3 in refs[1:]) + self.assertTrue(r2 is refs[0]) + self.assertTrue(r1 in refs[1:]) + self.assertTrue(r3 in refs[1:]) def test_subclass_refs_dont_conflate_callbacks(self): class MyRef(weakref.ref): @@ -716,10 +716,10 @@ o = Object(42) r1 = MyRef(o, id) r2 = MyRef(o, str) - self.assert_(r1 is not r2) + self.assertTrue(r1 is not r2) refs = weakref.getweakrefs(o) - self.assert_(r1 in refs) - self.assert_(r2 in refs) + self.assertTrue(r1 in refs) + self.assertTrue(r2 in refs) def test_subclass_refs_with_slots(self): class MyRef(weakref.ref): @@ -736,7 +736,7 @@ self.assertEqual(r.slot1, "abc") self.assertEqual(r.slot2, "def") self.assertEqual(r.meth(), "abcdef") - self.failIf(hasattr(r, "__dict__")) + self.assertFalse(hasattr(r, "__dict__")) def test_subclass_refs_with_cycle(self): # Bug #3110 @@ -794,23 +794,23 @@ # dict, objects = self.make_weak_valued_dict() for o in objects: - self.assert_(weakref.getweakrefcount(o) == 1, + self.assertTrue(weakref.getweakrefcount(o) == 1, "wrong number of weak references to %r!" % o) - self.assert_(o is dict[o.arg], + self.assertTrue(o is dict[o.arg], "wrong object returned by weak dict!") items1 = dict.items() items2 = dict.copy().items() items1.sort() items2.sort() - self.assert_(items1 == items2, + self.assertTrue(items1 == items2, "cloning of weak-valued dictionary did not work!") del items1, items2 - self.assert_(len(dict) == self.COUNT) + self.assertTrue(len(dict) == self.COUNT) del objects[0] - self.assert_(len(dict) == (self.COUNT - 1), + self.assertTrue(len(dict) == (self.COUNT - 1), "deleting object did not cause dictionary update") del objects, o - self.assert_(len(dict) == 0, + self.assertTrue(len(dict) == 0, "deleting the values did not clear the dictionary") # regression on SF bug #447152: dict = weakref.WeakValueDictionary() @@ -825,26 +825,26 @@ # dict, objects = self.make_weak_keyed_dict() for o in objects: - self.assert_(weakref.getweakrefcount(o) == 1, + self.assertTrue(weakref.getweakrefcount(o) == 1, "wrong number of weak references to %r!" % o) - self.assert_(o.arg is dict[o], + self.assertTrue(o.arg is dict[o], "wrong object returned by weak dict!") items1 = dict.items() items2 = dict.copy().items() - self.assert_(set(items1) == set(items2), + self.assertTrue(set(items1) == set(items2), "cloning of weak-keyed dictionary did not work!") del items1, items2 - self.assert_(len(dict) == self.COUNT) + self.assertTrue(len(dict) == self.COUNT) del objects[0] - self.assert_(len(dict) == (self.COUNT - 1), + self.assertTrue(len(dict) == (self.COUNT - 1), "deleting object did not cause dictionary update") del objects, o - self.assert_(len(dict) == 0, + self.assertTrue(len(dict) == 0, "deleting the keys did not clear the dictionary") o = Object(42) dict[o] = "What is the meaning of the universe?" - self.assert_(dict.has_key(o)) - self.assert_(not dict.has_key(34)) + self.assertTrue(dict.has_key(o)) + self.assertTrue(not dict.has_key(34)) def test_weak_keyed_iters(self): dict, objects = self.make_weak_keyed_dict() @@ -856,8 +856,8 @@ objects2 = list(objects) for wr in refs: ob = wr() - self.assert_(dict.has_key(ob)) - self.assert_(ob in dict) + self.assertTrue(dict.has_key(ob)) + self.assertTrue(ob in dict) self.assertEqual(ob.arg, dict[ob]) objects2.remove(ob) self.assertEqual(len(objects2), 0) @@ -867,8 +867,8 @@ self.assertEqual(len(list(dict.iterkeyrefs())), len(objects)) for wr in dict.iterkeyrefs(): ob = wr() - self.assert_(dict.has_key(ob)) - self.assert_(ob in dict) + self.assertTrue(dict.has_key(ob)) + self.assertTrue(ob in dict) self.assertEqual(ob.arg, dict[ob]) objects2.remove(ob) self.assertEqual(len(objects2), 0) @@ -903,37 +903,37 @@ items = dict.items() for item in dict.iteritems(): items.remove(item) - self.assert_(len(items) == 0, "iteritems() did not touch all items") + self.assertTrue(len(items) == 0, "iteritems() did not touch all items") # key iterator, via __iter__(): keys = dict.keys() for k in dict: keys.remove(k) - self.assert_(len(keys) == 0, "__iter__() did not touch all keys") + self.assertTrue(len(keys) == 0, "__iter__() did not touch all keys") # key iterator, via iterkeys(): keys = dict.keys() for k in dict.iterkeys(): keys.remove(k) - self.assert_(len(keys) == 0, "iterkeys() did not touch all keys") + self.assertTrue(len(keys) == 0, "iterkeys() did not touch all keys") # value iterator: values = dict.values() for v in dict.itervalues(): values.remove(v) - self.assert_(len(values) == 0, + self.assertTrue(len(values) == 0, "itervalues() did not touch all values") def test_make_weak_keyed_dict_from_dict(self): o = Object(3) dict = weakref.WeakKeyDictionary({o:364}) - self.assert_(dict[o] == 364) + self.assertTrue(dict[o] == 364) def test_make_weak_keyed_dict_from_weak_keyed_dict(self): o = Object(3) dict = weakref.WeakKeyDictionary({o:364}) dict2 = weakref.WeakKeyDictionary(dict) - self.assert_(dict[o] == 364) + self.assertTrue(dict[o] == 364) def make_weak_keyed_dict(self): dict = weakref.WeakKeyDictionary() @@ -953,19 +953,19 @@ weakdict = klass() weakdict[key1] = value1 weakdict[key2] = value2 - self.assert_(len(weakdict) == 2) + self.assertTrue(len(weakdict) == 2) k, v = weakdict.popitem() - self.assert_(len(weakdict) == 1) + self.assertTrue(len(weakdict) == 1) if k is key1: - self.assert_(v is value1) + self.assertTrue(v is value1) else: - self.assert_(v is value2) + self.assertTrue(v is value2) k, v = weakdict.popitem() - self.assert_(len(weakdict) == 0) + self.assertTrue(len(weakdict) == 0) if k is key1: - self.assert_(v is value1) + self.assertTrue(v is value1) else: - self.assert_(v is value2) + self.assertTrue(v is value2) def test_weak_valued_dict_popitem(self): self.check_popitem(weakref.WeakValueDictionary, @@ -976,21 +976,21 @@ C(), "value 1", C(), "value 2") def check_setdefault(self, klass, key, value1, value2): - self.assert_(value1 is not value2, + self.assertTrue(value1 is not value2, "invalid test" " -- value parameters must be distinct objects") weakdict = klass() o = weakdict.setdefault(key, value1) - self.assert_(o is value1) - self.assert_(weakdict.has_key(key)) - self.assert_(weakdict.get(key) is value1) - self.assert_(weakdict[key] is value1) + self.assertTrue(o is value1) + self.assertTrue(weakdict.has_key(key)) + self.assertTrue(weakdict.get(key) is value1) + self.assertTrue(weakdict[key] is value1) o = weakdict.setdefault(key, value2) - self.assert_(o is value1) - self.assert_(weakdict.has_key(key)) - self.assert_(weakdict.get(key) is value1) - self.assert_(weakdict[key] is value1) + self.assertTrue(o is value1) + self.assertTrue(weakdict.has_key(key)) + self.assertTrue(weakdict.get(key) is value1) + self.assertTrue(weakdict[key] is value1) def test_weak_valued_dict_setdefault(self): self.check_setdefault(weakref.WeakValueDictionary, @@ -1007,19 +1007,19 @@ # weakdict = klass() weakdict.update(dict) - self.assert_(len(weakdict) == len(dict)) + self.assertTrue(len(weakdict) == len(dict)) for k in weakdict.keys(): - self.assert_(dict.has_key(k), + self.assertTrue(dict.has_key(k), "mysterious new key appeared in weak dict") v = dict.get(k) - self.assert_(v is weakdict[k]) - self.assert_(v is weakdict.get(k)) + self.assertTrue(v is weakdict[k]) + self.assertTrue(v is weakdict.get(k)) for k in dict.keys(): - self.assert_(weakdict.has_key(k), + self.assertTrue(weakdict.has_key(k), "original key disappeared in weak dict") v = dict[k] - self.assert_(v is weakdict[k]) - self.assert_(v is weakdict.get(k)) + self.assertTrue(v is weakdict[k]) + self.assertTrue(v is weakdict.get(k)) def test_weak_valued_dict_update(self): self.check_update(weakref.WeakValueDictionary, @@ -1035,10 +1035,10 @@ o2 = Object('2') d[o1] = 'something' d[o2] = 'something' - self.assert_(len(d) == 2) + self.assertTrue(len(d) == 2) del d[o1] - self.assert_(len(d) == 1) - self.assert_(d.keys() == [o2]) + self.assertTrue(len(d) == 1) + self.assertTrue(d.keys() == [o2]) def test_weak_valued_delitem(self): d = weakref.WeakValueDictionary() @@ -1046,10 +1046,10 @@ o2 = Object('2') d['something'] = o1 d['something else'] = o2 - self.assert_(len(d) == 2) + self.assertTrue(len(d) == 2) del d['something'] - self.assert_(len(d) == 1) - self.assert_(d.items() == [('something else', o2)]) + self.assertTrue(len(d) == 1) + self.assertTrue(d.items() == [('something else', o2)]) def test_weak_keyed_bad_delitem(self): d = weakref.WeakKeyDictionary() Modified: python/trunk/Lib/test/test_wsgiref.py ============================================================================== --- python/trunk/Lib/test/test_wsgiref.py (original) +++ python/trunk/Lib/test/test_wsgiref.py Wed Jul 1 00:57:08 2009 @@ -149,7 +149,7 @@ start_response("200 OK", ('Content-Type','text/plain')) return ["Hello, world!"] out, err = run_amock(validator(bad_app)) - self.failUnless(out.endswith( + self.assertTrue(out.endswith( "A server error occurred. Please contact the administrator." )) self.assertEqual( @@ -178,14 +178,14 @@ env = {} util.setup_testing_defaults(env) if isinstance(value,StringIO): - self.failUnless(isinstance(env[key],StringIO)) + self.assertTrue(isinstance(env[key],StringIO)) else: self.assertEqual(env[key],value) # Check existing value env = {key:alt} util.setup_testing_defaults(env) - self.failUnless(env[key] is alt) + self.assertTrue(env[key] is alt) def checkCrossDefault(self,key,value,**kw): util.setup_testing_defaults(kw) @@ -212,15 +212,15 @@ compare_generic_iter(make_it,match) it = make_it() - self.failIf(it.filelike.closed) + self.assertFalse(it.filelike.closed) for item in it: pass - self.failIf(it.filelike.closed) + self.assertFalse(it.filelike.closed) it.close() - self.failUnless(it.filelike.closed) + self.assertTrue(it.filelike.closed) def testSimpleShifts(self): @@ -318,14 +318,14 @@ "TE Trailers Transfer-Encoding Upgrade" ).split(): for alt in hop, hop.title(), hop.upper(), hop.lower(): - self.failUnless(util.is_hop_by_hop(alt)) + self.assertTrue(util.is_hop_by_hop(alt)) # Not comprehensive, just a few random header names for hop in ( "Accept Cache-Control Date Pragma Trailer Via Warning" ).split(): for alt in hop, hop.title(), hop.upper(), hop.lower(): - self.failIf(util.is_hop_by_hop(alt)) + self.assertFalse(util.is_hop_by_hop(alt)) class HeaderTests(TestCase): @@ -336,17 +336,17 @@ self.assertEqual(Headers(test[:]).keys(), ['x']) self.assertEqual(Headers(test[:]).values(), ['y']) self.assertEqual(Headers(test[:]).items(), test) - self.failIf(Headers(test).items() is test) # must be copy! + self.assertFalse(Headers(test).items() is test) # must be copy! h=Headers([]) del h['foo'] # should not raise an error h['Foo'] = 'bar' for m in h.has_key, h.__contains__, h.get, h.get_all, h.__getitem__: - self.failUnless(m('foo')) - self.failUnless(m('Foo')) - self.failUnless(m('FOO')) - self.failIf(m('bar')) + self.assertTrue(m('foo')) + self.assertTrue(m('Foo')) + self.assertTrue(m('FOO')) + self.assertFalse(m('bar')) self.assertEqual(h['foo'],'bar') h['foo'] = 'baz' @@ -428,7 +428,7 @@ if not empty.has_key(k): self.assertEqual(env[k],v) for k,v in empty.items(): - self.failUnless(env.has_key(k)) + self.assertTrue(env.has_key(k)) def testEnviron(self): h = TestHandler(X="Y") @@ -441,7 +441,7 @@ h = BaseCGIHandler(None,None,None,{}) h.setup_environ() for key in 'wsgi.url_scheme', 'wsgi.input', 'wsgi.errors': - self.assert_(h.environ.has_key(key)) + self.assertTrue(h.environ.has_key(key)) def testScheme(self): h=TestHandler(HTTPS="on"); h.setup_environ() @@ -516,7 +516,7 @@ "Content-Length: %d\r\n" "\r\n%s" % (h.error_status,len(h.error_body),h.error_body)) - self.failUnless(h.stderr.getvalue().find("AssertionError")<>-1) + self.assertTrue(h.stderr.getvalue().find("AssertionError")<>-1) def testErrorAfterOutput(self): MSG = "Some output has been sent" @@ -529,7 +529,7 @@ self.assertEqual(h.stdout.getvalue(), "Status: 200 OK\r\n" "\r\n"+MSG) - self.failUnless(h.stderr.getvalue().find("AssertionError")<>-1) + self.assertTrue(h.stderr.getvalue().find("AssertionError")<>-1) def testHeaderFormats(self): @@ -568,7 +568,7 @@ if proto=="HTTP/0.9": self.assertEqual(h.stdout.getvalue(),"") else: - self.failUnless( + self.assertTrue( re.match(stdpat%(version,sw), h.stdout.getvalue()), (stdpat%(version,sw), h.stdout.getvalue()) ) Modified: python/trunk/Lib/test/test_xdrlib.py ============================================================================== --- python/trunk/Lib/test/test_xdrlib.py (original) +++ python/trunk/Lib/test/test_xdrlib.py Wed Jul 1 00:57:08 2009 @@ -30,15 +30,15 @@ self.assertEqual(up.unpack_int(), 42) self.assertEqual(up.unpack_uint(), 9) - self.assert_(up.unpack_bool() is True) + self.assertTrue(up.unpack_bool() is True) # remember position pos = up.get_position() - self.assert_(up.unpack_bool() is False) + self.assertTrue(up.unpack_bool() is False) # rewind and unpack again up.set_position(pos) - self.assert_(up.unpack_bool() is False) + self.assertTrue(up.unpack_bool() is False) self.assertEqual(up.unpack_uhyper(), 45L) self.assertAlmostEqual(up.unpack_float(), 1.9) Modified: python/trunk/Lib/test/test_xmlrpc.py ============================================================================== --- python/trunk/Lib/test/test_xmlrpc.py (original) +++ python/trunk/Lib/test/test_xmlrpc.py Wed Jul 1 00:57:08 2009 @@ -71,21 +71,21 @@ def test_cmp_datetime_DateTime(self): now = datetime.datetime.now() dt = xmlrpclib.DateTime(now.timetuple()) - self.assert_(dt == now) - self.assert_(now == dt) + self.assertTrue(dt == now) + self.assertTrue(now == dt) then = now + datetime.timedelta(seconds=4) - self.assert_(then >= dt) - self.assert_(dt < then) + self.assertTrue(then >= dt) + self.assertTrue(dt < then) def test_bug_1164912 (self): d = xmlrpclib.DateTime() ((new_d,), dummy) = xmlrpclib.loads(xmlrpclib.dumps((d,), methodresponse=True)) - self.assert_(isinstance(new_d.value, str)) + self.assertTrue(isinstance(new_d.value, str)) # Check that the output of dumps() is still an 8-bit string s = xmlrpclib.dumps((new_d,), methodresponse=True) - self.assert_(isinstance(s, str)) + self.assertTrue(isinstance(s, str)) def test_newstyle_class(self): class T(object): @@ -175,10 +175,10 @@ items = d.items() if have_unicode: self.assertEquals(s, u"abc \x95") - self.assert_(isinstance(s, unicode)) + self.assertTrue(isinstance(s, unicode)) self.assertEquals(items, [(u"def \x96", u"ghi \x97")]) - self.assert_(isinstance(items[0][0], unicode)) - self.assert_(isinstance(items[0][1], unicode)) + self.assertTrue(isinstance(items[0][0], unicode)) + self.assertTrue(isinstance(items[0][1], unicode)) else: self.assertEquals(s, "abc \xc2\x95") self.assertEquals(items, [("def \xc2\x96", "ghi \xc2\x97")]) @@ -511,7 +511,7 @@ self.assertRaises(AttributeError, SimpleXMLRPCServer.resolve_dotted_attribute, str, '__add') - self.assert_(SimpleXMLRPCServer.resolve_dotted_attribute(str, 'title')) + self.assertTrue(SimpleXMLRPCServer.resolve_dotted_attribute(str, 'title')) # Get the test to run faster by sending a request with test_simple1. # This avoids waiting for the socket timeout. self.test_simple1() @@ -838,7 +838,7 @@ conn.putheader("X-Test", "test_custom_user_agent") req = self.issue_request(TestTransport) - self.assert_("X-Test: test_custom_user_agent\r\n" in req) + self.assertTrue("X-Test: test_custom_user_agent\r\n" in req) def test_send_host(self): class TestTransport(FakeTransport): @@ -848,7 +848,7 @@ conn.putheader("X-Test", "test_send_host") req = self.issue_request(TestTransport) - self.assert_("X-Test: test_send_host\r\n" in req) + self.assertTrue("X-Test: test_send_host\r\n" in req) def test_send_request(self): class TestTransport(FakeTransport): @@ -858,7 +858,7 @@ conn.putheader("X-Test", "test_send_request") req = self.issue_request(TestTransport) - self.assert_("X-Test: test_send_request\r\n" in req) + self.assertTrue("X-Test: test_send_request\r\n" in req) def test_send_content(self): class TestTransport(FakeTransport): @@ -868,7 +868,7 @@ xmlrpclib.Transport.send_content(self, conn, body) req = self.issue_request(TestTransport) - self.assert_("X-Test: test_send_content\r\n" in req) + self.assertTrue("X-Test: test_send_content\r\n" in req) def test_main(): xmlrpc_tests = [XMLRPCTestCase, HelperTestCase, DateTimeTestCase, Modified: python/trunk/Lib/test/test_xrange.py ============================================================================== --- python/trunk/Lib/test/test_xrange.py (original) +++ python/trunk/Lib/test/test_xrange.py Wed Jul 1 00:57:08 2009 @@ -26,18 +26,18 @@ self.assertEqual(list(xrange(a+4, a, -2)), [a+4, a+2]) seq = list(xrange(a, b, c)) - self.assert_(a in seq) - self.assert_(b not in seq) + self.assertTrue(a in seq) + self.assertTrue(b not in seq) self.assertEqual(len(seq), 2) seq = list(xrange(b, a, -c)) - self.assert_(b in seq) - self.assert_(a not in seq) + self.assertTrue(b in seq) + self.assertTrue(a not in seq) self.assertEqual(len(seq), 2) seq = list(xrange(-a, -b, -c)) - self.assert_(-a in seq) - self.assert_(-b not in seq) + self.assertTrue(-a in seq) + self.assertTrue(-b not in seq) self.assertEqual(len(seq), 2) self.assertRaises(TypeError, xrange) Modified: python/trunk/Lib/test/test_zipfile.py ============================================================================== --- python/trunk/Lib/test/test_zipfile.py (original) +++ python/trunk/Lib/test/test_zipfile.py Wed Jul 1 00:57:08 2009 @@ -64,9 +64,9 @@ lines = directory.splitlines() self.assertEquals(len(lines), 4) # Number of files + header - self.assert_('File Name' in lines[0]) - self.assert_('Modified' in lines[0]) - self.assert_('Size' in lines[0]) + self.assertTrue('File Name' in lines[0]) + self.assertTrue('Modified' in lines[0]) + self.assertTrue('Size' in lines[0]) fn, date, time, size = lines[1].split() self.assertEquals(fn, 'another.name') @@ -76,17 +76,17 @@ # Check the namelist names = zipfp.namelist() self.assertEquals(len(names), 3) - self.assert_(TESTFN in names) - self.assert_("another"+os.extsep+"name" in names) - self.assert_("strfile" in names) + self.assertTrue(TESTFN in names) + self.assertTrue("another"+os.extsep+"name" in names) + self.assertTrue("strfile" in names) # Check infolist infos = zipfp.infolist() names = [ i.filename for i in infos ] self.assertEquals(len(names), 3) - self.assert_(TESTFN in names) - self.assert_("another"+os.extsep+"name" in names) - self.assert_("strfile" in names) + self.assertTrue(TESTFN in names) + self.assertTrue("another"+os.extsep+"name" in names) + self.assertTrue("strfile" in names) for i in infos: self.assertEquals(i.file_size, len(self.data)) @@ -145,11 +145,11 @@ data = "" for info in infos: data += zipfp.open(info).read() - self.assert_(data == "foobar" or data == "barfoo") + self.assertTrue(data == "foobar" or data == "barfoo") data = "" for info in infos: data += zipfp.read(info) - self.assert_(data == "foobar" or data == "barfoo") + self.assertTrue(data == "foobar" or data == "barfoo") zipfp.close() def zipRandomOpenTest(self, f, compression): @@ -451,9 +451,9 @@ lines = directory.splitlines() self.assertEquals(len(lines), 4) # Number of files + header - self.assert_('File Name' in lines[0]) - self.assert_('Modified' in lines[0]) - self.assert_('Size' in lines[0]) + self.assertTrue('File Name' in lines[0]) + self.assertTrue('Modified' in lines[0]) + self.assertTrue('Size' in lines[0]) fn, date, time, size = lines[1].split() self.assertEquals(fn, 'another.name') @@ -463,17 +463,17 @@ # Check the namelist names = zipfp.namelist() self.assertEquals(len(names), 3) - self.assert_(TESTFN in names) - self.assert_("another"+os.extsep+"name" in names) - self.assert_("strfile" in names) + self.assertTrue(TESTFN in names) + self.assertTrue("another"+os.extsep+"name" in names) + self.assertTrue("strfile" in names) # Check infolist infos = zipfp.infolist() names = [ i.filename for i in infos ] self.assertEquals(len(names), 3) - self.assert_(TESTFN in names) - self.assert_("another"+os.extsep+"name" in names) - self.assert_("strfile" in names) + self.assertTrue(TESTFN in names) + self.assertTrue("another"+os.extsep+"name" in names) + self.assertTrue("strfile" in names) for i in infos: self.assertEquals(i.file_size, len(self.data)) @@ -523,8 +523,8 @@ zipfp.writepy(fn) bn = os.path.basename(fn) - self.assert_(bn not in zipfp.namelist()) - self.assert_(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) + self.assertTrue(bn not in zipfp.namelist()) + self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() @@ -536,8 +536,8 @@ zipfp.writepy(fn, "testpackage") bn = "%s/%s"%("testpackage", os.path.basename(fn)) - self.assert_(bn not in zipfp.namelist()) - self.assert_(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) + self.assertTrue(bn not in zipfp.namelist()) + self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() def testWritePythonPackage(self): @@ -549,8 +549,8 @@ # Check for a couple of modules at different levels of the hieararchy names = zipfp.namelist() - self.assert_('email/__init__.pyo' in names or 'email/__init__.pyc' in names) - self.assert_('email/mime/text.pyo' in names or 'email/mime/text.pyc' in names) + self.assertTrue('email/__init__.pyo' in names or 'email/__init__.pyc' in names) + self.assertTrue('email/mime/text.pyo' in names or 'email/mime/text.pyc' in names) def testWritePythonDirectory(self): os.mkdir(TESTFN2) @@ -571,9 +571,9 @@ zipfp.writepy(TESTFN2) names = zipfp.namelist() - self.assert_('mod1.pyc' in names or 'mod1.pyo' in names) - self.assert_('mod2.pyc' in names or 'mod2.pyo' in names) - self.assert_('mod2.txt' not in names) + self.assertTrue('mod1.pyc' in names or 'mod1.pyo' in names) + self.assertTrue('mod2.pyc' in names or 'mod2.pyo' in names) + self.assertTrue('mod2.txt' not in names) finally: shutil.rmtree(TESTFN2) @@ -611,7 +611,7 @@ except IOError, (errno, errmsg): self.fail('Could not append data to a non-existent zip file.') - self.assert_(os.path.exists(TESTFN)) + self.assertTrue(os.path.exists(TESTFN)) zf = zipfile.ZipFile(TESTFN, 'r') self.assertEqual(zf.read(filename), content) @@ -640,19 +640,19 @@ with open(TESTFN, "w") as fp: fp.write("this is not a legal zip file\n") chk = zipfile.is_zipfile(TESTFN) - self.assert_(not chk) + self.assertTrue(not chk) # - passing a file object with open(TESTFN, "rb") as fp: chk = zipfile.is_zipfile(fp) - self.assert_(not chk) + self.assertTrue(not chk) # - passing a file-like object fp = StringIO() fp.write("this is not a legal zip file\n") chk = zipfile.is_zipfile(fp) - self.assert_(not chk) + self.assertTrue(not chk) fp.seek(0,0) chk = zipfile.is_zipfile(fp) - self.assert_(not chk) + self.assertTrue(not chk) def testIsZipValidFile(self): # This test checks that the is_zipfile function correctly identifies @@ -663,21 +663,21 @@ zipf.writestr("foo.txt", "O, for a Muse of Fire!") zipf.close() chk = zipfile.is_zipfile(TESTFN) - self.assert_(chk) + self.assertTrue(chk) # - passing a file object with open(TESTFN, "rb") as fp: chk = zipfile.is_zipfile(fp) - self.assert_(chk) + self.assertTrue(chk) fp.seek(0,0) zip_contents = fp.read() # - passing a file-like object fp = StringIO() fp.write(zip_contents) chk = zipfile.is_zipfile(fp) - self.assert_(chk) + self.assertTrue(chk) fp.seek(0,0) chk = zipfile.is_zipfile(fp) - self.assert_(chk) + self.assertTrue(chk) def testNonExistentFileRaisesIOError(self): # make sure we don't raise an AttributeError when a partially-constructed Modified: python/trunk/Lib/test/test_zipimport.py ============================================================================== --- python/trunk/Lib/test/test_zipimport.py (original) +++ python/trunk/Lib/test/test_zipimport.py Wed Jul 1 00:57:08 2009 @@ -290,7 +290,7 @@ z.close() zi = zipimport.zipimporter(TEMP_ZIP) self.assertEquals(data, zi.get_data(name)) - self.assert_('zipimporter object' in repr(zi)) + self.assertTrue('zipimporter object' in repr(zi)) finally: z.close() os.remove(TEMP_ZIP) @@ -372,7 +372,7 @@ s = StringIO.StringIO() print_tb(tb, 1, s) - self.failUnless(s.getvalue().endswith(raise_src)) + self.assertTrue(s.getvalue().endswith(raise_src)) else: raise AssertionError("This ought to be impossible") Modified: python/trunk/Lib/test/test_zipimport_support.py ============================================================================== --- python/trunk/Lib/test/test_zipimport_support.py (original) +++ python/trunk/Lib/test/test_zipimport_support.py Wed Jul 1 00:57:08 2009 @@ -191,7 +191,7 @@ print "Expected line", expected print "Got stdout:" print data - self.assert_(expected in data) + self.assertTrue(expected in data) zip_name, run_name = _make_test_zip(d, "test_zip", script_name, '__main__.py') exit_code, data = _run_python(zip_name) @@ -200,7 +200,7 @@ print "Expected line", expected print "Got stdout:" print data - self.assert_(expected in data) + self.assertTrue(expected in data) def test_pdb_issue4201(self): test_src = textwrap.dedent("""\ @@ -215,13 +215,13 @@ p = _spawn_python(script_name) p.stdin.write('l\n') data = _kill_python(p) - self.assert_(script_name in data) + self.assertTrue(script_name in data) zip_name, run_name = _make_test_zip(d, "test_zip", script_name, '__main__.py') p = _spawn_python(zip_name) p.stdin.write('l\n') data = _kill_python(p) - self.assert_(run_name in data) + self.assertTrue(run_name in data) def test_main(): Modified: python/trunk/Lib/test/test_zlib.py ============================================================================== --- python/trunk/Lib/test/test_zlib.py (original) +++ python/trunk/Lib/test/test_zlib.py Wed Jul 1 00:57:08 2009 @@ -10,7 +10,7 @@ # checksum test cases def test_crc32start(self): self.assertEqual(zlib.crc32(""), zlib.crc32("", 0)) - self.assert_(zlib.crc32("abc", 0xffffffff)) + self.assertTrue(zlib.crc32("abc", 0xffffffff)) def test_crc32empty(self): self.assertEqual(zlib.crc32("", 0), 0) @@ -19,7 +19,7 @@ def test_adler32start(self): self.assertEqual(zlib.adler32(""), zlib.adler32("", 1)) - self.assert_(zlib.adler32("abc", 0xffffffff)) + self.assertTrue(zlib.adler32("abc", 0xffffffff)) def test_adler32empty(self): self.assertEqual(zlib.adler32("", 0), 0) @@ -208,7 +208,7 @@ while cb: #max_length = 1 + len(cb)//10 chunk = dco.decompress(cb, dcx) - self.failIf(len(chunk) > dcx, + self.assertFalse(len(chunk) > dcx, 'chunk too big (%d>%d)' % (len(chunk), dcx)) bufs.append(chunk) cb = dco.unconsumed_tail @@ -233,7 +233,7 @@ while cb: max_length = 1 + len(cb)//10 chunk = dco.decompress(cb, max_length) - self.failIf(len(chunk) > max_length, + self.assertFalse(len(chunk) > max_length, 'chunk too big (%d>%d)' % (len(chunk),max_length)) bufs.append(chunk) cb = dco.unconsumed_tail @@ -242,7 +242,7 @@ else: while chunk: chunk = dco.decompress('', max_length) - self.failIf(len(chunk) > max_length, + self.assertFalse(len(chunk) > max_length, 'chunk too big (%d>%d)' % (len(chunk),max_length)) bufs.append(chunk) self.assertEqual(data, ''.join(bufs), 'Wrong data retrieved') @@ -316,7 +316,7 @@ # caused a core dump.) co = zlib.compressobj(zlib.Z_BEST_COMPRESSION) - self.failUnless(co.flush()) # Returns a zlib header + self.assertTrue(co.flush()) # Returns a zlib header dco = zlib.decompressobj() self.assertEqual(dco.flush(), "") # Returns nothing From python-checkins at python.org Wed Jul 1 01:06:09 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 30 Jun 2009 23:06:09 -0000 Subject: [Python-checkins] r73715 - in python/branches/py3k/Lib: ctypes/test/test_anon.py ctypes/test/test_array_in_pointer.py ctypes/test/test_arrays.py ctypes/test/test_as_parameter.py ctypes/test/test_bitfields.py ctypes/test/test_buffers.py ctypes/test/test_byteswap.py ctypes/test/test_callbacks.py ctypes/test/test_cast.py ctypes/test/test_cfuncs.py ctypes/test/test_checkretval.py ctypes/test/test_errno.py ctypes/test/test_find.py ctypes/test/test_frombuffer.py ctypes/test/test_funcptr.py ctypes/test/test_functions.py ctypes/test/test_incomplete.py ctypes/test/test_init.py ctypes/test/test_internals.py ctypes/test/test_keeprefs.py ctypes/test/test_libc.py ctypes/test/test_loading.py ctypes/test/test_macholib.py ctypes/test/test_memfunctions.py ctypes/test/test_numbers.py ctypes/test/test_parameters.py ctypes/test/test_pep3118.py ctypes/test/test_pickling.py ctypes/test/test_pointers.py ctypes/test/test_prototypes.py ctypes/test/test_python_api.py ctypes/test/test_random_things.py ctypes/test/test_refcounts.py ctypes/test/test_repr.py ctypes/test/test_returnfuncptrs.py ctypes/test/test_simplesubclasses.py ctypes/test/test_sizes.py ctypes/test/test_slicing.py ctypes/test/test_stringptr.py ctypes/test/test_strings.py ctypes/test/test_struct_fields.py ctypes/test/test_structures.py ctypes/test/test_unaligned_structures.py ctypes/test/test_unicode.py ctypes/test/test_values.py ctypes/test/test_varsize_struct.py ctypes/test/test_win32.py distutils/tests/test_archive_util.py distutils/tests/test_bdist_rpm.py distutils/tests/test_bdist_wininst.py distutils/tests/test_build_clib.py distutils/tests/test_build_ext.py distutils/tests/test_build_py.py distutils/tests/test_build_scripts.py distutils/tests/test_clean.py distutils/tests/test_cmd.py distutils/tests/test_config.py distutils/tests/test_config_cmd.py distutils/tests/test_dist.py distutils/tests/test_install.py distutils/tests/test_install_data.py distutils/tests/test_install_lib.py distutils/tests/test_install_scripts.py distutils/tests/test_msvc9compiler.py distutils/tests/test_register.py distutils/tests/test_sysconfig.py distutils/tests/test_upload.py distutils/tests/test_util.py email/test/test_email.py importlib/test/builtin/test_finder.py importlib/test/builtin/test_loader.py importlib/test/extension/test_finder.py importlib/test/extension/test_loader.py importlib/test/extension/test_path_hook.py importlib/test/frozen/test_finder.py importlib/test/frozen/test_loader.py importlib/test/import_/test_caching.py importlib/test/import_/test_fromlist.py importlib/test/import_/test_meta_path.py importlib/test/import_/test_packages.py importlib/test/import_/test_path.py importlib/test/import_/test_relative_imports.py importlib/test/source/test_abc_loader.py importlib/test/source/test_file_loader.py importlib/test/source/test_finder.py importlib/test/source/test_path_hook.py importlib/test/test_abc.py importlib/test/test_util.py json/tests/test_decode.py json/tests/test_speedups.py test/mapping_tests.py test/pickletester.py test/test___all__.py test/test___future__.py test/test_abc.py test/test_abstract_numbers.py test/test_array.py test/test_ast.py test/test_augassign.py test/test_base64.py test/test_bigmem.py test/test_binascii.py test/test_binop.py test/test_bisect.py test/test_bool.py test/test_bufio.py test/test_builtin.py test/test_bytes.py test/test_capi.py test/test_cfgparser.py test/test_cgi.py test/test_cmath.py test/test_cmd_line.py test/test_cmd_line_script.py test/test_codecs.py test/test_codeop.py test/test_collections.py test/test_compile.py test/test_complex.py test/test_contains.py test/test_contextlib.py test/test_copy.py test/test_copyreg.py test/test_csv.py test/test_datetime.py test/test_dbm.py test/test_dbm_dumb.py test/test_dbm_gnu.py test/test_dbm_ndbm.py test/test_decimal.py test/test_defaultdict.py test/test_deque.py test/test_descr.py test/test_dict.py test/test_dictviews.py test/test_docxmlrpc.py test/test_dummy_thread.py test/test_epoll.py test/test_errno.py test/test_exceptions.py test/test_file.py test/test_filecmp.py test/test_fileinput.py test/test_fileio.py test/test_float.py test/test_fnmatch.py test/test_ftplib.py test/test_funcattrs.py test/test_functools.py test/test_genericpath.py test/test_getargs2.py test/test_getopt.py test/test_gettext.py test/test_grammar.py test/test_grp.py test/test_gzip.py test/test_hash.py test/test_hashlib.py test/test_heapq.py test/test_hmac.py test/test_http_cookiejar.py test/test_httplib.py test/test_httpservers.py test/test_imp.py test/test_import.py test/test_importhooks.py test/test_index.py test/test_inspect.py test/test_int.py test/test_io.py test/test_ioctl.py test/test_iter.py test/test_itertools.py test/test_kqueue.py test/test_largefile.py test/test_list.py test/test_logging.py test/test_long.py test/test_macpath.py test/test_mailbox.py test/test_math.py test/test_memoryio.py test/test_memoryview.py test/test_mimetypes.py test/test_minidom.py test/test_mmap.py test/test_module.py test/test_modulefinder.py test/test_multibytecodec.py test/test_multibytecodec_support.py test/test_netrc.py test/test_normalization.py test/test_opcodes.py test/test_operator.py test/test_optparse.py test/test_os.py test/test_ossaudiodev.py test/test_parser.py test/test_peepholer.py test/test_pep247.py test/test_pep277.py test/test_pep3120.py test/test_pep352.py test/test_pkg.py test/test_pkgimport.py test/test_platform.py test/test_poplib.py test/test_posix.py test/test_posixpath.py test/test_pprint.py test/test_property.py test/test_pwd.py test/test_pyclbr.py test/test_pydoc.py test/test_queue.py test/test_raise.py test/test_random.py test/test_range.py test/test_re.py test/test_reprlib.py test/test_richcmp.py test/test_robotparser.py test/test_runpy.py test/test_scope.py test/test_set.py test/test_shutil.py test/test_signal.py test/test_site.py test/test_slice.py test/test_socket.py test/test_stringprep.py test/test_strptime.py test/test_struct.py test/test_structseq.py test/test_subprocess.py test/test_symtable.py test/test_sys.py test/test_tarfile.py test/test_tempfile.py test/test_threading.py test/test_threading_local.py test/test_time.py test/test_timeout.py test/test_tokenize.py test/test_traceback.py test/test_tuple.py test/test_types.py test/test_unary.py test/test_unicode.py test/test_unicode_file.py test/test_unicodedata.py test/test_urllib.py test/test_urllib2.py test/test_urllib2_localnet.py test/test_urllib2net.py test/test_urllibnet.py test/test_userdict.py test/test_uuid.py test/test_warnings.py test/test_weakref.py test/test_weakset.py test/test_winreg.py test/test_wsgiref.py test/test_xdrlib.py test/test_xmlrpc.py test/test_xmlrpc_net.py test/test_zipfile.py test/test_zipimport.py test/test_zipimport_support.py test/test_zlib.py tkinter/test/test_tkinter/test_text.py tkinter/test/test_ttk/test_extensions.py tkinter/test/test_ttk/test_functions.py tkinter/test/test_ttk/test_style.py tkinter/test/test_ttk/test_widgets.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 01:06:06 2009 New Revision: 73715 Log: convert old fail* assertions to assert* Modified: python/branches/py3k/Lib/ctypes/test/test_anon.py python/branches/py3k/Lib/ctypes/test/test_array_in_pointer.py python/branches/py3k/Lib/ctypes/test/test_arrays.py python/branches/py3k/Lib/ctypes/test/test_as_parameter.py python/branches/py3k/Lib/ctypes/test/test_bitfields.py python/branches/py3k/Lib/ctypes/test/test_buffers.py python/branches/py3k/Lib/ctypes/test/test_byteswap.py python/branches/py3k/Lib/ctypes/test/test_callbacks.py python/branches/py3k/Lib/ctypes/test/test_cast.py python/branches/py3k/Lib/ctypes/test/test_cfuncs.py python/branches/py3k/Lib/ctypes/test/test_checkretval.py python/branches/py3k/Lib/ctypes/test/test_errno.py python/branches/py3k/Lib/ctypes/test/test_find.py python/branches/py3k/Lib/ctypes/test/test_frombuffer.py python/branches/py3k/Lib/ctypes/test/test_funcptr.py python/branches/py3k/Lib/ctypes/test/test_functions.py python/branches/py3k/Lib/ctypes/test/test_incomplete.py python/branches/py3k/Lib/ctypes/test/test_init.py python/branches/py3k/Lib/ctypes/test/test_internals.py python/branches/py3k/Lib/ctypes/test/test_keeprefs.py python/branches/py3k/Lib/ctypes/test/test_libc.py python/branches/py3k/Lib/ctypes/test/test_loading.py python/branches/py3k/Lib/ctypes/test/test_macholib.py python/branches/py3k/Lib/ctypes/test/test_memfunctions.py python/branches/py3k/Lib/ctypes/test/test_numbers.py python/branches/py3k/Lib/ctypes/test/test_parameters.py python/branches/py3k/Lib/ctypes/test/test_pep3118.py python/branches/py3k/Lib/ctypes/test/test_pickling.py python/branches/py3k/Lib/ctypes/test/test_pointers.py python/branches/py3k/Lib/ctypes/test/test_prototypes.py python/branches/py3k/Lib/ctypes/test/test_python_api.py python/branches/py3k/Lib/ctypes/test/test_random_things.py python/branches/py3k/Lib/ctypes/test/test_refcounts.py python/branches/py3k/Lib/ctypes/test/test_repr.py python/branches/py3k/Lib/ctypes/test/test_returnfuncptrs.py python/branches/py3k/Lib/ctypes/test/test_simplesubclasses.py python/branches/py3k/Lib/ctypes/test/test_sizes.py python/branches/py3k/Lib/ctypes/test/test_slicing.py python/branches/py3k/Lib/ctypes/test/test_stringptr.py python/branches/py3k/Lib/ctypes/test/test_strings.py python/branches/py3k/Lib/ctypes/test/test_struct_fields.py python/branches/py3k/Lib/ctypes/test/test_structures.py python/branches/py3k/Lib/ctypes/test/test_unaligned_structures.py python/branches/py3k/Lib/ctypes/test/test_unicode.py python/branches/py3k/Lib/ctypes/test/test_values.py python/branches/py3k/Lib/ctypes/test/test_varsize_struct.py python/branches/py3k/Lib/ctypes/test/test_win32.py python/branches/py3k/Lib/distutils/tests/test_archive_util.py python/branches/py3k/Lib/distutils/tests/test_bdist_rpm.py python/branches/py3k/Lib/distutils/tests/test_bdist_wininst.py python/branches/py3k/Lib/distutils/tests/test_build_clib.py python/branches/py3k/Lib/distutils/tests/test_build_ext.py python/branches/py3k/Lib/distutils/tests/test_build_py.py python/branches/py3k/Lib/distutils/tests/test_build_scripts.py python/branches/py3k/Lib/distutils/tests/test_clean.py python/branches/py3k/Lib/distutils/tests/test_cmd.py python/branches/py3k/Lib/distutils/tests/test_config.py python/branches/py3k/Lib/distutils/tests/test_config_cmd.py python/branches/py3k/Lib/distutils/tests/test_dist.py python/branches/py3k/Lib/distutils/tests/test_install.py python/branches/py3k/Lib/distutils/tests/test_install_data.py python/branches/py3k/Lib/distutils/tests/test_install_lib.py python/branches/py3k/Lib/distutils/tests/test_install_scripts.py python/branches/py3k/Lib/distutils/tests/test_msvc9compiler.py python/branches/py3k/Lib/distutils/tests/test_register.py python/branches/py3k/Lib/distutils/tests/test_sysconfig.py python/branches/py3k/Lib/distutils/tests/test_upload.py python/branches/py3k/Lib/distutils/tests/test_util.py python/branches/py3k/Lib/email/test/test_email.py python/branches/py3k/Lib/importlib/test/builtin/test_finder.py python/branches/py3k/Lib/importlib/test/builtin/test_loader.py python/branches/py3k/Lib/importlib/test/extension/test_finder.py python/branches/py3k/Lib/importlib/test/extension/test_loader.py python/branches/py3k/Lib/importlib/test/extension/test_path_hook.py python/branches/py3k/Lib/importlib/test/frozen/test_finder.py python/branches/py3k/Lib/importlib/test/frozen/test_loader.py python/branches/py3k/Lib/importlib/test/import_/test_caching.py python/branches/py3k/Lib/importlib/test/import_/test_fromlist.py python/branches/py3k/Lib/importlib/test/import_/test_meta_path.py python/branches/py3k/Lib/importlib/test/import_/test_packages.py python/branches/py3k/Lib/importlib/test/import_/test_path.py python/branches/py3k/Lib/importlib/test/import_/test_relative_imports.py python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py python/branches/py3k/Lib/importlib/test/source/test_file_loader.py python/branches/py3k/Lib/importlib/test/source/test_finder.py python/branches/py3k/Lib/importlib/test/source/test_path_hook.py python/branches/py3k/Lib/importlib/test/test_abc.py python/branches/py3k/Lib/importlib/test/test_util.py python/branches/py3k/Lib/json/tests/test_decode.py python/branches/py3k/Lib/json/tests/test_speedups.py python/branches/py3k/Lib/test/mapping_tests.py python/branches/py3k/Lib/test/pickletester.py python/branches/py3k/Lib/test/test___all__.py python/branches/py3k/Lib/test/test___future__.py python/branches/py3k/Lib/test/test_abc.py python/branches/py3k/Lib/test/test_abstract_numbers.py python/branches/py3k/Lib/test/test_array.py python/branches/py3k/Lib/test/test_ast.py python/branches/py3k/Lib/test/test_augassign.py python/branches/py3k/Lib/test/test_base64.py python/branches/py3k/Lib/test/test_bigmem.py python/branches/py3k/Lib/test/test_binascii.py python/branches/py3k/Lib/test/test_binop.py python/branches/py3k/Lib/test/test_bisect.py python/branches/py3k/Lib/test/test_bool.py python/branches/py3k/Lib/test/test_bufio.py python/branches/py3k/Lib/test/test_builtin.py python/branches/py3k/Lib/test/test_bytes.py python/branches/py3k/Lib/test/test_capi.py python/branches/py3k/Lib/test/test_cfgparser.py python/branches/py3k/Lib/test/test_cgi.py python/branches/py3k/Lib/test/test_cmath.py python/branches/py3k/Lib/test/test_cmd_line.py python/branches/py3k/Lib/test/test_cmd_line_script.py python/branches/py3k/Lib/test/test_codecs.py python/branches/py3k/Lib/test/test_codeop.py python/branches/py3k/Lib/test/test_collections.py python/branches/py3k/Lib/test/test_compile.py python/branches/py3k/Lib/test/test_complex.py python/branches/py3k/Lib/test/test_contains.py python/branches/py3k/Lib/test/test_contextlib.py python/branches/py3k/Lib/test/test_copy.py python/branches/py3k/Lib/test/test_copyreg.py python/branches/py3k/Lib/test/test_csv.py python/branches/py3k/Lib/test/test_datetime.py python/branches/py3k/Lib/test/test_dbm.py python/branches/py3k/Lib/test/test_dbm_dumb.py python/branches/py3k/Lib/test/test_dbm_gnu.py python/branches/py3k/Lib/test/test_dbm_ndbm.py python/branches/py3k/Lib/test/test_decimal.py python/branches/py3k/Lib/test/test_defaultdict.py python/branches/py3k/Lib/test/test_deque.py python/branches/py3k/Lib/test/test_descr.py python/branches/py3k/Lib/test/test_dict.py python/branches/py3k/Lib/test/test_dictviews.py python/branches/py3k/Lib/test/test_docxmlrpc.py python/branches/py3k/Lib/test/test_dummy_thread.py python/branches/py3k/Lib/test/test_epoll.py python/branches/py3k/Lib/test/test_errno.py python/branches/py3k/Lib/test/test_exceptions.py python/branches/py3k/Lib/test/test_file.py python/branches/py3k/Lib/test/test_filecmp.py python/branches/py3k/Lib/test/test_fileinput.py python/branches/py3k/Lib/test/test_fileio.py python/branches/py3k/Lib/test/test_float.py python/branches/py3k/Lib/test/test_fnmatch.py python/branches/py3k/Lib/test/test_ftplib.py python/branches/py3k/Lib/test/test_funcattrs.py python/branches/py3k/Lib/test/test_functools.py python/branches/py3k/Lib/test/test_genericpath.py python/branches/py3k/Lib/test/test_getargs2.py python/branches/py3k/Lib/test/test_getopt.py python/branches/py3k/Lib/test/test_gettext.py python/branches/py3k/Lib/test/test_grammar.py python/branches/py3k/Lib/test/test_grp.py python/branches/py3k/Lib/test/test_gzip.py python/branches/py3k/Lib/test/test_hash.py python/branches/py3k/Lib/test/test_hashlib.py python/branches/py3k/Lib/test/test_heapq.py python/branches/py3k/Lib/test/test_hmac.py python/branches/py3k/Lib/test/test_http_cookiejar.py python/branches/py3k/Lib/test/test_httplib.py python/branches/py3k/Lib/test/test_httpservers.py python/branches/py3k/Lib/test/test_imp.py python/branches/py3k/Lib/test/test_import.py python/branches/py3k/Lib/test/test_importhooks.py python/branches/py3k/Lib/test/test_index.py python/branches/py3k/Lib/test/test_inspect.py python/branches/py3k/Lib/test/test_int.py python/branches/py3k/Lib/test/test_io.py python/branches/py3k/Lib/test/test_ioctl.py python/branches/py3k/Lib/test/test_iter.py python/branches/py3k/Lib/test/test_itertools.py python/branches/py3k/Lib/test/test_kqueue.py python/branches/py3k/Lib/test/test_largefile.py python/branches/py3k/Lib/test/test_list.py python/branches/py3k/Lib/test/test_logging.py python/branches/py3k/Lib/test/test_long.py python/branches/py3k/Lib/test/test_macpath.py python/branches/py3k/Lib/test/test_mailbox.py python/branches/py3k/Lib/test/test_math.py python/branches/py3k/Lib/test/test_memoryio.py python/branches/py3k/Lib/test/test_memoryview.py python/branches/py3k/Lib/test/test_mimetypes.py python/branches/py3k/Lib/test/test_minidom.py python/branches/py3k/Lib/test/test_mmap.py python/branches/py3k/Lib/test/test_module.py python/branches/py3k/Lib/test/test_modulefinder.py python/branches/py3k/Lib/test/test_multibytecodec.py python/branches/py3k/Lib/test/test_multibytecodec_support.py python/branches/py3k/Lib/test/test_netrc.py python/branches/py3k/Lib/test/test_normalization.py python/branches/py3k/Lib/test/test_opcodes.py python/branches/py3k/Lib/test/test_operator.py python/branches/py3k/Lib/test/test_optparse.py python/branches/py3k/Lib/test/test_os.py python/branches/py3k/Lib/test/test_ossaudiodev.py python/branches/py3k/Lib/test/test_parser.py python/branches/py3k/Lib/test/test_peepholer.py python/branches/py3k/Lib/test/test_pep247.py python/branches/py3k/Lib/test/test_pep277.py python/branches/py3k/Lib/test/test_pep3120.py python/branches/py3k/Lib/test/test_pep352.py python/branches/py3k/Lib/test/test_pkg.py python/branches/py3k/Lib/test/test_pkgimport.py python/branches/py3k/Lib/test/test_platform.py python/branches/py3k/Lib/test/test_poplib.py python/branches/py3k/Lib/test/test_posix.py python/branches/py3k/Lib/test/test_posixpath.py python/branches/py3k/Lib/test/test_pprint.py python/branches/py3k/Lib/test/test_property.py python/branches/py3k/Lib/test/test_pwd.py python/branches/py3k/Lib/test/test_pyclbr.py python/branches/py3k/Lib/test/test_pydoc.py python/branches/py3k/Lib/test/test_queue.py python/branches/py3k/Lib/test/test_raise.py python/branches/py3k/Lib/test/test_random.py python/branches/py3k/Lib/test/test_range.py python/branches/py3k/Lib/test/test_re.py python/branches/py3k/Lib/test/test_reprlib.py python/branches/py3k/Lib/test/test_richcmp.py python/branches/py3k/Lib/test/test_robotparser.py python/branches/py3k/Lib/test/test_runpy.py python/branches/py3k/Lib/test/test_scope.py python/branches/py3k/Lib/test/test_set.py python/branches/py3k/Lib/test/test_shutil.py python/branches/py3k/Lib/test/test_signal.py python/branches/py3k/Lib/test/test_site.py python/branches/py3k/Lib/test/test_slice.py python/branches/py3k/Lib/test/test_socket.py python/branches/py3k/Lib/test/test_stringprep.py python/branches/py3k/Lib/test/test_strptime.py python/branches/py3k/Lib/test/test_struct.py python/branches/py3k/Lib/test/test_structseq.py python/branches/py3k/Lib/test/test_subprocess.py python/branches/py3k/Lib/test/test_symtable.py python/branches/py3k/Lib/test/test_sys.py python/branches/py3k/Lib/test/test_tarfile.py python/branches/py3k/Lib/test/test_tempfile.py python/branches/py3k/Lib/test/test_threading.py python/branches/py3k/Lib/test/test_threading_local.py python/branches/py3k/Lib/test/test_time.py python/branches/py3k/Lib/test/test_timeout.py python/branches/py3k/Lib/test/test_tokenize.py python/branches/py3k/Lib/test/test_traceback.py python/branches/py3k/Lib/test/test_tuple.py python/branches/py3k/Lib/test/test_types.py python/branches/py3k/Lib/test/test_unary.py python/branches/py3k/Lib/test/test_unicode.py python/branches/py3k/Lib/test/test_unicode_file.py python/branches/py3k/Lib/test/test_unicodedata.py python/branches/py3k/Lib/test/test_urllib.py python/branches/py3k/Lib/test/test_urllib2.py python/branches/py3k/Lib/test/test_urllib2_localnet.py python/branches/py3k/Lib/test/test_urllib2net.py python/branches/py3k/Lib/test/test_urllibnet.py python/branches/py3k/Lib/test/test_userdict.py python/branches/py3k/Lib/test/test_uuid.py python/branches/py3k/Lib/test/test_warnings.py python/branches/py3k/Lib/test/test_weakref.py python/branches/py3k/Lib/test/test_weakset.py python/branches/py3k/Lib/test/test_winreg.py python/branches/py3k/Lib/test/test_wsgiref.py python/branches/py3k/Lib/test/test_xdrlib.py python/branches/py3k/Lib/test/test_xmlrpc.py python/branches/py3k/Lib/test/test_xmlrpc_net.py python/branches/py3k/Lib/test/test_zipfile.py python/branches/py3k/Lib/test/test_zipimport.py python/branches/py3k/Lib/test/test_zipimport_support.py python/branches/py3k/Lib/test/test_zlib.py python/branches/py3k/Lib/tkinter/test/test_tkinter/test_text.py python/branches/py3k/Lib/tkinter/test/test_ttk/test_extensions.py python/branches/py3k/Lib/tkinter/test/test_ttk/test_functions.py python/branches/py3k/Lib/tkinter/test/test_ttk/test_style.py python/branches/py3k/Lib/tkinter/test/test_ttk/test_widgets.py Modified: python/branches/py3k/Lib/ctypes/test/test_anon.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_anon.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_anon.py Wed Jul 1 01:06:06 2009 @@ -14,22 +14,22 @@ ("y", c_int)] _anonymous_ = ["_"] - self.failUnlessEqual(Y.a.offset, sizeof(c_int)) - self.failUnlessEqual(Y.b.offset, sizeof(c_int)) + self.assertEqual(Y.a.offset, sizeof(c_int)) + self.assertEqual(Y.b.offset, sizeof(c_int)) - self.failUnlessEqual(ANON.a.offset, 0) - self.failUnlessEqual(ANON.b.offset, 0) + self.assertEqual(ANON.a.offset, 0) + self.assertEqual(ANON.b.offset, 0) def test_anon_nonseq(self): # TypeError: _anonymous_ must be a sequence - self.failUnlessRaises(TypeError, + self.assertRaises(TypeError, lambda: type(Structure)("Name", (Structure,), {"_fields_": [], "_anonymous_": 42})) def test_anon_nonmember(self): # AttributeError: type object 'Name' has no attribute 'x' - self.failUnlessRaises(AttributeError, + self.assertRaises(AttributeError, lambda: type(Structure)("Name", (Structure,), {"_fields_": [], @@ -50,11 +50,11 @@ ("y", c_int)] _anonymous_ = ["_"] - self.failUnlessEqual(Y.x.offset, 0) - self.failUnlessEqual(Y.a.offset, sizeof(c_int)) - self.failUnlessEqual(Y.b.offset, sizeof(c_int)) - self.failUnlessEqual(Y._.offset, sizeof(c_int)) - self.failUnlessEqual(Y.y.offset, sizeof(c_int) * 2) + self.assertEqual(Y.x.offset, 0) + self.assertEqual(Y.a.offset, sizeof(c_int)) + self.assertEqual(Y.b.offset, sizeof(c_int)) + self.assertEqual(Y._.offset, sizeof(c_int)) + self.assertEqual(Y.y.offset, sizeof(c_int) * 2) if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_array_in_pointer.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_array_in_pointer.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_array_in_pointer.py Wed Jul 1 01:06:06 2009 @@ -26,7 +26,7 @@ c.pvalues = val_array # memory contains 4 NUL bytes now, that's correct - self.failUnlessEqual("00-00-00-00", dump(val_array)) + self.assertEqual("00-00-00-00", dump(val_array)) # set the values of the array through the pointer: for i in range(4): @@ -35,7 +35,7 @@ values = [c.pvalues[i].val for i in range(4)] # These are the expected results: here s the bug! - self.failUnlessEqual( + self.assertEqual( (values, dump(val_array)), ([1, 2, 3, 4], "01-02-03-04") ) @@ -45,7 +45,7 @@ val_array = (Value * 4)() # memory contains 4 NUL bytes now, that's correct - self.failUnlessEqual("00-00-00-00", dump(val_array)) + self.assertEqual("00-00-00-00", dump(val_array)) ptr = cast(val_array, POINTER(Value)) # set the values of the array through the pointer: @@ -55,7 +55,7 @@ values = [ptr[i].val for i in range(4)] # These are the expected results: here s the bug! - self.failUnlessEqual( + self.assertEqual( (values, dump(val_array)), ([1, 2, 3, 4], "01-02-03-04") ) Modified: python/branches/py3k/Lib/ctypes/test/test_arrays.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_arrays.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_arrays.py Wed Jul 1 01:06:06 2009 @@ -19,23 +19,23 @@ ia = int_array(*init) # length of instance ok? - self.failUnlessEqual(len(ia), alen) + self.assertEqual(len(ia), alen) # slot values ok? values = [ia[i] for i in range(len(init))] - self.failUnlessEqual(values, init) + self.assertEqual(values, init) # change the items from operator import setitem new_values = list(range(42, 42+alen)) [setitem(ia, n, new_values[n]) for n in range(alen)] values = [ia[i] for i in range(len(init))] - self.failUnlessEqual(values, new_values) + self.assertEqual(values, new_values) # are the items initialized to 0? ia = int_array() values = [ia[i] for i in range(len(init))] - self.failUnlessEqual(values, [0] * len(init)) + self.assertEqual(values, [0] * len(init)) # Too many in itializers should be caught self.assertRaises(IndexError, int_array, *range(alen*2)) @@ -48,14 +48,14 @@ # CharArray("abc") self.assertRaises(TypeError, CharArray, "abc") - self.failUnlessEqual(ca[0], b"a") - self.failUnlessEqual(ca[1], b"b") - self.failUnlessEqual(ca[2], b"c") - self.failUnlessEqual(ca[-3], b"a") - self.failUnlessEqual(ca[-2], b"b") - self.failUnlessEqual(ca[-1], b"c") + self.assertEqual(ca[0], b"a") + self.assertEqual(ca[1], b"b") + self.assertEqual(ca[2], b"c") + self.assertEqual(ca[-3], b"a") + self.assertEqual(ca[-2], b"b") + self.assertEqual(ca[-1], b"c") - self.failUnlessEqual(len(ca), 3) + self.assertEqual(len(ca), 3) # cannot delete items from operator import delitem @@ -69,34 +69,34 @@ na = numarray() values = [na[i] for i in range(alen)] - self.failUnlessEqual(values, [0] * alen) + self.assertEqual(values, [0] * alen) na = numarray(*[c_int()] * alen) values = [na[i] for i in range(alen)] - self.failUnlessEqual(values, [0]*alen) + self.assertEqual(values, [0]*alen) na = numarray(1, 2, 3, 4, 5) values = [i for i in na] - self.failUnlessEqual(values, [1, 2, 3, 4, 5]) + self.assertEqual(values, [1, 2, 3, 4, 5]) na = numarray(*map(c_int, (1, 2, 3, 4, 5))) values = [i for i in na] - self.failUnlessEqual(values, [1, 2, 3, 4, 5]) + self.assertEqual(values, [1, 2, 3, 4, 5]) def test_classcache(self): - self.failUnless(not ARRAY(c_int, 3) is ARRAY(c_int, 4)) - self.failUnless(ARRAY(c_int, 3) is ARRAY(c_int, 3)) + self.assertTrue(not ARRAY(c_int, 3) is ARRAY(c_int, 4)) + self.assertTrue(ARRAY(c_int, 3) is ARRAY(c_int, 3)) def test_from_address(self): # Failed with 0.9.8, reported by JUrner p = create_string_buffer("foo") sz = (c_char * 3).from_address(addressof(p)) - self.failUnlessEqual(sz[:], b"foo") - self.failUnlessEqual(sz[::], b"foo") - self.failUnlessEqual(sz[::-1], b"oof") - self.failUnlessEqual(sz[::3], b"f") - self.failUnlessEqual(sz[1:4:2], b"o") - self.failUnlessEqual(sz.value, b"foo") + self.assertEqual(sz[:], b"foo") + self.assertEqual(sz[::], b"foo") + self.assertEqual(sz[::-1], b"oof") + self.assertEqual(sz[::3], b"f") + self.assertEqual(sz[1:4:2], b"o") + self.assertEqual(sz.value, b"foo") try: create_unicode_buffer @@ -106,12 +106,12 @@ def test_from_addressW(self): p = create_unicode_buffer("foo") sz = (c_wchar * 3).from_address(addressof(p)) - self.failUnlessEqual(sz[:], "foo") - self.failUnlessEqual(sz[::], "foo") - self.failUnlessEqual(sz[::-1], "oof") - self.failUnlessEqual(sz[::3], "f") - self.failUnlessEqual(sz[1:4:2], "o") - self.failUnlessEqual(sz.value, "foo") + self.assertEqual(sz[:], "foo") + self.assertEqual(sz[::], "foo") + self.assertEqual(sz[::-1], "oof") + self.assertEqual(sz[::3], "f") + self.assertEqual(sz[1:4:2], "o") + self.assertEqual(sz.value, "foo") def test_cache(self): # Array types are cached internally in the _ctypes extension, @@ -125,7 +125,7 @@ # Create a new array type based on it: t1 = my_int * 1 t2 = my_int * 1 - self.failUnless(t1 is t2) + self.assertTrue(t1 is t2) if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_as_parameter.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_as_parameter.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_as_parameter.py Wed Jul 1 01:06:06 2009 @@ -25,8 +25,8 @@ f = dll._testfunc_i_bhilfd f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double] result = f(self.wrap(1), self.wrap("x"), self.wrap(3), self.wrap(4), self.wrap(5.0), self.wrap(6.0)) - self.failUnlessEqual(result, 139) - self.failUnless(type(result), int) + self.assertEqual(result, 139) + self.assertTrue(type(result), int) def test_pointers(self): f = dll._testfunc_p_p @@ -39,18 +39,18 @@ v = c_int(42) - self.failUnlessEqual(pointer(v).contents.value, 42) + self.assertEqual(pointer(v).contents.value, 42) result = f(self.wrap(pointer(v))) - self.failUnlessEqual(type(result), POINTER(c_int)) - self.failUnlessEqual(result.contents.value, 42) + self.assertEqual(type(result), POINTER(c_int)) + self.assertEqual(result.contents.value, 42) # This on works... result = f(self.wrap(pointer(v))) - self.failUnlessEqual(result.contents.value, v.value) + self.assertEqual(result.contents.value, v.value) p = pointer(c_int(99)) result = f(self.wrap(p)) - self.failUnlessEqual(result.contents.value, 99) + self.assertEqual(result.contents.value, 99) def test_shorts(self): f = dll._testfunc_callback_i_if @@ -67,7 +67,7 @@ cb = CallBack(callback) f(self.wrap(2**18), self.wrap(cb)) - self.failUnlessEqual(args, expected) + self.assertEqual(args, expected) ################################################################ @@ -84,17 +84,17 @@ cb = MyCallback(callback) result = f(self.wrap(-10), self.wrap(cb)) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) # test with prototype f.argtypes = [c_int, MyCallback] cb = MyCallback(callback) result = f(self.wrap(-10), self.wrap(cb)) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) result = f(self.wrap(-10), self.wrap(cb)) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) AnotherCallback = CALLBACK_FUNCTYPE(c_int, c_int, c_int, c_int, c_int) @@ -116,12 +116,12 @@ def callback(value): #print "called back with", value - self.failUnlessEqual(type(value), int) + self.assertEqual(type(value), int) return value cb = MyCallback(callback) result = f(self.wrap(-10), self.wrap(cb)) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) def test_longlong_callbacks(self): @@ -133,12 +133,12 @@ f.argtypes = [c_longlong, MyCallback] def callback(value): - self.failUnless(isinstance(value, int)) + self.assertTrue(isinstance(value, int)) return value & 0x7FFFFFFF cb = MyCallback(callback) - self.failUnlessEqual(13577625587, int(f(self.wrap(1000000000000), self.wrap(cb)))) + self.assertEqual(13577625587, int(f(self.wrap(1000000000000), self.wrap(cb)))) def test_byval(self): # without prototype @@ -148,7 +148,7 @@ result = dll._testfunc_byval(ptin, byref(ptout)) got = result, ptout.x, ptout.y expected = 3, 1, 2 - self.failUnlessEqual(got, expected) + self.assertEqual(got, expected) # with prototype ptin = POINT(101, 102) @@ -158,7 +158,7 @@ result = dll._testfunc_byval(self.wrap(ptin), byref(ptout)) got = result, ptout.x, ptout.y expected = 203, 101, 102 - self.failUnlessEqual(got, expected) + self.assertEqual(got, expected) def test_struct_return_2H(self): class S2H(Structure): @@ -168,7 +168,7 @@ dll.ret_2h_func.argtypes = [S2H] inp = S2H(99, 88) s2h = dll.ret_2h_func(self.wrap(inp)) - self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3)) + self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) def test_struct_return_8H(self): class S8I(Structure): @@ -184,7 +184,7 @@ dll.ret_8i_func.argtypes = [S8I] inp = S8I(9, 8, 7, 6, 5, 4, 3, 2) s8i = dll.ret_8i_func(self.wrap(inp)) - self.failUnlessEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), + self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modified: python/branches/py3k/Lib/ctypes/test/test_bitfields.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_bitfields.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_bitfields.py Wed Jul 1 01:06:06 2009 @@ -37,14 +37,14 @@ for name in "ABCDEFGHI": b = BITS() setattr(b, name, i) - self.failUnlessEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) + self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) def test_shorts(self): for i in range(256): for name in "MNOPQRS": b = BITS() setattr(b, name, i) - self.failUnlessEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) + self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) signed_int_types = (c_byte, c_short, c_int, c_long, c_longlong) unsigned_int_types = (c_ubyte, c_ushort, c_uint, c_ulong, c_ulonglong) @@ -58,10 +58,10 @@ ("b", c_longlong, 62), ("c", c_longlong, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_longlong)) + self.assertEqual(sizeof(X), sizeof(c_longlong)) x = X() x.a, x.b, x.c = -1, 7, -1 - self.failUnlessEqual((x.a, x.b, x.c), (-1, 7, -1)) + self.assertEqual((x.a, x.b, x.c), (-1, 7, -1)) def test_ulonglong(self): class X(Structure): @@ -69,11 +69,11 @@ ("b", c_ulonglong, 62), ("c", c_ulonglong, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_longlong)) + self.assertEqual(sizeof(X), sizeof(c_longlong)) x = X() - self.failUnlessEqual((x.a, x.b, x.c), (0, 0, 0)) + self.assertEqual((x.a, x.b, x.c), (0, 0, 0)) x.a, x.b, x.c = 7, 7, 7 - self.failUnlessEqual((x.a, x.b, x.c), (1, 7, 1)) + self.assertEqual((x.a, x.b, x.c), (1, 7, 1)) def test_signed(self): for c_typ in signed_int_types: @@ -82,14 +82,14 @@ ("a", c_typ, 3), ("b", c_typ, 3), ("c", c_typ, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_typ)*2) + self.assertEqual(sizeof(X), sizeof(c_typ)*2) x = X() - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) x.a = -1 - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, -1, 0, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, -1, 0, 0)) x.a, x.b = 0, -1 - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, -1, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, -1, 0)) def test_unsigned(self): @@ -98,14 +98,14 @@ _fields_ = [("a", c_typ, 3), ("b", c_typ, 3), ("c", c_typ, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_typ)) + self.assertEqual(sizeof(X), sizeof(c_typ)) x = X() - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 0, 0)) x.a = -1 - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 7, 0, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 7, 0, 0)) x.a, x.b = 0, -1 - self.failUnlessEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 7, 0)) + self.assertEqual((c_typ, x.a, x.b, x.c), (c_typ, 0, 7, 0)) def fail_fields(self, *fields): @@ -115,17 +115,17 @@ def test_nonint_types(self): # bit fields are not allowed on non-integer types. result = self.fail_fields(("a", c_char_p, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type c_char_p')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_char_p')) result = self.fail_fields(("a", c_void_p, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type c_void_p')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_void_p')) if c_int != c_long: result = self.fail_fields(("a", POINTER(c_int), 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type LP_c_int')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type LP_c_int')) result = self.fail_fields(("a", c_char, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type c_char')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_char')) try: c_wchar @@ -133,59 +133,59 @@ pass else: result = self.fail_fields(("a", c_wchar, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type c_wchar')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type c_wchar')) class Dummy(Structure): _fields_ = [] result = self.fail_fields(("a", Dummy, 1)) - self.failUnlessEqual(result, (TypeError, 'bit fields not allowed for type Dummy')) + self.assertEqual(result, (TypeError, 'bit fields not allowed for type Dummy')) def test_single_bitfield_size(self): for c_typ in int_types: result = self.fail_fields(("a", c_typ, -1)) - self.failUnlessEqual(result, (ValueError, 'number of bits invalid for bit field')) + self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) result = self.fail_fields(("a", c_typ, 0)) - self.failUnlessEqual(result, (ValueError, 'number of bits invalid for bit field')) + self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) class X(Structure): _fields_ = [("a", c_typ, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_typ)) + self.assertEqual(sizeof(X), sizeof(c_typ)) class X(Structure): _fields_ = [("a", c_typ, sizeof(c_typ)*8)] - self.failUnlessEqual(sizeof(X), sizeof(c_typ)) + self.assertEqual(sizeof(X), sizeof(c_typ)) result = self.fail_fields(("a", c_typ, sizeof(c_typ)*8 + 1)) - self.failUnlessEqual(result, (ValueError, 'number of bits invalid for bit field')) + self.assertEqual(result, (ValueError, 'number of bits invalid for bit field')) def test_multi_bitfields_size(self): class X(Structure): _fields_ = [("a", c_short, 1), ("b", c_short, 14), ("c", c_short, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_short)) + self.assertEqual(sizeof(X), sizeof(c_short)) class X(Structure): _fields_ = [("a", c_short, 1), ("a1", c_short), ("b", c_short, 14), ("c", c_short, 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_short)*3) - self.failUnlessEqual(X.a.offset, 0) - self.failUnlessEqual(X.a1.offset, sizeof(c_short)) - self.failUnlessEqual(X.b.offset, sizeof(c_short)*2) - self.failUnlessEqual(X.c.offset, sizeof(c_short)*2) + self.assertEqual(sizeof(X), sizeof(c_short)*3) + self.assertEqual(X.a.offset, 0) + self.assertEqual(X.a1.offset, sizeof(c_short)) + self.assertEqual(X.b.offset, sizeof(c_short)*2) + self.assertEqual(X.c.offset, sizeof(c_short)*2) class X(Structure): _fields_ = [("a", c_short, 3), ("b", c_short, 14), ("c", c_short, 14)] - self.failUnlessEqual(sizeof(X), sizeof(c_short)*3) - self.failUnlessEqual(X.a.offset, sizeof(c_short)*0) - self.failUnlessEqual(X.b.offset, sizeof(c_short)*1) - self.failUnlessEqual(X.c.offset, sizeof(c_short)*2) + self.assertEqual(sizeof(X), sizeof(c_short)*3) + self.assertEqual(X.a.offset, sizeof(c_short)*0) + self.assertEqual(X.b.offset, sizeof(c_short)*1) + self.assertEqual(X.c.offset, sizeof(c_short)*2) def get_except(self, func, *args, **kw): @@ -199,21 +199,21 @@ _fields_ = [("a", c_byte, 4), ("b", c_int, 4)] if os.name in ("nt", "ce"): - self.failUnlessEqual(sizeof(X), sizeof(c_int)*2) + self.assertEqual(sizeof(X), sizeof(c_int)*2) else: - self.failUnlessEqual(sizeof(X), sizeof(c_int)) + self.assertEqual(sizeof(X), sizeof(c_int)) def test_mixed_2(self): class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_int, 32)] - self.failUnlessEqual(sizeof(X), sizeof(c_int)*2) + self.assertEqual(sizeof(X), sizeof(c_int)*2) def test_mixed_3(self): class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_ubyte, 4)] - self.failUnlessEqual(sizeof(X), sizeof(c_byte)) + self.assertEqual(sizeof(X), sizeof(c_byte)) def test_mixed_4(self): class X(Structure): @@ -227,9 +227,9 @@ # does (unless GCC is run with '-mms-bitfields' which # produces code compatible with MSVC). if os.name in ("nt", "ce"): - self.failUnlessEqual(sizeof(X), sizeof(c_int) * 4) + self.assertEqual(sizeof(X), sizeof(c_int) * 4) else: - self.failUnlessEqual(sizeof(X), sizeof(c_int) * 2) + self.assertEqual(sizeof(X), sizeof(c_int) * 2) def test_anon_bitfields(self): # anonymous bit-fields gave a strange error message Modified: python/branches/py3k/Lib/ctypes/test/test_buffers.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_buffers.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_buffers.py Wed Jul 1 01:06:06 2009 @@ -5,32 +5,32 @@ def test_buffer(self): b = create_string_buffer(32) - self.failUnlessEqual(len(b), 32) - self.failUnlessEqual(sizeof(b), 32 * sizeof(c_char)) - self.failUnless(type(b[0]) is bytes) + self.assertEqual(len(b), 32) + self.assertEqual(sizeof(b), 32 * sizeof(c_char)) + self.assertTrue(type(b[0]) is bytes) b = create_string_buffer("abc") - self.failUnlessEqual(len(b), 4) # trailing nul char - self.failUnlessEqual(sizeof(b), 4 * sizeof(c_char)) - self.failUnless(type(b[0]) is bytes) - self.failUnlessEqual(b[0], b"a") - self.failUnlessEqual(b[:], b"abc\0") - self.failUnlessEqual(b[::], b"abc\0") - self.failUnlessEqual(b[::-1], b"\0cba") - self.failUnlessEqual(b[::2], b"ac") - self.failUnlessEqual(b[::5], b"a") + self.assertEqual(len(b), 4) # trailing nul char + self.assertEqual(sizeof(b), 4 * sizeof(c_char)) + self.assertTrue(type(b[0]) is bytes) + self.assertEqual(b[0], b"a") + self.assertEqual(b[:], b"abc\0") + self.assertEqual(b[::], b"abc\0") + self.assertEqual(b[::-1], b"\0cba") + self.assertEqual(b[::2], b"ac") + self.assertEqual(b[::5], b"a") def test_string_conversion(self): b = create_string_buffer("abc") - self.failUnlessEqual(len(b), 4) # trailing nul char - self.failUnlessEqual(sizeof(b), 4 * sizeof(c_char)) - self.failUnless(type(b[0]) is bytes) - self.failUnlessEqual(b[0], b"a") - self.failUnlessEqual(b[:], b"abc\0") - self.failUnlessEqual(b[::], b"abc\0") - self.failUnlessEqual(b[::-1], b"\0cba") - self.failUnlessEqual(b[::2], b"ac") - self.failUnlessEqual(b[::5], b"a") + self.assertEqual(len(b), 4) # trailing nul char + self.assertEqual(sizeof(b), 4 * sizeof(c_char)) + self.assertTrue(type(b[0]) is bytes) + self.assertEqual(b[0], b"a") + self.assertEqual(b[:], b"abc\0") + self.assertEqual(b[::], b"abc\0") + self.assertEqual(b[::-1], b"\0cba") + self.assertEqual(b[::2], b"ac") + self.assertEqual(b[::5], b"a") try: c_wchar @@ -39,32 +39,32 @@ else: def test_unicode_buffer(self): b = create_unicode_buffer(32) - self.failUnlessEqual(len(b), 32) - self.failUnlessEqual(sizeof(b), 32 * sizeof(c_wchar)) - self.failUnless(type(b[0]) is str) + self.assertEqual(len(b), 32) + self.assertEqual(sizeof(b), 32 * sizeof(c_wchar)) + self.assertTrue(type(b[0]) is str) b = create_unicode_buffer("abc") - self.failUnlessEqual(len(b), 4) # trailing nul char - self.failUnlessEqual(sizeof(b), 4 * sizeof(c_wchar)) - self.failUnless(type(b[0]) is str) - self.failUnlessEqual(b[0], "a") - self.failUnlessEqual(b[:], "abc\0") - self.failUnlessEqual(b[::], "abc\0") - self.failUnlessEqual(b[::-1], "\0cba") - self.failUnlessEqual(b[::2], "ac") - self.failUnlessEqual(b[::5], "a") + self.assertEqual(len(b), 4) # trailing nul char + self.assertEqual(sizeof(b), 4 * sizeof(c_wchar)) + self.assertTrue(type(b[0]) is str) + self.assertEqual(b[0], "a") + self.assertEqual(b[:], "abc\0") + self.assertEqual(b[::], "abc\0") + self.assertEqual(b[::-1], "\0cba") + self.assertEqual(b[::2], "ac") + self.assertEqual(b[::5], "a") def test_unicode_conversion(self): b = create_unicode_buffer("abc") - self.failUnlessEqual(len(b), 4) # trailing nul char - self.failUnlessEqual(sizeof(b), 4 * sizeof(c_wchar)) - self.failUnless(type(b[0]) is str) - self.failUnlessEqual(b[0], "a") - self.failUnlessEqual(b[:], "abc\0") - self.failUnlessEqual(b[::], "abc\0") - self.failUnlessEqual(b[::-1], "\0cba") - self.failUnlessEqual(b[::2], "ac") - self.failUnlessEqual(b[::5], "a") + self.assertEqual(len(b), 4) # trailing nul char + self.assertEqual(sizeof(b), 4 * sizeof(c_wchar)) + self.assertTrue(type(b[0]) is str) + self.assertEqual(b[0], "a") + self.assertEqual(b[:], "abc\0") + self.assertEqual(b[::], "abc\0") + self.assertEqual(b[::-1], "\0cba") + self.assertEqual(b[::2], "ac") + self.assertEqual(b[::5], "a") if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_byteswap.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_byteswap.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_byteswap.py Wed Jul 1 01:06:06 2009 @@ -23,131 +23,131 @@ def test_endian_short(self): if sys.byteorder == "little": - self.failUnless(c_short.__ctype_le__ is c_short) - self.failUnless(c_short.__ctype_be__.__ctype_le__ is c_short) + self.assertTrue(c_short.__ctype_le__ is c_short) + self.assertTrue(c_short.__ctype_be__.__ctype_le__ is c_short) else: - self.failUnless(c_short.__ctype_be__ is c_short) - self.failUnless(c_short.__ctype_le__.__ctype_be__ is c_short) + self.assertTrue(c_short.__ctype_be__ is c_short) + self.assertTrue(c_short.__ctype_le__.__ctype_be__ is c_short) s = c_short.__ctype_be__(0x1234) - self.failUnlessEqual(bin(struct.pack(">h", 0x1234)), "1234") - self.failUnlessEqual(bin(s), "1234") - self.failUnlessEqual(s.value, 0x1234) + self.assertEqual(bin(struct.pack(">h", 0x1234)), "1234") + self.assertEqual(bin(s), "1234") + self.assertEqual(s.value, 0x1234) s = c_short.__ctype_le__(0x1234) - self.failUnlessEqual(bin(struct.pack("h", 0x1234)), "1234") - self.failUnlessEqual(bin(s), "1234") - self.failUnlessEqual(s.value, 0x1234) + self.assertEqual(bin(struct.pack(">h", 0x1234)), "1234") + self.assertEqual(bin(s), "1234") + self.assertEqual(s.value, 0x1234) s = c_ushort.__ctype_le__(0x1234) - self.failUnlessEqual(bin(struct.pack("i", 0x12345678)), "12345678") - self.failUnlessEqual(bin(s), "12345678") - self.failUnlessEqual(s.value, 0x12345678) + self.assertEqual(bin(struct.pack(">i", 0x12345678)), "12345678") + self.assertEqual(bin(s), "12345678") + self.assertEqual(s.value, 0x12345678) s = c_int.__ctype_le__(0x12345678) - self.failUnlessEqual(bin(struct.pack("I", 0x12345678)), "12345678") - self.failUnlessEqual(bin(s), "12345678") - self.failUnlessEqual(s.value, 0x12345678) + self.assertEqual(bin(struct.pack(">I", 0x12345678)), "12345678") + self.assertEqual(bin(s), "12345678") + self.assertEqual(s.value, 0x12345678) s = c_uint.__ctype_le__(0x12345678) - self.failUnlessEqual(bin(struct.pack("q", 0x1234567890ABCDEF)), "1234567890ABCDEF") - self.failUnlessEqual(bin(s), "1234567890ABCDEF") - self.failUnlessEqual(s.value, 0x1234567890ABCDEF) + self.assertEqual(bin(struct.pack(">q", 0x1234567890ABCDEF)), "1234567890ABCDEF") + self.assertEqual(bin(s), "1234567890ABCDEF") + self.assertEqual(s.value, 0x1234567890ABCDEF) s = c_longlong.__ctype_le__(0x1234567890ABCDEF) - self.failUnlessEqual(bin(struct.pack("Q", 0x1234567890ABCDEF)), "1234567890ABCDEF") - self.failUnlessEqual(bin(s), "1234567890ABCDEF") - self.failUnlessEqual(s.value, 0x1234567890ABCDEF) + self.assertEqual(bin(struct.pack(">Q", 0x1234567890ABCDEF)), "1234567890ABCDEF") + self.assertEqual(bin(s), "1234567890ABCDEF") + self.assertEqual(s.value, 0x1234567890ABCDEF) s = c_ulonglong.__ctype_le__(0x1234567890ABCDEF) - self.failUnlessEqual(bin(struct.pack("f", math.pi)), bin(s)) + self.assertAlmostEqual(s.value, math.pi, places=6) + self.assertEqual(bin(struct.pack(">f", math.pi)), bin(s)) def test_endian_double(self): if sys.byteorder == "little": - self.failUnless(c_double.__ctype_le__ is c_double) - self.failUnless(c_double.__ctype_be__.__ctype_le__ is c_double) + self.assertTrue(c_double.__ctype_le__ is c_double) + self.assertTrue(c_double.__ctype_be__.__ctype_le__ is c_double) else: - self.failUnless(c_double.__ctype_be__ is c_double) - self.failUnless(c_double.__ctype_le__.__ctype_be__ is c_double) + self.assertTrue(c_double.__ctype_be__ is c_double) + self.assertTrue(c_double.__ctype_le__.__ctype_be__ is c_double) s = c_double(math.pi) - self.failUnlessEqual(s.value, math.pi) - self.failUnlessEqual(bin(struct.pack("d", math.pi)), bin(s)) + self.assertEqual(s.value, math.pi) + self.assertEqual(bin(struct.pack("d", math.pi)), bin(s)) s = c_double.__ctype_le__(math.pi) - self.failUnlessEqual(s.value, math.pi) - self.failUnlessEqual(bin(struct.pack("d", math.pi)), bin(s)) + self.assertEqual(s.value, math.pi) + self.assertEqual(bin(struct.pack(">d", math.pi)), bin(s)) def test_endian_other(self): - self.failUnless(c_byte.__ctype_le__ is c_byte) - self.failUnless(c_byte.__ctype_be__ is c_byte) + self.assertTrue(c_byte.__ctype_le__ is c_byte) + self.assertTrue(c_byte.__ctype_be__ is c_byte) - self.failUnless(c_ubyte.__ctype_le__ is c_ubyte) - self.failUnless(c_ubyte.__ctype_be__ is c_ubyte) + self.assertTrue(c_ubyte.__ctype_le__ is c_ubyte) + self.assertTrue(c_ubyte.__ctype_be__ is c_ubyte) - self.failUnless(c_char.__ctype_le__ is c_char) - self.failUnless(c_char.__ctype_be__ is c_char) + self.assertTrue(c_char.__ctype_le__ is c_char) + self.assertTrue(c_char.__ctype_be__ is c_char) def test_struct_fields_1(self): if sys.byteorder == "little": @@ -219,7 +219,7 @@ s1 = S(0x12, 0x1234, 0x12345678, 3.14) s2 = struct.pack(fmt, 0x12, 0x1234, 0x12345678, 3.14) - self.failUnlessEqual(bin(s1), bin(s2)) + self.assertEqual(bin(s1), bin(s2)) def test_unaligned_nonnative_struct_fields(self): if sys.byteorder == "little": @@ -247,7 +247,7 @@ s1.i = 0x12345678 s1.d = 3.14 s2 = struct.pack(fmt, 0x12, 0x1234, 0x12345678, 3.14) - self.failUnlessEqual(bin(s1), bin(s2)) + self.assertEqual(bin(s1), bin(s2)) def test_unaligned_native_struct_fields(self): if sys.byteorder == "little": @@ -274,7 +274,7 @@ s1.i = 0x12345678 s1.d = 3.14 s2 = struct.pack(fmt, 0x12, 0x1234, 0x12345678, 3.14) - self.failUnlessEqual(bin(s1), bin(s2)) + self.assertEqual(bin(s1), bin(s2)) if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_callbacks.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_callbacks.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_callbacks.py Wed Jul 1 01:06:06 2009 @@ -17,18 +17,18 @@ PROTO = self.functype.__func__(typ, typ) result = PROTO(self.callback)(arg) if typ == c_float: - self.failUnlessAlmostEqual(result, arg, places=5) + self.assertAlmostEqual(result, arg, places=5) else: - self.failUnlessEqual(self.got_args, (arg,)) - self.failUnlessEqual(result, arg) + self.assertEqual(self.got_args, (arg,)) + self.assertEqual(result, arg) PROTO = self.functype.__func__(typ, c_byte, typ) result = PROTO(self.callback)(-3, arg) if typ == c_float: - self.failUnlessAlmostEqual(result, arg, places=5) + self.assertAlmostEqual(result, arg, places=5) else: - self.failUnlessEqual(self.got_args, (-3, arg)) - self.failUnlessEqual(result, arg) + self.assertEqual(self.got_args, (-3, arg)) + self.assertEqual(result, arg) ################ @@ -103,7 +103,7 @@ # ...but this call doesn't leak any more. Where is the refcount? self.check_type(py_object, o) after = grc(o) - self.failUnlessEqual((after, o), (before, o)) + self.assertEqual((after, o), (before, o)) def test_unsupported_restype_1(self): # Only "fundamental" result types are supported for callback @@ -148,7 +148,7 @@ result = integrate(0.0, 1.0, CALLBACK(func), 10) diff = abs(result - 1./3.) - self.failUnless(diff < 0.01, "%s not less than 0.01" % diff) + self.assertTrue(diff < 0.01, "%s not less than 0.01" % diff) ################################################################ Modified: python/branches/py3k/Lib/ctypes/test/test_cast.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_cast.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_cast.py Wed Jul 1 01:06:06 2009 @@ -9,15 +9,15 @@ # casting an array to a pointer works. ptr = cast(array, POINTER(c_int)) - self.failUnlessEqual([ptr[i] for i in range(3)], [42, 17, 2]) + self.assertEqual([ptr[i] for i in range(3)], [42, 17, 2]) if 2*sizeof(c_short) == sizeof(c_int): ptr = cast(array, POINTER(c_short)) if sys.byteorder == "little": - self.failUnlessEqual([ptr[i] for i in range(6)], + self.assertEqual([ptr[i] for i in range(6)], [42, 0, 17, 0, 2, 0]) else: - self.failUnlessEqual([ptr[i] for i in range(6)], + self.assertEqual([ptr[i] for i in range(6)], [0, 42, 0, 17, 0, 2]) def test_address2pointer(self): @@ -25,54 +25,54 @@ address = addressof(array) ptr = cast(c_void_p(address), POINTER(c_int)) - self.failUnlessEqual([ptr[i] for i in range(3)], [42, 17, 2]) + self.assertEqual([ptr[i] for i in range(3)], [42, 17, 2]) ptr = cast(address, POINTER(c_int)) - self.failUnlessEqual([ptr[i] for i in range(3)], [42, 17, 2]) + self.assertEqual([ptr[i] for i in range(3)], [42, 17, 2]) def test_p2a_objects(self): array = (c_char_p * 5)() - self.failUnlessEqual(array._objects, None) + self.assertEqual(array._objects, None) array[0] = "foo bar" - self.failUnlessEqual(array._objects, {'0': b"foo bar"}) + self.assertEqual(array._objects, {'0': b"foo bar"}) p = cast(array, POINTER(c_char_p)) # array and p share a common _objects attribute - self.failUnless(p._objects is array._objects) - self.failUnlessEqual(array._objects, {'0': b"foo bar", id(array): array}) + self.assertTrue(p._objects is array._objects) + self.assertEqual(array._objects, {'0': b"foo bar", id(array): array}) p[0] = "spam spam" - self.failUnlessEqual(p._objects, {'0': b"spam spam", id(array): array}) - self.failUnless(array._objects is p._objects) + self.assertEqual(p._objects, {'0': b"spam spam", id(array): array}) + self.assertTrue(array._objects is p._objects) p[1] = "foo bar" - self.failUnlessEqual(p._objects, {'1': b'foo bar', '0': b"spam spam", id(array): array}) - self.failUnless(array._objects is p._objects) + self.assertEqual(p._objects, {'1': b'foo bar', '0': b"spam spam", id(array): array}) + self.assertTrue(array._objects is p._objects) def test_other(self): p = cast((c_int * 4)(1, 2, 3, 4), POINTER(c_int)) - self.failUnlessEqual(p[:4], [1,2, 3, 4]) - self.failUnlessEqual(p[:4:], [1, 2, 3, 4]) - self.failUnlessEqual(p[3:-1:-1], [4, 3, 2, 1]) - self.failUnlessEqual(p[:4:3], [1, 4]) + self.assertEqual(p[:4], [1,2, 3, 4]) + self.assertEqual(p[:4:], [1, 2, 3, 4]) + self.assertEqual(p[3:-1:-1], [4, 3, 2, 1]) + self.assertEqual(p[:4:3], [1, 4]) c_int() - self.failUnlessEqual(p[:4], [1, 2, 3, 4]) - self.failUnlessEqual(p[:4:], [1, 2, 3, 4]) - self.failUnlessEqual(p[3:-1:-1], [4, 3, 2, 1]) - self.failUnlessEqual(p[:4:3], [1, 4]) + self.assertEqual(p[:4], [1, 2, 3, 4]) + self.assertEqual(p[:4:], [1, 2, 3, 4]) + self.assertEqual(p[3:-1:-1], [4, 3, 2, 1]) + self.assertEqual(p[:4:3], [1, 4]) p[2] = 96 - self.failUnlessEqual(p[:4], [1, 2, 96, 4]) - self.failUnlessEqual(p[:4:], [1, 2, 96, 4]) - self.failUnlessEqual(p[3:-1:-1], [4, 96, 2, 1]) - self.failUnlessEqual(p[:4:3], [1, 4]) + self.assertEqual(p[:4], [1, 2, 96, 4]) + self.assertEqual(p[:4:], [1, 2, 96, 4]) + self.assertEqual(p[3:-1:-1], [4, 96, 2, 1]) + self.assertEqual(p[:4:3], [1, 4]) c_int() - self.failUnlessEqual(p[:4], [1, 2, 96, 4]) - self.failUnlessEqual(p[:4:], [1, 2, 96, 4]) - self.failUnlessEqual(p[3:-1:-1], [4, 96, 2, 1]) - self.failUnlessEqual(p[:4:3], [1, 4]) + self.assertEqual(p[:4], [1, 2, 96, 4]) + self.assertEqual(p[:4:], [1, 2, 96, 4]) + self.assertEqual(p[3:-1:-1], [4, 96, 2, 1]) + self.assertEqual(p[:4:3], [1, 4]) def test_char_p(self): # This didn't work: bad argument to internal function s = c_char_p("hiho") - self.failUnlessEqual(cast(cast(s, c_void_p), c_char_p).value, + self.assertEqual(cast(cast(s, c_void_p), c_char_p).value, "hiho") try: @@ -82,7 +82,7 @@ else: def test_wchar_p(self): s = c_wchar_p("hiho") - self.failUnlessEqual(cast(cast(s, c_void_p), c_wchar_p).value, + self.assertEqual(cast(cast(s, c_void_p), c_wchar_p).value, "hiho") if __name__ == "__main__": Modified: python/branches/py3k/Lib/ctypes/test/test_cfuncs.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_cfuncs.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_cfuncs.py Wed Jul 1 01:06:06 2009 @@ -17,176 +17,176 @@ def test_byte(self): self._dll.tf_b.restype = c_byte self._dll.tf_b.argtypes = (c_byte,) - self.failUnlessEqual(self._dll.tf_b(-126), -42) - self.failUnlessEqual(self.S(), -126) + self.assertEqual(self._dll.tf_b(-126), -42) + self.assertEqual(self.S(), -126) def test_byte_plus(self): self._dll.tf_bb.restype = c_byte self._dll.tf_bb.argtypes = (c_byte, c_byte) - self.failUnlessEqual(self._dll.tf_bb(0, -126), -42) - self.failUnlessEqual(self.S(), -126) + self.assertEqual(self._dll.tf_bb(0, -126), -42) + self.assertEqual(self.S(), -126) def test_ubyte(self): self._dll.tf_B.restype = c_ubyte self._dll.tf_B.argtypes = (c_ubyte,) - self.failUnlessEqual(self._dll.tf_B(255), 85) - self.failUnlessEqual(self.U(), 255) + self.assertEqual(self._dll.tf_B(255), 85) + self.assertEqual(self.U(), 255) def test_ubyte_plus(self): self._dll.tf_bB.restype = c_ubyte self._dll.tf_bB.argtypes = (c_byte, c_ubyte) - self.failUnlessEqual(self._dll.tf_bB(0, 255), 85) - self.failUnlessEqual(self.U(), 255) + self.assertEqual(self._dll.tf_bB(0, 255), 85) + self.assertEqual(self.U(), 255) def test_short(self): self._dll.tf_h.restype = c_short self._dll.tf_h.argtypes = (c_short,) - self.failUnlessEqual(self._dll.tf_h(-32766), -10922) - self.failUnlessEqual(self.S(), -32766) + self.assertEqual(self._dll.tf_h(-32766), -10922) + self.assertEqual(self.S(), -32766) def test_short_plus(self): self._dll.tf_bh.restype = c_short self._dll.tf_bh.argtypes = (c_byte, c_short) - self.failUnlessEqual(self._dll.tf_bh(0, -32766), -10922) - self.failUnlessEqual(self.S(), -32766) + self.assertEqual(self._dll.tf_bh(0, -32766), -10922) + self.assertEqual(self.S(), -32766) def test_ushort(self): self._dll.tf_H.restype = c_ushort self._dll.tf_H.argtypes = (c_ushort,) - self.failUnlessEqual(self._dll.tf_H(65535), 21845) - self.failUnlessEqual(self.U(), 65535) + self.assertEqual(self._dll.tf_H(65535), 21845) + self.assertEqual(self.U(), 65535) def test_ushort_plus(self): self._dll.tf_bH.restype = c_ushort self._dll.tf_bH.argtypes = (c_byte, c_ushort) - self.failUnlessEqual(self._dll.tf_bH(0, 65535), 21845) - self.failUnlessEqual(self.U(), 65535) + self.assertEqual(self._dll.tf_bH(0, 65535), 21845) + self.assertEqual(self.U(), 65535) def test_int(self): self._dll.tf_i.restype = c_int self._dll.tf_i.argtypes = (c_int,) - self.failUnlessEqual(self._dll.tf_i(-2147483646), -715827882) - self.failUnlessEqual(self.S(), -2147483646) + self.assertEqual(self._dll.tf_i(-2147483646), -715827882) + self.assertEqual(self.S(), -2147483646) def test_int_plus(self): self._dll.tf_bi.restype = c_int self._dll.tf_bi.argtypes = (c_byte, c_int) - self.failUnlessEqual(self._dll.tf_bi(0, -2147483646), -715827882) - self.failUnlessEqual(self.S(), -2147483646) + self.assertEqual(self._dll.tf_bi(0, -2147483646), -715827882) + self.assertEqual(self.S(), -2147483646) def test_uint(self): self._dll.tf_I.restype = c_uint self._dll.tf_I.argtypes = (c_uint,) - self.failUnlessEqual(self._dll.tf_I(4294967295), 1431655765) - self.failUnlessEqual(self.U(), 4294967295) + self.assertEqual(self._dll.tf_I(4294967295), 1431655765) + self.assertEqual(self.U(), 4294967295) def test_uint_plus(self): self._dll.tf_bI.restype = c_uint self._dll.tf_bI.argtypes = (c_byte, c_uint) - self.failUnlessEqual(self._dll.tf_bI(0, 4294967295), 1431655765) - self.failUnlessEqual(self.U(), 4294967295) + self.assertEqual(self._dll.tf_bI(0, 4294967295), 1431655765) + self.assertEqual(self.U(), 4294967295) def test_long(self): self._dll.tf_l.restype = c_long self._dll.tf_l.argtypes = (c_long,) - self.failUnlessEqual(self._dll.tf_l(-2147483646), -715827882) - self.failUnlessEqual(self.S(), -2147483646) + self.assertEqual(self._dll.tf_l(-2147483646), -715827882) + self.assertEqual(self.S(), -2147483646) def test_long_plus(self): self._dll.tf_bl.restype = c_long self._dll.tf_bl.argtypes = (c_byte, c_long) - self.failUnlessEqual(self._dll.tf_bl(0, -2147483646), -715827882) - self.failUnlessEqual(self.S(), -2147483646) + self.assertEqual(self._dll.tf_bl(0, -2147483646), -715827882) + self.assertEqual(self.S(), -2147483646) def test_ulong(self): self._dll.tf_L.restype = c_ulong self._dll.tf_L.argtypes = (c_ulong,) - self.failUnlessEqual(self._dll.tf_L(4294967295), 1431655765) - self.failUnlessEqual(self.U(), 4294967295) + self.assertEqual(self._dll.tf_L(4294967295), 1431655765) + self.assertEqual(self.U(), 4294967295) def test_ulong_plus(self): self._dll.tf_bL.restype = c_ulong self._dll.tf_bL.argtypes = (c_char, c_ulong) - self.failUnlessEqual(self._dll.tf_bL(' ', 4294967295), 1431655765) - self.failUnlessEqual(self.U(), 4294967295) + self.assertEqual(self._dll.tf_bL(' ', 4294967295), 1431655765) + self.assertEqual(self.U(), 4294967295) def test_longlong(self): self._dll.tf_q.restype = c_longlong self._dll.tf_q.argtypes = (c_longlong, ) - self.failUnlessEqual(self._dll.tf_q(-9223372036854775806), -3074457345618258602) - self.failUnlessEqual(self.S(), -9223372036854775806) + self.assertEqual(self._dll.tf_q(-9223372036854775806), -3074457345618258602) + self.assertEqual(self.S(), -9223372036854775806) def test_longlong_plus(self): self._dll.tf_bq.restype = c_longlong self._dll.tf_bq.argtypes = (c_byte, c_longlong) - self.failUnlessEqual(self._dll.tf_bq(0, -9223372036854775806), -3074457345618258602) - self.failUnlessEqual(self.S(), -9223372036854775806) + self.assertEqual(self._dll.tf_bq(0, -9223372036854775806), -3074457345618258602) + self.assertEqual(self.S(), -9223372036854775806) def test_ulonglong(self): self._dll.tf_Q.restype = c_ulonglong self._dll.tf_Q.argtypes = (c_ulonglong, ) - self.failUnlessEqual(self._dll.tf_Q(18446744073709551615), 6148914691236517205) - self.failUnlessEqual(self.U(), 18446744073709551615) + self.assertEqual(self._dll.tf_Q(18446744073709551615), 6148914691236517205) + self.assertEqual(self.U(), 18446744073709551615) def test_ulonglong_plus(self): self._dll.tf_bQ.restype = c_ulonglong self._dll.tf_bQ.argtypes = (c_byte, c_ulonglong) - self.failUnlessEqual(self._dll.tf_bQ(0, 18446744073709551615), 6148914691236517205) - self.failUnlessEqual(self.U(), 18446744073709551615) + self.assertEqual(self._dll.tf_bQ(0, 18446744073709551615), 6148914691236517205) + self.assertEqual(self.U(), 18446744073709551615) def test_float(self): self._dll.tf_f.restype = c_float self._dll.tf_f.argtypes = (c_float,) - self.failUnlessEqual(self._dll.tf_f(-42.), -14.) - self.failUnlessEqual(self.S(), -42) + self.assertEqual(self._dll.tf_f(-42.), -14.) + self.assertEqual(self.S(), -42) def test_float_plus(self): self._dll.tf_bf.restype = c_float self._dll.tf_bf.argtypes = (c_byte, c_float) - self.failUnlessEqual(self._dll.tf_bf(0, -42.), -14.) - self.failUnlessEqual(self.S(), -42) + self.assertEqual(self._dll.tf_bf(0, -42.), -14.) + self.assertEqual(self.S(), -42) def test_double(self): self._dll.tf_d.restype = c_double self._dll.tf_d.argtypes = (c_double,) - self.failUnlessEqual(self._dll.tf_d(42.), 14.) - self.failUnlessEqual(self.S(), 42) + self.assertEqual(self._dll.tf_d(42.), 14.) + self.assertEqual(self.S(), 42) def test_double_plus(self): self._dll.tf_bd.restype = c_double self._dll.tf_bd.argtypes = (c_byte, c_double) - self.failUnlessEqual(self._dll.tf_bd(0, 42.), 14.) - self.failUnlessEqual(self.S(), 42) + self.assertEqual(self._dll.tf_bd(0, 42.), 14.) + self.assertEqual(self.S(), 42) def test_longdouble(self): self._dll.tf_D.restype = c_longdouble self._dll.tf_D.argtypes = (c_longdouble,) - self.failUnlessEqual(self._dll.tf_D(42.), 14.) - self.failUnlessEqual(self.S(), 42) + self.assertEqual(self._dll.tf_D(42.), 14.) + self.assertEqual(self.S(), 42) def test_longdouble_plus(self): self._dll.tf_bD.restype = c_longdouble self._dll.tf_bD.argtypes = (c_byte, c_longdouble) - self.failUnlessEqual(self._dll.tf_bD(0, 42.), 14.) - self.failUnlessEqual(self.S(), 42) + self.assertEqual(self._dll.tf_bD(0, 42.), 14.) + self.assertEqual(self.S(), 42) def test_callwithresult(self): def process_result(result): return result * 2 self._dll.tf_i.restype = process_result self._dll.tf_i.argtypes = (c_int,) - self.failUnlessEqual(self._dll.tf_i(42), 28) - self.failUnlessEqual(self.S(), 42) - self.failUnlessEqual(self._dll.tf_i(-42), -28) - self.failUnlessEqual(self.S(), -42) + self.assertEqual(self._dll.tf_i(42), 28) + self.assertEqual(self.S(), 42) + self.assertEqual(self._dll.tf_i(-42), -28) + self.assertEqual(self.S(), -42) def test_void(self): self._dll.tv_i.restype = None self._dll.tv_i.argtypes = (c_int,) - self.failUnlessEqual(self._dll.tv_i(42), None) - self.failUnlessEqual(self.S(), 42) - self.failUnlessEqual(self._dll.tv_i(-42), None) - self.failUnlessEqual(self.S(), -42) + self.assertEqual(self._dll.tv_i(42), None) + self.assertEqual(self.S(), 42) + self.assertEqual(self._dll.tv_i(-42), None) + self.assertEqual(self.S(), -42) # The following repeates the above tests with stdcall functions (where # they are available) Modified: python/branches/py3k/Lib/ctypes/test/test_checkretval.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_checkretval.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_checkretval.py Wed Jul 1 01:06:06 2009 @@ -14,16 +14,16 @@ import _ctypes_test dll = CDLL(_ctypes_test.__file__) - self.failUnlessEqual(42, dll._testfunc_p_p(42)) + self.assertEqual(42, dll._testfunc_p_p(42)) dll._testfunc_p_p.restype = CHECKED - self.failUnlessEqual("42", dll._testfunc_p_p(42)) + self.assertEqual("42", dll._testfunc_p_p(42)) dll._testfunc_p_p.restype = None - self.failUnlessEqual(None, dll._testfunc_p_p(42)) + self.assertEqual(None, dll._testfunc_p_p(42)) del dll._testfunc_p_p.restype - self.failUnlessEqual(42, dll._testfunc_p_p(42)) + self.assertEqual(42, dll._testfunc_p_p(42)) try: oledll @@ -31,7 +31,7 @@ pass else: def test_oledll(self): - self.failUnlessRaises(WindowsError, + self.assertRaises(WindowsError, oledll.oleaut32.CreateTypeLib2, 0, None, None) Modified: python/branches/py3k/Lib/ctypes/test/test_errno.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_errno.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_errno.py Wed Jul 1 01:06:06 2009 @@ -15,11 +15,11 @@ libc_open.argtypes = c_char_p, c_int - self.failUnlessEqual(libc_open("", 0), -1) - self.failUnlessEqual(get_errno(), errno.ENOENT) + self.assertEqual(libc_open("", 0), -1) + self.assertEqual(get_errno(), errno.ENOENT) - self.failUnlessEqual(set_errno(32), errno.ENOENT) - self.failUnlessEqual(get_errno(), 32) + self.assertEqual(set_errno(32), errno.ENOENT) + self.assertEqual(get_errno(), 32) def _worker(): @@ -31,14 +31,14 @@ else: libc_open = libc.open libc_open.argtypes = c_char_p, c_int - self.failUnlessEqual(libc_open("", 0), -1) - self.failUnlessEqual(get_errno(), 0) + self.assertEqual(libc_open("", 0), -1) + self.assertEqual(get_errno(), 0) t = threading.Thread(target=_worker) t.start() t.join() - self.failUnlessEqual(get_errno(), 32) + self.assertEqual(get_errno(), 32) set_errno(0) if os.name == "nt": @@ -48,11 +48,11 @@ GetModuleHandle = dll.GetModuleHandleA GetModuleHandle.argtypes = [c_wchar_p] - self.failUnlessEqual(0, GetModuleHandle("foo")) - self.failUnlessEqual(get_last_error(), 126) + self.assertEqual(0, GetModuleHandle("foo")) + self.assertEqual(get_last_error(), 126) - self.failUnlessEqual(set_last_error(32), 126) - self.failUnlessEqual(get_last_error(), 32) + self.assertEqual(set_last_error(32), 126) + self.assertEqual(get_last_error(), 32) def _worker(): set_last_error(0) @@ -62,13 +62,13 @@ GetModuleHandle.argtypes = [c_wchar_p] GetModuleHandle("bar") - self.failUnlessEqual(get_last_error(), 0) + self.assertEqual(get_last_error(), 0) t = threading.Thread(target=_worker) t.start() t.join() - self.failUnlessEqual(get_last_error(), 32) + self.assertEqual(get_last_error(), 32) set_last_error(0) Modified: python/branches/py3k/Lib/ctypes/test/test_find.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_find.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_find.py Wed Jul 1 01:06:06 2009 @@ -76,7 +76,7 @@ ## sqrt = libm.sqrt ## sqrt.argtypes = (c_double,) ## sqrt.restype = c_double -## self.failUnlessEqual(sqrt(2), math.sqrt(2)) +## self.assertEqual(sqrt(2), math.sqrt(2)) if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_frombuffer.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_frombuffer.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_frombuffer.py Wed Jul 1 01:06:06 2009 @@ -16,14 +16,14 @@ y = X.from_buffer(a) self.assertEqual(y.c_int, a[0]) - self.failIf(y.init_called) + self.assertFalse(y.init_called) self.assertEqual(x[:], a.tolist()) a[0], a[-1] = 200, -200 self.assertEqual(x[:], a.tolist()) - self.assert_(a in x._objects.values()) + self.assertTrue(a in x._objects.values()) self.assertRaises(ValueError, c_int.from_buffer, a, -1) @@ -49,7 +49,7 @@ y = X.from_buffer_copy(a) self.assertEqual(y.c_int, a[0]) - self.failIf(y.init_called) + self.assertFalse(y.init_called) self.assertEqual(x[:], list(range(16))) Modified: python/branches/py3k/Lib/ctypes/test/test_funcptr.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_funcptr.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_funcptr.py Wed Jul 1 01:06:06 2009 @@ -18,10 +18,10 @@ return len(args) x = X(func) - self.failUnlessEqual(x.restype, c_int) - self.failUnlessEqual(x.argtypes, (c_int, c_int)) - self.failUnlessEqual(sizeof(x), sizeof(c_voidp)) - self.failUnlessEqual(sizeof(X), sizeof(c_voidp)) + self.assertEqual(x.restype, c_int) + self.assertEqual(x.argtypes, (c_int, c_int)) + self.assertEqual(sizeof(x), sizeof(c_voidp)) + self.assertEqual(sizeof(X), sizeof(c_voidp)) def test_first(self): StdCallback = WINFUNCTYPE(c_int, c_int, c_int) @@ -33,12 +33,12 @@ s = StdCallback(func) c = CdeclCallback(func) - self.failUnlessEqual(s(1, 2), 3) - self.failUnlessEqual(c(1, 2), 3) + self.assertEqual(s(1, 2), 3) + self.assertEqual(c(1, 2), 3) # The following no longer raises a TypeError - it is now # possible, as in C, to call cdecl functions with more parameters. #self.assertRaises(TypeError, c, 1, 2, 3) - self.failUnlessEqual(c(1, 2, 3, 4, 5, 6), 3) + self.assertEqual(c(1, 2, 3, 4, 5, 6), 3) if not WINFUNCTYPE is CFUNCTYPE and os.name != "ce": self.assertRaises(TypeError, s, 1, 2, 3) @@ -75,9 +75,9 @@ ## "lpfnWndProc", WNDPROC_2(wndproc)) # instead: - self.failUnless(WNDPROC is WNDPROC_2) + self.assertTrue(WNDPROC is WNDPROC_2) # 'wndclass.lpfnWndProc' leaks 94 references. Why? - self.failUnlessEqual(wndclass.lpfnWndProc(1, 2, 3, 4), 10) + self.assertEqual(wndclass.lpfnWndProc(1, 2, 3, 4), 10) f = wndclass.lpfnWndProc @@ -85,7 +85,7 @@ del wndclass del wndproc - self.failUnlessEqual(f(10, 11, 12, 13), 46) + self.assertEqual(f(10, 11, 12, 13), 46) def test_dllfunctions(self): @@ -97,8 +97,8 @@ strchr = lib.my_strchr strchr.restype = c_char_p strchr.argtypes = (c_char_p, c_char) - self.failUnlessEqual(strchr("abcdefghi", "b"), "bcdefghi") - self.failUnlessEqual(strchr("abcdefghi", "x"), None) + self.assertEqual(strchr("abcdefghi", "b"), "bcdefghi") + self.assertEqual(strchr("abcdefghi", "x"), None) strtok = lib.my_strtok @@ -118,10 +118,10 @@ ## b.value = s ## b = c_string(s) - self.failUnlessEqual(strtok(b, b"\n"), "a") - self.failUnlessEqual(strtok(None, b"\n"), "b") - self.failUnlessEqual(strtok(None, b"\n"), "c") - self.failUnlessEqual(strtok(None, b"\n"), None) + self.assertEqual(strtok(b, b"\n"), "a") + self.assertEqual(strtok(None, b"\n"), "b") + self.assertEqual(strtok(None, b"\n"), "c") + self.assertEqual(strtok(None, b"\n"), None) if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_functions.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_functions.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_functions.py Wed Jul 1 01:06:06 2009 @@ -71,8 +71,8 @@ f = dll._testfunc_i_bhilfd f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double] result = f(1, "x", 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 139) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, 139) + self.assertEqual(type(result), int) def test_wchar_result(self): try: @@ -83,38 +83,38 @@ f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_wchar result = f(0, 0, 0, 0, 0, 0) - self.failUnlessEqual(result, '\x00') + self.assertEqual(result, '\x00') def test_voidresult(self): f = dll._testfunc_v f.restype = None f.argtypes = [c_int, c_int, POINTER(c_int)] result = c_int() - self.failUnlessEqual(None, f(1, 2, byref(result))) - self.failUnlessEqual(result.value, 3) + self.assertEqual(None, f(1, 2, byref(result))) + self.assertEqual(result.value, 3) def test_intresult(self): f = dll._testfunc_i_bhilfd f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_int result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, 21) + self.assertEqual(type(result), int) result = f(-1, -2, -3, -4, -5.0, -6.0) - self.failUnlessEqual(result, -21) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, -21) + self.assertEqual(type(result), int) # If we declare the function to return a short, # is the high part split off? f.restype = c_short result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, 21) + self.assertEqual(type(result), int) result = f(1, 2, 3, 0x10004, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), int) + self.assertEqual(result, 21) + self.assertEqual(type(result), int) # You cannot assing character format codes as restype any longer self.assertRaises(TypeError, setattr, f, "restype", "i") @@ -124,36 +124,36 @@ f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_float result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, 21) + self.assertEqual(type(result), float) result = f(-1, -2, -3, -4, -5.0, -6.0) - self.failUnlessEqual(result, -21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, -21) + self.assertEqual(type(result), float) def test_doubleresult(self): f = dll._testfunc_d_bhilfd f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] f.restype = c_double result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, 21) + self.assertEqual(type(result), float) result = f(-1, -2, -3, -4, -5.0, -6.0) - self.failUnlessEqual(result, -21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, -21) + self.assertEqual(type(result), float) def test_longdoubleresult(self): f = dll._testfunc_D_bhilfD f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_longdouble] f.restype = c_longdouble result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, 21) + self.assertEqual(type(result), float) result = f(-1, -2, -3, -4, -5.0, -6.0) - self.failUnlessEqual(result, -21) - self.failUnlessEqual(type(result), float) + self.assertEqual(result, -21) + self.assertEqual(type(result), float) def test_longlongresult(self): try: @@ -164,23 +164,23 @@ f.restype = c_longlong f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double] result = f(1, 2, 3, 4, 5.0, 6.0) - self.failUnlessEqual(result, 21) + self.assertEqual(result, 21) f = dll._testfunc_q_bhilfdq f.restype = c_longlong f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double, c_longlong] result = f(1, 2, 3, 4, 5.0, 6.0, 21) - self.failUnlessEqual(result, 42) + self.assertEqual(result, 42) def test_stringresult(self): f = dll._testfunc_p_p f.argtypes = None f.restype = c_char_p result = f(b"123") - self.failUnlessEqual(result, "123") + self.assertEqual(result, "123") result = f(None) - self.failUnlessEqual(result, None) + self.assertEqual(result, None) def test_pointers(self): f = dll._testfunc_p_p @@ -193,29 +193,29 @@ v = c_int(42) - self.failUnlessEqual(pointer(v).contents.value, 42) + self.assertEqual(pointer(v).contents.value, 42) result = f(pointer(v)) - self.failUnlessEqual(type(result), POINTER(c_int)) - self.failUnlessEqual(result.contents.value, 42) + self.assertEqual(type(result), POINTER(c_int)) + self.assertEqual(result.contents.value, 42) # This on works... result = f(pointer(v)) - self.failUnlessEqual(result.contents.value, v.value) + self.assertEqual(result.contents.value, v.value) p = pointer(c_int(99)) result = f(p) - self.failUnlessEqual(result.contents.value, 99) + self.assertEqual(result.contents.value, 99) arg = byref(v) result = f(arg) - self.failIfEqual(result.contents, v.value) + self.assertNotEqual(result.contents, v.value) self.assertRaises(ArgumentError, f, byref(c_short(22))) # It is dangerous, however, because you don't control the lifetime # of the pointer: result = f(byref(c_int(99))) - self.failIfEqual(result.contents, 99) + self.assertNotEqual(result.contents, 99) def test_errors(self): f = dll._testfunc_p_p @@ -242,7 +242,7 @@ cb = CallBack(callback) f(2**18, cb) - self.failUnlessEqual(args, expected) + self.assertEqual(args, expected) ################################################################ @@ -259,13 +259,13 @@ cb = MyCallback(callback) result = f(-10, cb) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) # test with prototype f.argtypes = [c_int, MyCallback] cb = MyCallback(callback) result = f(-10, cb) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) AnotherCallback = WINFUNCTYPE(c_int, c_int, c_int, c_int, c_int) @@ -288,12 +288,12 @@ def callback(value): #print "called back with", value - self.failUnlessEqual(type(value), int) + self.assertEqual(type(value), int) return value cb = MyCallback(callback) result = f(-10, cb) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) def test_longlong_callbacks(self): @@ -305,12 +305,12 @@ f.argtypes = [c_longlong, MyCallback] def callback(value): - self.failUnless(isinstance(value, int)) + self.assertTrue(isinstance(value, int)) return value & 0x7FFFFFFF cb = MyCallback(callback) - self.failUnlessEqual(13577625587, f(1000000000000, cb)) + self.assertEqual(13577625587, f(1000000000000, cb)) def test_errors(self): self.assertRaises(AttributeError, getattr, dll, "_xxx_yyy") @@ -325,7 +325,7 @@ result = dll._testfunc_byval(ptin, byref(ptout)) got = result, ptout.x, ptout.y expected = 3, 1, 2 - self.failUnlessEqual(got, expected) + self.assertEqual(got, expected) # with prototype ptin = POINT(101, 102) @@ -335,7 +335,7 @@ result = dll._testfunc_byval(ptin, byref(ptout)) got = result, ptout.x, ptout.y expected = 203, 101, 102 - self.failUnlessEqual(got, expected) + self.assertEqual(got, expected) def test_struct_return_2H(self): class S2H(Structure): @@ -345,7 +345,7 @@ dll.ret_2h_func.argtypes = [S2H] inp = S2H(99, 88) s2h = dll.ret_2h_func(inp) - self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3)) + self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) if sys.platform == "win32": def test_struct_return_2H_stdcall(self): @@ -356,7 +356,7 @@ windll.s_ret_2h_func.restype = S2H windll.s_ret_2h_func.argtypes = [S2H] s2h = windll.s_ret_2h_func(S2H(99, 88)) - self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3)) + self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) def test_struct_return_8H(self): class S8I(Structure): @@ -372,7 +372,7 @@ dll.ret_8i_func.argtypes = [S8I] inp = S8I(9, 8, 7, 6, 5, 4, 3, 2) s8i = dll.ret_8i_func(inp) - self.failUnlessEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), + self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) if sys.platform == "win32": @@ -390,7 +390,7 @@ windll.s_ret_8i_func.argtypes = [S8I] inp = S8I(9, 8, 7, 6, 5, 4, 3, 2) s8i = windll.s_ret_8i_func(inp) - self.failUnlessEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), + self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) def test_sf1651235(self): @@ -401,7 +401,7 @@ return 0 callback = proto(callback) - self.failUnlessRaises(ArgumentError, lambda: callback((1, 2, 3, 4), POINT())) + self.assertRaises(ArgumentError, lambda: callback((1, 2, 3, 4), POINT())) if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_incomplete.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_incomplete.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_incomplete.py Wed Jul 1 01:06:06 2009 @@ -30,7 +30,7 @@ for i in range(8): result.append(p.name) p = p.next[0] - self.failUnlessEqual(result, ["foo", "bar"] * 4) + self.assertEqual(result, ["foo", "bar"] * 4) # to not leak references, we must clean _pointer_type_cache from ctypes import _pointer_type_cache Modified: python/branches/py3k/Lib/ctypes/test/test_init.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_init.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_init.py Wed Jul 1 01:06:06 2009 @@ -24,17 +24,17 @@ # make sure the only accessing a nested structure # doesn't call the structure's __new__ and __init__ y = Y() - self.failUnlessEqual((y.x.a, y.x.b), (0, 0)) - self.failUnlessEqual(y.x.new_was_called, False) + self.assertEqual((y.x.a, y.x.b), (0, 0)) + self.assertEqual(y.x.new_was_called, False) # But explicitely creating an X structure calls __new__ and __init__, of course. x = X() - self.failUnlessEqual((x.a, x.b), (9, 12)) - self.failUnlessEqual(x.new_was_called, True) + self.assertEqual((x.a, x.b), (9, 12)) + self.assertEqual(x.new_was_called, True) y.x = x - self.failUnlessEqual((y.x.a, y.x.b), (9, 12)) - self.failUnlessEqual(y.x.new_was_called, False) + self.assertEqual((y.x.a, y.x.b), (9, 12)) + self.assertEqual(y.x.new_was_called, False) if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_internals.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_internals.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_internals.py Wed Jul 1 01:06:06 2009 @@ -18,22 +18,22 @@ """ class ObjectsTestCase(unittest.TestCase): - def failUnlessSame(self, a, b): - self.failUnlessEqual(id(a), id(b)) + def assertTrueSame(self, a, b): + self.assertEqual(id(a), id(b)) def test_ints(self): i = 42000123 rc = grc(i) ci = c_int(i) - self.failUnlessEqual(rc, grc(i)) - self.failUnlessEqual(ci._objects, None) + self.assertEqual(rc, grc(i)) + self.assertEqual(ci._objects, None) def test_c_char_p(self): s = b"Hello, World" rc = grc(s) cs = c_char_p(s) - self.failUnlessEqual(rc + 1, grc(s)) - self.failUnlessSame(cs._objects, s) + self.assertEqual(rc + 1, grc(s)) + self.assertTrueSame(cs._objects, s) def test_simple_struct(self): class X(Structure): @@ -42,10 +42,10 @@ a = 421234 b = 421235 x = X() - self.failUnlessEqual(x._objects, None) + self.assertEqual(x._objects, None) x.a = a x.b = b - self.failUnlessEqual(x._objects, None) + self.assertEqual(x._objects, None) def test_embedded_structs(self): class X(Structure): @@ -55,13 +55,13 @@ _fields_ = [("x", X), ("y", X)] y = Y() - self.failUnlessEqual(y._objects, None) + self.assertEqual(y._objects, None) x1, x2 = X(), X() y.x, y.y = x1, x2 - self.failUnlessEqual(y._objects, {"0": {}, "1": {}}) + self.assertEqual(y._objects, {"0": {}, "1": {}}) x1.a, x2.b = 42, 93 - self.failUnlessEqual(y._objects, {"0": {}, "1": {}}) + self.assertEqual(y._objects, {"0": {}, "1": {}}) def test_xxx(self): class X(Structure): @@ -76,12 +76,12 @@ x = X() x.a = s1 x.b = s2 - self.failUnlessEqual(x._objects, {"0": bytes(s1, "ascii"), + self.assertEqual(x._objects, {"0": bytes(s1, "ascii"), "1": bytes(s2, "ascii")}) y = Y() y.x = x - self.failUnlessEqual(y._objects, {"0": {"0": bytes(s1, "ascii"), + self.assertEqual(y._objects, {"0": {"0": bytes(s1, "ascii"), "1": bytes(s2, "ascii")}}) ## x = y.x ## del y @@ -93,7 +93,7 @@ A = c_int*4 a = A(11, 22, 33, 44) - self.failUnlessEqual(a._objects, None) + self.assertEqual(a._objects, None) x = X() x.data = a Modified: python/branches/py3k/Lib/ctypes/test/test_keeprefs.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_keeprefs.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_keeprefs.py Wed Jul 1 01:06:06 2009 @@ -91,7 +91,7 @@ def test_p_cint(self): i = c_int(42) x = pointer(i) - self.failUnlessEqual(x._objects, {'1': i}) + self.assertEqual(x._objects, {'1': i}) class DeletePointerTestCase(unittest.TestCase): def X_test(self): Modified: python/branches/py3k/Lib/ctypes/test/test_libc.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_libc.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_libc.py Wed Jul 1 01:06:06 2009 @@ -13,9 +13,9 @@ def test_sqrt(self): lib.my_sqrt.argtypes = c_double, lib.my_sqrt.restype = c_double - self.failUnlessEqual(lib.my_sqrt(4.0), 2.0) + self.assertEqual(lib.my_sqrt(4.0), 2.0) import math - self.failUnlessEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) + self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) def test_qsort(self): comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char)) @@ -27,7 +27,7 @@ chars = create_string_buffer("spam, spam, and spam") lib.my_qsort(chars, len(chars)-1, sizeof(c_char), comparefunc(sort)) - self.failUnlessEqual(chars.raw, b" ,,aaaadmmmnpppsss\x00") + self.assertEqual(chars.raw, b" ,,aaaadmmmnpppsss\x00") if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_loading.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_loading.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_loading.py Wed Jul 1 01:06:06 2009 @@ -43,7 +43,7 @@ if os.name in ("nt", "ce"): def test_load_library(self): - self.failIf(libc_name is None) + self.assertFalse(libc_name is None) if is_resource_enabled("printing"): print(find_library("kernel32")) print(find_library("user32")) @@ -70,9 +70,9 @@ a_name = addressof(func_name) f_ord_addr = c_void_p.from_address(a_ord).value f_name_addr = c_void_p.from_address(a_name).value - self.failUnlessEqual(hex(f_ord_addr), hex(f_name_addr)) + self.assertEqual(hex(f_ord_addr), hex(f_name_addr)) - self.failUnlessRaises(AttributeError, dll.__getitem__, 1234) + self.assertRaises(AttributeError, dll.__getitem__, 1234) if os.name == "nt": def test_1703286_A(self): @@ -94,13 +94,13 @@ 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)) + self.assertEqual(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) + self.assertTrue(proc) # This is the real test: call the function via 'call_function' - self.failUnlessEqual(0, call_function(proc, (None,))) + self.assertEqual(0, call_function(proc, (None,))) if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_macholib.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_macholib.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_macholib.py Wed Jul 1 01:06:06 2009 @@ -48,14 +48,14 @@ if sys.platform == "darwin": def test_find(self): - self.failUnlessEqual(find_lib('pthread'), + self.assertEqual(find_lib('pthread'), '/usr/lib/libSystem.B.dylib') result = find_lib('z') - self.failUnless(result.startswith('/usr/lib/libz.1')) - self.failUnless(result.endswith('.dylib')) + self.assertTrue(result.startswith('/usr/lib/libz.1')) + self.assertTrue(result.endswith('.dylib')) - self.failUnlessEqual(find_lib('IOKit'), + self.assertEqual(find_lib('IOKit'), '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit') if __name__ == "__main__": Modified: python/branches/py3k/Lib/ctypes/test/test_memfunctions.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_memfunctions.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_memfunctions.py Wed Jul 1 01:06:06 2009 @@ -19,45 +19,45 @@ a = create_string_buffer(1000000) p = b"Hello, World" result = memmove(a, p, len(p)) - self.failUnlessEqual(a.value, b"Hello, World") + self.assertEqual(a.value, b"Hello, World") - self.failUnlessEqual(string_at(result), b"Hello, World") - self.failUnlessEqual(string_at(result, 5), b"Hello") - self.failUnlessEqual(string_at(result, 16), b"Hello, World\0\0\0\0") - self.failUnlessEqual(string_at(result, 0), b"") + self.assertEqual(string_at(result), b"Hello, World") + self.assertEqual(string_at(result, 5), b"Hello") + self.assertEqual(string_at(result, 16), b"Hello, World\0\0\0\0") + self.assertEqual(string_at(result, 0), b"") def test_memset(self): a = create_string_buffer(1000000) result = memset(a, ord('x'), 16) - self.failUnlessEqual(a.value, b"xxxxxxxxxxxxxxxx") + self.assertEqual(a.value, b"xxxxxxxxxxxxxxxx") - self.failUnlessEqual(string_at(result), b"xxxxxxxxxxxxxxxx") - self.failUnlessEqual(string_at(a), b"xxxxxxxxxxxxxxxx") - self.failUnlessEqual(string_at(a, 20), b"xxxxxxxxxxxxxxxx\0\0\0\0") + self.assertEqual(string_at(result), b"xxxxxxxxxxxxxxxx") + self.assertEqual(string_at(a), b"xxxxxxxxxxxxxxxx") + self.assertEqual(string_at(a, 20), b"xxxxxxxxxxxxxxxx\0\0\0\0") def test_cast(self): a = (c_ubyte * 32)(*map(ord, "abcdef")) - self.failUnlessEqual(cast(a, c_char_p).value, "abcdef") - self.failUnlessEqual(cast(a, POINTER(c_byte))[:7], + self.assertEqual(cast(a, c_char_p).value, "abcdef") + self.assertEqual(cast(a, POINTER(c_byte))[:7], [97, 98, 99, 100, 101, 102, 0]) - self.failUnlessEqual(cast(a, POINTER(c_byte))[:7:], + self.assertEqual(cast(a, POINTER(c_byte))[:7:], [97, 98, 99, 100, 101, 102, 0]) - self.failUnlessEqual(cast(a, POINTER(c_byte))[6:-1:-1], + self.assertEqual(cast(a, POINTER(c_byte))[6:-1:-1], [0, 102, 101, 100, 99, 98, 97]) - self.failUnlessEqual(cast(a, POINTER(c_byte))[:7:2], + self.assertEqual(cast(a, POINTER(c_byte))[:7:2], [97, 99, 101, 0]) - self.failUnlessEqual(cast(a, POINTER(c_byte))[:7:7], + self.assertEqual(cast(a, POINTER(c_byte))[:7:7], [97]) def test_string_at(self): s = string_at(b"foo bar") # XXX The following may be wrong, depending on how Python # manages string instances - self.failUnlessEqual(2, sys.getrefcount(s)) - self.failUnless(s, "foo bar") + self.assertEqual(2, sys.getrefcount(s)) + self.assertTrue(s, "foo bar") - self.failUnlessEqual(string_at(b"foo bar", 7), b"foo bar") - self.failUnlessEqual(string_at(b"foo bar", 3), b"foo") + self.assertEqual(string_at(b"foo bar", 7), b"foo bar") + self.assertEqual(string_at(b"foo bar", 3), b"foo") try: create_unicode_buffer @@ -68,12 +68,12 @@ p = create_unicode_buffer("Hello, World") a = create_unicode_buffer(1000000) result = memmove(a, p, len(p) * sizeof(c_wchar)) - self.failUnlessEqual(a.value, "Hello, World") + self.assertEqual(a.value, "Hello, World") - self.failUnlessEqual(wstring_at(a), "Hello, World") - self.failUnlessEqual(wstring_at(a, 5), "Hello") - self.failUnlessEqual(wstring_at(a, 16), "Hello, World\0\0\0\0") - self.failUnlessEqual(wstring_at(a, 0), "") + self.assertEqual(wstring_at(a), "Hello, World") + self.assertEqual(wstring_at(a, 5), "Hello") + self.assertEqual(wstring_at(a, 16), "Hello, World\0\0\0\0") + self.assertEqual(wstring_at(a, 0), "") if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_numbers.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_numbers.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_numbers.py Wed Jul 1 01:06:06 2009 @@ -55,25 +55,25 @@ def test_default_init(self): # default values are set to zero for t in signed_types + unsigned_types + float_types: - self.failUnlessEqual(t().value, 0) + self.assertEqual(t().value, 0) def test_unsigned_values(self): # the value given to the constructor is available # as the 'value' attribute for t, (l, h) in zip(unsigned_types, unsigned_ranges): - self.failUnlessEqual(t(l).value, l) - self.failUnlessEqual(t(h).value, h) + self.assertEqual(t(l).value, l) + self.assertEqual(t(h).value, h) def test_signed_values(self): # see above for t, (l, h) in zip(signed_types, signed_ranges): - self.failUnlessEqual(t(l).value, l) - self.failUnlessEqual(t(h).value, h) + self.assertEqual(t(l).value, l) + self.assertEqual(t(h).value, h) def test_bool_values(self): from operator import truth for t, v in zip(bool_types, bool_values): - self.failUnlessEqual(t(v).value, truth(v)) + self.assertEqual(t(v).value, truth(v)) def test_typeerror(self): # Only numbers are allowed in the contructor, @@ -93,13 +93,13 @@ # the from_param class method attribute always # returns PyCArgObject instances for t in signed_types + unsigned_types + float_types: - self.failUnlessEqual(ArgType, type(t.from_param(0))) + self.assertEqual(ArgType, type(t.from_param(0))) def test_byref(self): # calling byref returns also a PyCArgObject instance for t in signed_types + unsigned_types + float_types + bool_types: parm = byref(t()) - self.failUnlessEqual(ArgType, type(parm)) + self.assertEqual(ArgType, type(parm)) def test_floats(self): @@ -110,10 +110,10 @@ return 2.0 f = FloatLike() for t in float_types: - self.failUnlessEqual(t(2.0).value, 2.0) - self.failUnlessEqual(t(2).value, 2.0) - self.failUnlessEqual(t(2).value, 2.0) - self.failUnlessEqual(t(f).value, 2.0) + self.assertEqual(t(2.0).value, 2.0) + self.assertEqual(t(2).value, 2.0) + self.assertEqual(t(2).value, 2.0) + self.assertEqual(t(f).value, 2.0) def test_integers(self): class FloatLike(object): @@ -129,7 +129,7 @@ for t in signed_types + unsigned_types: self.assertRaises(TypeError, t, 3.14) self.assertRaises(TypeError, t, f) - self.failUnlessEqual(t(i).value, 2) + self.assertEqual(t(i).value, 2) def test_sizes(self): for t in signed_types + unsigned_types + float_types + bool_types: @@ -138,9 +138,9 @@ except struct.error: continue # sizeof of the type... - self.failUnlessEqual(sizeof(t), size) + self.assertEqual(sizeof(t), size) # and sizeof of an instance - self.failUnlessEqual(sizeof(t()), size) + self.assertEqual(sizeof(t()), size) def test_alignments(self): for t in signed_types + unsigned_types + float_types: @@ -148,10 +148,10 @@ align = struct.calcsize("c%c" % code) - struct.calcsize(code) # alignment of the type... - self.failUnlessEqual((code, alignment(t)), + self.assertEqual((code, alignment(t)), (code, align)) # and alignment of an instance - self.failUnlessEqual((code, alignment(t())), + self.assertEqual((code, alignment(t())), (code, align)) def test_int_from_address(self): @@ -167,12 +167,12 @@ # v now is an integer at an 'external' memory location v = t.from_address(a.buffer_info()[0]) - self.failUnlessEqual(v.value, a[0]) - self.failUnlessEqual(type(v), t) + self.assertEqual(v.value, a[0]) + self.assertEqual(type(v), t) # changing the value at the memory location changes v's value also a[0] = 42 - self.failUnlessEqual(v.value, a[0]) + self.assertEqual(v.value, a[0]) def test_float_from_address(self): @@ -180,11 +180,11 @@ for t in float_types: a = array(t._type_, [3.14]) v = t.from_address(a.buffer_info()[0]) - self.failUnlessEqual(v.value, a[0]) - self.failUnless(type(v) is t) + self.assertEqual(v.value, a[0]) + self.assertTrue(type(v) is t) a[0] = 2.3456e17 - self.failUnlessEqual(v.value, a[0]) - self.failUnless(type(v) is t) + self.assertEqual(v.value, a[0]) + self.assertTrue(type(v) is t) def test_char_from_address(self): from ctypes import c_char @@ -193,11 +193,11 @@ a = array('b', [0]) a[0] = ord('x') v = c_char.from_address(a.buffer_info()[0]) - self.failUnlessEqual(v.value, b'x') - self.failUnless(type(v) is c_char) + self.assertEqual(v.value, b'x') + self.assertTrue(type(v) is c_char) a[0] = ord('?') - self.failUnlessEqual(v.value, b'?') + self.assertEqual(v.value, b'?') # array does not support c_bool / 't' # def test_bool_from_address(self): @@ -205,11 +205,11 @@ # from array import array # a = array(c_bool._type_, [True]) # v = t.from_address(a.buffer_info()[0]) - # self.failUnlessEqual(v.value, a[0]) - # self.failUnlessEqual(type(v) is t) + # self.assertEqual(v.value, a[0]) + # self.assertEqual(type(v) is t) # a[0] = False - # self.failUnlessEqual(v.value, a[0]) - # self.failUnlessEqual(type(v) is t) + # self.assertEqual(v.value, a[0]) + # self.assertEqual(type(v) is t) def test_init(self): # c_int() can be initialized from Python's int, and c_int. Modified: python/branches/py3k/Lib/ctypes/test/test_parameters.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_parameters.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_parameters.py Wed Jul 1 01:06:06 2009 @@ -33,8 +33,8 @@ return value * 4 from_param = classmethod(from_param) - self.failUnlessEqual(CVOIDP.from_param("abc"), "abcabc") - self.failUnlessEqual(CCHARP.from_param("abc"), "abcabcabcabc") + self.assertEqual(CVOIDP.from_param("abc"), "abcabc") + self.assertEqual(CCHARP.from_param("abc"), "abcabcabcabc") try: from ctypes import c_wchar_p @@ -46,7 +46,7 @@ return value * 3 from_param = classmethod(from_param) - self.failUnlessEqual(CWCHARP.from_param("abc"), "abcabcabc") + self.assertEqual(CWCHARP.from_param("abc"), "abcabcabc") # XXX Replace by c_char_p tests def test_cstrings(self): @@ -55,10 +55,10 @@ # c_char_p.from_param on a Python String packs the string # into a cparam object s = b"123" - self.failUnless(c_char_p.from_param(s)._obj is s) + self.assertTrue(c_char_p.from_param(s)._obj is s) # new in 0.9.1: convert (encode) unicode to ascii - self.failUnlessEqual(c_char_p.from_param("123")._obj, b"123") + self.assertEqual(c_char_p.from_param("123")._obj, b"123") self.assertRaises(UnicodeEncodeError, c_char_p.from_param, "123\377") self.assertRaises(TypeError, c_char_p.from_param, 42) @@ -66,7 +66,7 @@ # calling c_char_p.from_param with a c_char_p instance # returns the argument itself: a = c_char_p("123") - self.failUnless(c_char_p.from_param(a) is a) + self.assertTrue(c_char_p.from_param(a) is a) def test_cw_strings(self): from ctypes import byref @@ -77,15 +77,15 @@ return s = "123" if sys.platform == "win32": - self.failUnless(c_wchar_p.from_param(s)._obj is s) + self.assertTrue(c_wchar_p.from_param(s)._obj is s) self.assertRaises(TypeError, c_wchar_p.from_param, 42) # new in 0.9.1: convert (decode) ascii to unicode - self.failUnlessEqual(c_wchar_p.from_param("123")._obj, "123") + self.assertEqual(c_wchar_p.from_param("123")._obj, "123") self.assertRaises(UnicodeDecodeError, c_wchar_p.from_param, b"123\377") pa = c_wchar_p.from_param(c_wchar_p("123")) - self.failUnlessEqual(type(pa), c_wchar_p) + self.assertEqual(type(pa), c_wchar_p) def test_int_pointers(self): from ctypes import c_short, c_uint, c_int, c_long, POINTER, pointer @@ -94,10 +94,10 @@ ## p = pointer(c_int(42)) ## x = LPINT.from_param(p) x = LPINT.from_param(pointer(c_int(42))) - self.failUnlessEqual(x.contents.value, 42) - self.failUnlessEqual(LPINT(c_int(42)).contents.value, 42) + self.assertEqual(x.contents.value, 42) + self.assertEqual(LPINT(c_int(42)).contents.value, 42) - self.failUnlessEqual(LPINT.from_param(None), 0) + self.assertEqual(LPINT.from_param(None), 0) if c_int != c_long: self.assertRaises(TypeError, LPINT.from_param, pointer(c_long(42))) @@ -133,8 +133,8 @@ from ctypes import c_short, c_uint, c_int, c_long, POINTER INTARRAY = c_int * 3 ia = INTARRAY() - self.failUnlessEqual(len(ia), 3) - self.failUnlessEqual([ia[i] for i in range(3)], [0, 0, 0]) + self.assertEqual(len(ia), 3) + self.assertEqual([ia[i] for i in range(3)], [0, 0, 0]) # Pointers are only compatible with arrays containing items of # the same type! @@ -161,8 +161,8 @@ return None func.argtypes = (Adapter(),) - self.failUnlessEqual(func(None), None) - self.failUnlessEqual(func(object()), None) + self.assertEqual(func(None), None) + self.assertEqual(func(object()), None) class Adapter(object): def from_param(cls, obj): @@ -171,7 +171,7 @@ func.argtypes = (Adapter(),) # don't know how to convert parameter 1 self.assertRaises(ArgumentError, func, object()) - self.failUnlessEqual(func(c_void_p(42)), 42) + self.assertEqual(func(c_void_p(42)), 42) class Adapter(object): def from_param(cls, obj): Modified: python/branches/py3k/Lib/ctypes/test/test_pep3118.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_pep3118.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_pep3118.py Wed Jul 1 01:06:06 2009 @@ -24,23 +24,23 @@ ob = tp() v = memoryview(ob) try: - self.failUnlessEqual(normalize(v.format), normalize(fmt)) + self.assertEqual(normalize(v.format), normalize(fmt)) if shape is not None: - self.failUnlessEqual(len(v), shape[0]) + self.assertEqual(len(v), shape[0]) else: - self.failUnlessEqual(len(v) * sizeof(itemtp), sizeof(ob)) - self.failUnlessEqual(v.itemsize, sizeof(itemtp)) - self.failUnlessEqual(v.shape, shape) + self.assertEqual(len(v) * sizeof(itemtp), sizeof(ob)) + self.assertEqual(v.itemsize, sizeof(itemtp)) + self.assertEqual(v.shape, shape) # ctypes object always have a non-strided memory block - self.failUnlessEqual(v.strides, None) + self.assertEqual(v.strides, None) # they are always read/write - self.failIf(v.readonly) + self.assertFalse(v.readonly) if v.shape: n = 1 for dim in v.shape: n = n * dim - self.failUnlessEqual(n * v.itemsize, len(v.tobytes())) + self.assertEqual(n * v.itemsize, len(v.tobytes())) except: # so that we can see the failing type print(tp) @@ -51,23 +51,23 @@ ob = tp() v = memoryview(ob) try: - self.failUnlessEqual(v.format, fmt) + self.assertEqual(v.format, fmt) if shape is not None: - self.failUnlessEqual(len(v), shape[0]) + self.assertEqual(len(v), shape[0]) else: - self.failUnlessEqual(len(v) * sizeof(itemtp), sizeof(ob)) - self.failUnlessEqual(v.itemsize, sizeof(itemtp)) - self.failUnlessEqual(v.shape, shape) + self.assertEqual(len(v) * sizeof(itemtp), sizeof(ob)) + self.assertEqual(v.itemsize, sizeof(itemtp)) + self.assertEqual(v.shape, shape) # ctypes object always have a non-strided memory block - self.failUnlessEqual(v.strides, None) + self.assertEqual(v.strides, None) # they are always read/write - self.failIf(v.readonly) + self.assertFalse(v.readonly) if v.shape: n = 1 for dim in v.shape: n = n * dim - self.failUnlessEqual(n, len(v)) + self.assertEqual(n, len(v)) except: # so that we can see the failing type print(tp) Modified: python/branches/py3k/Lib/ctypes/test/test_pickling.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_pickling.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_pickling.py Wed Jul 1 01:06:06 2009 @@ -27,8 +27,8 @@ c_double(3.14), ]: dst = self.loads(self.dumps(src)) - self.failUnlessEqual(src.__dict__, dst.__dict__) - self.failUnlessEqual(memoryview(src).tobytes(), + self.assertEqual(src.__dict__, dst.__dict__) + self.assertEqual(memoryview(src).tobytes(), memoryview(dst).tobytes()) def test_struct(self): @@ -36,17 +36,17 @@ x = X() x.a = 42 - self.failUnlessEqual(X.init_called, 1) + self.assertEqual(X.init_called, 1) y = self.loads(self.dumps(x)) # loads must NOT call __init__ - self.failUnlessEqual(X.init_called, 1) + self.assertEqual(X.init_called, 1) # ctypes instances are identical when the instance __dict__ # and the memory buffer are identical - self.failUnlessEqual(y.__dict__, x.__dict__) - self.failUnlessEqual(memoryview(y).tobytes(), + self.assertEqual(y.__dict__, x.__dict__) + self.assertEqual(memoryview(y).tobytes(), memoryview(x).tobytes()) def test_unpickable(self): Modified: python/branches/py3k/Lib/ctypes/test/test_pointers.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_pointers.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_pointers.py Wed Jul 1 01:06:06 2009 @@ -17,7 +17,7 @@ POINTER(c_ulong)(c_ulong(22)) # Pointer can't set contents: has no _type_ - self.failUnlessRaises(TypeError, A, c_ulong(33)) + self.assertRaises(TypeError, A, c_ulong(33)) def test_pass_pointers(self): dll = CDLL(_ctypes_test.__file__) @@ -27,12 +27,12 @@ i = c_int(12345678) ## func.argtypes = (POINTER(c_int),) address = func(byref(i)) - self.failUnlessEqual(c_int.from_address(address).value, 12345678) + self.assertEqual(c_int.from_address(address).value, 12345678) func.restype = POINTER(c_int) res = func(pointer(i)) - self.failUnlessEqual(res.contents.value, 12345678) - self.failUnlessEqual(res[0], 12345678) + self.assertEqual(res.contents.value, 12345678) + self.assertEqual(res[0], 12345678) def test_change_pointers(self): dll = CDLL(_ctypes_test.__file__) @@ -43,18 +43,18 @@ func.argtypes = (POINTER(c_int),) res = func(pointer(i)) - self.failUnlessEqual(res[0], 87654) - self.failUnlessEqual(res.contents.value, 87654) + self.assertEqual(res[0], 87654) + self.assertEqual(res.contents.value, 87654) # C code: *res = 54345 res[0] = 54345 - self.failUnlessEqual(i.value, 54345) + self.assertEqual(i.value, 54345) # C code: # int x = 12321; # res = &x res.contents = c_int(12321) - self.failUnlessEqual(i.value, 54345) + self.assertEqual(i.value, 54345) def test_callbacks_with_pointers(self): # a function type receiving a pointer @@ -78,7 +78,7 @@ ## i = c_int(42) ## callback(byref(i)) -## self.failUnless(i.value == 84) +## self.assertTrue(i.value == 84) doit(callback) ## print self.result @@ -91,11 +91,11 @@ i = ct(42) p = pointer(i) ## print type(p.contents), ct - self.failUnless(type(p.contents) is ct) + self.assertTrue(type(p.contents) is ct) # p.contents is the same as p[0] ## print p.contents -## self.failUnless(p.contents == 42) -## self.failUnless(p[0] == 42) +## self.assertTrue(p.contents == 42) +## self.assertTrue(p[0] == 42) self.assertRaises(TypeError, delitem, p, 0) @@ -117,9 +117,9 @@ pt = pointer(Table(1, 2, 3)) - self.failUnlessEqual(pt.contents.a, 1) - self.failUnlessEqual(pt.contents.b, 2) - self.failUnlessEqual(pt.contents.c, 3) + self.assertEqual(pt.contents.a, 1) + self.assertEqual(pt.contents.b, 2) + self.assertEqual(pt.contents.c, 3) pt.contents.c = 33 @@ -130,8 +130,8 @@ p = pointer(c_int(42)) # Although a pointer can be indexed, it ha no length self.assertRaises(TypeError, len, p) - self.failUnlessEqual(p[0], 42) - self.failUnlessEqual(p.contents.value, 42) + self.assertEqual(p[0], 42) + self.assertEqual(p.contents.value, 42) def test_charpp(self): """Test that a character pointer-to-pointer is correctly passed""" @@ -156,20 +156,20 @@ pp = pointer(p) q = pointer(y) pp[0] = q # <== - self.failUnlessEqual(p[0], 6) + self.assertEqual(p[0], 6) def test_c_void_p(self): # http://sourceforge.net/tracker/?func=detail&aid=1518190&group_id=5470&atid=105470 if sizeof(c_void_p) == 4: - self.failUnlessEqual(c_void_p(0xFFFFFFFF).value, + self.assertEqual(c_void_p(0xFFFFFFFF).value, c_void_p(-1).value) - self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFF).value, + self.assertEqual(c_void_p(0xFFFFFFFFFFFFFFFF).value, c_void_p(-1).value) elif sizeof(c_void_p) == 8: - self.failUnlessEqual(c_void_p(0xFFFFFFFF).value, + self.assertEqual(c_void_p(0xFFFFFFFF).value, 0xFFFFFFFF) - self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFF).value, + self.assertEqual(c_void_p(0xFFFFFFFFFFFFFFFF).value, c_void_p(-1).value) - self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFFFFFFFFFF).value, + self.assertEqual(c_void_p(0xFFFFFFFFFFFFFFFFFFFFFFFF).value, c_void_p(-1).value) self.assertRaises(TypeError, c_void_p, 3.14) # make sure floats are NOT accepted @@ -177,16 +177,16 @@ def test_pointers_bool(self): # NULL pointers have a boolean False value, non-NULL pointers True. - self.failUnlessEqual(bool(POINTER(c_int)()), False) - self.failUnlessEqual(bool(pointer(c_int())), True) + self.assertEqual(bool(POINTER(c_int)()), False) + self.assertEqual(bool(pointer(c_int())), True) - self.failUnlessEqual(bool(CFUNCTYPE(None)(0)), False) - self.failUnlessEqual(bool(CFUNCTYPE(None)(42)), True) + self.assertEqual(bool(CFUNCTYPE(None)(0)), False) + self.assertEqual(bool(CFUNCTYPE(None)(42)), True) # COM methods are boolean True: if sys.platform == "win32": mth = WINFUNCTYPE(None)(42, "name", (), None) - self.failUnlessEqual(bool(mth), True) + self.assertEqual(bool(mth), True) if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_prototypes.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_prototypes.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_prototypes.py Wed Jul 1 01:06:06 2009 @@ -58,23 +58,23 @@ try: func() except TypeError as details: - self.failUnlessEqual(str(details), "required argument 'input' missing") + self.assertEqual(str(details), "required argument 'input' missing") else: self.fail("TypeError not raised") - self.failUnlessEqual(func(None), None) - self.failUnlessEqual(func(input=None), None) + self.assertEqual(func(None), None) + self.assertEqual(func(input=None), None) def test_int_pointer_arg(self): func = testdll._testfunc_p_p func.restype = c_long - self.failUnlessEqual(0, func(0)) + self.assertEqual(0, func(0)) ci = c_int(0) func.argtypes = POINTER(c_int), - self.failUnlessEqual(positive_address(addressof(ci)), + self.assertEqual(positive_address(addressof(ci)), positive_address(func(byref(ci)))) func.argtypes = c_char_p, @@ -91,45 +91,45 @@ func.restype = c_char_p func.argtypes = POINTER(c_char), - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func("123")) - self.failUnlessEqual(None, func(c_char_p(None))) - self.failUnlessEqual("123", func(c_char_p("123"))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func("123")) + self.assertEqual(None, func(c_char_p(None))) + self.assertEqual("123", func(c_char_p("123"))) - self.failUnlessEqual("123", func(c_buffer("123"))) + self.assertEqual("123", func(c_buffer("123"))) ca = c_char("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) def test_c_char_p_arg(self): func = testdll._testfunc_p_p func.restype = c_char_p func.argtypes = c_char_p, - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func("123")) - self.failUnlessEqual(None, func(c_char_p(None))) - self.failUnlessEqual("123", func(c_char_p("123"))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func("123")) + self.assertEqual(None, func(c_char_p(None))) + self.assertEqual("123", func(c_char_p("123"))) - self.failUnlessEqual("123", func(c_buffer("123"))) + self.assertEqual("123", func(c_buffer("123"))) ca = c_char("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) def test_c_void_p_arg(self): func = testdll._testfunc_p_p func.restype = c_char_p func.argtypes = c_void_p, - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func(b"123")) - self.failUnlessEqual("123", func(c_char_p("123"))) - self.failUnlessEqual(None, func(c_char_p(None))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func(b"123")) + self.assertEqual("123", func(c_char_p("123"))) + self.assertEqual(None, func(c_char_p(None))) - self.failUnlessEqual("123", func(c_buffer("123"))) + self.assertEqual("123", func(c_buffer("123"))) ca = c_char("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) func(byref(c_int())) func(pointer(c_int())) @@ -140,8 +140,8 @@ except NameError: pass else: - self.failUnlessEqual(None, func(c_wchar_p(None))) - self.failUnlessEqual("123", func(c_wchar_p("123"))) + self.assertEqual(None, func(c_wchar_p(None))) + self.assertEqual("123", func(c_wchar_p("123"))) def test_instance(self): func = testdll._testfunc_p_p @@ -151,10 +151,10 @@ _as_parameter_ = None func.argtypes = c_void_p, - self.failUnlessEqual(None, func(X())) + self.assertEqual(None, func(X())) func.argtypes = None - self.failUnlessEqual(None, func(X())) + self.assertEqual(None, func(X())) try: c_wchar @@ -174,15 +174,15 @@ func.restype = c_wchar_p func.argtypes = POINTER(c_wchar), - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func("123")) - self.failUnlessEqual(None, func(c_wchar_p(None))) - self.failUnlessEqual("123", func(c_wchar_p("123"))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func("123")) + self.assertEqual(None, func(c_wchar_p(None))) + self.assertEqual("123", func(c_wchar_p("123"))) - self.failUnlessEqual("123", func(c_wbuffer("123"))) + self.assertEqual("123", func(c_wbuffer("123"))) ca = c_wchar("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) def test_c_wchar_p_arg(self): func = testdll._testfunc_p_p @@ -191,16 +191,16 @@ c_wchar_p.from_param("123") - self.failUnlessEqual(None, func(None)) - self.failUnlessEqual("123", func("123")) - self.failUnlessEqual(None, func(c_wchar_p(None))) - self.failUnlessEqual("123", func(c_wchar_p("123"))) + self.assertEqual(None, func(None)) + self.assertEqual("123", func("123")) + self.assertEqual(None, func(c_wchar_p(None))) + self.assertEqual("123", func(c_wchar_p("123"))) # XXX Currently, these raise TypeErrors, although they shouldn't: - self.failUnlessEqual("123", func(c_wbuffer("123"))) + self.assertEqual("123", func(c_wbuffer("123"))) ca = c_wchar("a") - self.failUnlessEqual("a", func(pointer(ca))[0]) - self.failUnlessEqual("a", func(byref(ca))[0]) + self.assertEqual("a", func(pointer(ca))[0]) + self.assertEqual("a", func(byref(ca))[0]) class ArrayTest(unittest.TestCase): def test(self): Modified: python/branches/py3k/Lib/ctypes/test/test_python_api.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_python_api.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_python_api.py Wed Jul 1 01:06:06 2009 @@ -23,7 +23,7 @@ PyBytes_FromStringAndSize.restype = py_object PyBytes_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t - self.failUnlessEqual(PyBytes_FromStringAndSize(b"abcdefghi", 3), b"abc") + self.assertEqual(PyBytes_FromStringAndSize(b"abcdefghi", 3), b"abc") def test_PyString_FromString(self): pythonapi.PyBytes_FromString.restype = py_object @@ -32,10 +32,10 @@ s = b"abc" refcnt = grc(s) pyob = pythonapi.PyBytes_FromString(s) - self.failUnlessEqual(grc(s), refcnt) - self.failUnlessEqual(s, pyob) + self.assertEqual(grc(s), refcnt) + self.assertEqual(s, pyob) del pyob - self.failUnlessEqual(grc(s), refcnt) + self.assertEqual(grc(s), refcnt) if is_resource_enabled("refcount"): # This test is unreliable, because it is possible that code in @@ -44,28 +44,28 @@ def test_PyLong_Long(self): ref42 = grc(42) pythonapi.PyLong_FromLong.restype = py_object - self.failUnlessEqual(pythonapi.PyLong_FromLong(42), 42) + self.assertEqual(pythonapi.PyLong_FromLong(42), 42) - self.failUnlessEqual(grc(42), ref42) + self.assertEqual(grc(42), ref42) pythonapi.PyLong_AsLong.argtypes = (py_object,) pythonapi.PyLong_AsLong.restype = c_long res = pythonapi.PyLong_AsLong(42) - self.failUnlessEqual(grc(res), ref42 + 1) + self.assertEqual(grc(res), ref42 + 1) del res - self.failUnlessEqual(grc(42), ref42) + self.assertEqual(grc(42), ref42) def test_PyObj_FromPtr(self): s = "abc def ghi jkl" ref = grc(s) # id(python-object) is the address pyobj = PyObj_FromPtr(id(s)) - self.failUnless(s is pyobj) + self.assertTrue(s is pyobj) - self.failUnlessEqual(grc(s), ref + 1) + self.assertEqual(grc(s), ref + 1) del pyobj - self.failUnlessEqual(grc(s), ref) + self.assertEqual(grc(s), ref) def test_PyOS_snprintf(self): PyOS_snprintf = pythonapi.PyOS_snprintf @@ -73,18 +73,18 @@ buf = c_buffer(256) PyOS_snprintf(buf, sizeof(buf), "Hello from %s", b"ctypes") - self.failUnlessEqual(buf.value, b"Hello from ctypes") + self.assertEqual(buf.value, b"Hello from ctypes") PyOS_snprintf(buf, sizeof(buf), "Hello from %s (%d, %d, %d)", b"ctypes", 1, 2, 3) - self.failUnlessEqual(buf.value, b"Hello from ctypes (1, 2, 3)") + self.assertEqual(buf.value, b"Hello from ctypes (1, 2, 3)") # not enough arguments - self.failUnlessRaises(TypeError, PyOS_snprintf, buf) + self.assertRaises(TypeError, PyOS_snprintf, buf) def test_pyobject_repr(self): - self.failUnlessEqual(repr(py_object()), "py_object()") - self.failUnlessEqual(repr(py_object(42)), "py_object(42)") - self.failUnlessEqual(repr(py_object(object)), "py_object(%r)" % object) + self.assertEqual(repr(py_object()), "py_object()") + self.assertEqual(repr(py_object(42)), "py_object(42)") + self.assertEqual(repr(py_object(object)), "py_object(%r)" % object) if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_random_things.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_random_things.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_random_things.py Wed Jul 1 01:06:06 2009 @@ -20,7 +20,7 @@ hdll = windll.kernel32.LoadLibraryA(b"kernel32") funcaddr = windll.kernel32.GetProcAddress(hdll, "GetModuleHandleA") - self.failUnlessEqual(call_function(funcaddr, (None,)), + self.assertEqual(call_function(funcaddr, (None,)), windll.kernel32.GetModuleHandleA(None)) class CallbackTracbackTestCase(unittest.TestCase): @@ -49,25 +49,25 @@ def test_ValueError(self): cb = CFUNCTYPE(c_int, c_int)(callback_func) out = self.capture_stderr(cb, 42) - self.failUnlessEqual(out.splitlines()[-1], + self.assertEqual(out.splitlines()[-1], "ValueError: 42") def test_IntegerDivisionError(self): cb = CFUNCTYPE(c_int, c_int)(callback_func) out = self.capture_stderr(cb, 0) - self.failUnlessEqual(out.splitlines()[-1][:19], + self.assertEqual(out.splitlines()[-1][:19], "ZeroDivisionError: ") def test_FloatDivisionError(self): cb = CFUNCTYPE(c_int, c_double)(callback_func) out = self.capture_stderr(cb, 0.0) - self.failUnlessEqual(out.splitlines()[-1][:19], + self.assertEqual(out.splitlines()[-1][:19], "ZeroDivisionError: ") def test_TypeErrorDivisionError(self): cb = CFUNCTYPE(c_int, c_char_p)(callback_func) out = self.capture_stderr(cb, "spam") - self.failUnlessEqual(out.splitlines()[-1], + self.assertEqual(out.splitlines()[-1], "TypeError: " "unsupported operand type(s) for /: 'int' and 'str'") Modified: python/branches/py3k/Lib/ctypes/test/test_refcounts.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_refcounts.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_refcounts.py Wed Jul 1 01:06:06 2009 @@ -21,17 +21,17 @@ #print "called back with", value return value - self.failUnlessEqual(grc(callback), 2) + self.assertEqual(grc(callback), 2) cb = MyCallback(callback) - self.failUnless(grc(callback) > 2) + self.assertTrue(grc(callback) > 2) result = f(-10, cb) - self.failUnlessEqual(result, -18) + self.assertEqual(result, -18) cb = None gc.collect() - self.failUnlessEqual(grc(callback), 2) + self.assertEqual(grc(callback), 2) def test_refcount(self): @@ -39,19 +39,19 @@ def func(*args): pass # this is the standard refcount for func - self.failUnlessEqual(grc(func), 2) + self.assertEqual(grc(func), 2) # the CFuncPtr instance holds atr least one refcount on func: f = OtherCallback(func) - self.failUnless(grc(func) > 2) + self.assertTrue(grc(func) > 2) # and may release it again del f - self.failUnless(grc(func) >= 2) + self.assertTrue(grc(func) >= 2) # but now it must be gone gc.collect() - self.failUnless(grc(func) == 2) + self.assertTrue(grc(func) == 2) class X(ctypes.Structure): _fields_ = [("a", OtherCallback)] @@ -59,27 +59,27 @@ x.a = OtherCallback(func) # the CFuncPtr instance holds atr least one refcount on func: - self.failUnless(grc(func) > 2) + self.assertTrue(grc(func) > 2) # and may release it again del x - self.failUnless(grc(func) >= 2) + self.assertTrue(grc(func) >= 2) # and now it must be gone again gc.collect() - self.failUnlessEqual(grc(func), 2) + self.assertEqual(grc(func), 2) f = OtherCallback(func) # the CFuncPtr instance holds atr least one refcount on func: - self.failUnless(grc(func) > 2) + self.assertTrue(grc(func) > 2) # create a cycle f.cycle = f del f gc.collect() - self.failUnlessEqual(grc(func), 2) + self.assertEqual(grc(func), 2) class AnotherLeak(unittest.TestCase): def test_callback(self): @@ -92,7 +92,7 @@ a = sys.getrefcount(ctypes.c_int) f(1, 2) - self.failUnlessEqual(sys.getrefcount(ctypes.c_int), a) + self.assertEqual(sys.getrefcount(ctypes.c_int), a) if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_repr.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_repr.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_repr.py Wed Jul 1 01:06:06 2009 @@ -18,12 +18,12 @@ def test_numbers(self): for typ in subclasses: base = typ.__bases__[0] - self.failUnless(repr(base(42)).startswith(base.__name__)) - self.failUnlessEqual(": " "expected string, int found") cls, msg = self.get_except(Person, "Someone", ("a", "b", "c")) - self.failUnlessEqual(cls, RuntimeError) + self.assertEqual(cls, RuntimeError) if issubclass(Exception, object): - self.failUnlessEqual(msg, + self.assertEqual(msg, "(Phone) : too many initializers") else: - self.failUnlessEqual(msg, "(Phone) TypeError: too many initializers") + self.assertEqual(msg, "(Phone) TypeError: too many initializers") def get_except(self, func, *args): @@ -331,7 +331,7 @@ ## # same as 'class X(Structure): pass' ## # fails, since we need either a _fields_ or a _abstract_ attribute ## cls, msg = self.get_except(meta, "X", (Structure,), {}) -## self.failUnlessEqual((cls, msg), +## self.assertEqual((cls, msg), ## (AttributeError, "class must define a '_fields_' attribute")) def test_abstract_class(self): @@ -339,15 +339,15 @@ _abstract_ = "something" # try 'X()' cls, msg = self.get_except(eval, "X()", locals()) - self.failUnlessEqual((cls, msg), (TypeError, "abstract class")) + self.assertEqual((cls, msg), (TypeError, "abstract class")) def test_methods(self): ## class X(Structure): ## _fields_ = [] - self.failUnless("in_dll" in dir(type(Structure))) - self.failUnless("from_address" in dir(type(Structure))) - self.failUnless("in_dll" in dir(type(Structure))) + self.assertTrue("in_dll" in dir(type(Structure))) + self.assertTrue("from_address" in dir(type(Structure))) + self.assertTrue("in_dll" in dir(type(Structure))) class PointerMemberTestCase(unittest.TestCase): @@ -360,7 +360,7 @@ # We can assign arrays of the correct type s.array = (c_int * 3)(1, 2, 3) items = [s.array[i] for i in range(3)] - self.failUnlessEqual(items, [1, 2, 3]) + self.assertEqual(items, [1, 2, 3]) # The following are bugs, but are included here because the unittests # also describe the current behaviour. @@ -371,14 +371,14 @@ s.array[0] = 42 items = [s.array[i] for i in range(3)] - self.failUnlessEqual(items, [42, 2, 3]) + self.assertEqual(items, [42, 2, 3]) s.array[0] = 1 ## s.array[1] = 42 items = [s.array[i] for i in range(3)] - self.failUnlessEqual(items, [1, 2, 3]) + self.assertEqual(items, [1, 2, 3]) def test_none_to_pointer_fields(self): class S(Structure): @@ -388,7 +388,7 @@ s = S() s.x = 12345678 s.p = None - self.failUnlessEqual(s.x, 12345678) + self.assertEqual(s.x, 12345678) class TestRecursiveStructure(unittest.TestCase): def test_contains_itself(self): @@ -398,7 +398,7 @@ try: Recursive._fields_ = [("next", Recursive)] except AttributeError as details: - self.failUnless("Structure or union cannot contain itself" in + self.assertTrue("Structure or union cannot contain itself" in str(details)) else: self.fail("Structure or union cannot contain itself") @@ -415,7 +415,7 @@ try: Second._fields_ = [("first", First)] except AttributeError as details: - self.failUnless("_fields_ is final" in + self.assertTrue("_fields_ is final" in str(details)) else: self.fail("AttributeError not raised") Modified: python/branches/py3k/Lib/ctypes/test/test_unaligned_structures.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_unaligned_structures.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_unaligned_structures.py Wed Jul 1 01:06:06 2009 @@ -28,18 +28,18 @@ def test_native(self): for typ in structures: ## print typ.value - self.failUnlessEqual(typ.value.offset, 1) + self.assertEqual(typ.value.offset, 1) o = typ() o.value = 4 - self.failUnlessEqual(o.value, 4) + self.assertEqual(o.value, 4) def test_swapped(self): for typ in byteswapped_structures: ## print >> sys.stderr, typ.value - self.failUnlessEqual(typ.value.offset, 1) + self.assertEqual(typ.value.offset, 1) o = typ() o.value = 4 - self.failUnlessEqual(o.value, 4) + self.assertEqual(o.value, 4) if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_unicode.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_unicode.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_unicode.py Wed Jul 1 01:06:06 2009 @@ -22,55 +22,55 @@ def test_ascii_strict(self): ctypes.set_conversion_mode("ascii", "strict") # no conversions take place with unicode arguments - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("ab\u2070"), 3) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("ab\u2070"), 3) # string args are converted - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessRaises(ctypes.ArgumentError, wcslen, b"ab\xe4") + self.assertEqual(wcslen("abc"), 3) + self.assertRaises(ctypes.ArgumentError, wcslen, b"ab\xe4") def test_ascii_replace(self): ctypes.set_conversion_mode("ascii", "replace") - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("ab\u2070"), 3) - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("ab\xe4"), 3) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("ab\u2070"), 3) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("ab\xe4"), 3) def test_ascii_ignore(self): ctypes.set_conversion_mode("ascii", "ignore") - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("ab\u2070"), 3) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("ab\u2070"), 3) # ignore error mode skips non-ascii characters - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen(b"\xe4\xf6\xfc\xdf"), 0) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen(b"\xe4\xf6\xfc\xdf"), 0) def test_latin1_strict(self): ctypes.set_conversion_mode("latin-1", "strict") - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("ab\u2070"), 3) - self.failUnlessEqual(wcslen("abc"), 3) - self.failUnlessEqual(wcslen("\xe4\xf6\xfc\xdf"), 4) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("ab\u2070"), 3) + self.assertEqual(wcslen("abc"), 3) + self.assertEqual(wcslen("\xe4\xf6\xfc\xdf"), 4) def test_buffers(self): ctypes.set_conversion_mode("ascii", "strict") buf = ctypes.create_unicode_buffer("abc") - self.failUnlessEqual(len(buf), 3+1) + self.assertEqual(len(buf), 3+1) ctypes.set_conversion_mode("ascii", "replace") buf = ctypes.create_unicode_buffer(b"ab\xe4\xf6\xfc") - self.failUnlessEqual(buf[:], "ab\uFFFD\uFFFD\uFFFD\0") - self.failUnlessEqual(buf[::], "ab\uFFFD\uFFFD\uFFFD\0") - self.failUnlessEqual(buf[::-1], "\0\uFFFD\uFFFD\uFFFDba") - self.failUnlessEqual(buf[::2], "a\uFFFD\uFFFD") - self.failUnlessEqual(buf[6:5:-1], "") + self.assertEqual(buf[:], "ab\uFFFD\uFFFD\uFFFD\0") + self.assertEqual(buf[::], "ab\uFFFD\uFFFD\uFFFD\0") + self.assertEqual(buf[::-1], "\0\uFFFD\uFFFD\uFFFDba") + self.assertEqual(buf[::2], "a\uFFFD\uFFFD") + self.assertEqual(buf[6:5:-1], "") ctypes.set_conversion_mode("ascii", "ignore") buf = ctypes.create_unicode_buffer(b"ab\xe4\xf6\xfc") # is that correct? not sure. But with 'ignore', you get what you pay for.. - self.failUnlessEqual(buf[:], "ab\0\0\0\0") - self.failUnlessEqual(buf[::], "ab\0\0\0\0") - self.failUnlessEqual(buf[::-1], "\0\0\0\0ba") - self.failUnlessEqual(buf[::2], "a\0\0") - self.failUnlessEqual(buf[6:5:-1], "") + self.assertEqual(buf[:], "ab\0\0\0\0") + self.assertEqual(buf[::], "ab\0\0\0\0") + self.assertEqual(buf[::-1], "\0\0\0\0ba") + self.assertEqual(buf[::2], "a\0\0") + self.assertEqual(buf[6:5:-1], "") import _ctypes_test func = ctypes.CDLL(_ctypes_test.__file__)._testfunc_p_p @@ -88,41 +88,41 @@ def test_ascii_replace(self): ctypes.set_conversion_mode("ascii", "strict") - self.failUnlessEqual(func("abc"), "abc") - self.failUnlessEqual(func("abc"), "abc") + self.assertEqual(func("abc"), "abc") + self.assertEqual(func("abc"), "abc") self.assertRaises(ctypes.ArgumentError, func, "ab\xe4") def test_ascii_ignore(self): ctypes.set_conversion_mode("ascii", "ignore") - self.failUnlessEqual(func("abc"), "abc") - self.failUnlessEqual(func("abc"), "abc") - self.failUnlessEqual(func("\xe4\xf6\xfc\xdf"), "") + self.assertEqual(func("abc"), "abc") + self.assertEqual(func("abc"), "abc") + self.assertEqual(func("\xe4\xf6\xfc\xdf"), "") def test_ascii_replace(self): ctypes.set_conversion_mode("ascii", "replace") - self.failUnlessEqual(func("abc"), "abc") - self.failUnlessEqual(func("abc"), "abc") - self.failUnlessEqual(func("\xe4\xf6\xfc\xdf"), "????") + self.assertEqual(func("abc"), "abc") + self.assertEqual(func("abc"), "abc") + self.assertEqual(func("\xe4\xf6\xfc\xdf"), "????") def test_buffers(self): ctypes.set_conversion_mode("ascii", "strict") buf = ctypes.create_string_buffer("abc") - self.failUnlessEqual(len(buf), 3+1) + self.assertEqual(len(buf), 3+1) ctypes.set_conversion_mode("ascii", "replace") buf = ctypes.create_string_buffer("ab\xe4\xf6\xfc") - self.failUnlessEqual(buf[:], b"ab???\0") - self.failUnlessEqual(buf[::], b"ab???\0") - self.failUnlessEqual(buf[::-1], b"\0???ba") - self.failUnlessEqual(buf[::2], b"a??") - self.failUnlessEqual(buf[6:5:-1], b"") + self.assertEqual(buf[:], b"ab???\0") + self.assertEqual(buf[::], b"ab???\0") + self.assertEqual(buf[::-1], b"\0???ba") + self.assertEqual(buf[::2], b"a??") + self.assertEqual(buf[6:5:-1], b"") ctypes.set_conversion_mode("ascii", "ignore") buf = ctypes.create_string_buffer("ab\xe4\xf6\xfc") # is that correct? not sure. But with 'ignore', you get what you pay for.. - self.failUnlessEqual(buf[:], b"ab\0\0\0\0") - self.failUnlessEqual(buf[::], b"ab\0\0\0\0") - self.failUnlessEqual(buf[::-1], b"\0\0\0\0ba") + self.assertEqual(buf[:], b"ab\0\0\0\0") + self.assertEqual(buf[::], b"ab\0\0\0\0") + self.assertEqual(buf[::-1], b"\0\0\0\0ba") if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_values.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_values.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_values.py Wed Jul 1 01:06:06 2009 @@ -15,13 +15,13 @@ ctdll = CDLL(_ctypes_test.__file__) an_integer = c_int.in_dll(ctdll, "an_integer") x = an_integer.value - self.failUnlessEqual(x, ctdll.get_an_integer()) + self.assertEqual(x, ctdll.get_an_integer()) an_integer.value *= 2 - self.failUnlessEqual(x*2, ctdll.get_an_integer()) + self.assertEqual(x*2, ctdll.get_an_integer()) # To avoid test failures when this test is repeated several # times the original value must be restored an_integer.value = x - self.failUnlessEqual(x, ctdll.get_an_integer()) + self.assertEqual(x, ctdll.get_an_integer()) def test_undefined(self): ctdll = CDLL(_ctypes_test.__file__) @@ -40,11 +40,11 @@ # docstrings are also removed in the latter case. opt = c_int.in_dll(pydll, "Py_OptimizeFlag").value if __debug__: - self.failUnlessEqual(opt, 0) + self.assertEqual(opt, 0) elif ValuesTestCase.__doc__ is not None: - self.failUnlessEqual(opt, 1) + self.assertEqual(opt, 1) else: - self.failUnlessEqual(opt, 2) + self.assertEqual(opt, 2) def test_frozentable(self): # Python exports a PyImport_FrozenModules symbol. This is a @@ -76,7 +76,7 @@ expected = [("__hello__", 104), ("__phello__", -104), ("__phello__.spam", 104)] else: expected = [("__hello__", 100), ("__phello__", -100), ("__phello__.spam", 100)] - self.failUnlessEqual(items, expected) + self.assertEqual(items, expected) from ctypes import _pointer_type_cache del _pointer_type_cache[struct_frozen] Modified: python/branches/py3k/Lib/ctypes/test/test_varsize_struct.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_varsize_struct.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_varsize_struct.py Wed Jul 1 01:06:06 2009 @@ -7,44 +7,44 @@ _fields_ = [("item", c_int), ("array", c_int * 1)] - self.failUnlessEqual(sizeof(X), sizeof(c_int) * 2) + self.assertEqual(sizeof(X), sizeof(c_int) * 2) x = X() x.item = 42 x.array[0] = 100 - self.failUnlessEqual(sizeof(x), sizeof(c_int) * 2) + self.assertEqual(sizeof(x), sizeof(c_int) * 2) # make room for one additional item new_size = sizeof(X) + sizeof(c_int) * 1 resize(x, new_size) - self.failUnlessEqual(sizeof(x), new_size) - self.failUnlessEqual((x.item, x.array[0]), (42, 100)) + self.assertEqual(sizeof(x), new_size) + self.assertEqual((x.item, x.array[0]), (42, 100)) # make room for 10 additional items new_size = sizeof(X) + sizeof(c_int) * 9 resize(x, new_size) - self.failUnlessEqual(sizeof(x), new_size) - self.failUnlessEqual((x.item, x.array[0]), (42, 100)) + self.assertEqual(sizeof(x), new_size) + self.assertEqual((x.item, x.array[0]), (42, 100)) # make room for one additional item new_size = sizeof(X) + sizeof(c_int) * 1 resize(x, new_size) - self.failUnlessEqual(sizeof(x), new_size) - self.failUnlessEqual((x.item, x.array[0]), (42, 100)) + self.assertEqual(sizeof(x), new_size) + self.assertEqual((x.item, x.array[0]), (42, 100)) def test_array_invalid_length(self): # cannot create arrays with non-positive size - self.failUnlessRaises(ValueError, lambda: c_int * -1) - self.failUnlessRaises(ValueError, lambda: c_int * -3) + self.assertRaises(ValueError, lambda: c_int * -1) + self.assertRaises(ValueError, lambda: c_int * -3) def test_zerosized_array(self): array = (c_int * 0)() # accessing elements of zero-sized arrays raise IndexError - self.failUnlessRaises(IndexError, array.__setitem__, 0, None) - self.failUnlessRaises(IndexError, array.__getitem__, 0) - self.failUnlessRaises(IndexError, array.__setitem__, 1, None) - self.failUnlessRaises(IndexError, array.__getitem__, 1) - self.failUnlessRaises(IndexError, array.__setitem__, -1, None) - self.failUnlessRaises(IndexError, array.__getitem__, -1) + self.assertRaises(IndexError, array.__setitem__, 0, None) + self.assertRaises(IndexError, array.__getitem__, 0) + self.assertRaises(IndexError, array.__setitem__, 1, None) + self.assertRaises(IndexError, array.__getitem__, 1) + self.assertRaises(IndexError, array.__setitem__, -1, None) + self.assertRaises(IndexError, array.__getitem__, -1) if __name__ == "__main__": unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_win32.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_win32.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_win32.py Wed Jul 1 01:06:06 2009 @@ -18,7 +18,7 @@ self.assertRaises(ValueError, IsWindow) # This one should succeeed... - self.failUnlessEqual(0, IsWindow(0)) + self.assertEqual(0, IsWindow(0)) # ValueError: Procedure probably called with too many arguments (8 bytes in excess) self.assertRaises(ValueError, IsWindow, 0, 0, 0) @@ -49,13 +49,13 @@ class TestWintypes(unittest.TestCase): def test_HWND(self): from ctypes import wintypes - self.failUnlessEqual(sizeof(wintypes.HWND), sizeof(c_void_p)) + self.assertEqual(sizeof(wintypes.HWND), sizeof(c_void_p)) def test_PARAM(self): from ctypes import wintypes - self.failUnlessEqual(sizeof(wintypes.WPARAM), + self.assertEqual(sizeof(wintypes.WPARAM), sizeof(c_void_p)) - self.failUnlessEqual(sizeof(wintypes.LPARAM), + self.assertEqual(sizeof(wintypes.LPARAM), sizeof(c_void_p)) def test_COMError(self): @@ -84,7 +84,7 @@ pt = POINT(10, 10) rect = RECT(0, 0, 20, 20) - self.failUnlessEqual(1, dll.PointInRect(byref(rect), pt)) + self.assertEqual(1, dll.PointInRect(byref(rect), pt)) if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/distutils/tests/test_archive_util.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_archive_util.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_archive_util.py Wed Jul 1 01:06:06 2009 @@ -47,7 +47,7 @@ # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -58,7 +58,7 @@ finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) def _tarinfo(self, path): tar = tarfile.open(path) @@ -96,7 +96,7 @@ # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now create another tarball using `tar` tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') @@ -110,7 +110,7 @@ finally: os.chdir(old_dir) - self.assert_(os.path.exists(tarball2)) + self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) @@ -123,7 +123,7 @@ finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now for a dry_run base_name = os.path.join(tmpdir2, 'archive') @@ -134,7 +134,7 @@ finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) @unittest.skipUnless(find_executable('compress'), 'The compress program is required') @@ -151,7 +151,7 @@ finally: os.chdir(old_dir) tarball = base_name + '.tar.Z' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) # same test with dry_run @@ -165,7 +165,7 @@ dry_run=True) finally: os.chdir(old_dir) - self.assert_(not os.path.exists(tarball)) + self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') Modified: python/branches/py3k/Lib/distutils/tests/test_bdist_rpm.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_bdist_rpm.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_bdist_rpm.py Wed Jul 1 01:06:06 2009 @@ -74,7 +74,7 @@ cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) def test_no_optimize_flag(self): @@ -114,7 +114,7 @@ cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) def test_suite(): Modified: python/branches/py3k/Lib/distutils/tests/test_bdist_wininst.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_bdist_wininst.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_bdist_wininst.py Wed Jul 1 01:06:06 2009 @@ -21,7 +21,7 @@ # and make sure it finds it and returns its content # no matter what platform we have exe_file = cmd.get_exe_bytes() - self.assert_(len(exe_file) > 10) + self.assertTrue(len(exe_file) > 10) def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_build_clib.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_clib.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_clib.py Wed Jul 1 01:06:06 2009 @@ -135,7 +135,7 @@ cmd.run() # let's check the result - self.assert_('libfoo.a' in os.listdir(build_temp)) + self.assertTrue('libfoo.a' in os.listdir(build_temp)) def test_suite(): return unittest.makeSuite(BuildCLibTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_ext.py Wed Jul 1 01:06:06 2009 @@ -74,15 +74,15 @@ import xx for attr in ('error', 'foo', 'new', 'roj'): - self.assert_(hasattr(xx, attr)) + self.assertTrue(hasattr(xx, attr)) self.assertEquals(xx.foo(2, 5), 7) self.assertEquals(xx.foo(13,15), 28) self.assertEquals(xx.new().demo(), None) doc = 'This is a template module just for instruction.' self.assertEquals(xx.__doc__, doc) - self.assert_(isinstance(xx.Null(), xx.Null)) - self.assert_(isinstance(xx.Str(), xx.Str)) + self.assertTrue(isinstance(xx.Null(), xx.Null)) + self.assertTrue(isinstance(xx.Str(), xx.Str)) def tearDown(self): # Get everything back to normal @@ -114,7 +114,7 @@ _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris - self.assert_(len(cmd.library_dirs) > 0) + self.assertTrue(len(cmd.library_dirs) > 0) def test_user_site(self): # site.USER_SITE was introduced in 2.6 @@ -128,7 +128,7 @@ # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 @@ -144,9 +144,9 @@ # see if include_dirs and library_dirs # were set - self.assert_(lib in cmd.library_dirs) - self.assert_(lib in cmd.rpath) - self.assert_(incl in cmd.include_dirs) + self.assertTrue(lib in cmd.library_dirs) + self.assertTrue(lib in cmd.rpath) + self.assertTrue(incl in cmd.include_dirs) def test_optional_extension(self): @@ -175,10 +175,10 @@ from distutils import sysconfig py_include = sysconfig.get_python_inc() - self.assert_(py_include in cmd.include_dirs) + self.assertTrue(py_include in cmd.include_dirs) plat_py_include = sysconfig.get_python_inc(plat_specific=1) - self.assert_(plat_py_include in cmd.include_dirs) + self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string @@ -192,7 +192,7 @@ cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assert_('my_lib_dir' in cmd.library_dirs) + self.assertTrue('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths @@ -257,13 +257,13 @@ 'some': 'bar'})] cmd.check_extensions_list(exts) ext = exts[0] - self.assert_(isinstance(ext, Extension)) + self.assertTrue(isinstance(ext, Extension)) # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') self.assertEquals(ext.libraries, 'foo') - self.assert_(not hasattr(ext, 'some')) + self.assertTrue(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', @@ -321,7 +321,7 @@ so_file = cmd.get_outputs()[0] finally: os.chdir(old_wd) - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) @@ -330,7 +330,7 @@ cmd.inplace = 0 cmd.run() so_file = cmd.get_outputs()[0] - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) Modified: python/branches/py3k/Lib/distutils/tests/test_build_py.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_py.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_py.py Wed Jul 1 01:06:06 2009 @@ -52,9 +52,9 @@ self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) - self.assert_("__init__.py" in files) - self.assert_("__init__.pyc" in files) - self.assert_("README.txt" in files) + self.assertTrue("__init__.py" in files) + self.assertTrue("__init__.pyc" in files) + self.assertTrue("README.txt" in files) def test_empty_package_dir (self): # See SF 1668596/1720897. Modified: python/branches/py3k/Lib/distutils/tests/test_build_scripts.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_scripts.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_scripts.py Wed Jul 1 01:06:06 2009 @@ -16,12 +16,12 @@ def test_default_settings(self): cmd = self.get_build_scripts_cmd("/foo/bar", []) - self.assert_(not cmd.force) - self.assert_(cmd.build_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(cmd.build_dir is None) cmd.finalize_options() - self.assert_(cmd.force) + self.assertTrue(cmd.force) self.assertEqual(cmd.build_dir, "/foo/bar") def test_build(self): @@ -37,7 +37,7 @@ built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def get_build_scripts_cmd(self, target, scripts): import sys @@ -100,7 +100,7 @@ built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_clean.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_clean.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_clean.py Wed Jul 1 01:06:06 2009 @@ -35,7 +35,7 @@ # make sure the files where removed for name, path in dirs: - self.assert_(not os.path.exists(path), + self.assertTrue(not os.path.exists(path), '%s was not removed' % path) # let's run the command again (should spit warnings but suceed) Modified: python/branches/py3k/Lib/distutils/tests/test_cmd.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_cmd.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_cmd.py Wed Jul 1 01:06:06 2009 @@ -70,7 +70,7 @@ cmd.option2 = None cmd.ensure_string('option2', 'xxx') - self.assert_(hasattr(cmd, 'option2')) + self.assertTrue(hasattr(cmd, 'option2')) cmd.option3 = 1 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') Modified: python/branches/py3k/Lib/distutils/tests/test_config.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_config.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_config.py Wed Jul 1 01:06:06 2009 @@ -102,9 +102,9 @@ def test_server_empty_registration(self): cmd = self._cmd(self.dist) rc = cmd._get_rc_file() - self.assert_(not os.path.exists(rc)) + self.assertTrue(not os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') - self.assert_(os.path.exists(rc)) + self.assertTrue(os.path.exists(rc)) content = open(rc).read() self.assertEquals(content, WANTED) Modified: python/branches/py3k/Lib/distutils/tests/test_config_cmd.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_config_cmd.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_config_cmd.py Wed Jul 1 01:06:06 2009 @@ -73,14 +73,14 @@ self.write_file(f2, 'xxx') for f in (f1, f2): - self.assert_(os.path.exists(f)) + self.assertTrue(os.path.exists(f)) pkg_dir, dist = self.create_dist() cmd = config(dist) cmd._clean(f1, f2) for f in (f1, f2): - self.assert_(not os.path.exists(f)) + self.assertTrue(not os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_dist.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_dist.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_dist.py Wed Jul 1 01:06:06 2009 @@ -72,7 +72,7 @@ self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") - self.assert_(isinstance(cmd, test_dist)) + self.assertTrue(isinstance(cmd, test_dist)) self.assertEqual(cmd.sample_option, "sometext") def test_command_packages_configfile(self): @@ -175,10 +175,10 @@ "version": "1.0"} dist = Distribution(attrs) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.0" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.0" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides(self): attrs = {"name": "package", @@ -190,9 +190,9 @@ self.assertEqual(dist.get_provides(), ["package", "package.sub"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides_illegal(self): self.assertRaises(ValueError, Distribution, @@ -210,11 +210,11 @@ self.assertEqual(dist.get_requires(), ["other", "another (==1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("Requires: other" in meta) - self.assert_("Requires: another (==1.0)" in meta) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("Requires: other" in meta) + self.assertTrue("Requires: another (==1.0)" in meta) + self.assertTrue("obsoletes:" not in meta.lower()) def test_requires_illegal(self): self.assertRaises(ValueError, Distribution, @@ -232,11 +232,11 @@ self.assertEqual(dist.get_obsoletes(), ["other", "another (<1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("Obsoletes: other" in meta) - self.assert_("Obsoletes: another (<1.0)" in meta) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("Obsoletes: other" in meta) + self.assertTrue("Obsoletes: another (<1.0)" in meta) def test_obsoletes_illegal(self): self.assertRaises(ValueError, Distribution, @@ -270,14 +270,14 @@ if sys.platform in ('linux', 'darwin'): self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files) + self.assertTrue(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files, + self.assertTrue(user_filename in files, '%r not found in %r' % (user_filename, files)) finally: os.remove(user_filename) @@ -303,7 +303,7 @@ output = [line for line in s.getvalue().split('\n') if line.strip() != ''] - self.assert_(len(output) > 0) + self.assertTrue(len(output) > 0) def test_suite(): suite = unittest.TestSuite() Modified: python/branches/py3k/Lib/distutils/tests/test_install.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_install.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_install.py Wed Jul 1 01:06:06 2009 @@ -88,7 +88,7 @@ def _test_user_site(self): for key in ('nt_user', 'unix_user', 'os2_home'): - self.assert_(key in INSTALL_SCHEMES) + self.assertTrue(key in INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) @@ -96,24 +96,24 @@ # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 # user base and site shouldn't be created yet - self.assert_(not os.path.exists(self.user_base)) - self.assert_(not os.path.exists(self.user_site)) + self.assertTrue(not os.path.exists(self.user_base)) + self.assertTrue(not os.path.exists(self.user_site)) # let's run finalize cmd.ensure_finalized() # now they should - self.assert_(os.path.exists(self.user_base)) - self.assert_(os.path.exists(self.user_site)) + self.assertTrue(os.path.exists(self.user_base)) + self.assertTrue(os.path.exists(self.user_site)) - self.assert_('userbase' in cmd.config_vars) - self.assert_('usersite' in cmd.config_vars) + self.assertTrue('userbase' in cmd.config_vars) + self.assertTrue('usersite' in cmd.config_vars) def test_handle_extra_path(self): dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) Modified: python/branches/py3k/Lib/distutils/tests/test_install_data.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_install_data.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_install_data.py Wed Jul 1 01:06:06 2009 @@ -35,9 +35,9 @@ # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) rtwo = os.path.split(two)[-1] - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) rone = os.path.split(one)[-1] - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # let's try with warn_dir one @@ -47,8 +47,8 @@ # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # now using root and empty dir @@ -65,8 +65,8 @@ # let's check the result self.assertEquals(len(cmd.get_outputs()), 4) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) def test_suite(): return unittest.makeSuite(InstallDataTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_install_lib.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_install_lib.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_install_lib.py Wed Jul 1 01:06:06 2009 @@ -39,8 +39,8 @@ f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) def test_get_outputs(self): pkg_dir, dist = self.create_dist() @@ -57,7 +57,7 @@ cmd.distribution.script_name = 'setup.py' # get_output should return 4 elements - self.assert_(len(cmd.get_outputs()) >= 2) + self.assertTrue(len(cmd.get_outputs()) >= 2) def test_get_inputs(self): pkg_dir, dist = self.create_dist() Modified: python/branches/py3k/Lib/distutils/tests/test_install_scripts.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_install_scripts.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_install_scripts.py Wed Jul 1 01:06:06 2009 @@ -23,15 +23,15 @@ skip_build=1, ) cmd = install_scripts(dist) - self.assert_(not cmd.force) - self.assert_(not cmd.skip_build) - self.assert_(cmd.build_dir is None) - self.assert_(cmd.install_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(not cmd.skip_build) + self.assertTrue(cmd.build_dir is None) + self.assertTrue(cmd.install_dir is None) cmd.finalize_options() - self.assert_(cmd.force) - self.assert_(cmd.skip_build) + self.assertTrue(cmd.force) + self.assertTrue(cmd.skip_build) self.assertEqual(cmd.build_dir, "/foo/bar") self.assertEqual(cmd.install_dir, "/splat/funk") @@ -69,7 +69,7 @@ installed = os.listdir(target) for name in expected: - self.assert_(name in installed) + self.assertTrue(name in installed) def test_suite(): Modified: python/branches/py3k/Lib/distutils/tests/test_msvc9compiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_msvc9compiler.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_msvc9compiler.py Wed Jul 1 01:06:06 2009 @@ -46,7 +46,7 @@ # windows registeries versions. path = r'Software\Microsoft\Notepad' v = Reg.get_value(path, "lfitalic") - self.assert_(v in (0, 1)) + self.assertTrue(v in (0, 1)) import winreg HKCU = winreg.HKEY_CURRENT_USER @@ -54,7 +54,7 @@ self.assertEquals(keys, None) keys = Reg.read_keys(HKCU, r'Software\Microsoft') - self.assert_('Notepad' in keys) + self.assertTrue('Notepad' in keys) def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_register.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_register.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_register.py Wed Jul 1 01:06:06 2009 @@ -96,7 +96,7 @@ cmd = self._get_cmd() # we shouldn't have a .pypirc file yet - self.assert_(not os.path.exists(self.rc)) + self.assertTrue(not os.path.exists(self.rc)) # patching input and getpass.getpass # so register gets happy @@ -115,7 +115,7 @@ del register_module.input # we should have a brand new .pypirc file - self.assert_(os.path.exists(self.rc)) + self.assertTrue(os.path.exists(self.rc)) # with the content similar to WANTED_PYPIRC content = open(self.rc).read() @@ -133,13 +133,13 @@ # let's see what the server received : we should # have 2 similar requests - self.assert_(self.conn.reqs, 2) + self.assertTrue(self.conn.reqs, 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) self.assertEquals(req1['Content-length'], '1374') self.assertEquals(req2['Content-length'], '1374') - self.assert_((b'xxx') in self.conn.reqs[1].data) + self.assertTrue((b'xxx') in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -165,11 +165,11 @@ del register_module.input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '608') - self.assert_((b'tarek') in req.data) + self.assertTrue((b'tarek') in req.data) def test_password_reset(self): # this test runs choice 3 @@ -183,11 +183,11 @@ del register_module.input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '290') - self.assert_((b'tarek') in req.data) + self.assertTrue((b'tarek') in req.data) def test_strict(self): # testing the script option Modified: python/branches/py3k/Lib/distutils/tests/test_sysconfig.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_sysconfig.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_sysconfig.py Wed Jul 1 01:06:06 2009 @@ -21,12 +21,12 @@ def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() - self.assert_(os.path.isfile(config_h), config_h) + self.assertTrue(os.path.isfile(config_h), config_h) def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before - #self.assert_(os.path.isdir(lib_dir), lib_dir) + #self.assertTrue(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) @@ -36,14 +36,14 @@ # This is not much of a test. We make sure Python.h exists # in the directory returned by get_python_inc() but we don't know # it is the correct file. - self.assert_(os.path.isdir(inc_dir), inc_dir) + self.assertTrue(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") - self.assert_(os.path.isfile(python_h), python_h) + self.assertTrue(os.path.isfile(python_h), python_h) def test_get_config_vars(self): cvars = sysconfig.get_config_vars() - self.assert_(isinstance(cvars, dict)) - self.assert_(cvars) + self.assertTrue(isinstance(cvars, dict)) + self.assertTrue(cvars) def test_customize_compiler(self): Modified: python/branches/py3k/Lib/distutils/tests/test_upload.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_upload.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_upload.py Wed Jul 1 01:06:06 2009 @@ -96,11 +96,11 @@ # what did we send ? headers = dict(self.last_open.req.headers) self.assertEquals(headers['Content-length'], '2087') - self.assert_(headers['Content-type'].startswith('multipart/form-data')) + self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEquals(self.last_open.req.get_method(), 'POST') self.assertEquals(self.last_open.req.get_full_url(), 'http://pypi.python.org/pypi') - self.assert_(b'xxx' in self.last_open.req.data) + self.assertTrue(b'xxx' in self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_util.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_util.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_util.py Wed Jul 1 01:06:06 2009 @@ -225,10 +225,10 @@ no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') for y in yes: - self.assert_(strtobool(y)) + self.assertTrue(strtobool(y)) for n in no: - self.assert_(not strtobool(n)) + self.assertTrue(not strtobool(n)) def test_rfc822_escape(self): header = 'I am a\npoor\nlonesome\nheader\n' Modified: python/branches/py3k/Lib/email/test/test_email.py ============================================================================== --- python/branches/py3k/Lib/email/test/test_email.py (original) +++ python/branches/py3k/Lib/email/test/test_email.py Wed Jul 1 01:06:06 2009 @@ -53,7 +53,7 @@ # Base test class class TestEmailBase(unittest.TestCase): def ndiffAssertEqual(self, first, second): - """Like failUnlessEqual except use ndiff for readable output.""" + """Like assertEqual except use ndiff for readable output.""" if first != second: sfirst = str(first) ssecond = str(second) @@ -222,12 +222,12 @@ msg['From'] = 'Me' msg['to'] = 'You' # Check for case insensitivity - self.failUnless('from' in msg) - self.failUnless('From' in msg) - self.failUnless('FROM' in msg) - self.failUnless('to' in msg) - self.failUnless('To' in msg) - self.failUnless('TO' in msg) + self.assertTrue('from' in msg) + self.assertTrue('From' in msg) + self.assertTrue('FROM' in msg) + self.assertTrue('to' in msg) + self.assertTrue('To' in msg) + self.assertTrue('TO' in msg) def test_as_string(self): eq = self.ndiffAssertEqual @@ -237,7 +237,7 @@ eq(text, str(msg)) fullrepr = msg.as_string(unixfrom=True) lines = fullrepr.split('\n') - self.failUnless(lines[0].startswith('From ')) + self.assertTrue(lines[0].startswith('From ')) eq(text, NL.join(lines[1:])) def test_bad_param(self): @@ -307,12 +307,12 @@ '"Jim&&Jill"') def test_field_containment(self): - unless = self.failUnless + unless = self.assertTrue msg = email.message_from_string('Header: exists') unless('header' in msg) unless('Header' in msg) unless('HEADER' in msg) - self.failIf('headerx' in msg) + self.assertFalse('headerx' in msg) def test_set_param(self): eq = self.assertEqual @@ -952,7 +952,7 @@ def test_add_header(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue self._au.add_header('Content-Disposition', 'attachment', filename='audiotest.au') eq(self._au['content-disposition'], @@ -992,7 +992,7 @@ def test_add_header(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue self._im.add_header('Content-Disposition', 'attachment', filename='dingusfish.gif') eq(self._im['content-disposition'], @@ -1036,7 +1036,7 @@ def test_types(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue eq(self._msg.get_content_type(), 'text/plain') eq(self._msg.get_param('charset'), 'us-ascii') missing = [] @@ -1046,7 +1046,7 @@ def test_payload(self): self.assertEqual(self._msg.get_payload(), 'hello there') - self.failUnless(not self._msg.is_multipart()) + self.assertTrue(not self._msg.is_multipart()) def test_charset(self): eq = self.assertEqual @@ -1097,7 +1097,7 @@ def test_hierarchy(self): # convenience eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue raises = self.assertRaises # tests m = self._msg @@ -1411,7 +1411,7 @@ -- XXXX-- ''') - self.failUnless(msg.is_multipart()) + self.assertTrue(msg.is_multipart()) eq(msg.get_boundary(), ' XXXX') eq(len(msg.get_payload()), 2) @@ -1441,7 +1441,7 @@ eq(msg.get_content_subtype(), 'plain') def test_same_boundary_inner_outer(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_15.txt') # XXX We can probably eventually do better inner = msg.get_payload(0) @@ -1451,7 +1451,7 @@ errors.StartBoundaryNotFoundDefect)) def test_multipart_no_boundary(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_25.txt') unless(isinstance(msg.get_payload(), str)) self.assertEqual(len(msg.defects), 2) @@ -1509,7 +1509,7 @@ """) def test_lying_multipart(self): - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_41.txt') unless(hasattr(msg, 'defects')) self.assertEqual(len(msg.defects), 2) @@ -1529,7 +1529,7 @@ # [*] This message is missing its start boundary bad = outer.get_payload(1).get_payload(0) self.assertEqual(len(bad.defects), 1) - self.failUnless(isinstance(bad.defects[0], + self.assertTrue(isinstance(bad.defects[0], errors.StartBoundaryNotFoundDefect)) def test_first_line_is_continuation_header(self): @@ -1539,7 +1539,7 @@ eq(msg.keys(), []) eq(msg.get_payload(), 'Line 2\nLine 3') eq(len(msg.defects), 1) - self.failUnless(isinstance(msg.defects[0], + self.assertTrue(isinstance(msg.defects[0], errors.FirstHeaderLineIsContinuationDefect)) eq(msg.defects[0].line, ' Line 1\n') @@ -1607,7 +1607,7 @@ def test_valid_argument(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue subject = 'A sub-message' m = Message() m['Subject'] = subject @@ -1651,20 +1651,20 @@ def test_parse_message_rfc822(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue msg = self._msgobj('msg_11.txt') eq(msg.get_content_type(), 'message/rfc822') payload = msg.get_payload() unless(isinstance(payload, list)) eq(len(payload), 1) submsg = payload[0] - self.failUnless(isinstance(submsg, Message)) + self.assertTrue(isinstance(submsg, Message)) eq(submsg['subject'], 'An enclosed message') eq(submsg.get_payload(), 'Here is the body of the message.\n') def test_dsn(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue # msg 16 is a Delivery Status Notification, see RFC 1894 msg = self._msgobj('msg_16.txt') eq(msg.get_content_type(), 'multipart/report') @@ -2002,7 +2002,7 @@ def test_content_type(self): eq = self.assertEquals - unless = self.failUnless + unless = self.assertTrue # Get a message object and reset the seek pointer for other tests msg, text = self._msgobj('msg_05.txt') eq(msg.get_content_type(), 'multipart/report') @@ -2024,7 +2024,7 @@ eq(msg2.get_payload(), 'Yadda yadda yadda\n') msg3 = msg.get_payload(2) eq(msg3.get_content_type(), 'message/rfc822') - self.failUnless(isinstance(msg3, Message)) + self.assertTrue(isinstance(msg3, Message)) payload = msg3.get_payload() unless(isinstance(payload, list)) eq(len(payload), 1) @@ -2034,7 +2034,7 @@ def test_parser(self): eq = self.assertEquals - unless = self.failUnless + unless = self.assertTrue msg, text = self._msgobj('msg_06.txt') # Check some of the outer headers eq(msg.get_content_type(), 'message/rfc822') @@ -2044,9 +2044,9 @@ unless(isinstance(payload, list)) eq(len(payload), 1) msg1 = payload[0] - self.failUnless(isinstance(msg1, Message)) + self.assertTrue(isinstance(msg1, Message)) eq(msg1.get_content_type(), 'text/plain') - self.failUnless(isinstance(msg1.get_payload(), str)) + self.assertTrue(isinstance(msg1.get_payload(), str)) eq(msg1.get_payload(), '\n') @@ -2077,7 +2077,7 @@ self.assertEqual(text, s.getvalue()) def test_message_from_string_with_class(self): - unless = self.failUnless + unless = self.assertTrue with openfile('msg_01.txt') as fp: text = fp.read() @@ -2095,7 +2095,7 @@ unless(isinstance(subpart, MyMessage)) def test_message_from_file_with_class(self): - unless = self.failUnless + unless = self.assertTrue # Create a subclass class MyMessage(Message): pass @@ -2217,7 +2217,7 @@ def test_charset_richcomparisons(self): eq = self.assertEqual - ne = self.failIfEqual + ne = self.assertNotEqual cset1 = Charset() cset2 = Charset() eq(cset1, 'us-ascii') @@ -2410,8 +2410,8 @@ eq(msg['from'], 'ppp-request at zzz.org') eq(msg['to'], 'ppp at zzz.org') eq(msg.get_content_type(), 'multipart/mixed') - self.failIf(msg.is_multipart()) - self.failUnless(isinstance(msg.get_payload(), str)) + self.assertFalse(msg.is_multipart()) + self.assertTrue(isinstance(msg.get_payload(), str)) def test_whitespace_continuation(self): eq = self.assertEqual @@ -2613,18 +2613,18 @@ def test_quopri_header_check(self): for c in self.hlit: - self.failIf(quoprimime.header_check(c), + self.assertFalse(quoprimime.header_check(c), 'Should not be header quopri encoded: %s' % chr(c)) for c in self.hnon: - self.failUnless(quoprimime.header_check(c), + self.assertTrue(quoprimime.header_check(c), 'Should be header quopri encoded: %s' % chr(c)) def test_quopri_body_check(self): for c in self.blit: - self.failIf(quoprimime.body_check(c), + self.assertFalse(quoprimime.body_check(c), 'Should not be body quopri encoded: %s' % chr(c)) for c in self.bnon: - self.failUnless(quoprimime.body_check(c), + self.assertTrue(quoprimime.body_check(c), 'Should be body quopri encoded: %s' % chr(c)) def test_header_quopri_len(self): @@ -2789,7 +2789,7 @@ h = Header("I am the very model of a modern Major-General; I've information vegetable, animal, and mineral; I know the kings of England, and I quote the fights historical from Marathon to Waterloo, in order categorical; I'm very well acquainted, too, with matters mathematical; I understand equations, both the simple and quadratical; about binomial theorem I'm teeming with a lot o' news, with many cheerful facts about the square of the hypotenuse.", maxlinelen=76) for l in h.encode(splitchars=' ').split('\n '): - self.failUnless(len(l) <= 76) + self.assertTrue(len(l) <= 76) def test_multilingual(self): eq = self.ndiffAssertEqual @@ -3166,7 +3166,7 @@ ''' msg = email.message_from_string(m) param = msg.get_param('NAME') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual( param, 'file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm') @@ -3319,7 +3319,7 @@ """ msg = email.message_from_string(m) param = msg.get_param('name') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual(param, "Frank's Document") def test_rfc2231_tick_attack_extended(self): @@ -3343,7 +3343,7 @@ """ msg = email.message_from_string(m) param = msg.get_param('name') - self.failIf(isinstance(param, tuple)) + self.assertFalse(isinstance(param, tuple)) self.assertEqual(param, "us-ascii'en-us'Frank's Document") def test_rfc2231_no_extended_values(self): Modified: python/branches/py3k/Lib/importlib/test/builtin/test_finder.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/builtin/test_finder.py (original) +++ python/branches/py3k/Lib/importlib/test/builtin/test_finder.py Wed Jul 1 01:06:06 2009 @@ -14,7 +14,7 @@ # Common case. with util.uncache(builtin_util.NAME): found = machinery.BuiltinImporter.find_module(builtin_util.NAME) - self.assert_(found) + self.assertTrue(found) def test_package(self): # Built-in modules cannot be a package. @@ -35,14 +35,14 @@ def test_failure(self): assert 'importlib' not in sys.builtin_module_names loader = machinery.BuiltinImporter.find_module('importlib') - self.assert_(loader is None) + self.assertTrue(loader is None) def test_ignore_path(self): # The value for 'path' should always trigger a failed import. with util.uncache(builtin_util.NAME): loader = machinery.BuiltinImporter.find_module(builtin_util.NAME, ['pkg']) - self.assert_(loader is None) + self.assertTrue(loader is None) Modified: python/branches/py3k/Lib/importlib/test/builtin/test_loader.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/builtin/test_loader.py (original) +++ python/branches/py3k/Lib/importlib/test/builtin/test_loader.py Wed Jul 1 01:06:06 2009 @@ -18,10 +18,10 @@ def verify(self, module): """Verify that the module matches against what it should have.""" - self.assert_(isinstance(module, types.ModuleType)) + self.assertTrue(isinstance(module, types.ModuleType)) for attr, value in self.verification.items(): self.assertEqual(getattr(module, attr), value) - self.assert_(module.__name__ in sys.modules) + self.assertTrue(module.__name__ in sys.modules) load_module = staticmethod(lambda name: machinery.BuiltinImporter.load_module(name)) @@ -49,7 +49,7 @@ with util.uncache(builtin_util.NAME): module1 = self.load_module(builtin_util.NAME) module2 = self.load_module(builtin_util.NAME) - self.assert_(module1 is module2) + self.assertTrue(module1 is module2) def test_unloadable(self): name = 'dssdsdfff' @@ -70,17 +70,17 @@ def test_get_code(self): # There is no code object. result = machinery.BuiltinImporter.get_code(builtin_util.NAME) - self.assert_(result is None) + self.assertTrue(result is None) def test_get_source(self): # There is no source. result = machinery.BuiltinImporter.get_source(builtin_util.NAME) - self.assert_(result is None) + self.assertTrue(result is None) def test_is_package(self): # Cannot be a package. result = machinery.BuiltinImporter.is_package(builtin_util.NAME) - self.assert_(not result) + self.assertTrue(not result) def test_not_builtin(self): # Modules not built-in should raise ImportError. Modified: python/branches/py3k/Lib/importlib/test/extension/test_finder.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/extension/test_finder.py (original) +++ python/branches/py3k/Lib/importlib/test/extension/test_finder.py Wed Jul 1 01:06:06 2009 @@ -13,7 +13,7 @@ return importer.find_module(fullname) def test_module(self): - self.assert_(self.find_module(util.NAME)) + self.assertTrue(self.find_module(util.NAME)) def test_package(self): # Extension modules cannot be an __init__ for a package. @@ -32,7 +32,7 @@ pass def test_failure(self): - self.assert_(self.find_module('asdfjkl;') is None) + self.assertTrue(self.find_module('asdfjkl;') is None) # XXX Raise an exception if someone tries to use the 'path' argument? Modified: python/branches/py3k/Lib/importlib/test/extension/test_loader.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/extension/test_loader.py (original) +++ python/branches/py3k/Lib/importlib/test/extension/test_loader.py Wed Jul 1 01:06:06 2009 @@ -23,8 +23,8 @@ ('__file__', ext_util.FILEPATH), ('__package__', '')]: self.assertEqual(getattr(module, attr), value) - self.assert_(ext_util.NAME in sys.modules) - self.assert_(isinstance(module.__loader__, + self.assertTrue(ext_util.NAME in sys.modules) + self.assertTrue(isinstance(module.__loader__, _bootstrap._ExtensionFileLoader)) def test_package(self): @@ -39,7 +39,7 @@ with util.uncache(ext_util.NAME): module1 = self.load_module(ext_util.NAME) module2 = self.load_module(ext_util.NAME) - self.assert_(module1 is module2) + self.assertTrue(module1 is module2) def test_state_after_failure(self): # No easy way to trigger a failure after a successful import. Modified: python/branches/py3k/Lib/importlib/test/extension/test_path_hook.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/extension/test_path_hook.py (original) +++ python/branches/py3k/Lib/importlib/test/extension/test_path_hook.py Wed Jul 1 01:06:06 2009 @@ -19,7 +19,7 @@ def test_success(self): # Path hook should handle a directory where a known extension module # exists. - self.assert_(hasattr(self.hook(util.PATH), 'find_module')) + self.assertTrue(hasattr(self.hook(util.PATH), 'find_module')) def test_main(): Modified: python/branches/py3k/Lib/importlib/test/frozen/test_finder.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/frozen/test_finder.py (original) +++ python/branches/py3k/Lib/importlib/test/frozen/test_finder.py Wed Jul 1 01:06:06 2009 @@ -15,15 +15,15 @@ def test_module(self): name = '__hello__' loader = self.find(name) - self.assert_(hasattr(loader, 'load_module')) + self.assertTrue(hasattr(loader, 'load_module')) def test_package(self): loader = self.find('__phello__') - self.assert_(hasattr(loader, 'load_module')) + self.assertTrue(hasattr(loader, 'load_module')) def test_module_in_package(self): loader = self.find('__phello__.spam', ['__phello__']) - self.assert_(hasattr(loader, 'load_module')) + self.assertTrue(hasattr(loader, 'load_module')) def test_package_in_package(self): # No frozen package within another package to test with. @@ -35,7 +35,7 @@ def test_failure(self): loader = self.find('') - self.assert_(loader is None) + self.assertTrue(loader is None) def test_main(): Modified: python/branches/py3k/Lib/importlib/test/frozen/test_loader.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/frozen/test_loader.py (original) +++ python/branches/py3k/Lib/importlib/test/frozen/test_loader.py Wed Jul 1 01:06:06 2009 @@ -43,7 +43,7 @@ with util.uncache('__hello__'): module1 = machinery.FrozenImporter.load_module('__hello__') module2 = machinery.FrozenImporter.load_module('__hello__') - self.assert_(module1 is module2) + self.assertTrue(module1 is module2) def test_state_after_failure(self): # No way to trigger an error in a frozen module. @@ -65,12 +65,12 @@ code = machinery.FrozenImporter.get_code(name) mod = imp.new_module(name) exec(code, mod.__dict__) - self.assert_(hasattr(mod, 'initialized')) + self.assertTrue(hasattr(mod, 'initialized')) def test_get_source(self): # Should always return None. result = machinery.FrozenImporter.get_source('__hello__') - self.assert_(result is None) + self.assertTrue(result is None) def test_is_package(self): # Should be able to tell what is a package. @@ -78,7 +78,7 @@ ('__phello__.spam', False)) for name, is_package in test_for: result = machinery.FrozenImporter.is_package(name) - self.assert_(bool(result) == is_package) + self.assertTrue(bool(result) == is_package) def test_failure(self): # Raise ImportError for modules that are not frozen. Modified: python/branches/py3k/Lib/importlib/test/import_/test_caching.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/import_/test_caching.py (original) +++ python/branches/py3k/Lib/importlib/test/import_/test_caching.py Wed Jul 1 01:06:06 2009 @@ -53,8 +53,8 @@ with self.create_mock('pkg.__init__', 'pkg.module') as importer: with util.import_state(meta_path=[importer]): module = import_util.import_('pkg.module') - self.assert_(hasattr(module, 'module')) - self.assert_(id(module.module), id(sys.modules['pkg.module'])) + self.assertTrue(hasattr(module, 'module')) + self.assertTrue(id(module.module), id(sys.modules['pkg.module'])) # See test_using_cache_after_loader() for reasoning. @import_util.importlib_only @@ -63,7 +63,7 @@ with self.create_mock('pkg.__init__', 'pkg.module') as importer: with util.import_state(meta_path=[importer]): module = import_util.import_('pkg', fromlist=['module']) - self.assert_(hasattr(module, 'module')) + self.assertTrue(hasattr(module, 'module')) self.assertEquals(id(module.module), id(sys.modules['pkg.module'])) Modified: python/branches/py3k/Lib/importlib/test/import_/test_fromlist.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/import_/test_fromlist.py (original) +++ python/branches/py3k/Lib/importlib/test/import_/test_fromlist.py Wed Jul 1 01:06:06 2009 @@ -59,7 +59,7 @@ with util.import_state(meta_path=[importer]): module = import_util.import_('module', fromlist=['non_existent']) self.assertEquals(module.__name__, 'module') - self.assert_(not hasattr(module, 'non_existent')) + self.assertTrue(not hasattr(module, 'non_existent')) def test_module_from_package(self): # [module] @@ -67,7 +67,7 @@ with util.import_state(meta_path=[importer]): module = import_util.import_('pkg', fromlist=['module']) self.assertEquals(module.__name__, 'pkg') - self.assert_(hasattr(module, 'module')) + self.assertTrue(hasattr(module, 'module')) self.assertEquals(module.module.__name__, 'pkg.module') def test_no_module_from_package(self): @@ -76,7 +76,7 @@ with util.import_state(meta_path=[importer]): module = import_util.import_('pkg', fromlist='non_existent') self.assertEquals(module.__name__, 'pkg') - self.assert_(not hasattr(module, 'non_existent')) + self.assertTrue(not hasattr(module, 'non_existent')) def test_empty_string(self): with util.mock_modules('pkg.__init__', 'pkg.mod') as importer: @@ -91,7 +91,7 @@ mock['pkg'].__all__ = ['module'] module = import_util.import_('pkg', fromlist=['*']) self.assertEquals(module.__name__, 'pkg') - self.assert_(hasattr(module, 'module')) + self.assertTrue(hasattr(module, 'module')) self.assertEqual(module.module.__name__, 'pkg.module') def test_star_with_others(self): @@ -102,8 +102,8 @@ mock['pkg'].__all__ = ['module1'] module = import_util.import_('pkg', fromlist=['module2', '*']) self.assertEquals(module.__name__, 'pkg') - self.assert_(hasattr(module, 'module1')) - self.assert_(hasattr(module, 'module2')) + self.assertTrue(hasattr(module, 'module1')) + self.assertTrue(hasattr(module, 'module2')) self.assertEquals(module.module1.__name__, 'pkg.module1') self.assertEquals(module.module2.__name__, 'pkg.module2') Modified: python/branches/py3k/Lib/importlib/test/import_/test_meta_path.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/import_/test_meta_path.py (original) +++ python/branches/py3k/Lib/importlib/test/import_/test_meta_path.py Wed Jul 1 01:06:06 2009 @@ -64,7 +64,7 @@ self.assertEquals(len(args), 2) self.assertEquals(len(kwargs), 0) self.assertEquals(args[0], mod_name) - self.assert_(args[1] is None) + self.assertTrue(args[1] is None) def test_with_path(self): # [path set] @@ -82,9 +82,9 @@ args = log[1][0] kwargs = log[1][1] # Assuming all arguments are positional. - self.assert_(not kwargs) + self.assertTrue(not kwargs) self.assertEquals(args[0], mod_name) - self.assert_(args[1] is path) + self.assertTrue(args[1] is path) Modified: python/branches/py3k/Lib/importlib/test/import_/test_packages.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/import_/test_packages.py (original) +++ python/branches/py3k/Lib/importlib/test/import_/test_packages.py Wed Jul 1 01:06:06 2009 @@ -13,7 +13,7 @@ with util.mock_modules('pkg.__init__', 'pkg.module') as mock: with util.import_state(meta_path=[mock]): module = import_util.import_('pkg.module') - self.assert_('pkg' in sys.modules) + self.assertTrue('pkg' in sys.modules) def test_bad_parent(self): with util.mock_modules('pkg.module') as mock: Modified: python/branches/py3k/Lib/importlib/test/import_/test_path.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/import_/test_path.py (original) +++ python/branches/py3k/Lib/importlib/test/import_/test_path.py Wed Jul 1 01:06:06 2009 @@ -19,7 +19,7 @@ # Test None returned upon not finding a suitable finder. module = '' with util.import_state(): - self.assert_(machinery.PathFinder.find_module(module) is None) + self.assertTrue(machinery.PathFinder.find_module(module) is None) def test_sys_path(self): # Test that sys.path is used when 'path' is None. @@ -30,7 +30,7 @@ with util.import_state(path_importer_cache={path: importer}, path=[path]): loader = machinery.PathFinder.find_module(module) - self.assert_(loader is importer) + self.assertTrue(loader is importer) def test_path(self): # Test that 'path' is used when set. @@ -40,7 +40,7 @@ importer = util.mock_modules(module) with util.import_state(path_importer_cache={path: importer}): loader = machinery.PathFinder.find_module(module, [path]) - self.assert_(loader is importer) + self.assertTrue(loader is importer) def test_path_hooks(self): # Test that sys.path_hooks is used. @@ -51,16 +51,16 @@ hook = import_util.mock_path_hook(path, importer=importer) with util.import_state(path_hooks=[hook]): loader = machinery.PathFinder.find_module(module, [path]) - self.assert_(loader is importer) - self.assert_(path in sys.path_importer_cache) - self.assert_(sys.path_importer_cache[path] is importer) + self.assertTrue(loader is importer) + self.assertTrue(path in sys.path_importer_cache) + self.assertTrue(sys.path_importer_cache[path] is importer) def test_path_importer_cache_has_None(self): # Test that if sys.path_importer_cache has None that None is returned. clear_cache = {path: None for path in sys.path} with util.import_state(path_importer_cache=clear_cache): for name in ('asynchat', 'sys', ''): - self.assert_(machinery.PathFinder.find_module(name) is None) + self.assertTrue(machinery.PathFinder.find_module(name) is None) def test_path_importer_cache_has_None_continues(self): # Test that having None in sys.path_importer_cache causes the search to @@ -71,7 +71,7 @@ with util.import_state(path=['1', '2'], path_importer_cache={'1': None, '2': importer}): loader = machinery.PathFinder.find_module(module) - self.assert_(loader is importer) + self.assertTrue(loader is importer) @@ -88,15 +88,15 @@ with util.import_state(): nothing = _bootstrap._DefaultPathFinder.find_module(module, path=[existing_path]) - self.assert_(nothing is None) - self.assert_(existing_path in sys.path_importer_cache) - self.assert_(not isinstance(sys.path_importer_cache[existing_path], + self.assertTrue(nothing is None) + self.assertTrue(existing_path in sys.path_importer_cache) + self.assertTrue(not isinstance(sys.path_importer_cache[existing_path], imp.NullImporter)) nothing = _bootstrap._DefaultPathFinder.find_module(module, path=[bad_path]) - self.assert_(nothing is None) - self.assert_(bad_path in sys.path_importer_cache) - self.assert_(isinstance(sys.path_importer_cache[bad_path], + self.assertTrue(nothing is None) + self.assertTrue(bad_path in sys.path_importer_cache) + self.assertTrue(isinstance(sys.path_importer_cache[bad_path], imp.NullImporter)) def test_path_importer_cache_has_None(self): @@ -113,7 +113,7 @@ with util.import_state(path_importer_cache={path: None}): loader = _bootstrap._DefaultPathFinder.find_module(module, path=[path]) - self.assert_(loader is importer) + self.assertTrue(loader is importer) finally: _bootstrap._DEFAULT_PATH_HOOK = original_hook Modified: python/branches/py3k/Lib/importlib/test/import_/test_relative_imports.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/import_/test_relative_imports.py (original) +++ python/branches/py3k/Lib/importlib/test/import_/test_relative_imports.py Wed Jul 1 01:06:06 2009 @@ -79,7 +79,7 @@ import_util.import_('pkg') # For __import__(). module = import_util.import_('', global_, fromlist=['mod2'], level=1) self.assertEqual(module.__name__, 'pkg') - self.assert_(hasattr(module, 'mod2')) + self.assertTrue(hasattr(module, 'mod2')) self.assertEqual(module.mod2.attr, 'pkg.mod2') self.relative_import_test(create, globals_, callback) @@ -105,7 +105,7 @@ module = import_util.import_('', global_, fromlist=['module'], level=1) self.assertEqual(module.__name__, 'pkg') - self.assert_(hasattr(module, 'module')) + self.assertTrue(hasattr(module, 'module')) self.assertEqual(module.module.attr, 'pkg.module') self.relative_import_test(create, globals_, callback) @@ -129,7 +129,7 @@ module = import_util.import_('', global_, fromlist=['subpkg2'], level=2) self.assertEqual(module.__name__, 'pkg') - self.assert_(hasattr(module, 'subpkg2')) + self.assertTrue(hasattr(module, 'subpkg2')) self.assertEqual(module.subpkg2.attr, 'pkg.subpkg2.__init__') def test_deep_import(self): Modified: python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py (original) +++ python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py Wed Jul 1 01:06:06 2009 @@ -133,10 +133,10 @@ mock = self.mocker({name: path}) with util.uncache(name): module = mock.load_module(name) - self.assert_(name in sys.modules) + self.assertTrue(name in sys.modules) self.eq_attrs(module, __name__=name, __file__=path, __package__='', __loader__=mock) - self.assert_(not hasattr(module, '__path__')) + self.assertTrue(not hasattr(module, '__path__')) return mock, name def test_package(self): @@ -145,7 +145,7 @@ mock = self.mocker({name: path}) with util.uncache(name): module = mock.load_module(name) - self.assert_(name in sys.modules) + self.assertTrue(name in sys.modules) self.eq_attrs(module, __name__=name, __file__=path, __path__=[os.path.dirname(path)], __package__=name, __loader__=mock) @@ -171,8 +171,8 @@ with util.uncache(name): sys.modules[name] = module loaded_module = mock.load_module(name) - self.assert_(loaded_module is module) - self.assert_(sys.modules[name] is module) + self.assertTrue(loaded_module is module) + self.assertTrue(sys.modules[name] is module) return mock, name def test_state_after_failure(self): @@ -184,8 +184,8 @@ with util.uncache(name): sys.modules[name] = module self.assertRaises(ZeroDivisionError, mock.load_module, name) - self.assert_(sys.modules[name] is module) - self.assert_(hasattr(module, 'blah')) + self.assertTrue(sys.modules[name] is module) + self.assertTrue(hasattr(module, 'blah')) return mock def test_unloadable(self): @@ -194,7 +194,7 @@ mock.source = b"1/0" with util.uncache(name): self.assertRaises(ZeroDivisionError, mock.load_module, name) - self.assert_(name not in sys.modules) + self.assertTrue(name not in sys.modules) return mock @@ -293,7 +293,7 @@ sys.dont_write_bytecode = dont_write_bytecode with util.uncache(name): mock.load_module(name) - self.assert_((name in mock.module_bytecode) is not + self.assertTrue((name in mock.module_bytecode) is not dont_write_bytecode) def test_no_bytecode_written(self): @@ -319,7 +319,7 @@ 'magic': bad_magic}}) with util.uncache(name): mock.load_module(name) - self.assert_(name in mock.module_bytecode) + self.assertTrue(name in mock.module_bytecode) magic = mock.module_bytecode[name][:4] self.assertEqual(magic, imp.get_magic()) @@ -332,7 +332,7 @@ {name: {'path': 'path/to/mod.bytecode', 'mtime': old_mtime}}) with util.uncache(name): mock.load_module(name) - self.assert_(name in mock.module_bytecode) + self.assertTrue(name in mock.module_bytecode) mtime = importlib._r_long(mock.module_bytecode[name][4:8]) self.assertEqual(mtime, PyPycLoaderMock.default_mtime) Modified: python/branches/py3k/Lib/importlib/test/source/test_file_loader.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/source/test_file_loader.py (original) +++ python/branches/py3k/Lib/importlib/test/source/test_file_loader.py Wed Jul 1 01:06:06 2009 @@ -23,7 +23,7 @@ loader = _bootstrap._PyPycFileLoader('_temp', mapping['_temp'], False) module = loader.load_module('_temp') - self.assert_('_temp' in sys.modules) + self.assertTrue('_temp' in sys.modules) check = {'__name__': '_temp', '__file__': mapping['_temp'], '__package__': ''} for attr, value in check.items(): @@ -35,7 +35,7 @@ mapping['_pkg.__init__'], True) module = loader.load_module('_pkg') - self.assert_('_pkg' in sys.modules) + self.assertTrue('_pkg' in sys.modules) check = {'__name__': '_pkg', '__file__': mapping['_pkg.__init__'], '__path__': [os.path.dirname(mapping['_pkg.__init__'])], '__package__': '_pkg'} @@ -48,7 +48,7 @@ loader = _bootstrap._PyPycFileLoader('_pkg.mod', mapping['_pkg.mod'], False) module = loader.load_module('_pkg.mod') - self.assert_('_pkg.mod' in sys.modules) + self.assertTrue('_pkg.mod' in sys.modules) check = {'__name__': '_pkg.mod', '__file__': mapping['_pkg.mod'], '__package__': '_pkg'} for attr, value in check.items(): @@ -73,7 +73,7 @@ # than the original mtime. loader.source_mtime = self.fake_mtime(loader.source_mtime) module = loader.load_module('_temp') - self.assert_('testing_var' in module.__dict__, + self.assertTrue('testing_var' in module.__dict__, "'testing_var' not in " "{0}".format(list(module.__dict__.keys()))) self.assertEqual(module, sys.modules['_temp']) @@ -105,7 +105,7 @@ loader = _bootstrap._PyPycFileLoader('_temp', mapping['_temp'], False) self.assertRaises(SyntaxError, loader.load_module, '_temp') - self.assert_('_temp' not in sys.modules) + self.assertTrue('_temp' not in sys.modules) class BadBytecodeTest(unittest.TestCase): @@ -124,7 +124,7 @@ def import_(self, file, module_name): loader = _bootstrap._PyPycFileLoader(module_name, file, False) module = loader.load_module(module_name) - self.assert_(module_name in sys.modules) + self.assertTrue(module_name in sys.modules) # [bad magic] @source_util.writes_bytecode_files @@ -168,7 +168,7 @@ bytecode_file.write(b'AAAA') self.assertRaises(ValueError, self.import_, mapping['_temp'], '_temp') - self.assert_('_temp' not in sys.modules) + self.assertTrue('_temp' not in sys.modules) def test_main(): Modified: python/branches/py3k/Lib/importlib/test/source/test_finder.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/source/test_finder.py (original) +++ python/branches/py3k/Lib/importlib/test/source/test_finder.py Wed Jul 1 01:06:06 2009 @@ -53,7 +53,7 @@ for name in unlink: os.unlink(mapping[name]) loader = self.import_(mapping['.root'], test) - self.assert_(hasattr(loader, 'load_module')) + self.assertTrue(hasattr(loader, 'load_module')) return loader def test_module(self): @@ -79,7 +79,7 @@ with source_util.create_modules('pkg.__init__', 'pkg.sub') as mapping: pkg_dir = os.path.dirname(mapping['pkg.__init__']) loader = self.import_(pkg_dir, 'pkg.sub') - self.assert_(hasattr(loader, 'load_module')) + self.assertTrue(hasattr(loader, 'load_module')) # [sub package] def test_package_in_package(self): @@ -87,7 +87,7 @@ with context as mapping: pkg_dir = os.path.dirname(mapping['pkg.__init__']) loader = self.import_(pkg_dir, 'pkg.sub') - self.assert_(hasattr(loader, 'load_module')) + self.assertTrue(hasattr(loader, 'load_module')) # [sub empty] def test_empty_sub_directory(self): @@ -105,13 +105,13 @@ # XXX This is not a blackbox test! name = '_temp' loader = self.run_test(name, {'{0}.__init__'.format(name), name}) - self.assert_('__init__' in loader._base_path) + self.assertTrue('__init__' in loader._base_path) def test_failure(self): with source_util.create_modules('blah') as mapping: nothing = self.import_(mapping['.root'], 'sdfsadsadf') - self.assert_(nothing is None) + self.assertTrue(nothing is None) # [empty dir] def test_empty_dir(self): Modified: python/branches/py3k/Lib/importlib/test/source/test_path_hook.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/source/test_path_hook.py (original) +++ python/branches/py3k/Lib/importlib/test/source/test_path_hook.py Wed Jul 1 01:06:06 2009 @@ -10,7 +10,7 @@ def test_success(self): # XXX Only work on existing directories? with source_util.create_modules('dummy') as mapping: - self.assert_(hasattr(_bootstrap._FileFinder(mapping['.root']), + self.assertTrue(hasattr(_bootstrap._FileFinder(mapping['.root']), 'find_module')) Modified: python/branches/py3k/Lib/importlib/test/test_abc.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/test_abc.py (original) +++ python/branches/py3k/Lib/importlib/test/test_abc.py Wed Jul 1 01:06:06 2009 @@ -11,7 +11,7 @@ def verify(self, ABC, *classes): """Verify the classes are subclasses of the ABC.""" for cls in classes: - self.assert_(issubclass(cls, ABC)) + self.assertTrue(issubclass(cls, ABC)) def test_Finder(self): self.verify(abc.Finder, machinery.BuiltinImporter, Modified: python/branches/py3k/Lib/importlib/test/test_util.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/test_util.py (original) +++ python/branches/py3k/Lib/importlib/test/test_util.py Wed Jul 1 01:06:06 2009 @@ -29,8 +29,8 @@ module_name = 'a.b.c' with test_util.uncache(module_name): module = self.return_module(module_name) - self.assert_(module_name in sys.modules) - self.assert_(isinstance(module, types.ModuleType)) + self.assertTrue(module_name in sys.modules) + self.assertTrue(isinstance(module, types.ModuleType)) self.assertEqual(module.__name__, module_name) def test_reload(self): @@ -40,7 +40,7 @@ with test_util.uncache(name): sys.modules[name] = module returned_module = self.return_module(name) - self.assert_(sys.modules[name] is returned_module) + self.assertTrue(sys.modules[name] is returned_module) def test_new_module_failure(self): # Test that a module is removed from sys.modules if added but an @@ -48,7 +48,7 @@ name = 'a.b.c' with test_util.uncache(name): self.raise_exception(name) - self.assert_(name not in sys.modules) + self.assertTrue(name not in sys.modules) def test_reload_failure(self): # Test that a failure on reload leaves the module in-place. @@ -57,7 +57,7 @@ with test_util.uncache(name): sys.modules[name] = module self.raise_exception(name) - self.assert_(sys.modules[name] is module) + self.assertTrue(sys.modules[name] is module) class SetPackageTests(unittest.TestCase): @@ -71,7 +71,7 @@ fxn = lambda: module wrapped = util.set_package(fxn) wrapped() - self.assert_(hasattr(module, '__package__')) + self.assertTrue(hasattr(module, '__package__')) self.assertEqual(expect, module.__package__) def test_top_level(self): Modified: python/branches/py3k/Lib/json/tests/test_decode.py ============================================================================== --- python/branches/py3k/Lib/json/tests/test_decode.py (original) +++ python/branches/py3k/Lib/json/tests/test_decode.py Wed Jul 1 01:06:06 2009 @@ -8,12 +8,12 @@ class TestDecode(TestCase): def test_decimal(self): rval = json.loads('1.1', parse_float=decimal.Decimal) - self.assert_(isinstance(rval, decimal.Decimal)) + self.assertTrue(isinstance(rval, decimal.Decimal)) self.assertEquals(rval, decimal.Decimal('1.1')) def test_float(self): rval = json.loads('1', parse_int=float) - self.assert_(isinstance(rval, float)) + self.assertTrue(isinstance(rval, float)) self.assertEquals(rval, 1.0) def test_object_pairs_hook(self): Modified: python/branches/py3k/Lib/json/tests/test_speedups.py ============================================================================== --- python/branches/py3k/Lib/json/tests/test_speedups.py (original) +++ python/branches/py3k/Lib/json/tests/test_speedups.py Wed Jul 1 01:06:06 2009 @@ -7,9 +7,9 @@ class TestSpeedups(TestCase): def test_scanstring(self): self.assertEquals(decoder.scanstring.__module__, "_json") - self.assert_(decoder.scanstring is decoder.c_scanstring) + self.assertTrue(decoder.scanstring is decoder.c_scanstring) def test_encode_basestring_ascii(self): self.assertEquals(encoder.encode_basestring_ascii.__module__, "_json") - self.assert_(encoder.encode_basestring_ascii is + self.assertTrue(encoder.encode_basestring_ascii is encoder.c_encode_basestring_ascii) Modified: python/branches/py3k/Lib/test/mapping_tests.py ============================================================================== --- python/branches/py3k/Lib/test/mapping_tests.py (original) +++ python/branches/py3k/Lib/test/mapping_tests.py Wed Jul 1 01:06:06 2009 @@ -50,15 +50,15 @@ for key, value in self.reference.items(): self.assertEqual(d[key], value) knownkey = list(self.other.keys())[0] - self.failUnlessRaises(KeyError, lambda:d[knownkey]) + self.assertRaises(KeyError, lambda:d[knownkey]) #len self.assertEqual(len(p), 0) self.assertEqual(len(d), len(self.reference)) #__contains__ for k in self.reference: - self.assert_(k in d) + self.assertTrue(k in d) for k in self.other: - self.failIf(k in d) + self.assertFalse(k in d) #cmp self.assertEqual(p, p) self.assertEqual(d, d) @@ -69,10 +69,10 @@ if not d: self.fail("Full mapping must compare to True") # keys(), items(), iterkeys() ... def check_iterandlist(iter, lst, ref): - self.assert_(hasattr(iter, '__next__')) - self.assert_(hasattr(iter, '__iter__')) + self.assertTrue(hasattr(iter, '__next__')) + self.assertTrue(hasattr(iter, '__iter__')) x = list(iter) - self.assert_(set(x)==set(lst)==set(ref)) + self.assertTrue(set(x)==set(lst)==set(ref)) check_iterandlist(iter(d.keys()), list(d.keys()), self.reference.keys()) check_iterandlist(iter(d), list(d.keys()), self.reference.keys()) @@ -85,7 +85,7 @@ knownkey, knownvalue = next(iter(self.other.items())) self.assertEqual(d.get(key, knownvalue), value) self.assertEqual(d.get(knownkey, knownvalue), knownvalue) - self.failIf(knownkey in d) + self.assertFalse(knownkey in d) def test_write(self): # Test for write operations on mapping @@ -96,7 +96,7 @@ self.assertEqual(p[key], value) for key in self.reference.keys(): del p[key] - self.failUnlessRaises(KeyError, lambda:p[key]) + self.assertRaises(KeyError, lambda:p[key]) p = self._empty_mapping() #update p.update(self.reference) @@ -115,16 +115,16 @@ self.assertEqual(d[knownkey], knownvalue) #pop self.assertEqual(d.pop(knownkey), knownvalue) - self.failIf(knownkey in d) + self.assertFalse(knownkey in d) self.assertRaises(KeyError, d.pop, knownkey) default = 909 d[knownkey] = knownvalue self.assertEqual(d.pop(knownkey, default), knownvalue) - self.failIf(knownkey in d) + self.assertFalse(knownkey in d) self.assertEqual(d.pop(knownkey, default), default) #popitem key, value = d.popitem() - self.failIf(key in d) + self.assertFalse(key in d) self.assertEqual(value, self.reference[key]) p=self._empty_mapping() self.assertRaises(KeyError, p.popitem) @@ -133,17 +133,17 @@ self.assertEqual(self._empty_mapping(), self._empty_mapping()) def test_bool(self): - self.assert_(not self._empty_mapping()) - self.assert_(self.reference) - self.assert_(bool(self._empty_mapping()) is False) - self.assert_(bool(self.reference) is True) + self.assertTrue(not self._empty_mapping()) + self.assertTrue(self.reference) + self.assertTrue(bool(self._empty_mapping()) is False) + self.assertTrue(bool(self.reference) is True) def test_keys(self): d = self._empty_mapping() self.assertEqual(list(d.keys()), []) d = self.reference - self.assert_(list(self.inmapping.keys())[0] in d.keys()) - self.assert_(list(self.other.keys())[0] not in d.keys()) + self.assertTrue(list(self.inmapping.keys())[0] in d.keys()) + self.assertTrue(list(self.other.keys())[0] not in d.keys()) self.assertRaises(TypeError, d.keys, None) def test_values(self): @@ -268,10 +268,10 @@ def test_get(self): d = self._empty_mapping() - self.assert_(d.get(list(self.other.keys())[0]) is None) + self.assertTrue(d.get(list(self.other.keys())[0]) is None) self.assertEqual(d.get(list(self.other.keys())[0], 3), 3) d = self.reference - self.assert_(d.get(list(self.other.keys())[0]) is None) + self.assertTrue(d.get(list(self.other.keys())[0]) is None) self.assertEqual(d.get(list(self.other.keys())[0], 3), 3) self.assertEqual(d.get(list(self.inmapping.keys())[0]), list(self.inmapping.values())[0]) @@ -304,15 +304,15 @@ class TestMappingProtocol(BasicTestMappingProtocol): def test_constructor(self): BasicTestMappingProtocol.test_constructor(self) - self.assert_(self._empty_mapping() is not self._empty_mapping()) + self.assertTrue(self._empty_mapping() is not self._empty_mapping()) self.assertEqual(self.type2test(x=1, y=2), {"x": 1, "y": 2}) def test_bool(self): BasicTestMappingProtocol.test_bool(self) - self.assert_(not self._empty_mapping()) - self.assert_(self._full_mapping({"x": "y"})) - self.assert_(bool(self._empty_mapping()) is False) - self.assert_(bool(self._full_mapping({"x": "y"})) is True) + self.assertTrue(not self._empty_mapping()) + self.assertTrue(self._full_mapping({"x": "y"})) + self.assertTrue(bool(self._empty_mapping()) is False) + self.assertTrue(bool(self._full_mapping({"x": "y"})) is True) def test_keys(self): BasicTestMappingProtocol.test_keys(self) @@ -320,9 +320,9 @@ self.assertEqual(list(d.keys()), []) d = self._full_mapping({'a': 1, 'b': 2}) k = d.keys() - self.assert_('a' in k) - self.assert_('b' in k) - self.assert_('c' not in k) + self.assertTrue('a' in k) + self.assertTrue('b' in k) + self.assertTrue('c' not in k) def test_values(self): BasicTestMappingProtocol.test_values(self) @@ -337,12 +337,12 @@ def test_contains(self): d = self._empty_mapping() - self.assert_(not ('a' in d)) - self.assert_('a' not in d) + self.assertTrue(not ('a' in d)) + self.assertTrue('a' not in d) d = self._full_mapping({'a': 1, 'b': 2}) - self.assert_('a' in d) - self.assert_('b' in d) - self.assert_('c' not in d) + self.assertTrue('a' in d) + self.assertTrue('b' in d) + self.assertTrue('c' not in d) self.assertRaises(TypeError, d.__contains__) @@ -421,7 +421,7 @@ def test_fromkeys(self): self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) d = self._empty_mapping() - self.assert_(not(d.fromkeys('abc') is d)) + self.assertTrue(not(d.fromkeys('abc') is d)) self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) self.assertEqual(d.fromkeys([]), {}) @@ -432,17 +432,17 @@ class dictlike(self.type2test): pass self.assertEqual(dictlike.fromkeys('a'), {'a':None}) self.assertEqual(dictlike().fromkeys('a'), {'a':None}) - self.assert_(dictlike.fromkeys('a').__class__ is dictlike) - self.assert_(dictlike().fromkeys('a').__class__ is dictlike) + self.assertTrue(dictlike.fromkeys('a').__class__ is dictlike) + self.assertTrue(dictlike().fromkeys('a').__class__ is dictlike) # FIXME: the following won't work with UserDict, because it's an old style class - # self.assert_(type(dictlike.fromkeys('a')) is dictlike) + # self.assertTrue(type(dictlike.fromkeys('a')) is dictlike) class mydict(self.type2test): def __new__(cls): return collections.UserDict() ud = mydict.fromkeys('ab') self.assertEqual(ud, {'a':None, 'b':None}) # FIXME: the following won't work with UserDict, because it's an old style class - # self.assert_(isinstance(ud, collections.UserDict)) + # self.assertTrue(isinstance(ud, collections.UserDict)) self.assertRaises(TypeError, dict.fromkeys) class Exc(Exception): pass @@ -472,16 +472,16 @@ self.assertEqual(d.copy(), {1:1, 2:2, 3:3}) d = self._empty_mapping() self.assertEqual(d.copy(), d) - self.assert_(isinstance(d.copy(), d.__class__)) + self.assertTrue(isinstance(d.copy(), d.__class__)) self.assertRaises(TypeError, d.copy, None) def test_get(self): BasicTestMappingProtocol.test_get(self) d = self._empty_mapping() - self.assert_(d.get('c') is None) + self.assertTrue(d.get('c') is None) self.assertEqual(d.get('c', 3), 3) d = self._full_mapping({'a' : 1, 'b' : 2}) - self.assert_(d.get('c') is None) + self.assertTrue(d.get('c') is None) self.assertEqual(d.get('c', 3), 3) self.assertEqual(d.get('a'), 1) self.assertEqual(d.get('a', 3), 1) @@ -489,9 +489,9 @@ def test_setdefault(self): BasicTestMappingProtocol.test_setdefault(self) d = self._empty_mapping() - self.assert_(d.setdefault('key0') is None) + self.assertTrue(d.setdefault('key0') is None) d.setdefault('key0', []) - self.assert_(d.setdefault('key0') is None) + self.assertTrue(d.setdefault('key0') is None) d.setdefault('key', []).append(3) self.assertEqual(d['key'][0], 3) d.setdefault('key', []).append(4) @@ -517,9 +517,9 @@ self.assertEqual(va, int(ka)) kb, vb = tb = b.popitem() self.assertEqual(vb, int(kb)) - self.assert_(not(copymode < 0 and ta != tb)) - self.assert_(not a) - self.assert_(not b) + self.assertTrue(not(copymode < 0 and ta != tb)) + self.assertTrue(not a) + self.assertTrue(not b) def test_pop(self): BasicTestMappingProtocol.test_pop(self) @@ -577,7 +577,7 @@ return collections.UserDict() ud = mydict.fromkeys('ab') self.assertEqual(ud, {'a':None, 'b':None}) - self.assert_(isinstance(ud, collections.UserDict)) + self.assertTrue(isinstance(ud, collections.UserDict)) def test_pop(self): TestMappingProtocol.test_pop(self) Modified: python/branches/py3k/Lib/test/pickletester.py ============================================================================== --- python/branches/py3k/Lib/test/pickletester.py (original) +++ python/branches/py3k/Lib/test/pickletester.py Wed Jul 1 01:06:06 2009 @@ -449,7 +449,7 @@ s = self.dumps(l, proto) x = self.loads(s) self.assertEqual(len(x), 1) - self.assert_(x is x[0]) + self.assertTrue(x is x[0]) def test_recursive_tuple(self): t = ([],) @@ -459,7 +459,7 @@ x = self.loads(s) self.assertEqual(len(x), 1) self.assertEqual(len(x[0]), 1) - self.assert_(x is x[0][0]) + self.assertTrue(x is x[0][0]) def test_recursive_dict(self): d = {} @@ -468,7 +468,7 @@ s = self.dumps(d, proto) x = self.loads(s) self.assertEqual(list(x.keys()), [1]) - self.assert_(x[1] is x) + self.assertTrue(x[1] is x) def test_recursive_inst(self): i = C() @@ -477,7 +477,7 @@ s = self.dumps(i, 2) x = self.loads(s) self.assertEqual(dir(x), dir(i)) - self.assert_(x.attr is x) + self.assertTrue(x.attr is x) def test_recursive_multi(self): l = [] @@ -491,7 +491,7 @@ self.assertEqual(len(x), 1) self.assertEqual(dir(x[0]), dir(i)) self.assertEqual(list(x[0].attr.keys()), [1]) - self.assert_(x[0].attr[1] is x) + self.assertTrue(x[0].attr[1] is x) def test_get(self): self.assertRaises(KeyError, self.loads, b'g0\np0') @@ -639,7 +639,7 @@ try: self.loads(badpickle) except ValueError as detail: - self.failUnless(str(detail).startswith( + self.assertTrue(str(detail).startswith( "unsupported pickle protocol")) else: self.fail("expected bad protocol number to raise ValueError") @@ -720,7 +720,7 @@ for x in None, False, True: s = self.dumps(x, proto) y = self.loads(s) - self.assert_(x is y, (proto, x, s, y)) + self.assertTrue(x is y, (proto, x, s, y)) expected = expected_opcode[proto, x] self.assertEqual(opcode_in_pickle(expected, s), True) @@ -770,8 +770,8 @@ # Dump using protocol 1 for comparison. s1 = self.dumps(x, 1) - self.assert_(__name__.encode("utf-8") in s1) - self.assert_(b"MyList" in s1) + self.assertTrue(__name__.encode("utf-8") in s1) + self.assertTrue(b"MyList" in s1) self.assertEqual(opcode_in_pickle(opcode, s1), False) y = self.loads(s1) @@ -780,8 +780,8 @@ # Dump using protocol 2 for test. s2 = self.dumps(x, 2) - self.assert_(__name__.encode("utf-8") not in s2) - self.assert_(b"MyList" not in s2) + self.assertTrue(__name__.encode("utf-8") not in s2) + self.assertTrue(b"MyList" not in s2) self.assertEqual(opcode_in_pickle(opcode, s2), True, repr(s2)) y = self.loads(s2) @@ -825,7 +825,7 @@ if proto == 0: self.assertEqual(num_appends, 0) else: - self.failUnless(num_appends >= 2) + self.assertTrue(num_appends >= 2) def test_dict_chunking(self): n = 10 # too small to chunk @@ -848,7 +848,7 @@ if proto == 0: self.assertEqual(num_setitems, 0) else: - self.failUnless(num_setitems >= 2) + self.assertTrue(num_setitems >= 2) def test_simple_newobj(self): x = object.__new__(SimpleNewObj) # avoid __init__ Modified: python/branches/py3k/Lib/test/test___all__.py ============================================================================== --- python/branches/py3k/Lib/test/test___all__.py (original) +++ python/branches/py3k/Lib/test/test___all__.py Wed Jul 1 01:06:06 2009 @@ -17,7 +17,7 @@ # Silent fail here seems the best route since some modules # may not be available in all environments. return - self.failUnless(hasattr(sys.modules[modname], "__all__"), + self.assertTrue(hasattr(sys.modules[modname], "__all__"), "%s has no __all__ attribute" % modname) names = {} exec("from %s import *" % modname, names) Modified: python/branches/py3k/Lib/test/test___future__.py ============================================================================== --- python/branches/py3k/Lib/test/test___future__.py (original) +++ python/branches/py3k/Lib/test/test___future__.py Wed Jul 1 01:06:06 2009 @@ -15,7 +15,7 @@ for name in dir(__future__): obj = getattr(__future__, name, None) if obj is not None and isinstance(obj, __future__._Feature): - self.assert_( + self.assertTrue( name in given_feature_names, "%r should have been in all_feature_names" % name ) @@ -30,7 +30,7 @@ optional = value.getOptionalRelease() mandatory = value.getMandatoryRelease() - a = self.assert_ + a = self.assertTrue e = self.assertEqual def check(t, name): a(isinstance(t, tuple), "%s isn't tuple" % name) Modified: python/branches/py3k/Lib/test/test_abc.py ============================================================================== --- python/branches/py3k/Lib/test/test_abc.py (original) +++ python/branches/py3k/Lib/test/test_abc.py Wed Jul 1 01:06:06 2009 @@ -42,23 +42,23 @@ def bar(self): pass # concrete self.assertEqual(C.__abstractmethods__, {"foo"}) self.assertRaises(TypeError, C) # because foo is abstract - self.assert_(isabstract(C)) + self.assertTrue(isabstract(C)) 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 - self.assert_(isabstract(D)) + self.assertTrue(isabstract(D)) class E(D): def foo(self): pass self.assertEqual(E.__abstractmethods__, set()) E() # now foo is concrete, too - self.failIf(isabstract(E)) + self.assertFalse(isabstract(E)) class F(E): @abstractthing def bar(self): pass # abstract override of concrete self.assertEqual(F.__abstractmethods__, {"bar"}) self.assertRaises(TypeError, F) # because bar is abstract now - self.assert_(isabstract(F)) + self.assertTrue(isabstract(F)) def test_subclass_oldstyle_class(self): class A: @@ -142,41 +142,41 @@ def test_registration_transitiveness(self): class A(metaclass=abc.ABCMeta): pass - self.failUnless(issubclass(A, A)) - self.failUnless(issubclass(A, (A,))) + self.assertTrue(issubclass(A, A)) + self.assertTrue(issubclass(A, (A,))) class B(metaclass=abc.ABCMeta): pass - self.failIf(issubclass(A, B)) - self.failIf(issubclass(A, (B,))) - self.failIf(issubclass(B, A)) - self.failIf(issubclass(B, (A,))) + self.assertFalse(issubclass(A, B)) + self.assertFalse(issubclass(A, (B,))) + self.assertFalse(issubclass(B, A)) + self.assertFalse(issubclass(B, (A,))) class C(metaclass=abc.ABCMeta): pass A.register(B) class B1(B): pass - self.failUnless(issubclass(B1, A)) - self.failUnless(issubclass(B1, (A,))) + self.assertTrue(issubclass(B1, A)) + self.assertTrue(issubclass(B1, (A,))) class C1(C): pass B1.register(C1) - self.failIf(issubclass(C, B)) - self.failIf(issubclass(C, (B,))) - self.failIf(issubclass(C, B1)) - self.failIf(issubclass(C, (B1,))) - self.failUnless(issubclass(C1, A)) - self.failUnless(issubclass(C1, (A,))) - self.failUnless(issubclass(C1, B)) - self.failUnless(issubclass(C1, (B,))) - self.failUnless(issubclass(C1, B1)) - self.failUnless(issubclass(C1, (B1,))) + self.assertFalse(issubclass(C, B)) + self.assertFalse(issubclass(C, (B,))) + self.assertFalse(issubclass(C, B1)) + self.assertFalse(issubclass(C, (B1,))) + self.assertTrue(issubclass(C1, A)) + self.assertTrue(issubclass(C1, (A,))) + self.assertTrue(issubclass(C1, B)) + self.assertTrue(issubclass(C1, (B,))) + self.assertTrue(issubclass(C1, B1)) + self.assertTrue(issubclass(C1, (B1,))) C1.register(int) class MyInt(int): pass - self.failUnless(issubclass(MyInt, A)) - self.failUnless(issubclass(MyInt, (A,))) - self.failUnless(isinstance(42, A)) - self.failUnless(isinstance(42, (A,))) + self.assertTrue(issubclass(MyInt, A)) + self.assertTrue(issubclass(MyInt, (A,))) + self.assertTrue(isinstance(42, A)) + self.assertTrue(isinstance(42, (A,))) def test_all_new_methods_are_called(self): class A(metaclass=abc.ABCMeta): Modified: python/branches/py3k/Lib/test/test_abstract_numbers.py ============================================================================== --- python/branches/py3k/Lib/test/test_abstract_numbers.py (original) +++ python/branches/py3k/Lib/test/test_abstract_numbers.py Wed Jul 1 01:06:06 2009 @@ -9,8 +9,8 @@ class TestNumbers(unittest.TestCase): def test_int(self): - self.failUnless(issubclass(int, Integral)) - self.failUnless(issubclass(int, Complex)) + self.assertTrue(issubclass(int, Integral)) + self.assertTrue(issubclass(int, Complex)) self.assertEqual(7, int(7).real) self.assertEqual(0, int(7).imag) @@ -19,16 +19,16 @@ self.assertEqual(1, int(7).denominator) def test_float(self): - self.failIf(issubclass(float, Rational)) - self.failUnless(issubclass(float, Real)) + self.assertFalse(issubclass(float, Rational)) + self.assertTrue(issubclass(float, Real)) self.assertEqual(7.3, float(7.3).real) self.assertEqual(0, float(7.3).imag) self.assertEqual(7.3, float(7.3).conjugate()) def test_complex(self): - self.failIf(issubclass(complex, Real)) - self.failUnless(issubclass(complex, Complex)) + self.assertFalse(issubclass(complex, Real)) + self.assertTrue(issubclass(complex, Complex)) c1, c2 = complex(3, 2), complex(4,1) # XXX: This is not ideal, but see the comment in math_trunc(). Modified: python/branches/py3k/Lib/test/test_array.py ============================================================================== --- python/branches/py3k/Lib/test/test_array.py (original) +++ python/branches/py3k/Lib/test/test_array.py Wed Jul 1 01:06:06 2009 @@ -49,7 +49,7 @@ def test_constructor(self): a = array.array(self.typecode) self.assertEqual(a.typecode, self.typecode) - self.assert_(a.itemsize>=self.minitemsize) + self.assertTrue(a.itemsize>=self.minitemsize) self.assertRaises(TypeError, array.array, self.typecode, None) def test_len(self): @@ -64,10 +64,10 @@ a = array.array(self.typecode, self.example) self.assertRaises(TypeError, a.buffer_info, 42) bi = a.buffer_info() - self.assert_(isinstance(bi, tuple)) + self.assertTrue(isinstance(bi, tuple)) self.assertEqual(len(bi), 2) - self.assert_(isinstance(bi[0], int)) - self.assert_(isinstance(bi[1], int)) + self.assertTrue(isinstance(bi[0], int)) + self.assertTrue(isinstance(bi[1], int)) self.assertEqual(bi[1], len(a)) def test_byteswap(self): @@ -216,39 +216,39 @@ def test_cmp(self): a = array.array(self.typecode, self.example) - self.assert_((a == 42) is False) - self.assert_((a != 42) is True) + self.assertTrue((a == 42) is False) + self.assertTrue((a != 42) is True) - self.assert_((a == a) is True) - self.assert_((a != a) is False) - self.assert_((a < a) is False) - self.assert_((a <= a) is True) - self.assert_((a > a) is False) - self.assert_((a >= a) is True) + self.assertTrue((a == a) is True) + self.assertTrue((a != a) is False) + self.assertTrue((a < a) is False) + self.assertTrue((a <= a) is True) + self.assertTrue((a > a) is False) + self.assertTrue((a >= a) is True) al = array.array(self.typecode, self.smallerexample) ab = array.array(self.typecode, self.biggerexample) - self.assert_((a == 2*a) is False) - self.assert_((a != 2*a) is True) - self.assert_((a < 2*a) is True) - self.assert_((a <= 2*a) is True) - self.assert_((a > 2*a) is False) - self.assert_((a >= 2*a) is False) - - self.assert_((a == al) is False) - self.assert_((a != al) is True) - self.assert_((a < al) is False) - self.assert_((a <= al) is False) - self.assert_((a > al) is True) - self.assert_((a >= al) is True) - - self.assert_((a == ab) is False) - self.assert_((a != ab) is True) - self.assert_((a < ab) is True) - self.assert_((a <= ab) is True) - self.assert_((a > ab) is False) - self.assert_((a >= ab) is False) + self.assertTrue((a == 2*a) is False) + self.assertTrue((a != 2*a) is True) + self.assertTrue((a < 2*a) is True) + self.assertTrue((a <= 2*a) is True) + self.assertTrue((a > 2*a) is False) + self.assertTrue((a >= 2*a) is False) + + self.assertTrue((a == al) is False) + self.assertTrue((a != al) is True) + self.assertTrue((a < al) is False) + self.assertTrue((a <= al) is False) + self.assertTrue((a > al) is True) + self.assertTrue((a >= al) is True) + + self.assertTrue((a == ab) is False) + self.assertTrue((a != ab) is True) + self.assertTrue((a < ab) is True) + self.assertTrue((a <= ab) is True) + self.assertTrue((a > ab) is False) + self.assertTrue((a >= ab) is False) def test_add(self): a = array.array(self.typecode, self.example) \ @@ -267,7 +267,7 @@ a = array.array(self.typecode, self.example[::-1]) b = a a += array.array(self.typecode, 2*self.example) - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual( a, array.array(self.typecode, self.example[::-1]+2*self.example) @@ -310,22 +310,22 @@ b = a a *= 5 - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual( a, array.array(self.typecode, 5*self.example) ) a *= 0 - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual(a, array.array(self.typecode)) a *= 1000 - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual(a, array.array(self.typecode)) a *= -1 - self.assert_(a is b) + self.assertTrue(a is b) self.assertEqual(a, array.array(self.typecode)) a = array.array(self.typecode, self.example) Modified: python/branches/py3k/Lib/test/test_ast.py ============================================================================== --- python/branches/py3k/Lib/test/test_ast.py (original) +++ python/branches/py3k/Lib/test/test_ast.py Wed Jul 1 01:06:06 2009 @@ -116,20 +116,20 @@ class AST_Tests(unittest.TestCase): - def _assert_order(self, ast_node, parent_pos): + def _assertTrueorder(self, ast_node, parent_pos): if not isinstance(ast_node, ast.AST) or ast_node._fields is None: return if isinstance(ast_node, (ast.expr, ast.stmt, ast.excepthandler)): node_pos = (ast_node.lineno, ast_node.col_offset) - self.assert_(node_pos >= parent_pos) + self.assertTrue(node_pos >= parent_pos) parent_pos = (ast_node.lineno, ast_node.col_offset) for name in ast_node._fields: value = getattr(ast_node, name) if isinstance(value, list): for child in value: - self._assert_order(child, parent_pos) + self._assertTrueorder(child, parent_pos) elif value is not None: - self._assert_order(value, parent_pos) + self._assertTrueorder(value, parent_pos) def test_snippets(self): for input, output, kind in ((exec_tests, exec_results, "exec"), @@ -138,7 +138,7 @@ for i, o in zip(input, output): ast_tree = compile(i, "?", kind, ast.PyCF_ONLY_AST) self.assertEquals(to_tuple(ast_tree), o) - self._assert_order(ast_tree, (0, 0)) + self._assertTrueorder(ast_tree, (0, 0)) def test_slice(self): slc = ast.parse("x[::]").body[0].value.slice Modified: python/branches/py3k/Lib/test/test_augassign.py ============================================================================== --- python/branches/py3k/Lib/test/test_augassign.py (original) +++ python/branches/py3k/Lib/test/test_augassign.py Wed Jul 1 01:06:06 2009 @@ -60,7 +60,7 @@ y[1:2] += [1] self.assertEquals(x, [1, 2, 1, 2, 3]) - self.assert_(x is y) + self.assertTrue(x is y) def testCustomMethods1(self): @@ -85,23 +85,23 @@ y = x x += 10 - self.assert_(isinstance(x, aug_test)) - self.assert_(y is not x) + self.assertTrue(isinstance(x, aug_test)) + self.assertTrue(y is not x) self.assertEquals(x.val, 11) x = aug_test2(2) y = x x += 10 - self.assert_(y is x) + self.assertTrue(y is x) self.assertEquals(x.val, 12) x = aug_test3(3) y = x x += 10 - self.assert_(isinstance(x, aug_test3)) - self.assert_(y is not x) + self.assertTrue(isinstance(x, aug_test3)) + self.assertTrue(y is not x) self.assertEquals(x.val, 13) Modified: python/branches/py3k/Lib/test/test_base64.py ============================================================================== --- python/branches/py3k/Lib/test/test_base64.py (original) +++ python/branches/py3k/Lib/test/test_base64.py Wed Jul 1 01:06:06 2009 @@ -204,7 +204,7 @@ self.assertRaises(TypeError, base64.b16decode, "") def test_ErrorHeritage(self): - self.assert_(issubclass(binascii.Error, ValueError)) + self.assertTrue(issubclass(binascii.Error, ValueError)) Modified: python/branches/py3k/Lib/test/test_bigmem.py ============================================================================== --- python/branches/py3k/Lib/test/test_bigmem.py (original) +++ python/branches/py3k/Lib/test/test_bigmem.py Wed Jul 1 01:06:06 2009 @@ -80,12 +80,12 @@ _ = self.from_latin1 SUBSTR = _(' abc def ghi') s = _('-') * size + SUBSTR - self.failUnless(s.endswith(SUBSTR)) - self.failUnless(s.endswith(s)) + self.assertTrue(s.endswith(SUBSTR)) + self.assertTrue(s.endswith(s)) s2 = _('...') + s - self.failUnless(s2.endswith(s)) - self.failIf(s.endswith(_('a') + SUBSTR)) - self.failIf(SUBSTR.endswith(s)) + self.assertTrue(s2.endswith(s)) + self.assertFalse(s.endswith(_('a') + SUBSTR)) + self.assertFalse(SUBSTR.endswith(s)) @bigmemtest(minsize=_2G + 10, memuse=2) def test_expandtabs(self, size): @@ -139,27 +139,27 @@ _ = self.from_latin1 SUBSTR = _('123456') s = _('a') * size + SUBSTR - self.failUnless(s.isalnum()) + self.assertTrue(s.isalnum()) s += _('.') - self.failIf(s.isalnum()) + self.assertFalse(s.isalnum()) @bigmemtest(minsize=_2G, memuse=2) def test_isalpha(self, size): _ = self.from_latin1 SUBSTR = _('zzzzzzz') s = _('a') * size + SUBSTR - self.failUnless(s.isalpha()) + self.assertTrue(s.isalpha()) s += _('.') - self.failIf(s.isalpha()) + self.assertFalse(s.isalpha()) @bigmemtest(minsize=_2G, memuse=2) def test_isdigit(self, size): _ = self.from_latin1 SUBSTR = _('123456') s = _('9') * size + SUBSTR - self.failUnless(s.isdigit()) + self.assertTrue(s.isdigit()) s += _('z') - self.failIf(s.isdigit()) + self.assertFalse(s.isdigit()) @bigmemtest(minsize=_2G, memuse=2) def test_islower(self, size): @@ -168,9 +168,9 @@ chr(c) for c in range(255) if not chr(c).isupper())) repeats = size // len(chars) + 2 s = chars * repeats - self.failUnless(s.islower()) + self.assertTrue(s.islower()) s += _('A') - self.failIf(s.islower()) + self.assertFalse(s.islower()) @bigmemtest(minsize=_2G, memuse=2) def test_isspace(self, size): @@ -178,20 +178,20 @@ whitespace = _(' \f\n\r\t\v') repeats = size // len(whitespace) + 2 s = whitespace * repeats - self.failUnless(s.isspace()) + self.assertTrue(s.isspace()) s += _('j') - self.failIf(s.isspace()) + self.assertFalse(s.isspace()) @bigmemtest(minsize=_2G, memuse=2) def test_istitle(self, size): _ = self.from_latin1 SUBSTR = _('123456') s = _('').join([_('A'), _('a') * size, SUBSTR]) - self.failUnless(s.istitle()) + self.assertTrue(s.istitle()) s += _('A') - self.failUnless(s.istitle()) + self.assertTrue(s.istitle()) s += _('aA') - self.failIf(s.istitle()) + self.assertFalse(s.istitle()) @bigmemtest(minsize=_2G, memuse=2) def test_isupper(self, size): @@ -200,9 +200,9 @@ chr(c) for c in range(255) if not chr(c).islower())) repeats = size // len(chars) + 2 s = chars * repeats - self.failUnless(s.isupper()) + self.assertTrue(s.isupper()) s += _('a') - self.failIf(s.isupper()) + self.assertFalse(s.isupper()) @bigmemtest(minsize=_2G, memuse=2) def test_join(self, size): @@ -211,15 +211,15 @@ x = s.join([_('aaaaa'), _('bbbbb')]) self.assertEquals(x.count(_('a')), 5) self.assertEquals(x.count(_('b')), 5) - self.failUnless(x.startswith(_('aaaaaA'))) - self.failUnless(x.endswith(_('Abbbbb'))) + self.assertTrue(x.startswith(_('aaaaaA'))) + self.assertTrue(x.endswith(_('Abbbbb'))) @bigmemtest(minsize=_2G + 10, memuse=1) def test_ljust(self, size): _ = self.from_latin1 SUBSTR = _(' abc def ghi') s = SUBSTR.ljust(size) - self.failUnless(s.startswith(SUBSTR + _(' '))) + self.assertTrue(s.startswith(SUBSTR + _(' '))) self.assertEquals(len(s), size) self.assertEquals(s.strip(), SUBSTR.strip()) @@ -244,7 +244,7 @@ # Type-specific optimization if isinstance(s, (str, bytes)): stripped = s.lstrip() - self.failUnless(stripped is s) + self.assertTrue(stripped is s) @bigmemtest(minsize=_2G + 10, memuse=2) def test_replace(self, size): @@ -299,7 +299,7 @@ _ = self.from_latin1 SUBSTR = _(' abc def ghi') s = SUBSTR.ljust(size) - self.failUnless(s.startswith(SUBSTR + _(' '))) + self.assertTrue(s.startswith(SUBSTR + _(' '))) self.assertEquals(len(s), size) self.assertEquals(s.strip(), SUBSTR.strip()) @@ -316,7 +316,7 @@ # Type-specific optimization if isinstance(s, (str, bytes)): stripped = s.rstrip() - self.failUnless(stripped is s) + self.assertTrue(stripped is s) # The test takes about size bytes to build a string, and then about # sqrt(size) substrings of sqrt(size) in size and a list to @@ -378,9 +378,9 @@ _ = self.from_latin1 SUBSTR = _(' abc def ghi') s = _('-') * size + SUBSTR - self.failUnless(s.startswith(s)) - self.failUnless(s.startswith(_('-') * size)) - self.failIf(s.startswith(SUBSTR)) + self.assertTrue(s.startswith(s)) + self.assertTrue(s.startswith(_('-') * size)) + self.assertFalse(s.startswith(SUBSTR)) @bigmemtest(minsize=_2G, memuse=1) def test_strip(self, size): @@ -412,8 +412,8 @@ SUBSTR = _('SpaaHAaaAaham') s = SUBSTR * (size // len(SUBSTR) + 2) s = s.title() - self.failUnless(s.startswith((SUBSTR * 3).title())) - self.failUnless(s.endswith(SUBSTR.lower() * 3)) + self.assertTrue(s.startswith((SUBSTR * 3).title())) + self.assertTrue(s.endswith(SUBSTR.lower() * 3)) @bigmemtest(minsize=_2G, memuse=2) def test_translate(self, size): @@ -451,8 +451,8 @@ _ = self.from_latin1 SUBSTR = _('-568324723598234') s = SUBSTR.zfill(size) - self.failUnless(s.endswith(_('0') + SUBSTR[1:])) - self.failUnless(s.startswith(_('-0'))) + self.assertTrue(s.endswith(_('0') + SUBSTR[1:])) + self.assertTrue(s.startswith(_('-0'))) self.assertEquals(len(s), size) self.assertEquals(s.count(_('0')), size - len(SUBSTR)) @@ -519,12 +519,12 @@ edge = _('-') * (size // 2) s = _('').join([edge, SUBSTR, edge]) del edge - self.failUnless(SUBSTR in s) - self.failIf(SUBSTR * 2 in s) - self.failUnless(_('-') in s) - self.failIf(_('a') in s) + self.assertTrue(SUBSTR in s) + self.assertFalse(SUBSTR * 2 in s) + self.assertTrue(_('-') in s) + self.assertFalse(_('a') in s) s += _('a') - self.failUnless(_('a') in s) + self.assertTrue(_('a') in s) @bigmemtest(minsize=_2G + 10, memuse=2) def test_compare(self, size): @@ -534,10 +534,10 @@ self.assertEqual(s1, s2) del s2 s2 = s1 + _('a') - self.failIf(s1 == s2) + self.assertFalse(s1 == s2) del s2 s2 = _('.') * size - self.failIf(s1 == s2) + self.assertFalse(s1 == s2) @bigmemtest(minsize=_2G + 10, memuse=1) def test_hash(self, size): @@ -552,7 +552,7 @@ h1 = hash(s) del s s = _('\x00') * (size + 1) - self.failIf(h1 == hash(s)) + self.assertFalse(h1 == hash(s)) class StrTest(unittest.TestCase, BaseStrTest): @@ -623,7 +623,7 @@ except MemoryError: pass # acceptable on 32-bit else: - self.failUnless(s == eval(r)) + self.assertTrue(s == eval(r)) @bigmemtest(minsize=_2G + 10, memuse=character_size * 2) def test_format(self, size): @@ -633,8 +633,8 @@ del sf sf = '..%s..' % (s,) self.assertEquals(len(sf), len(s) + 4) - self.failUnless(sf.startswith('..-')) - self.failUnless(sf.endswith('-..')) + self.assertTrue(sf.startswith('..-')) + self.assertTrue(sf.endswith('-..')) del s, sf size //= 2 @@ -682,8 +682,8 @@ s = "\uAAAA" * size for f in (repr, ascii): r = f(s) - self.failUnless(len(r) > size) - self.failUnless(r.endswith(r"\uaaaa'"), r[-10:]) + self.assertTrue(len(r) > size) + self.assertTrue(r.endswith(r"\uaaaa'"), r[-10:]) del r # The character takes 4 bytes even in UCS-2 builds because it will @@ -693,8 +693,8 @@ s = "\U0001AAAA" * size for f in (repr, ascii): r = f(s) - self.failUnless(len(r) > size) - self.failUnless(r.endswith(r"\U0001aaaa'"), r[-12:]) + self.assertTrue(len(r) > size) + self.assertTrue(r.endswith(r"\U0001aaaa'"), r[-12:]) del r @@ -740,10 +740,10 @@ self.assertEqual(t1, t2) del t2 t2 = ('',) * (size + 1) - self.failIf(t1 == t2) + self.assertFalse(t1 == t2) del t2 t2 = (1,) * size - self.failIf(t1 == t2) + self.assertFalse(t1 == t2) # Test concatenating into a single tuple of more than 2G in length, # and concatenating a tuple of more than 2G in length separately, so @@ -768,9 +768,9 @@ def test_contains(self, size): t = (1, 2, 3, 4, 5) * size self.assertEquals(len(t), size * 5) - self.failUnless(5 in t) - self.failIf((1, 2, 3, 4, 5) in t) - self.failIf(0 in t) + self.assertTrue(5 in t) + self.assertFalse((1, 2, 3, 4, 5) in t) + self.assertFalse(0 in t) @bigmemtest(minsize=_2G + 10, memuse=8) def test_hash(self, size): @@ -778,7 +778,7 @@ h1 = hash(t1) del t1 t2 = (0,) * (size + 1) - self.failIf(h1 == hash(t2)) + self.assertFalse(h1 == hash(t2)) @bigmemtest(minsize=_2G + 10, memuse=8) def test_index_and_slice(self, size): @@ -874,10 +874,10 @@ self.assertEqual(l1, l2) del l2 l2 = [''] * (size + 1) - self.failIf(l1 == l2) + self.assertFalse(l1 == l2) del l2 l2 = [2] * size - self.failIf(l1 == l2) + self.assertFalse(l1 == l2) # Test concatenating into a single list of more than 2G in length, # and concatenating a list of more than 2G in length separately, so @@ -902,8 +902,8 @@ l = [sys.stdout] * size l += l self.assertEquals(len(l), size * 2) - self.failUnless(l[0] is l[-1]) - self.failUnless(l[size - 1] is l[size + 1]) + self.assertTrue(l[0] is l[-1]) + self.assertTrue(l[size - 1] is l[size + 1]) @bigmemtest(minsize=_2G // 2 + 2, memuse=24) def test_inplace_concat_small(self, size): @@ -917,14 +917,14 @@ def test_contains(self, size): l = [1, 2, 3, 4, 5] * size self.assertEquals(len(l), size * 5) - self.failUnless(5 in l) - self.failIf([1, 2, 3, 4, 5] in l) - self.failIf(0 in l) + self.assertTrue(5 in l) + self.assertFalse([1, 2, 3, 4, 5] in l) + self.assertFalse(0 in l) @bigmemtest(minsize=_2G + 10, memuse=8) def test_hash(self, size): l = [0] * size - self.failUnlessRaises(TypeError, hash, l) + self.assertRaises(TypeError, hash, l) @bigmemtest(minsize=_2G + 10, memuse=8) def test_index_and_slice(self, size): @@ -984,7 +984,7 @@ # Like test_concat, split in two. def basic_test_repeat(self, size): l = [] * size - self.failIf(l) + self.assertFalse(l) l = [''] * size self.assertEquals(len(l), size) l = l * 2 @@ -1002,13 +1002,13 @@ l = [''] l *= size self.assertEquals(len(l), size) - self.failUnless(l[0] is l[-1]) + self.assertTrue(l[0] is l[-1]) del l l = [''] * size l *= 2 self.assertEquals(len(l), size * 2) - self.failUnless(l[size - 1] is l[-1]) + self.assertTrue(l[size - 1] is l[-1]) @bigmemtest(minsize=_2G // 2 + 2, memuse=16) def test_inplace_repeat_small(self, size): @@ -1042,8 +1042,8 @@ l = [object()] * size l.append(object()) self.assertEquals(len(l), size+1) - self.failUnless(l[-3] is l[-2]) - self.failIf(l[-2] is l[-1]) + self.assertTrue(l[-3] is l[-2]) + self.assertFalse(l[-2] is l[-1]) @bigmemtest(minsize=_2G // 5 + 2, memuse=8 * 5) def test_count(self, size): @@ -1055,8 +1055,8 @@ l = [object] * size l.extend(l) self.assertEquals(len(l), size * 2) - self.failUnless(l[0] is l[-1]) - self.failUnless(l[size - 1] is l[size + 1]) + self.assertTrue(l[0] is l[-1]) + self.assertTrue(l[size - 1] is l[size + 1]) @bigmemtest(minsize=_2G // 2 + 2, memuse=16) def test_extend_small(self, size): Modified: python/branches/py3k/Lib/test/test_binascii.py ============================================================================== --- python/branches/py3k/Lib/test/test_binascii.py (original) +++ python/branches/py3k/Lib/test/test_binascii.py Wed Jul 1 01:06:06 2009 @@ -14,8 +14,8 @@ def test_exceptions(self): # Check module exceptions - self.assert_(issubclass(binascii.Error, Exception)) - self.assert_(issubclass(binascii.Incomplete, Exception)) + self.assertTrue(issubclass(binascii.Error, Exception)) + self.assertTrue(issubclass(binascii.Incomplete, Exception)) def test_functions(self): # Check presence of all functions @@ -26,10 +26,10 @@ prefixes.extend(["crc_", "rlecode_", "rledecode_"]) for prefix in prefixes: name = prefix + suffix - self.assert_(hasattr(getattr(binascii, name), '__call__')) + self.assertTrue(hasattr(getattr(binascii, name), '__call__')) self.assertRaises(TypeError, getattr(binascii, name)) for name in ("hexlify", "unhexlify"): - self.assert_(hasattr(getattr(binascii, name), '__call__')) + self.assertTrue(hasattr(getattr(binascii, name), '__call__')) self.assertRaises(TypeError, getattr(binascii, name)) def test_base64valid(self): Modified: python/branches/py3k/Lib/test/test_binop.py ============================================================================== --- python/branches/py3k/Lib/test/test_binop.py (original) +++ python/branches/py3k/Lib/test/test_binop.py Wed Jul 1 01:06:06 2009 @@ -210,10 +210,10 @@ self.assertEqual(gcd(-10, -2), -2) for i in range(1, 20): for j in range(1, 20): - self.assert_(gcd(i, j) > 0) - self.assert_(gcd(-i, j) < 0) - self.assert_(gcd(i, -j) > 0) - self.assert_(gcd(-i, -j) < 0) + self.assertTrue(gcd(i, j) > 0) + self.assertTrue(gcd(-i, j) < 0) + self.assertTrue(gcd(i, -j) > 0) + self.assertTrue(gcd(-i, -j) < 0) def test_constructor(self): a = Rat(10, 15) Modified: python/branches/py3k/Lib/test/test_bisect.py ============================================================================== --- python/branches/py3k/Lib/test/test_bisect.py (original) +++ python/branches/py3k/Lib/test/test_bisect.py Wed Jul 1 01:06:06 2009 @@ -130,14 +130,14 @@ elem = randrange(-1, n+1) ip = self.module.bisect_left(data, elem) if ip < len(data): - self.failUnless(elem <= data[ip]) + self.assertTrue(elem <= data[ip]) if ip > 0: - self.failUnless(data[ip-1] < elem) + self.assertTrue(data[ip-1] < elem) ip = self.module.bisect_right(data, elem) if ip < len(data): - self.failUnless(elem < data[ip]) + self.assertTrue(elem < data[ip]) if ip > 0: - self.failUnless(data[ip-1] <= elem) + self.assertTrue(data[ip-1] <= elem) def test_optionalSlicing(self): for func, data, elem, expected in self.precomputedCases: @@ -146,15 +146,15 @@ for hi in range(3,8): hi = min(len(data), hi) ip = func(data, elem, lo, hi) - self.failUnless(lo <= ip <= hi) + self.assertTrue(lo <= ip <= hi) if func is self.module.bisect_left and ip < hi: - self.failUnless(elem <= data[ip]) + self.assertTrue(elem <= data[ip]) if func is self.module.bisect_left and ip > lo: - self.failUnless(data[ip-1] < elem) + self.assertTrue(data[ip-1] < elem) if func is self.module.bisect_right and ip < hi: - self.failUnless(elem < data[ip]) + self.assertTrue(elem < data[ip]) if func is self.module.bisect_right and ip > lo: - self.failUnless(data[ip-1] <= elem) + self.assertTrue(data[ip-1] <= elem) self.assertEqual(ip, max(lo, min(hi, expected))) def test_backcompatibility(self): Modified: python/branches/py3k/Lib/test/test_bool.py ============================================================================== --- python/branches/py3k/Lib/test/test_bool.py (original) +++ python/branches/py3k/Lib/test/test_bool.py Wed Jul 1 01:06:06 2009 @@ -8,10 +8,10 @@ class BoolTest(unittest.TestCase): def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def assertIsNot(self, a, b): - self.assert_(a is not b) + self.assertTrue(a is not b) def test_subclass(self): try: @@ -221,15 +221,15 @@ def test_boolean(self): self.assertEqual(True & 1, 1) - self.assert_(not isinstance(True & 1, bool)) + self.assertTrue(not isinstance(True & 1, bool)) self.assertIs(True & True, True) self.assertEqual(True | 1, 1) - self.assert_(not isinstance(True | 1, bool)) + self.assertTrue(not isinstance(True | 1, bool)) self.assertIs(True | True, True) self.assertEqual(True ^ 1, 0) - self.assert_(not isinstance(True ^ 1, bool)) + self.assertTrue(not isinstance(True ^ 1, bool)) self.assertIs(True ^ True, False) def test_fileclosed(self): Modified: python/branches/py3k/Lib/test/test_bufio.py ============================================================================== --- python/branches/py3k/Lib/test/test_bufio.py (original) +++ python/branches/py3k/Lib/test/test_bufio.py Wed Jul 1 01:06:06 2009 @@ -34,7 +34,7 @@ line = f.readline() self.assertEqual(line, s) line = f.readline() - self.assert_(not line) # Must be at EOF + self.assertTrue(not line) # Must be at EOF f.close() finally: support.unlink(support.TESTFN) Modified: python/branches/py3k/Lib/test/test_builtin.py ============================================================================== --- python/branches/py3k/Lib/test/test_builtin.py (original) +++ python/branches/py3k/Lib/test/test_builtin.py Wed Jul 1 01:06:06 2009 @@ -176,24 +176,24 @@ def test_neg(self): x = -sys.maxsize-1 - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) self.assertEqual(-x, sys.maxsize+1) # XXX(nnorwitz): This test case for callable should probably be removed. def test_callable(self): - self.assert_(hasattr(len, '__call__')) + self.assertTrue(hasattr(len, '__call__')) def f(): pass - self.assert_(hasattr(f, '__call__')) + self.assertTrue(hasattr(f, '__call__')) class C: def meth(self): pass - self.assert_(hasattr(C, '__call__')) + self.assertTrue(hasattr(C, '__call__')) x = C() - self.assert_(hasattr(x.meth, '__call__')) - self.assert_(not hasattr(x, '__call__')) + self.assertTrue(hasattr(x.meth, '__call__')) + self.assertTrue(not hasattr(x, '__call__')) class D(C): def __call__(self): pass y = D() - self.assert_(hasattr(y, '__call__')) + self.assertTrue(hasattr(y, '__call__')) y() def test_chr(self): @@ -220,7 +220,7 @@ self.assertRaises((OverflowError, ValueError), chr, 2**32) def test_cmp(self): - self.assert_(not hasattr(builtins, "cmp")) + self.assertTrue(not hasattr(builtins, "cmp")) def test_compile(self): compile('print(1)\n', '', 'exec') @@ -252,11 +252,11 @@ # dir() - local scope local_var = 1 - self.assert_('local_var' in dir()) + self.assertTrue('local_var' in dir()) # dir(module) import sys - self.assert_('exit' in dir(sys)) + self.assertTrue('exit' in dir(sys)) # dir(module_with_invalid__dict__) import types @@ -266,8 +266,8 @@ self.assertRaises(TypeError, dir, f) # dir(type) - self.assert_("strip" in dir(str)) - self.assert_("__mro__" not in dir(str)) + self.assertTrue("strip" in dir(str)) + self.assertTrue("__mro__" not in dir(str)) # dir(obj) class Foo(object): @@ -276,13 +276,13 @@ self.y = 8 self.z = 9 f = Foo() - self.assert_("y" in dir(f)) + self.assertTrue("y" in dir(f)) # dir(obj_no__dict__) class Foo(object): __slots__ = [] f = Foo() - self.assert_("__repr__" in dir(f)) + self.assertTrue("__repr__" in dir(f)) # dir(obj_no__class__with__dict__) # (an ugly trick to cause getattr(f, "__class__") to fail) @@ -291,15 +291,15 @@ def __init__(self): self.bar = "wow" f = Foo() - self.assert_("__repr__" not in dir(f)) - self.assert_("bar" in dir(f)) + self.assertTrue("__repr__" not in dir(f)) + self.assertTrue("bar" in dir(f)) # dir(obj_using __dir__) class Foo(object): def __dir__(self): return ["kan", "ga", "roo"] f = Foo() - self.assert_(dir(f) == ["ga", "kan", "roo"]) + self.assertTrue(dir(f) == ["ga", "kan", "roo"]) # dir(obj__dir__not_list) class Foo(object): @@ -334,10 +334,10 @@ self.assertEqual(divmod(-sys.maxsize-1, -1), (sys.maxsize+1, 0)) - self.assert_(not fcmp(divmod(3.25, 1.0), (3.0, 0.25))) - self.assert_(not fcmp(divmod(-3.25, 1.0), (-4.0, 0.75))) - self.assert_(not fcmp(divmod(3.25, -1.0), (-4.0, -0.75))) - self.assert_(not fcmp(divmod(-3.25, -1.0), (3.0, -0.25))) + self.assertTrue(not fcmp(divmod(3.25, 1.0), (3.0, 0.25))) + self.assertTrue(not fcmp(divmod(-3.25, 1.0), (-4.0, 0.75))) + self.assertTrue(not fcmp(divmod(3.25, -1.0), (-4.0, -0.75))) + self.assertTrue(not fcmp(divmod(-3.25, -1.0), (3.0, -0.25))) self.assertRaises(TypeError, divmod) @@ -489,7 +489,7 @@ def test_getattr(self): import sys - self.assert_(getattr(sys, 'stdout') is sys.stdout) + self.assertTrue(getattr(sys, 'stdout') is sys.stdout) self.assertRaises(TypeError, getattr, sys, 1) self.assertRaises(TypeError, getattr, sys, 1, "foo") self.assertRaises(TypeError, getattr) @@ -497,7 +497,7 @@ def test_hasattr(self): import sys - self.assert_(hasattr(sys, 'stdout')) + self.assertTrue(hasattr(sys, 'stdout')) self.assertRaises(TypeError, hasattr, sys, 1) self.assertRaises(TypeError, hasattr) self.assertEqual(False, hasattr(sys, chr(sys.maxunicode))) @@ -575,11 +575,11 @@ c = C() d = D() e = E() - self.assert_(isinstance(c, C)) - self.assert_(isinstance(d, C)) - self.assert_(not isinstance(e, C)) - self.assert_(not isinstance(c, D)) - self.assert_(not isinstance('foo', E)) + self.assertTrue(isinstance(c, C)) + self.assertTrue(isinstance(d, C)) + self.assertTrue(not isinstance(e, C)) + self.assertTrue(not isinstance(c, D)) + self.assertTrue(not isinstance('foo', E)) self.assertRaises(TypeError, isinstance, E, 'foo') self.assertRaises(TypeError, isinstance) @@ -593,9 +593,9 @@ c = C() d = D() e = E() - self.assert_(issubclass(D, C)) - self.assert_(issubclass(C, C)) - self.assert_(not issubclass(C, D)) + self.assertTrue(issubclass(D, C)) + self.assertTrue(issubclass(C, C)) + self.assertTrue(not issubclass(C, D)) self.assertRaises(TypeError, issubclass, 'foo', E) self.assertRaises(TypeError, issubclass, E, 'foo') self.assertRaises(TypeError, issubclass) @@ -958,18 +958,18 @@ self.assertEqual(list(range(a+4, a, -2)), [a+4, a+2]) seq = list(range(a, b, c)) - self.assert_(a in seq) - self.assert_(b not in seq) + self.assertTrue(a in seq) + self.assertTrue(b not in seq) self.assertEqual(len(seq), 2) seq = list(range(b, a, -c)) - self.assert_(b in seq) - self.assert_(a not in seq) + self.assertTrue(b in seq) + self.assertTrue(a not in seq) self.assertEqual(len(seq), 2) seq = list(range(-a, -b, -c)) - self.assert_(-a in seq) - self.assert_(-b not in seq) + self.assertTrue(-a in seq) + self.assertTrue(-b not in seq) self.assertEqual(len(seq), 2) self.assertRaises(TypeError, range) Modified: python/branches/py3k/Lib/test/test_bytes.py ============================================================================== --- python/branches/py3k/Lib/test/test_bytes.py (original) +++ python/branches/py3k/Lib/test/test_bytes.py Wed Jul 1 01:06:06 2009 @@ -102,22 +102,22 @@ b3 = self.type2test([1, 3]) self.assertEqual(b1, b2) - self.failUnless(b2 != b3) - self.failUnless(b1 <= b2) - self.failUnless(b1 <= b3) - self.failUnless(b1 < b3) - self.failUnless(b1 >= b2) - self.failUnless(b3 >= b2) - self.failUnless(b3 > b2) - - self.failIf(b1 != b2) - self.failIf(b2 == b3) - self.failIf(b1 > b2) - self.failIf(b1 > b3) - self.failIf(b1 >= b3) - self.failIf(b1 < b2) - self.failIf(b3 < b2) - self.failIf(b3 <= b2) + self.assertTrue(b2 != b3) + self.assertTrue(b1 <= b2) + self.assertTrue(b1 <= b3) + self.assertTrue(b1 < b3) + self.assertTrue(b1 >= b2) + self.assertTrue(b3 >= b2) + self.assertTrue(b3 > b2) + + self.assertFalse(b1 != b2) + self.assertFalse(b2 == b3) + self.assertFalse(b1 > b2) + self.assertFalse(b1 > b3) + self.assertFalse(b1 >= b3) + self.assertFalse(b1 < b2) + self.assertFalse(b3 < b2) + self.assertFalse(b3 <= b2) def test_compare_to_str(self): warnings.simplefilter('ignore', BytesWarning) @@ -220,27 +220,27 @@ def test_contains(self): b = self.type2test(b"abc") - self.failUnless(ord('a') in b) - self.failUnless(int(ord('a')) in b) - self.failIf(200 in b) - self.failIf(200 in b) + self.assertTrue(ord('a') in b) + self.assertTrue(int(ord('a')) in b) + self.assertFalse(200 in b) + self.assertFalse(200 in b) self.assertRaises(ValueError, lambda: 300 in b) self.assertRaises(ValueError, lambda: -1 in b) self.assertRaises(TypeError, lambda: None in b) self.assertRaises(TypeError, lambda: float(ord('a')) in b) self.assertRaises(TypeError, lambda: "a" in b) for f in bytes, bytearray: - self.failUnless(f(b"") in b) - self.failUnless(f(b"a") in b) - self.failUnless(f(b"b") in b) - self.failUnless(f(b"c") in b) - self.failUnless(f(b"ab") in b) - self.failUnless(f(b"bc") in b) - self.failUnless(f(b"abc") in b) - self.failIf(f(b"ac") in b) - self.failIf(f(b"d") in b) - self.failIf(f(b"dab") in b) - self.failIf(f(b"abd") in b) + self.assertTrue(f(b"") in b) + self.assertTrue(f(b"a") in b) + self.assertTrue(f(b"b") in b) + self.assertTrue(f(b"c") in b) + self.assertTrue(f(b"ab") in b) + self.assertTrue(f(b"bc") in b) + self.assertTrue(f(b"abc") in b) + self.assertFalse(f(b"ac") in b) + self.assertFalse(f(b"d") in b) + self.assertFalse(f(b"dab") in b) + self.assertFalse(f(b"abd") in b) def test_fromhex(self): self.assertRaises(TypeError, self.type2test.fromhex) @@ -626,7 +626,7 @@ b += b"def" self.assertEqual(b, b"abcdef") self.assertEqual(b, b1) - self.failUnless(b is b1) + self.assertTrue(b is b1) b += b"xyz" self.assertEqual(b, b"abcdefxyz") try: @@ -642,7 +642,7 @@ b *= 3 self.assertEqual(b, b"abcabcabc") self.assertEqual(b, b1) - self.failUnless(b is b1) + self.assertTrue(b is b1) def test_irepeat_1char(self): b = bytearray(b"x") @@ -650,17 +650,17 @@ b *= 100 self.assertEqual(b, b"x"*100) self.assertEqual(b, b1) - self.failUnless(b is b1) + self.assertTrue(b is b1) def test_alloc(self): b = bytearray() alloc = b.__alloc__() - self.assert_(alloc >= 0) + self.assertTrue(alloc >= 0) seq = [alloc] for i in range(100): b += b"x" alloc = b.__alloc__() - self.assert_(alloc >= len(b)) + self.assertTrue(alloc >= len(b)) if alloc not in seq: seq.append(alloc) @@ -759,7 +759,7 @@ a, b, c = bytearray(b"x").partition(b"y") self.assertEqual(b, b"") self.assertEqual(c, b"") - self.assert_(b is not c) + self.assertTrue(b is not c) b += b"!" self.assertEqual(c, b"") a, b, c = bytearray(b"x").partition(b"y") @@ -769,7 +769,7 @@ b, c, a = bytearray(b"x").rpartition(b"y") self.assertEqual(b, b"") self.assertEqual(c, b"") - self.assert_(b is not c) + self.assertTrue(b is not c) b += b"!" self.assertEqual(c, b"") c, b, a = bytearray(b"x").rpartition(b"y") @@ -860,10 +860,10 @@ self.assertEqual(bytes(b"abc") <= b"ab", False) def test_doc(self): - self.failUnless(bytearray.__doc__ != None) - self.failUnless(bytearray.__doc__.startswith("bytearray("), bytearray.__doc__) - self.failUnless(bytes.__doc__ != None) - self.failUnless(bytes.__doc__.startswith("bytes("), bytes.__doc__) + self.assertTrue(bytearray.__doc__ != None) + self.assertTrue(bytearray.__doc__.startswith("bytearray("), bytearray.__doc__) + self.assertTrue(bytes.__doc__ != None) + self.assertTrue(bytes.__doc__.startswith("bytes("), bytes.__doc__) def test_from_bytearray(self): sample = bytes(b"Hello world\n\x80\x81\xfe\xff") @@ -920,7 +920,7 @@ def test_return_self(self): # bytearray.replace must always return a new bytearray b = bytearray() - self.failIf(b.replace(b'', b'') is b) + self.assertFalse(b.replace(b'', b'') is b) def test_compare(self): if sys.flags.bytes_warning: @@ -997,20 +997,20 @@ class ByteArraySubclassTest(unittest.TestCase): def test_basic(self): - self.assert_(issubclass(ByteArraySubclass, bytearray)) - self.assert_(isinstance(ByteArraySubclass(), bytearray)) + self.assertTrue(issubclass(ByteArraySubclass, bytearray)) + self.assertTrue(isinstance(ByteArraySubclass(), bytearray)) a, b = b"abcd", b"efgh" _a, _b = ByteArraySubclass(a), ByteArraySubclass(b) # test comparison operators with subclass instances - self.assert_(_a == _a) - self.assert_(_a != _b) - self.assert_(_a < _b) - self.assert_(_a <= _b) - self.assert_(_b >= _a) - self.assert_(_b > _a) - self.assert_(_a is not a) + self.assertTrue(_a == _a) + self.assertTrue(_a != _b) + self.assertTrue(_a < _b) + self.assertTrue(_a <= _b) + self.assertTrue(_b >= _a) + self.assertTrue(_b > _a) + self.assertTrue(_a is not a) # test concat of subclass instances self.assertEqual(a + b, _a + _b) @@ -1018,7 +1018,7 @@ self.assertEqual(a + b, _a + b) # test repeat - self.assert_(a*5 == _a*5) + self.assertTrue(a*5 == _a*5) def test_join(self): # Make sure join returns a NEW object for single item sequences @@ -1026,12 +1026,12 @@ # Make sure that it is of the appropriate type. s1 = ByteArraySubclass(b"abcd") s2 = bytearray().join([s1]) - self.assert_(s1 is not s2) - self.assert_(type(s2) is bytearray, type(s2)) + self.assertTrue(s1 is not s2) + self.assertTrue(type(s2) is bytearray, type(s2)) # Test reverse, calling join on subclass s3 = s1.join([b"abcd"]) - self.assert_(type(s3) is bytearray) + self.assertTrue(type(s3) is bytearray) def test_pickle(self): a = ByteArraySubclass(b"abcd") Modified: python/branches/py3k/Lib/test/test_capi.py ============================================================================== --- python/branches/py3k/Lib/test/test_capi.py (original) +++ python/branches/py3k/Lib/test/test_capi.py Wed Jul 1 01:06:06 2009 @@ -24,7 +24,7 @@ def test_instancemethod(self): inst = InstanceMethod() self.assertEqual(id(inst), inst.id()) - self.assert_(inst.testfunction() is inst) + self.assertTrue(inst.testfunction() is inst) self.assertEqual(inst.testfunction.__doc__, testfunction.__doc__) self.assertEqual(InstanceMethod.testfunction.__doc__, testfunction.__doc__) @@ -64,7 +64,7 @@ if context and not context.event.is_set(): continue count += 1 - self.failUnless(count < 10000, + self.assertTrue(count < 10000, "timeout waiting for %i callbacks, got %i"%(n, len(l))) if False and support.verbose: print("(%i)"%(len(l),)) Modified: python/branches/py3k/Lib/test/test_cfgparser.py ============================================================================== --- python/branches/py3k/Lib/test/test_cfgparser.py (original) +++ python/branches/py3k/Lib/test/test_cfgparser.py Wed Jul 1 01:06:06 2009 @@ -76,16 +76,16 @@ eq(cf.get('Spaces', 'key with spaces'), 'value') eq(cf.get('Spaces', 'another with spaces'), 'splat!') - self.failIf('__name__' in cf.options("Foo Bar"), + self.assertFalse('__name__' in cf.options("Foo Bar"), '__name__ "option" should not be exposed by the API!') # Make sure the right things happen for remove_option(); # added to include check for SourceForge bug #123324: - self.failUnless(cf.remove_option('Foo Bar', 'foo'), + self.assertTrue(cf.remove_option('Foo Bar', 'foo'), "remove_option() failed to report existence of option") - self.failIf(cf.has_option('Foo Bar', 'foo'), + self.assertFalse(cf.has_option('Foo Bar', 'foo'), "remove_option() failed to remove option") - self.failIf(cf.remove_option('Foo Bar', 'foo'), + self.assertFalse(cf.remove_option('Foo Bar', 'foo'), "remove_option() failed to report non-existence of option" " that was removed") @@ -107,10 +107,10 @@ eq(cf.options("a"), ["b"]) eq(cf.get("a", "b"), "value", "could not locate option, expecting case-insensitive option names") - self.failUnless(cf.has_option("a", "b")) + self.assertTrue(cf.has_option("a", "b")) cf.set("A", "A-B", "A-B value") for opt in ("a-b", "A-b", "a-B", "A-B"): - self.failUnless( + self.assertTrue( cf.has_option("A", opt), "has_option() returned false for option which should exist") eq(cf.options("A"), ["a-b"]) @@ -127,7 +127,7 @@ # SF bug #561822: cf = self.fromstring("[section]\nnekey=nevalue\n", defaults={"key":"value"}) - self.failUnless(cf.has_option("section", "Key")) + self.assertTrue(cf.has_option("section", "Key")) def test_default_case_sensitivity(self): @@ -163,7 +163,7 @@ cf = self.newconfig() self.assertEqual(cf.sections(), [], "new ConfigParser should have no defined sections") - self.failIf(cf.has_section("Foo"), + self.assertFalse(cf.has_section("Foo"), "new ConfigParser should have no acknowledged sections") self.assertRaises(configparser.NoSectionError, cf.options, "Foo") @@ -202,8 +202,8 @@ "E5=FALSE AND MORE" ) for x in range(1, 5): - self.failUnless(cf.getboolean('BOOLTEST', 't%d' % x)) - self.failIf(cf.getboolean('BOOLTEST', 'f%d' % x)) + self.assertTrue(cf.getboolean('BOOLTEST', 't%d' % x)) + self.assertFalse(cf.getboolean('BOOLTEST', 'f%d' % x)) self.assertRaises(ValueError, cf.getboolean, 'BOOLTEST', 'e%d' % x) Modified: python/branches/py3k/Lib/test/test_cgi.py ============================================================================== --- python/branches/py3k/Lib/test/test_cgi.py (original) +++ python/branches/py3k/Lib/test/test_cgi.py Wed Jul 1 01:06:06 2009 @@ -143,7 +143,7 @@ # test individual fields for key in expect.keys(): expect_val = expect[key] - self.assert_(key in fs) + self.assertTrue(key in fs) if len(expect_val) > 1: self.assertEqual(fs.getvalue(key), expect_val) else: @@ -194,7 +194,7 @@ # if we're not chunking properly, readline is only called twice # (by read_binary); if we are chunking properly, it will be called 5 times # as long as the chunksize is 1 << 16. - self.assert_(f.numcalls > 2) + self.assertTrue(f.numcalls > 2) def test_fieldstorage_multipart(self): #Test basic FieldStorage multipart parsing Modified: python/branches/py3k/Lib/test/test_cmath.py ============================================================================== --- python/branches/py3k/Lib/test/test_cmath.py (original) +++ python/branches/py3k/Lib/test/test_cmath.py Wed Jul 1 01:06:06 2009 @@ -412,7 +412,7 @@ # real or imaginary part NaN for z in complex_nans: - self.assert_(math.isnan(phase(z))) + self.assertTrue(math.isnan(phase(z))) def test_abs(self): # zeros @@ -425,18 +425,18 @@ # real or imaginary part NaN self.assertEqual(abs(complex(NAN, -INF)), INF) - self.assert_(math.isnan(abs(complex(NAN, -2.3)))) - self.assert_(math.isnan(abs(complex(NAN, -0.0)))) - self.assert_(math.isnan(abs(complex(NAN, 0.0)))) - self.assert_(math.isnan(abs(complex(NAN, 2.3)))) + self.assertTrue(math.isnan(abs(complex(NAN, -2.3)))) + self.assertTrue(math.isnan(abs(complex(NAN, -0.0)))) + self.assertTrue(math.isnan(abs(complex(NAN, 0.0)))) + self.assertTrue(math.isnan(abs(complex(NAN, 2.3)))) self.assertEqual(abs(complex(NAN, INF)), INF) self.assertEqual(abs(complex(-INF, NAN)), INF) - self.assert_(math.isnan(abs(complex(-2.3, NAN)))) - self.assert_(math.isnan(abs(complex(-0.0, NAN)))) - self.assert_(math.isnan(abs(complex(0.0, NAN)))) - self.assert_(math.isnan(abs(complex(2.3, NAN)))) + self.assertTrue(math.isnan(abs(complex(-2.3, NAN)))) + self.assertTrue(math.isnan(abs(complex(-0.0, NAN)))) + self.assertTrue(math.isnan(abs(complex(0.0, NAN)))) + self.assertTrue(math.isnan(abs(complex(2.3, NAN)))) self.assertEqual(abs(complex(INF, NAN)), INF) - self.assert_(math.isnan(abs(complex(NAN, NAN)))) + self.assertTrue(math.isnan(abs(complex(NAN, NAN)))) # result overflows if float.__getformat__("double").startswith("IEEE"): @@ -455,26 +455,26 @@ self.assertCEqual(rect(1, -pi/2), (0, -1.)) def test_isnan(self): - self.failIf(cmath.isnan(1)) - self.failIf(cmath.isnan(1j)) - self.failIf(cmath.isnan(INF)) - self.assert_(cmath.isnan(NAN)) - self.assert_(cmath.isnan(complex(NAN, 0))) - self.assert_(cmath.isnan(complex(0, NAN))) - self.assert_(cmath.isnan(complex(NAN, NAN))) - self.assert_(cmath.isnan(complex(NAN, INF))) - self.assert_(cmath.isnan(complex(INF, NAN))) + self.assertFalse(cmath.isnan(1)) + self.assertFalse(cmath.isnan(1j)) + self.assertFalse(cmath.isnan(INF)) + self.assertTrue(cmath.isnan(NAN)) + self.assertTrue(cmath.isnan(complex(NAN, 0))) + self.assertTrue(cmath.isnan(complex(0, NAN))) + self.assertTrue(cmath.isnan(complex(NAN, NAN))) + self.assertTrue(cmath.isnan(complex(NAN, INF))) + self.assertTrue(cmath.isnan(complex(INF, NAN))) def test_isinf(self): - self.failIf(cmath.isinf(1)) - self.failIf(cmath.isinf(1j)) - self.failIf(cmath.isinf(NAN)) - self.assert_(cmath.isinf(INF)) - self.assert_(cmath.isinf(complex(INF, 0))) - self.assert_(cmath.isinf(complex(0, INF))) - self.assert_(cmath.isinf(complex(INF, INF))) - self.assert_(cmath.isinf(complex(NAN, INF))) - self.assert_(cmath.isinf(complex(INF, NAN))) + self.assertFalse(cmath.isinf(1)) + self.assertFalse(cmath.isinf(1j)) + self.assertFalse(cmath.isinf(NAN)) + self.assertTrue(cmath.isinf(INF)) + self.assertTrue(cmath.isinf(complex(INF, 0))) + self.assertTrue(cmath.isinf(complex(0, INF))) + self.assertTrue(cmath.isinf(complex(INF, INF))) + self.assertTrue(cmath.isinf(complex(NAN, INF))) + self.assertTrue(cmath.isinf(complex(INF, NAN))) def test_main(): Modified: python/branches/py3k/Lib/test/test_cmd_line.py ============================================================================== --- python/branches/py3k/Lib/test/test_cmd_line.py (original) +++ python/branches/py3k/Lib/test/test_cmd_line.py Wed Jul 1 01:06:06 2009 @@ -169,7 +169,7 @@ p.stdin.flush() data, rc = _kill_python_and_exit_code(p) self.assertEqual(rc, 0) - self.assert_(data.startswith(b'x'), data) + self.assertTrue(data.startswith(b'x'), data) def test_large_PYTHONPATH(self): with test.support.EnvironmentVarGuard() as env: @@ -178,8 +178,8 @@ env['PYTHONPATH'] = path1 + os.pathsep + path2 p = _spawn_python('-S', '-c', 'import sys; print(sys.path)') stdout, _ = p.communicate() - self.assert_(path1.encode('ascii') in stdout) - self.assert_(path2.encode('ascii') in stdout) + self.assertTrue(path1.encode('ascii') in stdout) + self.assertTrue(path2.encode('ascii') in stdout) def test_main(): Modified: python/branches/py3k/Lib/test/test_cmd_line_script.py ============================================================================== --- python/branches/py3k/Lib/test/test_cmd_line_script.py (original) +++ python/branches/py3k/Lib/test/test_cmd_line_script.py Wed Jul 1 01:06:06 2009 @@ -154,9 +154,9 @@ print(printed_file) print(printed_package) print(printed_argv0) - self.assert_(printed_file in data) - self.assert_(printed_package in data) - self.assert_(printed_argv0 in data) + self.assertTrue(printed_file in data) + self.assertTrue(printed_package in data) + self.assertTrue(printed_argv0 in data) def _check_import_error(self, script_name, expected_msg, *cmd_line_switches): @@ -166,7 +166,7 @@ print('Output from test script %r:' % script_name) print(data) print('Expected output: %r' % expected_msg) - self.assert_(expected_msg in data) + self.assertTrue(expected_msg in data) def test_basic_script(self): with temp_dir() as script_dir: Modified: python/branches/py3k/Lib/test/test_codecs.py ============================================================================== --- python/branches/py3k/Lib/test/test_codecs.py (original) +++ python/branches/py3k/Lib/test/test_codecs.py Wed Jul 1 01:06:06 2009 @@ -29,14 +29,14 @@ d = codecs.getincrementaldecoder(encoding)() part1 = d.decode(s[:i]) state = d.getstate() - self.assert_(isinstance(state[1], int)) + self.assertTrue(isinstance(state[1], int)) # Check that the condition stated in the documentation for # IncrementalDecoder.getstate() holds if not state[1]: # reset decoder to the default state without anything buffered d.setstate((state[0][:0], 0)) # Feeding the previous input may not produce any output - self.assert_(not d.decode(state[0])) + self.assertTrue(not d.decode(state[0])) # The decoder must return to the same state self.assertEqual(state, d.getstate()) # Create a new decoder and set it to the state @@ -296,7 +296,7 @@ f.write("spam") d = s.getvalue() # check whether there is exactly one BOM in it - self.assert_(d == self.spamle or d == self.spambe) + self.assertTrue(d == self.spamle or d == self.spambe) # try to read it back s = io.BytesIO(d) f = reader(s) @@ -429,7 +429,7 @@ f.write("spam") d = s.getvalue() # check whether there is exactly one BOM in it - self.assert_(d == self.spamle or d == self.spambe) + self.assertTrue(d == self.spamle or d == self.spambe) # try to read it back s = io.BytesIO(d) f = reader(s) @@ -1335,7 +1335,7 @@ for c in s: writer.write(c) chunk = q.read() - self.assert_(type(chunk) is bytes, type(chunk)) + self.assertTrue(type(chunk) is bytes, type(chunk)) encodedresult += chunk q = Queue(b"") reader = codecs.getreader(encoding)(q) Modified: python/branches/py3k/Lib/test/test_codeop.py ============================================================================== --- python/branches/py3k/Lib/test/test_codeop.py (original) +++ python/branches/py3k/Lib/test/test_codeop.py Wed Jul 1 01:06:06 2009 @@ -23,7 +23,7 @@ '''succeed iff str is a valid piece of code''' if is_jython: code = compile_command(str, "", symbol) - self.assert_(code) + self.assertTrue(code) if symbol == "single": d,r = {},{} saved_stdout = sys.stdout @@ -52,9 +52,9 @@ compile_command(str,symbol=symbol) self.fail("No exception thrown for invalid code") except SyntaxError: - self.assert_(is_syntax) + self.assertTrue(is_syntax) except OverflowError: - self.assert_(not is_syntax) + self.assertTrue(not is_syntax) def test_valid(self): av = self.assertValid Modified: python/branches/py3k/Lib/test/test_collections.py ============================================================================== --- python/branches/py3k/Lib/test/test_collections.py (original) +++ python/branches/py3k/Lib/test/test_collections.py Wed Jul 1 01:06:06 2009 @@ -44,9 +44,9 @@ namedtuple('_', 'a b c') # Test leading underscores in a typename nt = namedtuple('nt', 'the quick brown fox') # check unicode input - self.assert_("u'" not in repr(nt._fields)) + self.assertTrue("u'" not in repr(nt._fields)) nt = namedtuple('nt', ('the', 'quick')) # check unicode input - self.assert_("u'" not in repr(nt._fields)) + self.assertTrue("u'" not in repr(nt._fields)) self.assertRaises(TypeError, Point._make, [11]) # catch too few args self.assertRaises(TypeError, Point._make, [11, 22, 33]) # catch too many args @@ -75,8 +75,8 @@ self.assertRaises(TypeError, eval, 'Point(XXX=1, y=2)', locals()) # wrong keyword argument self.assertRaises(TypeError, eval, 'Point(x=1)', locals()) # missing keyword argument self.assertEqual(repr(p), 'Point(x=11, y=22)') - self.assert_('__dict__' not in dir(p)) # verify instance has no dict - self.assert_('__weakref__' not in dir(p)) + self.assertTrue('__dict__' not in dir(p)) # verify instance has no dict + self.assertTrue('__weakref__' not in dir(p)) self.assertEqual(p, Point._make([11, 22])) # test _make classmethod self.assertEqual(p._fields, ('x', 'y')) # test _fields attribute self.assertEqual(p._replace(x=1), (1, 22)) # test _replace method @@ -103,7 +103,7 @@ Point = namedtuple('Point', 'x y') p = Point(11, 22) - self.assert_(isinstance(p, tuple)) + self.assertTrue(isinstance(p, tuple)) self.assertEqual(p, (11, 22)) # matches a real tuple self.assertEqual(tuple(p), (11, 22)) # coercable to a real tuple self.assertEqual(list(p), [11, 22]) # coercable to a list @@ -236,8 +236,8 @@ # Check some non-hashables non_samples = [bytearray(), list(), set(), dict()] for x in non_samples: - self.failIf(isinstance(x, Hashable), repr(x)) - self.failIf(issubclass(type(x), Hashable), repr(type(x))) + self.assertFalse(isinstance(x, Hashable), repr(x)) + self.assertFalse(issubclass(type(x), Hashable), repr(type(x))) # Check some hashables samples = [None, int(), float(), complex(), @@ -246,23 +246,23 @@ int, list, object, type, bytes() ] for x in samples: - self.failUnless(isinstance(x, Hashable), repr(x)) - self.failUnless(issubclass(type(x), Hashable), repr(type(x))) + self.assertTrue(isinstance(x, Hashable), repr(x)) + self.assertTrue(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)) + self.assertFalse(issubclass(int, H)) self.validate_abstract_methods(Hashable, '__hash__') 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))) + self.assertFalse(isinstance(x, Iterable), repr(x)) + self.assertFalse(issubclass(type(x), Iterable), repr(type(x))) # Check some iterables samples = [bytes(), str(), tuple(), list(), set(), frozenset(), dict(), @@ -271,21 +271,21 @@ (x for x in []), ] for x in samples: - self.failUnless(isinstance(x, Iterable), repr(x)) - self.failUnless(issubclass(type(x), Iterable), repr(type(x))) + self.assertTrue(isinstance(x, Iterable), repr(x)) + self.assertTrue(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)) + self.assertFalse(issubclass(str, I)) self.validate_abstract_methods(Iterable, '__iter__') def test_Iterator(self): non_samples = [None, 42, 3.14, 1j, b"", "", (), [], {}, set()] for x in non_samples: - self.failIf(isinstance(x, Iterator), repr(x)) - self.failIf(issubclass(type(x), Iterator), repr(type(x))) + self.assertFalse(isinstance(x, Iterator), repr(x)) + self.assertFalse(issubclass(type(x), Iterator), repr(type(x))) samples = [iter(bytes()), iter(str()), iter(tuple()), iter(list()), iter(dict()), iter(set()), iter(frozenset()), @@ -295,8 +295,8 @@ (x for x in []), ] for x in samples: - self.failUnless(isinstance(x, Iterator), repr(x)) - self.failUnless(issubclass(type(x), Iterator), repr(type(x))) + self.assertTrue(isinstance(x, Iterator), repr(x)) + self.assertTrue(issubclass(type(x), Iterator), repr(type(x))) self.validate_abstract_methods(Iterator, '__next__') def test_Sized(self): @@ -305,15 +305,15 @@ (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))) + self.assertFalse(isinstance(x, Sized), repr(x)) + self.assertFalse(issubclass(type(x), Sized), repr(type(x))) samples = [bytes(), str(), 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))) + self.assertTrue(isinstance(x, Sized), repr(x)) + self.assertTrue(issubclass(type(x), Sized), repr(type(x))) self.validate_abstract_methods(Sized, '__len__') def test_Container(self): @@ -322,15 +322,15 @@ (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))) + self.assertFalse(isinstance(x, Container), repr(x)) + self.assertFalse(issubclass(type(x), Container), repr(type(x))) samples = [bytes(), str(), 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))) + self.assertTrue(isinstance(x, Container), repr(x)) + self.assertTrue(issubclass(type(x), Container), repr(type(x))) self.validate_abstract_methods(Container, '__contains__') def test_Callable(self): @@ -340,32 +340,32 @@ (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))) + self.assertFalse(isinstance(x, Callable), repr(x)) + self.assertFalse(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))) + self.assertTrue(isinstance(x, Callable), repr(x)) + self.assertTrue(issubclass(type(x), Callable), repr(type(x))) self.validate_abstract_methods(Callable, '__call__') 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)) + self.assertTrue(issubclass(C, B)) + self.assertFalse(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__) + self.assertFalse(issubclass(C, B), B.__name__) B.register(C) - self.failUnless(issubclass(C, B)) + self.assertTrue(issubclass(C, B)) class WithSet(MutableSet): @@ -395,8 +395,8 @@ def test_Set(self): for sample in [set, frozenset]: - self.failUnless(isinstance(sample(), Set)) - self.failUnless(issubclass(sample, Set)) + self.assertTrue(isinstance(sample(), Set)) + self.assertTrue(issubclass(sample, Set)) self.validate_abstract_methods(Set, '__contains__', '__iter__', '__len__') def test_hash_Set(self): @@ -412,13 +412,13 @@ def __hash__(self): return self._hash() a, b = OneTwoThreeSet(), OneTwoThreeSet() - self.failUnless(hash(a) == hash(b)) + self.assertTrue(hash(a) == hash(b)) def test_MutableSet(self): - self.failUnless(isinstance(set(), MutableSet)) - self.failUnless(issubclass(set, MutableSet)) - self.failIf(isinstance(frozenset(), MutableSet)) - self.failIf(issubclass(frozenset, MutableSet)) + self.assertTrue(isinstance(set(), MutableSet)) + self.assertTrue(issubclass(set, MutableSet)) + self.assertFalse(isinstance(frozenset(), MutableSet)) + self.assertFalse(issubclass(frozenset, MutableSet)) self.validate_abstract_methods(MutableSet, '__contains__', '__iter__', '__len__', 'add', 'discard') @@ -457,46 +457,46 @@ def test_Mapping(self): for sample in [dict]: - self.failUnless(isinstance(sample(), Mapping)) - self.failUnless(issubclass(sample, Mapping)) + self.assertTrue(isinstance(sample(), Mapping)) + self.assertTrue(issubclass(sample, Mapping)) self.validate_abstract_methods(Mapping, '__contains__', '__iter__', '__len__', '__getitem__') def test_MutableMapping(self): for sample in [dict]: - self.failUnless(isinstance(sample(), MutableMapping)) - self.failUnless(issubclass(sample, MutableMapping)) + self.assertTrue(isinstance(sample(), MutableMapping)) + self.assertTrue(issubclass(sample, MutableMapping)) self.validate_abstract_methods(MutableMapping, '__contains__', '__iter__', '__len__', '__getitem__', '__setitem__', '__delitem__') def test_Sequence(self): for sample in [tuple, list, bytes, str]: - self.failUnless(isinstance(sample(), Sequence)) - self.failUnless(issubclass(sample, Sequence)) - self.failUnless(isinstance(range(10), Sequence)) - self.failUnless(issubclass(range, Sequence)) - self.failUnless(issubclass(str, Sequence)) + self.assertTrue(isinstance(sample(), Sequence)) + self.assertTrue(issubclass(sample, Sequence)) + self.assertTrue(isinstance(range(10), Sequence)) + self.assertTrue(issubclass(range, Sequence)) + self.assertTrue(issubclass(str, Sequence)) self.validate_abstract_methods(Sequence, '__contains__', '__iter__', '__len__', '__getitem__') def test_ByteString(self): for sample in [bytes, bytearray]: - self.failUnless(isinstance(sample(), ByteString)) - self.failUnless(issubclass(sample, ByteString)) + self.assertTrue(isinstance(sample(), ByteString)) + self.assertTrue(issubclass(sample, ByteString)) for sample in [str, list, tuple]: - self.failIf(isinstance(sample(), ByteString)) - self.failIf(issubclass(sample, ByteString)) - self.failIf(isinstance(memoryview(b""), ByteString)) - self.failIf(issubclass(memoryview, ByteString)) + self.assertFalse(isinstance(sample(), ByteString)) + self.assertFalse(issubclass(sample, ByteString)) + self.assertFalse(isinstance(memoryview(b""), ByteString)) + self.assertFalse(issubclass(memoryview, ByteString)) def test_MutableSequence(self): for sample in [tuple, str, bytes]: - self.failIf(isinstance(sample(), MutableSequence)) - self.failIf(issubclass(sample, MutableSequence)) + self.assertFalse(isinstance(sample(), MutableSequence)) + self.assertFalse(issubclass(sample, MutableSequence)) for sample in [list, bytearray]: - self.failUnless(isinstance(sample(), MutableSequence)) - self.failUnless(issubclass(sample, MutableSequence)) - self.failIf(issubclass(str, MutableSequence)) + self.assertTrue(isinstance(sample(), MutableSequence)) + self.assertTrue(issubclass(sample, MutableSequence)) + self.assertFalse(issubclass(str, MutableSequence)) self.validate_abstract_methods(MutableSequence, '__contains__', '__iter__', '__len__', '__getitem__', '__setitem__', '__delitem__', 'insert') @@ -506,10 +506,10 @@ c = Counter('abcaba') self.assertEqual(c, Counter({'a':3 , 'b': 2, 'c': 1})) self.assertEqual(c, Counter(a=3, b=2, c=1)) - self.assert_(isinstance(c, dict)) - self.assert_(isinstance(c, Mapping)) - self.assert_(issubclass(Counter, dict)) - self.assert_(issubclass(Counter, Mapping)) + self.assertTrue(isinstance(c, dict)) + self.assertTrue(isinstance(c, Mapping)) + self.assertTrue(issubclass(Counter, dict)) + self.assertTrue(issubclass(Counter, Mapping)) self.assertEqual(len(c), 3) self.assertEqual(sum(c.values()), 6) self.assertEqual(sorted(c.values()), [1, 2, 3]) @@ -581,7 +581,7 @@ Counter(words), ]): msg = (i, dup, words) - self.assert_(dup is not words) + self.assertTrue(dup is not words) self.assertEquals(dup, words) self.assertEquals(len(dup), len(words)) self.assertEquals(type(dup), type(words)) @@ -597,7 +597,7 @@ def test_invariant_for_the_in_operator(self): c = Counter(a=10, b=-2, c=0) for elem in c: - self.assert_(elem in c) + self.assertTrue(elem in c) def test_multiset_operations(self): # Verify that adding a zero counter will strip zeros and negatives @@ -622,7 +622,7 @@ self.assertEqual(numberop(p[x], q[x]), result[x], (counterop, x, p, q)) # verify that results exclude non-positive counts - self.assert_(x>0 for x in result.values()) + self.assertTrue(x>0 for x in result.values()) elements = 'abcdef' for i in range(100): @@ -697,7 +697,7 @@ pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)] od = OrderedDict(pairs) del od['a'] - self.assert_('a' not in od) + self.assertTrue('a' not in od) with self.assertRaises(KeyError): del od['a'] self.assertEqual(list(od.items()), pairs[:2] + pairs[3:]) @@ -778,7 +778,7 @@ update_test, OrderedDict(od), ]): - self.assert_(dup is not od) + self.assertTrue(dup is not od) self.assertEquals(dup, od) self.assertEquals(list(dup.items()), list(od.items())) self.assertEquals(len(dup), len(od)) @@ -791,7 +791,7 @@ od = OrderedDict(pairs) # yaml.dump(od) --> # '!!python/object/apply:__main__.OrderedDict\n- - [a, 1]\n - [b, 2]\n' - self.assert_(all(type(pair)==list for pair in od.__reduce__()[1])) + self.assertTrue(all(type(pair)==list for pair in od.__reduce__()[1])) def test_reduce_not_too_fat(self): # do not save instance dictionary if not needed Modified: python/branches/py3k/Lib/test/test_compile.py ============================================================================== --- python/branches/py3k/Lib/test/test_compile.py (original) +++ python/branches/py3k/Lib/test/test_compile.py Wed Jul 1 01:06:06 2009 @@ -376,10 +376,10 @@ import __mangled_mod import __package__.module - self.assert_("_A__mangled" in A.f.__code__.co_varnames) - self.assert_("__not_mangled__" in A.f.__code__.co_varnames) - self.assert_("_A__mangled_mod" in A.f.__code__.co_varnames) - self.assert_("__package__" in A.f.__code__.co_varnames) + self.assertTrue("_A__mangled" in A.f.__code__.co_varnames) + self.assertTrue("__not_mangled__" in A.f.__code__.co_varnames) + self.assertTrue("_A__mangled_mod" in A.f.__code__.co_varnames) + self.assertTrue("__package__" in A.f.__code__.co_varnames) def test_compile_ast(self): fname = __file__ @@ -398,7 +398,7 @@ for fname, code in sample_code: co1 = compile(code, '%s1' % fname, 'exec') ast = compile(code, '%s2' % fname, 'exec', _ast.PyCF_ONLY_AST) - self.assert_(type(ast) == _ast.Module) + self.assertTrue(type(ast) == _ast.Module) co2 = compile(ast, '%s3' % fname, 'exec') self.assertEqual(co1, co2) # the code object's filename comes from the second compilation step Modified: python/branches/py3k/Lib/test/test_complex.py ============================================================================== --- python/branches/py3k/Lib/test/test_complex.py (original) +++ python/branches/py3k/Lib/test/test_complex.py Wed Jul 1 01:06:06 2009 @@ -35,7 +35,7 @@ if x == 0: return abs(y) < eps # check that relative difference < eps - self.assert_(abs((x-y)/y) < eps) + self.assertTrue(abs((x-y)/y) < eps) def assertFloatsAreIdentical(self, x, y): """assert that floats x and y are identical, in the sense that: @@ -66,7 +66,7 @@ self.assertCloseAbs(x.imag, y.imag, eps) def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def check_div(self, x, y): """Compute complex z=x*y, and check that z/x==y and z/y==x.""" @@ -174,8 +174,8 @@ def test_boolcontext(self): for i in range(100): - self.assert_(complex(random() + 1e-6, random() + 1e-6)) - self.assert_(not complex(0.0, 0.0)) + self.assertTrue(complex(random() + 1e-6, random() + 1e-6)) + self.assertTrue(not complex(0.0, 0.0)) def test_conjugate(self): self.assertClose(complex(5.3, 9.8).conjugate(), 5.3-9.8j) @@ -257,7 +257,7 @@ self.assertEqual(split_zeros(complex(-0., 1.).real), split_zeros(-0.)) c = 3.14 + 1j - self.assert_(complex(c) is c) + self.assertTrue(complex(c) is c) del c self.assertRaises(TypeError, complex, "1", "1") Modified: python/branches/py3k/Lib/test/test_contains.py ============================================================================== --- python/branches/py3k/Lib/test/test_contains.py (original) +++ python/branches/py3k/Lib/test/test_contains.py Wed Jul 1 01:06:06 2009 @@ -20,19 +20,19 @@ a = base_set(1) b = myset(1) c = seq(1) - self.assert_(1 in b) - self.assert_(0 not in b) - self.assert_(1 in c) - self.assert_(0 not in c) + self.assertTrue(1 in b) + self.assertTrue(0 not in b) + self.assertTrue(1 in c) + self.assertTrue(0 not in c) self.assertRaises(TypeError, lambda: 1 in a) self.assertRaises(TypeError, lambda: 1 not in a) # test char in string - self.assert_('c' in 'abc') - self.assert_('d' not in 'abc') + self.assertTrue('c' in 'abc') + self.assertTrue('d' not in 'abc') - self.assert_('' in '') - self.assert_('' in 'abc') + self.assertTrue('' in '') + self.assertTrue('' in 'abc') self.assertRaises(TypeError, lambda: None in 'abc') @@ -40,15 +40,15 @@ # a collection of tests on builtin sequence types a = range(10) for i in a: - self.assert_(i in a) - self.assert_(16 not in a) - self.assert_(a not in a) + self.assertTrue(i in a) + self.assertTrue(16 not in a) + self.assertTrue(a not in a) a = tuple(a) for i in a: - self.assert_(i in a) - self.assert_(16 not in a) - self.assert_(a not in a) + self.assertTrue(i in a) + self.assertTrue(16 not in a) + self.assertTrue(a not in a) class Deviant1: """Behaves strangely when compared @@ -64,7 +64,7 @@ self.aList.remove(14) return 0 - self.assert_(Deviant1() not in Deviant1.aList) + self.assertTrue(Deviant1() not in Deviant1.aList) def test_nonreflexive(self): # containment and equality tests involving elements that are @@ -81,9 +81,9 @@ for constructor in constructors: container = constructor(values) for elem in container: - self.assert_(elem in container) - self.assert_(container == constructor(values)) - self.assert_(container == container) + self.assertTrue(elem in container) + self.assertTrue(container == constructor(values)) + self.assertTrue(container == container) def test_main(): Modified: python/branches/py3k/Lib/test/test_contextlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_contextlib.py (original) +++ python/branches/py3k/Lib/test/test_contextlib.py Wed Jul 1 01:06:06 2009 @@ -54,7 +54,7 @@ ctx = whee() ctx.__enter__() # Calling __exit__ should not result in an exception - self.failIf(ctx.__exit__(TypeError, TypeError("foo"), None)) + self.assertFalse(ctx.__exit__(TypeError, TypeError("foo"), None)) def test_contextmanager_trap_yield_after_throw(self): @contextmanager @@ -261,17 +261,17 @@ try: f = None with open(tfn, "w") as f: - self.failIf(f.closed) + self.assertFalse(f.closed) f.write("Booh\n") - self.failUnless(f.closed) + self.assertTrue(f.closed) f = None try: with open(tfn, "r") as f: - self.failIf(f.closed) + self.assertFalse(f.closed) self.assertEqual(f.read(), "Booh\n") 1/0 except ZeroDivisionError: - self.failUnless(f.closed) + self.assertTrue(f.closed) else: self.fail("Didn't raise ZeroDivisionError") finally: @@ -283,16 +283,16 @@ class LockContextTestCase(unittest.TestCase): def boilerPlate(self, lock, locked): - self.failIf(locked()) + self.assertFalse(locked()) with lock: - self.failUnless(locked()) - self.failIf(locked()) + self.assertTrue(locked()) + self.assertFalse(locked()) try: with lock: - self.failUnless(locked()) + self.assertTrue(locked()) 1/0 except ZeroDivisionError: - self.failIf(locked()) + self.assertFalse(locked()) else: self.fail("Didn't raise ZeroDivisionError") Modified: python/branches/py3k/Lib/test/test_copy.py ============================================================================== --- python/branches/py3k/Lib/test/test_copy.py (original) +++ python/branches/py3k/Lib/test/test_copy.py Wed Jul 1 01:06:06 2009 @@ -17,8 +17,8 @@ # Attempt full line coverage of copy.py from top to bottom def test_exceptions(self): - self.assert_(copy.Error is copy.error) - self.assert_(issubclass(copy.Error, Exception)) + self.assertTrue(copy.Error is copy.error) + self.assertTrue(issubclass(copy.Error, Exception)) # The copy() method @@ -59,7 +59,7 @@ raise support.TestFailed("shouldn't call this") x = C() y = copy.copy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_copy_reduce(self): class C(object): @@ -67,7 +67,7 @@ return "" x = C() y = copy.copy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_copy_cant(self): class C(object): @@ -91,7 +91,7 @@ "hello", "hello\u1234", f.__code__, NewStyle, range(10), Classic, max] for x in tests: - self.assert_(copy.copy(x) is x, repr(x)) + self.assertTrue(copy.copy(x) is x, repr(x)) def test_copy_list(self): x = [1, 2, 3] @@ -185,9 +185,9 @@ x = [x, x] y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y[0] is not x[0]) - self.assert_(y[0] is y[1]) + self.assertTrue(y is not x) + self.assertTrue(y[0] is not x[0]) + self.assertTrue(y[0] is y[1]) def test_deepcopy_issubclass(self): # XXX Note: there's no way to test the TypeError coming out of @@ -232,7 +232,7 @@ raise support.TestFailed("shouldn't call this") x = C() y = copy.deepcopy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_deepcopy_reduce(self): class C(object): @@ -240,7 +240,7 @@ return "" x = C() y = copy.deepcopy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_deepcopy_cant(self): class C(object): @@ -264,14 +264,14 @@ "hello", "hello\u1234", f.__code__, NewStyle, range(10), Classic, max] for x in tests: - self.assert_(copy.deepcopy(x) is x, repr(x)) + self.assertTrue(copy.deepcopy(x) is x, repr(x)) def test_deepcopy_list(self): x = [[1, 2], 3] y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(x is not y) - self.assert_(x[0] is not y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is not y[0]) def test_deepcopy_reflexive_list(self): x = [] @@ -279,16 +279,16 @@ y = copy.deepcopy(x) for op in comparisons: self.assertRaises(RuntimeError, op, y, x) - self.assert_(y is not x) - self.assert_(y[0] is y) + self.assertTrue(y is not x) + self.assertTrue(y[0] is y) self.assertEqual(len(y), 1) def test_deepcopy_tuple(self): x = ([1, 2], 3) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(x is not y) - self.assert_(x[0] is not y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is not y[0]) def test_deepcopy_reflexive_tuple(self): x = ([],) @@ -296,16 +296,16 @@ y = copy.deepcopy(x) for op in comparisons: self.assertRaises(RuntimeError, op, y, x) - self.assert_(y is not x) - self.assert_(y[0] is not x[0]) - self.assert_(y[0][0] is y) + self.assertTrue(y is not x) + self.assertTrue(y[0] is not x[0]) + self.assertTrue(y[0][0] is y) def test_deepcopy_dict(self): x = {"foo": [1, 2], "bar": 3} y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(x is not y) - self.assert_(x["foo"] is not y["foo"]) + self.assertTrue(x is not y) + self.assertTrue(x["foo"] is not y["foo"]) def test_deepcopy_reflexive_dict(self): x = {} @@ -315,15 +315,15 @@ self.assertRaises(TypeError, op, y, x) for op in equality_comparisons: self.assertRaises(RuntimeError, op, y, x) - self.assert_(y is not x) - self.assert_(y['foo'] is y) + self.assertTrue(y is not x) + self.assertTrue(y['foo'] is y) self.assertEqual(len(y), 1) def test_deepcopy_keepalive(self): memo = {} x = 42 y = copy.deepcopy(x, memo) - self.assert_(memo[id(x)] is x) + self.assertTrue(memo[id(x)] is x) def test_deepcopy_inst_vanilla(self): class C: @@ -334,7 +334,7 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_deepcopy(self): class C: @@ -347,8 +347,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_getinitargs(self): class C: @@ -361,8 +361,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_getstate(self): class C: @@ -375,8 +375,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_setstate(self): class C: @@ -389,8 +389,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_inst_getstate_setstate(self): class C: @@ -405,8 +405,8 @@ x = C([42]) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y is not x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y is not x) + self.assertTrue(y.foo is not x.foo) def test_deepcopy_reflexive_inst(self): class C: @@ -414,8 +414,8 @@ x = C() x.foo = x y = copy.deepcopy(x) - self.assert_(y is not x) - self.assert_(y.foo is y) + self.assertTrue(y is not x) + self.assertTrue(y.foo is y) # _reconstruct() @@ -425,9 +425,9 @@ return "" x = C() y = copy.copy(x) - self.assert_(y is x) + self.assertTrue(y is x) y = copy.deepcopy(x) - self.assert_(y is x) + self.assertTrue(y is x) def test_reconstruct_nostate(self): class C(object): @@ -436,9 +436,9 @@ x = C() x.foo = 42 y = copy.copy(x) - self.assert_(y.__class__ is x.__class__) + self.assertTrue(y.__class__ is x.__class__) y = copy.deepcopy(x) - self.assert_(y.__class__ is x.__class__) + self.assertTrue(y.__class__ is x.__class__) def test_reconstruct_state(self): class C(object): @@ -452,7 +452,7 @@ self.assertEqual(y, x) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y.foo is not x.foo) def test_reconstruct_state_setstate(self): class C(object): @@ -468,7 +468,7 @@ self.assertEqual(y, x) y = copy.deepcopy(x) self.assertEqual(y, x) - self.assert_(y.foo is not x.foo) + self.assertTrue(y.foo is not x.foo) def test_reconstruct_reflexive(self): class C(object): @@ -476,8 +476,8 @@ x = C() x.foo = x y = copy.deepcopy(x) - self.assert_(y is not x) - self.assert_(y.foo is y) + self.assertTrue(y is not x) + self.assertTrue(y.foo is y) # Additions for Python 2.3 and pickle protocol 2 @@ -491,12 +491,12 @@ x = C([[1, 2], 3]) y = copy.copy(x) self.assertEqual(x, y) - self.assert_(x is not y) - self.assert_(x[0] is y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is y[0]) y = copy.deepcopy(x) self.assertEqual(x, y) - self.assert_(x is not y) - self.assert_(x[0] is not y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is not y[0]) def test_reduce_5tuple(self): class C(dict): @@ -508,12 +508,12 @@ x = C([("foo", [1, 2]), ("bar", 3)]) y = copy.copy(x) self.assertEqual(x, y) - self.assert_(x is not y) - self.assert_(x["foo"] is y["foo"]) + self.assertTrue(x is not y) + self.assertTrue(x["foo"] is y["foo"]) y = copy.deepcopy(x) self.assertEqual(x, y) - self.assert_(x is not y) - self.assert_(x["foo"] is not y["foo"]) + self.assertTrue(x is not y) + self.assertTrue(x["foo"] is not y["foo"]) def test_copy_slots(self): class C(object): @@ -521,7 +521,7 @@ x = C() x.foo = [42] y = copy.copy(x) - self.assert_(x.foo is y.foo) + self.assertTrue(x.foo is y.foo) def test_deepcopy_slots(self): class C(object): @@ -530,7 +530,7 @@ x.foo = [42] y = copy.deepcopy(x) self.assertEqual(x.foo, y.foo) - self.assert_(x.foo is not y.foo) + self.assertTrue(x.foo is not y.foo) def test_copy_list_subclass(self): class C(list): @@ -540,8 +540,8 @@ y = copy.copy(x) self.assertEqual(list(x), list(y)) self.assertEqual(x.foo, y.foo) - self.assert_(x[0] is y[0]) - self.assert_(x.foo is y.foo) + self.assertTrue(x[0] is y[0]) + self.assertTrue(x.foo is y.foo) def test_deepcopy_list_subclass(self): class C(list): @@ -551,8 +551,8 @@ y = copy.deepcopy(x) self.assertEqual(list(x), list(y)) self.assertEqual(x.foo, y.foo) - self.assert_(x[0] is not y[0]) - self.assert_(x.foo is not y.foo) + self.assertTrue(x[0] is not y[0]) + self.assertTrue(x.foo is not y.foo) def test_copy_tuple_subclass(self): class C(tuple): @@ -569,8 +569,8 @@ self.assertEqual(tuple(x), ([1, 2], 3)) y = copy.deepcopy(x) self.assertEqual(tuple(y), ([1, 2], 3)) - self.assert_(x is not y) - self.assert_(x[0] is not y[0]) + self.assertTrue(x is not y) + self.assertTrue(x[0] is not y[0]) def test_getstate_exc(self): class EvilState(object): Modified: python/branches/py3k/Lib/test/test_copyreg.py ============================================================================== --- python/branches/py3k/Lib/test/test_copyreg.py (original) +++ python/branches/py3k/Lib/test/test_copyreg.py Wed Jul 1 01:06:06 2009 @@ -51,10 +51,10 @@ mod, func, code) copyreg.add_extension(mod, func, code) # Should be in the registry. - self.assert_(copyreg._extension_registry[mod, func] == code) - self.assert_(copyreg._inverted_registry[code] == (mod, func)) + self.assertTrue(copyreg._extension_registry[mod, func] == code) + self.assertTrue(copyreg._inverted_registry[code] == (mod, func)) # Shouldn't be in the cache. - self.assert_(code not in copyreg._extension_cache) + self.assertTrue(code not in copyreg._extension_cache) # Redundant registration should be OK. copyreg.add_extension(mod, func, code) # shouldn't blow up # Conflicting code. @@ -81,7 +81,7 @@ e.restore() # Shouldn't be there anymore. - self.assert_((mod, func) not in copyreg._extension_registry) + self.assertTrue((mod, func) not in copyreg._extension_registry) # The code *may* be in copyreg._extension_registry, though, if # we happened to pick on a registered code. So don't check for # that. Modified: python/branches/py3k/Lib/test/test_csv.py ============================================================================== --- python/branches/py3k/Lib/test/test_csv.py (original) +++ python/branches/py3k/Lib/test/test_csv.py Wed Jul 1 01:06:06 2009 @@ -315,7 +315,7 @@ expected_dialects.sort() csv.register_dialect(name, myexceltsv) try: - self.failUnless(csv.get_dialect(name).delimiter, '\t') + self.assertTrue(csv.get_dialect(name).delimiter, '\t') got_dialects = csv.list_dialects() got_dialects.sort() self.assertEqual(expected_dialects, got_dialects) @@ -326,8 +326,8 @@ name = 'fedcba' csv.register_dialect(name, delimiter=';') try: - self.failUnless(csv.get_dialect(name).delimiter, '\t') - self.failUnless(list(csv.reader('X;Y;Z', name)), ['X', 'Y', 'Z']) + self.assertTrue(csv.get_dialect(name).delimiter, '\t') + self.assertTrue(list(csv.reader('X;Y;Z', name)), ['X', 'Y', 'Z']) finally: csv.unregister_dialect(name) @@ -811,7 +811,7 @@ # given that all three lines in sample3 are equal, # I think that any character could have been 'guessed' as the # delimiter, depending on dictionary order - self.assert_(dialect.delimiter in self.sample3) + self.assertTrue(dialect.delimiter in self.sample3) dialect = sniffer.sniff(self.sample3, delimiters="?,") self.assertEqual(dialect.delimiter, "?") dialect = sniffer.sniff(self.sample3, delimiters="/,") Modified: python/branches/py3k/Lib/test/test_datetime.py ============================================================================== --- python/branches/py3k/Lib/test/test_datetime.py (original) +++ python/branches/py3k/Lib/test/test_datetime.py Wed Jul 1 01:06:06 2009 @@ -77,9 +77,9 @@ def __init__(self, offset, name): self.__offset = offset self.__name = name - self.failUnless(issubclass(NotEnough, tzinfo)) + self.assertTrue(issubclass(NotEnough, tzinfo)) ne = NotEnough(3, "NotByALongShot") - self.failUnless(isinstance(ne, tzinfo)) + self.assertTrue(isinstance(ne, tzinfo)) dt = datetime.now() self.assertRaises(NotImplementedError, ne.tzname, dt) @@ -88,7 +88,7 @@ def test_normal(self): fo = FixedOffset(3, "Three") - self.failUnless(isinstance(fo, tzinfo)) + self.assertTrue(isinstance(fo, tzinfo)) for dt in datetime.now(), None: self.assertEqual(fo.utcoffset(dt), timedelta(minutes=3)) self.assertEqual(fo.tzname(dt), "Three") @@ -99,25 +99,25 @@ # carry no data), but they need to be picklable anyway else # concrete subclasses can't be pickled. orig = tzinfo.__new__(tzinfo) - self.failUnless(type(orig) is tzinfo) + self.assertTrue(type(orig) is tzinfo) for pickler, unpickler, proto in pickle_choices: green = pickler.dumps(orig, proto) derived = unpickler.loads(green) - self.failUnless(type(derived) is tzinfo) + self.assertTrue(type(derived) is tzinfo) def test_pickling_subclass(self): # Make sure we can pickle/unpickle an instance of a subclass. offset = timedelta(minutes=-300) orig = PicklableFixedOffset(offset, 'cookie') - self.failUnless(isinstance(orig, tzinfo)) - self.failUnless(type(orig) is PicklableFixedOffset) + self.assertTrue(isinstance(orig, tzinfo)) + self.assertTrue(type(orig) is PicklableFixedOffset) self.assertEqual(orig.utcoffset(None), offset) self.assertEqual(orig.tzname(None), 'cookie') for pickler, unpickler, proto in pickle_choices: green = pickler.dumps(orig, proto) derived = unpickler.loads(green) - self.failUnless(isinstance(derived, tzinfo)) - self.failUnless(type(derived) is PicklableFixedOffset) + self.assertTrue(isinstance(derived, tzinfo)) + self.assertTrue(type(derived) is PicklableFixedOffset) self.assertEqual(derived.utcoffset(None), offset) self.assertEqual(derived.tzname(None), 'cookie') @@ -134,16 +134,16 @@ def test_harmless_mixed_comparison(self): me = self.theclass(1, 1, 1) - self.failIf(me == ()) - self.failUnless(me != ()) - self.failIf(() == me) - self.failUnless(() != me) + self.assertFalse(me == ()) + self.assertTrue(me != ()) + self.assertFalse(() == me) + self.assertTrue(() != me) - self.failUnless(me in [1, 20, [], me]) - self.failIf(me not in [1, 20, [], me]) + self.assertTrue(me in [1, 20, [], me]) + self.assertFalse(me not in [1, 20, [], me]) - self.failUnless([] in [me, 1, 20, []]) - self.failIf([] not in [me, 1, 20, []]) + self.assertTrue([] in [me, 1, 20, []]) + self.assertFalse([] not in [me, 1, 20, []]) def test_harmful_mixed_comparison(self): me = self.theclass(1, 1, 1) @@ -303,26 +303,26 @@ t1 = timedelta(2, 3, 4) t2 = timedelta(2, 3, 4) self.assertEqual(t1, t2) - self.failUnless(t1 <= t2) - self.failUnless(t1 >= t2) - self.failUnless(not t1 != t2) - self.failUnless(not t1 < t2) - self.failUnless(not t1 > t2) + self.assertTrue(t1 <= t2) + self.assertTrue(t1 >= t2) + self.assertTrue(not t1 != t2) + self.assertTrue(not t1 < t2) + self.assertTrue(not t1 > t2) for args in (3, 3, 3), (2, 4, 4), (2, 3, 5): t2 = timedelta(*args) # this is larger than t1 - self.failUnless(t1 < t2) - self.failUnless(t2 > t1) - self.failUnless(t1 <= t2) - self.failUnless(t2 >= t1) - self.failUnless(t1 != t2) - self.failUnless(t2 != t1) - self.failUnless(not t1 == t2) - self.failUnless(not t2 == t1) - self.failUnless(not t1 > t2) - self.failUnless(not t2 < t1) - self.failUnless(not t1 >= t2) - self.failUnless(not t2 <= t1) + self.assertTrue(t1 < t2) + self.assertTrue(t2 > t1) + self.assertTrue(t1 <= t2) + self.assertTrue(t2 >= t1) + self.assertTrue(t1 != t2) + self.assertTrue(t2 != t1) + self.assertTrue(not t1 == t2) + self.assertTrue(not t2 == t1) + self.assertTrue(not t1 > t2) + self.assertTrue(not t2 < t1) + self.assertTrue(not t1 >= t2) + self.assertTrue(not t2 <= t1) for badarg in OTHERSTUFF: self.assertEqual(t1 == badarg, False) @@ -368,7 +368,7 @@ # Verify td -> string -> td identity. s = repr(td) - self.failUnless(s.startswith('datetime.')) + self.assertTrue(s.startswith('datetime.')) s = s[9:] td2 = eval(s) self.assertEqual(td, td2) @@ -378,10 +378,10 @@ self.assertEqual(td, td2) def test_resolution_info(self): - self.assert_(isinstance(timedelta.min, timedelta)) - self.assert_(isinstance(timedelta.max, timedelta)) - self.assert_(isinstance(timedelta.resolution, timedelta)) - self.assert_(timedelta.max > timedelta.min) + self.assertTrue(isinstance(timedelta.min, timedelta)) + self.assertTrue(isinstance(timedelta.max, timedelta)) + self.assertTrue(isinstance(timedelta.resolution, timedelta)) + self.assertTrue(timedelta.max > timedelta.min) self.assertEqual(timedelta.min, timedelta(-999999999)) self.assertEqual(timedelta.max, timedelta(999999999, 24*3600-1, 1e6-1)) self.assertEqual(timedelta.resolution, timedelta(0, 0, 1)) @@ -428,11 +428,11 @@ (-1, 24*3600-1, 999999)) def test_bool(self): - self.failUnless(timedelta(1)) - self.failUnless(timedelta(0, 1)) - self.failUnless(timedelta(0, 0, 1)) - self.failUnless(timedelta(microseconds=1)) - self.failUnless(not timedelta(0)) + self.assertTrue(timedelta(1)) + self.assertTrue(timedelta(0, 1)) + self.assertTrue(timedelta(0, 0, 1)) + self.assertTrue(timedelta(microseconds=1)) + self.assertTrue(not timedelta(0)) def test_subclass_timedelta(self): @@ -448,17 +448,17 @@ return round(sum) t1 = T(days=1) - self.assert_(type(t1) is T) + self.assertTrue(type(t1) is T) self.assertEqual(t1.as_hours(), 24) t2 = T(days=-1, seconds=-3600) - self.assert_(type(t2) is T) + self.assertTrue(type(t2) is T) self.assertEqual(t2.as_hours(), -25) t3 = t1 + t2 - self.assert_(type(t3) is timedelta) + self.assertTrue(type(t3) is timedelta) t4 = T.from_td(t3) - self.assert_(type(t4) is T) + self.assertTrue(type(t4) is T) self.assertEqual(t3.days, t4.days) self.assertEqual(t3.seconds, t4.seconds) self.assertEqual(t3.microseconds, t4.microseconds) @@ -521,7 +521,7 @@ self.theclass.today()): # Verify dt -> string -> date identity. s = repr(dt) - self.failUnless(s.startswith('datetime.')) + self.assertTrue(s.startswith('datetime.')) s = s[9:] dt2 = eval(s) self.assertEqual(dt, dt2) @@ -755,7 +755,7 @@ # It worked or it didn't. If it didn't, assume it's reason #2, and # let the test pass if they're within half a second of each other. - self.failUnless(today == todayagain or + self.assertTrue(today == todayagain or abs(todayagain - today) < timedelta(seconds=0.5)) def test_weekday(self): @@ -891,10 +891,10 @@ self.assertEqual(b.__format__(fmt), 'B') def test_resolution_info(self): - self.assert_(isinstance(self.theclass.min, self.theclass)) - self.assert_(isinstance(self.theclass.max, self.theclass)) - self.assert_(isinstance(self.theclass.resolution, timedelta)) - self.assert_(self.theclass.max > self.theclass.min) + self.assertTrue(isinstance(self.theclass.min, self.theclass)) + self.assertTrue(isinstance(self.theclass.max, self.theclass)) + self.assertTrue(isinstance(self.theclass.resolution, timedelta)) + self.assertTrue(self.theclass.max > self.theclass.min) def test_extreme_timedelta(self): big = self.theclass.max - self.theclass.min @@ -943,26 +943,26 @@ t1 = self.theclass(2, 3, 4) t2 = self.theclass(2, 3, 4) self.assertEqual(t1, t2) - self.failUnless(t1 <= t2) - self.failUnless(t1 >= t2) - self.failUnless(not t1 != t2) - self.failUnless(not t1 < t2) - self.failUnless(not t1 > t2) + self.assertTrue(t1 <= t2) + self.assertTrue(t1 >= t2) + self.assertTrue(not t1 != t2) + self.assertTrue(not t1 < t2) + self.assertTrue(not t1 > t2) for args in (3, 3, 3), (2, 4, 4), (2, 3, 5): t2 = self.theclass(*args) # this is larger than t1 - self.failUnless(t1 < t2) - self.failUnless(t2 > t1) - self.failUnless(t1 <= t2) - self.failUnless(t2 >= t1) - self.failUnless(t1 != t2) - self.failUnless(t2 != t1) - self.failUnless(not t1 == t2) - self.failUnless(not t2 == t1) - self.failUnless(not t1 > t2) - self.failUnless(not t2 < t1) - self.failUnless(not t1 >= t2) - self.failUnless(not t2 <= t1) + self.assertTrue(t1 < t2) + self.assertTrue(t2 > t1) + self.assertTrue(t1 <= t2) + self.assertTrue(t2 >= t1) + self.assertTrue(t1 != t2) + self.assertTrue(t2 != t1) + self.assertTrue(not t1 == t2) + self.assertTrue(not t2 == t1) + self.assertTrue(not t1 > t2) + self.assertTrue(not t2 < t1) + self.assertTrue(not t1 >= t2) + self.assertTrue(not t2 <= t1) for badarg in OTHERSTUFF: self.assertEqual(t1 == badarg, False) @@ -1031,8 +1031,8 @@ def test_bool(self): # All dates are considered true. - self.failUnless(self.theclass.min) - self.failUnless(self.theclass.max) + self.assertTrue(self.theclass.min) + self.assertTrue(self.theclass.max) def test_strftime_out_of_range(self): # For nasty technical reasons, we can't handle years before 1900. @@ -1155,7 +1155,7 @@ self.theclass.now()): # Verify dt -> string -> datetime identity. s = repr(dt) - self.failUnless(s.startswith('datetime.')) + self.assertTrue(s.startswith('datetime.')) s = s[9:] dt2 = eval(s) self.assertEqual(dt, dt2) @@ -1228,7 +1228,7 @@ dt2 = self.theclass(2002, 3, 1, 10, 0, 0) dt3 = self.theclass(2002, 3, 1, 9, 0, 0) self.assertEqual(dt1, dt3) - self.assert_(dt2 > dt3) + self.assertTrue(dt2 > dt3) # Make sure comparison doesn't forget microseconds, and isn't done # via comparing a float timestamp (an IEEE double doesn't have enough @@ -1239,7 +1239,7 @@ us = timedelta(microseconds=1) dt2 = dt1 + us self.assertEqual(dt2 - dt1, us) - self.assert_(dt1 < dt2) + self.assertTrue(dt1 < dt2) def test_strftime_with_bad_tzname_replace(self): # verify ok if tzinfo.tzname().replace() returns a non-string @@ -1420,28 +1420,28 @@ t1 = self.theclass(*args) t2 = self.theclass(*args) self.assertEqual(t1, t2) - self.failUnless(t1 <= t2) - self.failUnless(t1 >= t2) - self.failUnless(not t1 != t2) - self.failUnless(not t1 < t2) - self.failUnless(not t1 > t2) + self.assertTrue(t1 <= t2) + self.assertTrue(t1 >= t2) + self.assertTrue(not t1 != t2) + self.assertTrue(not t1 < t2) + self.assertTrue(not t1 > t2) for i in range(len(args)): newargs = args[:] newargs[i] = args[i] + 1 t2 = self.theclass(*newargs) # this is larger than t1 - self.failUnless(t1 < t2) - self.failUnless(t2 > t1) - self.failUnless(t1 <= t2) - self.failUnless(t2 >= t1) - self.failUnless(t1 != t2) - self.failUnless(t2 != t1) - self.failUnless(not t1 == t2) - self.failUnless(not t2 == t1) - self.failUnless(not t1 > t2) - self.failUnless(not t2 < t1) - self.failUnless(not t1 >= t2) - self.failUnless(not t2 <= t1) + self.assertTrue(t1 < t2) + self.assertTrue(t2 > t1) + self.assertTrue(t1 <= t2) + self.assertTrue(t2 >= t1) + self.assertTrue(t1 != t2) + self.assertTrue(t2 != t1) + self.assertTrue(not t1 == t2) + self.assertTrue(not t2 == t1) + self.assertTrue(not t1 > t2) + self.assertTrue(not t2 < t1) + self.assertTrue(not t1 >= t2) + self.assertTrue(not t2 <= t1) # A helper for timestamp constructor tests. @@ -1520,7 +1520,7 @@ if abs(from_timestamp - from_now) <= tolerance: break # Else try again a few times. - self.failUnless(abs(from_timestamp - from_now) <= tolerance) + self.assertTrue(abs(from_timestamp - from_now) <= tolerance) def test_strptime(self): import _strptime @@ -1689,7 +1689,7 @@ # Verify t -> string -> time identity. s = repr(t) - self.failUnless(s.startswith('datetime.')) + self.assertTrue(s.startswith('datetime.')) s = s[9:] t2 = eval(s) self.assertEqual(t, t2) @@ -1704,28 +1704,28 @@ t1 = self.theclass(*args) t2 = self.theclass(*args) self.assertEqual(t1, t2) - self.failUnless(t1 <= t2) - self.failUnless(t1 >= t2) - self.failUnless(not t1 != t2) - self.failUnless(not t1 < t2) - self.failUnless(not t1 > t2) + self.assertTrue(t1 <= t2) + self.assertTrue(t1 >= t2) + self.assertTrue(not t1 != t2) + self.assertTrue(not t1 < t2) + self.assertTrue(not t1 > t2) for i in range(len(args)): newargs = args[:] newargs[i] = args[i] + 1 t2 = self.theclass(*newargs) # this is larger than t1 - self.failUnless(t1 < t2) - self.failUnless(t2 > t1) - self.failUnless(t1 <= t2) - self.failUnless(t2 >= t1) - self.failUnless(t1 != t2) - self.failUnless(t2 != t1) - self.failUnless(not t1 == t2) - self.failUnless(not t2 == t1) - self.failUnless(not t1 > t2) - self.failUnless(not t2 < t1) - self.failUnless(not t1 >= t2) - self.failUnless(not t2 <= t1) + self.assertTrue(t1 < t2) + self.assertTrue(t2 > t1) + self.assertTrue(t1 <= t2) + self.assertTrue(t2 >= t1) + self.assertTrue(t1 != t2) + self.assertTrue(t2 != t1) + self.assertTrue(not t1 == t2) + self.assertTrue(not t2 == t1) + self.assertTrue(not t1 > t2) + self.assertTrue(not t2 < t1) + self.assertTrue(not t1 >= t2) + self.assertTrue(not t2 <= t1) for badarg in OTHERSTUFF: self.assertEqual(t1 == badarg, False) @@ -1876,10 +1876,10 @@ "%s(23, 15)" % name) def test_resolution_info(self): - self.assert_(isinstance(self.theclass.min, self.theclass)) - self.assert_(isinstance(self.theclass.max, self.theclass)) - self.assert_(isinstance(self.theclass.resolution, timedelta)) - self.assert_(self.theclass.max > self.theclass.min) + self.assertTrue(isinstance(self.theclass.min, self.theclass)) + self.assertTrue(isinstance(self.theclass.max, self.theclass)) + self.assertTrue(isinstance(self.theclass.resolution, timedelta)) + self.assertTrue(self.theclass.max > self.theclass.min) def test_pickling(self): args = 20, 59, 16, 64**2 @@ -1899,12 +1899,12 @@ def test_bool(self): cls = self.theclass - self.failUnless(cls(1)) - self.failUnless(cls(0, 1)) - self.failUnless(cls(0, 0, 1)) - self.failUnless(cls(0, 0, 0, 1)) - self.failUnless(not cls(0)) - self.failUnless(not cls()) + self.assertTrue(cls(1)) + self.assertTrue(cls(0, 1)) + self.assertTrue(cls(0, 0, 1)) + self.assertTrue(cls(0, 0, 0, 1)) + self.assertTrue(not cls(0)) + self.assertTrue(not cls()) def test_replace(self): cls = self.theclass @@ -2001,7 +2001,7 @@ def utcoffset(self, dt): pass b = BetterTry() t = cls(1, 1, 1, tzinfo=b) - self.failUnless(t.tzinfo is b) + self.assertTrue(t.tzinfo is b) def test_utc_offset_out_of_bounds(self): class Edgy(tzinfo): @@ -2040,9 +2040,9 @@ for t in (cls(1, 1, 1), cls(1, 1, 1, tzinfo=None), cls(1, 1, 1, tzinfo=C1())): - self.failUnless(t.utcoffset() is None) - self.failUnless(t.dst() is None) - self.failUnless(t.tzname() is None) + self.assertTrue(t.utcoffset() is None) + self.assertTrue(t.dst() is None) + self.assertTrue(t.tzname() is None) class C3(tzinfo): def utcoffset(self, dt): return timedelta(minutes=-1439) @@ -2137,7 +2137,7 @@ self.assertEqual(t.minute, 0) self.assertEqual(t.second, 0) self.assertEqual(t.microsecond, 0) - self.failUnless(t.tzinfo is None) + self.assertTrue(t.tzinfo is None) def test_zones(self): est = FixedOffset(-300, "EST", 1) @@ -2152,25 +2152,25 @@ self.assertEqual(t1.tzinfo, est) self.assertEqual(t2.tzinfo, utc) self.assertEqual(t3.tzinfo, met) - self.failUnless(t4.tzinfo is None) + self.assertTrue(t4.tzinfo is None) self.assertEqual(t5.tzinfo, utc) self.assertEqual(t1.utcoffset(), timedelta(minutes=-300)) self.assertEqual(t2.utcoffset(), timedelta(minutes=0)) self.assertEqual(t3.utcoffset(), timedelta(minutes=60)) - self.failUnless(t4.utcoffset() is None) + self.assertTrue(t4.utcoffset() is None) self.assertRaises(TypeError, t1.utcoffset, "no args") self.assertEqual(t1.tzname(), "EST") self.assertEqual(t2.tzname(), "UTC") self.assertEqual(t3.tzname(), "MET") - self.failUnless(t4.tzname() is None) + self.assertTrue(t4.tzname() is None) self.assertRaises(TypeError, t1.tzname, "no args") self.assertEqual(t1.dst(), timedelta(minutes=1)) self.assertEqual(t2.dst(), timedelta(minutes=-2)) self.assertEqual(t3.dst(), timedelta(minutes=3)) - self.failUnless(t4.dst() is None) + self.assertTrue(t4.dst() is None) self.assertRaises(TypeError, t1.dst, "no args") self.assertEqual(hash(t1), hash(t2)) @@ -2246,7 +2246,7 @@ green = pickler.dumps(orig, proto) derived = unpickler.loads(green) self.assertEqual(orig, derived) - self.failUnless(isinstance(derived.tzinfo, PicklableFixedOffset)) + self.assertTrue(isinstance(derived.tzinfo, PicklableFixedOffset)) self.assertEqual(derived.utcoffset(), timedelta(minutes=-300)) self.assertEqual(derived.tzname(), 'cookie') @@ -2255,20 +2255,20 @@ cls = self.theclass t = cls(0, tzinfo=FixedOffset(-300, "")) - self.failUnless(t) + self.assertTrue(t) t = cls(5, tzinfo=FixedOffset(-300, "")) - self.failUnless(t) + self.assertTrue(t) t = cls(5, tzinfo=FixedOffset(300, "")) - self.failUnless(not t) + self.assertTrue(not t) t = cls(23, 59, tzinfo=FixedOffset(23*60 + 59, "")) - self.failUnless(not t) + self.assertTrue(not t) # Mostly ensuring this doesn't overflow internally. t = cls(0, tzinfo=FixedOffset(23*60 + 59, "")) - self.failUnless(t) + self.assertTrue(t) # But this should yield a value error -- the utcoffset is bogus. t = cls(0, tzinfo=FixedOffset(24*60, "")) @@ -2302,13 +2302,13 @@ # Ensure we can get rid of a tzinfo. self.assertEqual(base.tzname(), "+100") base2 = base.replace(tzinfo=None) - self.failUnless(base2.tzinfo is None) - self.failUnless(base2.tzname() is None) + self.assertTrue(base2.tzinfo is None) + self.assertTrue(base2.tzname() is None) # Ensure we can add one. base3 = base2.replace(tzinfo=z100) self.assertEqual(base, base3) - self.failUnless(base.tzinfo is base3.tzinfo) + self.assertTrue(base.tzinfo is base3.tzinfo) # Out of bounds. base = cls(1) @@ -2345,7 +2345,7 @@ # But if they're not identical, it isn't ignored. t2 = t2.replace(tzinfo=Varies()) - self.failUnless(t1 < t2) # t1's offset counter still going up + self.assertTrue(t1 < t2) # t1's offset counter still going up def test_subclass_timetz(self): @@ -2401,9 +2401,9 @@ tzinfo=FixedOffset(-1439, "")) # Make sure those compare correctly, and w/o overflow. - self.failUnless(t1 < t2) - self.failUnless(t1 != t2) - self.failUnless(t2 > t1) + self.assertTrue(t1 < t2) + self.assertTrue(t1 != t2) + self.assertTrue(t2 > t1) self.assertEqual(t1, t1) self.assertEqual(t2, t2) @@ -2415,21 +2415,21 @@ # Change t1 not to subtract a minute, and t1 should be larger. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(0, "")) - self.failUnless(t1 > t2) + self.assertTrue(t1 > t2) # Change t1 to subtract 2 minutes, and t1 should be smaller. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(2, "")) - self.failUnless(t1 < t2) + self.assertTrue(t1 < t2) # Back to the original t1, but make seconds resolve it. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(1, ""), second=1) - self.failUnless(t1 > t2) + self.assertTrue(t1 > t2) # Likewise, but make microseconds resolve it. t1 = self.theclass(1, 12, 31, 23, 59, tzinfo=FixedOffset(1, ""), microsecond=1) - self.failUnless(t1 > t2) + self.assertTrue(t1 > t2) # Make t2 naive and it should fail. t2 = self.theclass.min @@ -2473,7 +2473,7 @@ green = pickler.dumps(orig, proto) derived = unpickler.loads(green) self.assertEqual(orig, derived) - self.failUnless(isinstance(derived.tzinfo, + self.assertTrue(isinstance(derived.tzinfo, PicklableFixedOffset)) self.assertEqual(derived.utcoffset(), timedelta(minutes=-300)) self.assertEqual(derived.tzname(), 'cookie') @@ -2544,7 +2544,7 @@ tz55 = FixedOffset(-330, "west 5:30") timeaware = now.time().replace(tzinfo=tz55) nowaware = self.theclass.combine(now.date(), timeaware) - self.failUnless(nowaware.tzinfo is tz55) + self.assertTrue(nowaware.tzinfo is tz55) self.assertEqual(nowaware.timetz(), timeaware) # Can't mix aware and non-aware. @@ -2563,15 +2563,15 @@ # Adding a delta should preserve tzinfo. delta = timedelta(weeks=1, minutes=12, microseconds=5678) nowawareplus = nowaware + delta - self.failUnless(nowaware.tzinfo is tz55) + self.assertTrue(nowaware.tzinfo is tz55) nowawareplus2 = delta + nowaware - self.failUnless(nowawareplus2.tzinfo is tz55) + self.assertTrue(nowawareplus2.tzinfo is tz55) self.assertEqual(nowawareplus, nowawareplus2) # that - delta should be what we started with, and that - what we # started with should be delta. diff = nowawareplus - delta - self.failUnless(diff.tzinfo is tz55) + self.assertTrue(diff.tzinfo is tz55) self.assertEqual(nowaware, diff) self.assertRaises(TypeError, lambda: delta - nowawareplus) self.assertEqual(nowawareplus - nowaware, delta) @@ -2580,7 +2580,7 @@ tzr = FixedOffset(random.randrange(-1439, 1440), "randomtimezone") # Attach it to nowawareplus. nowawareplus = nowawareplus.replace(tzinfo=tzr) - self.failUnless(nowawareplus.tzinfo is tzr) + self.assertTrue(nowawareplus.tzinfo is tzr) # Make sure the difference takes the timezone adjustments into account. got = nowaware - nowawareplus # Expected: (nowaware base - nowaware offset) - @@ -2607,7 +2607,7 @@ off42 = FixedOffset(42, "42") another = meth(off42) again = meth(tz=off42) - self.failUnless(another.tzinfo is again.tzinfo) + self.assertTrue(another.tzinfo is again.tzinfo) self.assertEqual(another.utcoffset(), timedelta(minutes=42)) # Bad argument with and w/o naming the keyword. self.assertRaises(TypeError, meth, 16) @@ -2624,7 +2624,7 @@ utc = FixedOffset(0, "utc", 0) for dummy in range(3): now = datetime.now(weirdtz) - self.failUnless(now.tzinfo is weirdtz) + self.assertTrue(now.tzinfo is weirdtz) utcnow = datetime.utcnow().replace(tzinfo=utc) now2 = utcnow.astimezone(weirdtz) if abs(now - now2) < timedelta(seconds=30): @@ -2645,7 +2645,7 @@ off42 = FixedOffset(42, "42") another = meth(ts, off42) again = meth(ts, tz=off42) - self.failUnless(another.tzinfo is again.tzinfo) + self.assertTrue(another.tzinfo is again.tzinfo) self.assertEqual(another.utcoffset(), timedelta(minutes=42)) # Bad argument with and w/o naming the keyword. self.assertRaises(TypeError, meth, ts, 16) @@ -2840,13 +2840,13 @@ # Ensure we can get rid of a tzinfo. self.assertEqual(base.tzname(), "+100") base2 = base.replace(tzinfo=None) - self.failUnless(base2.tzinfo is None) - self.failUnless(base2.tzname() is None) + self.assertTrue(base2.tzinfo is None) + self.assertTrue(base2.tzname() is None) # Ensure we can add one. base3 = base2.replace(tzinfo=z100) self.assertEqual(base, base3) - self.failUnless(base.tzinfo is base3.tzinfo) + self.assertTrue(base.tzinfo is base3.tzinfo) # Out of bounds. base = cls(2000, 2, 29) @@ -2859,20 +2859,20 @@ fm5h = FixedOffset(-timedelta(hours=5), "m300") dt = self.theclass.now(tz=f44m) - self.failUnless(dt.tzinfo is f44m) + self.assertTrue(dt.tzinfo is f44m) # Replacing with degenerate tzinfo raises an exception. self.assertRaises(ValueError, dt.astimezone, fnone) # Ditto with None tz. self.assertRaises(TypeError, dt.astimezone, None) # Replacing with same tzinfo makes no change. x = dt.astimezone(dt.tzinfo) - self.failUnless(x.tzinfo is f44m) + self.assertTrue(x.tzinfo is f44m) self.assertEqual(x.date(), dt.date()) self.assertEqual(x.time(), dt.time()) # Replacing with different tzinfo does adjust. got = dt.astimezone(fm5h) - self.failUnless(got.tzinfo is fm5h) + self.assertTrue(got.tzinfo is fm5h) self.assertEqual(got.utcoffset(), timedelta(hours=-5)) expected = dt - dt.utcoffset() # in effect, convert to UTC expected += fm5h.utcoffset(dt) # and from there to local time @@ -2880,7 +2880,7 @@ self.assertEqual(got.date(), expected.date()) self.assertEqual(got.time(), expected.time()) self.assertEqual(got.timetz(), expected.timetz()) - self.failUnless(got.tzinfo is expected.tzinfo) + self.assertTrue(got.tzinfo is expected.tzinfo) self.assertEqual(got, expected) def test_aware_subtract(self): @@ -2955,7 +2955,7 @@ # But if they're not identical, it isn't ignored. t2 = t2.replace(tzinfo=Varies()) - self.failUnless(t1 < t2) # t1's offset counter still going up + self.assertTrue(t1 < t2) # t1's offset counter still going up def test_subclass_datetimetz(self): @@ -3306,10 +3306,10 @@ # type comparison, despite that datetime is a subclass of date. as_date = date.today() as_datetime = datetime.combine(as_date, time()) - self.assert_(as_date != as_datetime) - self.assert_(as_datetime != as_date) - self.assert_(not as_date == as_datetime) - self.assert_(not as_datetime == as_date) + self.assertTrue(as_date != as_datetime) + self.assertTrue(as_datetime != as_date) + self.assertTrue(not as_date == as_datetime) + self.assertTrue(not as_datetime == as_date) self.assertRaises(TypeError, lambda: as_date < as_datetime) self.assertRaises(TypeError, lambda: as_datetime < as_date) self.assertRaises(TypeError, lambda: as_date <= as_datetime) Modified: python/branches/py3k/Lib/test/test_dbm.py ============================================================================== --- python/branches/py3k/Lib/test/test_dbm.py (original) +++ python/branches/py3k/Lib/test/test_dbm.py Wed Jul 1 01:06:06 2009 @@ -57,7 +57,7 @@ return keys def test_error(self): - self.assert_(issubclass(self.module.error, IOError)) + self.assertTrue(issubclass(self.module.error, IOError)) def test_anydbm_not_existing(self): self.assertRaises(dbm.error, dbm.open, _fname) @@ -154,9 +154,9 @@ self.d[k] = v self.assertEqual(sorted(self.d.keys()), sorted(k for (k, v) in a)) for k, v in a: - self.assert_(k in self.d) + self.assertTrue(k in self.d) self.assertEqual(self.d[k], v) - self.assert_(b'xxx' not in self.d) + self.assertTrue(b'xxx' not in self.d) self.assertRaises(KeyError, lambda: self.d[b'xxx']) self.d.close() Modified: python/branches/py3k/Lib/test/test_dbm_dumb.py ============================================================================== --- python/branches/py3k/Lib/test/test_dbm_dumb.py (original) +++ python/branches/py3k/Lib/test/test_dbm_dumb.py Wed Jul 1 01:06:06 2009 @@ -118,7 +118,7 @@ f['1'] = 'a' f.close() f = dumbdbm.open(_fname, 'r') - self.assert_('\u00fc' in f) + self.assertTrue('\u00fc' in f) self.assertEqual(f['\u00fc'.encode('utf-8')], self._dict['\u00fc'.encode('utf-8')]) self.assertEqual(f[b'1'], b'a') Modified: python/branches/py3k/Lib/test/test_dbm_gnu.py ============================================================================== --- python/branches/py3k/Lib/test/test_dbm_gnu.py (original) +++ python/branches/py3k/Lib/test/test_dbm_gnu.py Wed Jul 1 01:06:06 2009 @@ -24,11 +24,11 @@ self.g[b'bytes'] = b'data' key_set = set(self.g.keys()) self.assertEqual(key_set, set([b'a', b'bytes', b'12345678910'])) - self.assert_(b'a' in self.g) + self.assertTrue(b'a' in self.g) self.assertEqual(self.g[b'bytes'], b'data') key = self.g.firstkey() while key: - self.assert_(key in key_set) + self.assertTrue(key in key_set) key_set.remove(key) key = self.g.nextkey(key) self.assertRaises(KeyError, lambda: self.g['xxx']) @@ -66,7 +66,7 @@ self.g['x'] = 'x' * 10000 size1 = os.path.getsize(filename) - self.assert_(size0 < size1) + self.assertTrue(size0 < size1) del self.g['x'] # 'size' is supposed to be the same even after deleting an entry. @@ -74,7 +74,7 @@ self.g.reorganize() size2 = os.path.getsize(filename) - self.assert_(size1 > size2 >= size0) + self.assertTrue(size1 > size2 >= size0) def test_main(): Modified: python/branches/py3k/Lib/test/test_dbm_ndbm.py ============================================================================== --- python/branches/py3k/Lib/test/test_dbm_ndbm.py (original) +++ python/branches/py3k/Lib/test/test_dbm_ndbm.py Wed Jul 1 01:06:06 2009 @@ -19,12 +19,12 @@ def test_keys(self): self.d = dbm.ndbm.open(self.filename, 'c') - self.assert_(self.d.keys() == []) + self.assertTrue(self.d.keys() == []) self.d['a'] = 'b' self.d[b'bytes'] = b'data' self.d['12345678910'] = '019237410982340912840198242' self.d.keys() - self.assert_(b'a' in self.d) + self.assertTrue(b'a' in self.d) self.assertEqual(self.d[b'bytes'], b'data') self.d.close() Modified: python/branches/py3k/Lib/test/test_decimal.py ============================================================================== --- python/branches/py3k/Lib/test/test_decimal.py (original) +++ python/branches/py3k/Lib/test/test_decimal.py Wed Jul 1 01:06:06 2009 @@ -507,7 +507,7 @@ # from int d = nc.create_decimal(456) - self.failUnless(isinstance(d, Decimal)) + self.assertTrue(isinstance(d, Decimal)) self.assertEqual(nc.create_decimal(45678), nc.create_decimal('457E+2')) @@ -1050,12 +1050,12 @@ f = Decimal('2') for x, y in [(n, n), (n, i), (i, n), (n, f), (f, n), (s, n), (n, s), (s, i), (i, s), (s, f), (f, s), (s, s)]: - self.assert_(x != y) - self.assert_(not (x == y)) - self.assert_(not (x < y)) - self.assert_(not (x <= y)) - self.assert_(not (x > y)) - self.assert_(not (x >= y)) + self.assertTrue(x != y) + self.assertTrue(not (x == y)) + self.assertTrue(not (x < y)) + self.assertTrue(not (x <= y)) + self.assertTrue(not (x > y)) + self.assertTrue(not (x >= y)) # The following are two functions used to test threading in the next class @@ -1128,18 +1128,18 @@ dc = Decimal('45') #two Decimals - self.failUnless(dc > da) - self.failUnless(dc >= da) - self.failUnless(da < dc) - self.failUnless(da <= dc) + self.assertTrue(dc > da) + self.assertTrue(dc >= da) + self.assertTrue(da < dc) + self.assertTrue(da <= dc) self.assertEqual(da, db) - self.failUnless(da != dc) - self.failUnless(da <= db) - self.failUnless(da >= db) + self.assertTrue(da != dc) + self.assertTrue(da <= db) + self.assertTrue(da >= db) #a Decimal and an int - self.failUnless(dc > 23) - self.failUnless(23 < dc) + self.assertTrue(dc > 23) + self.assertTrue(23 < dc) self.assertEqual(dc, 45) #a Decimal and uncomparable @@ -1200,8 +1200,8 @@ #the same hash that to an int self.assertEqual(hash(Decimal(23)), hash(23)) self.assertRaises(TypeError, hash, Decimal('NaN')) - self.assert_(hash(Decimal('Inf'))) - self.assert_(hash(Decimal('-Inf'))) + self.assertTrue(hash(Decimal('Inf'))) + self.assertTrue(hash(Decimal('-Inf'))) # check that the value of the hash doesn't depend on the # current context (issue #1757) @@ -1228,22 +1228,22 @@ l2 = 28 #between Decimals - self.failUnless(min(d1,d2) is d1) - self.failUnless(min(d2,d1) is d1) - self.failUnless(max(d1,d2) is d2) - self.failUnless(max(d2,d1) is d2) + self.assertTrue(min(d1,d2) is d1) + self.assertTrue(min(d2,d1) is d1) + self.assertTrue(max(d1,d2) is d2) + self.assertTrue(max(d2,d1) is d2) #between Decimal and long - self.failUnless(min(d1,l2) is d1) - self.failUnless(min(l2,d1) is d1) - self.failUnless(max(l1,d2) is d2) - self.failUnless(max(d2,l1) is d2) + self.assertTrue(min(d1,l2) is d1) + self.assertTrue(min(l2,d1) is d1) + self.assertTrue(max(l1,d2) is d2) + self.assertTrue(max(d2,l1) is d2) def test_as_nonzero(self): #as false - self.failIf(Decimal(0)) + self.assertFalse(Decimal(0)) #as true - self.failUnless(Decimal('0.372')) + self.assertTrue(Decimal('0.372')) def test_tostring_methods(self): #Test str and repr methods. @@ -1513,10 +1513,10 @@ class DecimalPythonAPItests(unittest.TestCase): def test_abc(self): - self.assert_(issubclass(Decimal, numbers.Number)) - self.assert_(not issubclass(Decimal, numbers.Real)) - self.assert_(isinstance(Decimal(0), numbers.Number)) - self.assert_(not isinstance(Decimal(0), numbers.Real)) + self.assertTrue(issubclass(Decimal, numbers.Number)) + self.assertTrue(not issubclass(Decimal, numbers.Real)) + self.assertTrue(isinstance(Decimal(0), numbers.Number)) + self.assertTrue(not isinstance(Decimal(0), numbers.Real)) def test_pickle(self): d = Decimal('-3.141590000') @@ -1555,9 +1555,9 @@ '0.1000000000000000055511151231257827021181583404541015625') bigint = 12345678901234567890123456789 self.assertEqual(MyDecimal.from_float(bigint), MyDecimal(bigint)) - self.assert_(MyDecimal.from_float(float('nan')).is_qnan()) - self.assert_(MyDecimal.from_float(float('inf')).is_infinite()) - self.assert_(MyDecimal.from_float(float('-inf')).is_infinite()) + self.assertTrue(MyDecimal.from_float(float('nan')).is_qnan()) + self.assertTrue(MyDecimal.from_float(float('inf')).is_infinite()) + self.assertTrue(MyDecimal.from_float(float('-inf')).is_infinite()) self.assertEqual(str(MyDecimal.from_float(float('nan'))), str(Decimal('NaN'))) self.assertEqual(str(MyDecimal.from_float(float('inf'))), @@ -1604,8 +1604,8 @@ self.assertEqual(v1, v2) def test_equality_with_other_types(self): - self.assert_(Decimal(10) in ['a', 1.0, Decimal(10), (1,2), {}]) - self.assert_(Decimal(10) not in ['a', 1.0, (1,2), {}]) + self.assertTrue(Decimal(10) in ['a', 1.0, Decimal(10), (1,2), {}]) + self.assertTrue(Decimal(10) not in ['a', 1.0, (1,2), {}]) def test_copy(self): # All copies should be deep @@ -1625,9 +1625,9 @@ with localcontext() as enter_ctx: set_ctx = getcontext() final_ctx = getcontext() - self.assert_(orig_ctx is final_ctx, 'did not restore context correctly') - self.assert_(orig_ctx is not set_ctx, 'did not copy the context') - self.assert_(set_ctx is enter_ctx, '__enter__ returned wrong context') + self.assertTrue(orig_ctx is final_ctx, 'did not restore context correctly') + self.assertTrue(orig_ctx is not set_ctx, 'did not copy the context') + self.assertTrue(set_ctx is enter_ctx, '__enter__ returned wrong context') def test_localcontextarg(self): # Use a copy of the supplied context in the block @@ -1636,10 +1636,10 @@ with localcontext(new_ctx) as enter_ctx: set_ctx = getcontext() final_ctx = getcontext() - self.assert_(orig_ctx is final_ctx, 'did not restore context correctly') - self.assert_(set_ctx.prec == new_ctx.prec, 'did not set correct context') - self.assert_(new_ctx is not set_ctx, 'did not copy the context') - self.assert_(set_ctx is enter_ctx, '__enter__ returned wrong context') + self.assertTrue(orig_ctx is final_ctx, 'did not restore context correctly') + self.assertTrue(set_ctx.prec == new_ctx.prec, 'did not set correct context') + self.assertTrue(new_ctx is not set_ctx, 'did not copy the context') + self.assertTrue(set_ctx is enter_ctx, '__enter__ returned wrong context') class ContextFlags(unittest.TestCase): def test_flags_irrelevant(self): Modified: python/branches/py3k/Lib/test/test_defaultdict.py ============================================================================== --- python/branches/py3k/Lib/test/test_defaultdict.py (original) +++ python/branches/py3k/Lib/test/test_defaultdict.py Wed Jul 1 01:06:06 2009 @@ -25,21 +25,21 @@ d1[13] d1[14] self.assertEqual(d1, {12: [42, 24], 13: [], 14: []}) - self.assert_(d1[12] is not d1[13] is not d1[14]) + self.assertTrue(d1[12] is not d1[13] is not d1[14]) d2 = defaultdict(list, foo=1, bar=2) self.assertEqual(d2.default_factory, list) self.assertEqual(d2, {"foo": 1, "bar": 2}) self.assertEqual(d2["foo"], 1) self.assertEqual(d2["bar"], 2) self.assertEqual(d2[42], []) - self.assert_("foo" in d2) - self.assert_("foo" in d2.keys()) - self.assert_("bar" in d2) - self.assert_("bar" in d2.keys()) - self.assert_(42 in d2) - self.assert_(42 in d2.keys()) - self.assert_(12 not in d2) - self.assert_(12 not in d2.keys()) + self.assertTrue("foo" in d2) + self.assertTrue("foo" in d2.keys()) + self.assertTrue("bar" in d2) + self.assertTrue("bar" in d2.keys()) + self.assertTrue(42 in d2) + self.assertTrue(42 in d2.keys()) + self.assertTrue(12 not in d2) + self.assertTrue(12 not in d2.keys()) d2.default_factory = None self.assertEqual(d2.default_factory, None) try: @@ -68,7 +68,7 @@ self.assertEqual(repr(d2), "defaultdict(, {12: 42})") def foo(): return 43 d3 = defaultdict(foo) - self.assert_(d3.default_factory is foo) + self.assertTrue(d3.default_factory is foo) d3[13] self.assertEqual(repr(d3), "defaultdict(%s, {13: 43})" % repr(foo)) @@ -127,7 +127,7 @@ d2 = copy.deepcopy(d1) self.assertEqual(d2.default_factory, foobar) self.assertEqual(d2, d1) - self.assert_(d1[1] is not d2[1]) + self.assertTrue(d1[1] is not d2[1]) d1.default_factory = list d2 = copy.deepcopy(d1) self.assertEqual(d2.default_factory, list) @@ -150,7 +150,7 @@ def _factory(self): return [] d = sub() - self.assert_(repr(d).startswith( + self.assertTrue(repr(d).startswith( "defaultdict(= 0) + self.assertTrue(str(c1).find('C object at ') >= 0) self.assertEqual(str(c1), repr(c1)) - self.assert_(-1 not in c1) + self.assertTrue(-1 not in c1) for i in range(10): - self.assert_(i in c1) + self.assertTrue(i in c1) self.assertFalse(10 in c1) # Test the default behavior for dynamic classes class D(object): @@ -1671,21 +1671,21 @@ raise IndexError d1 = D() d2 = D() - self.assert_(not not d1) + self.assertTrue(not not d1) self.assertNotEqual(id(d1), id(d2)) hash(d1) hash(d2) self.assertEqual(d1, d1) self.assertNotEqual(d1, d2) - self.assert_(not d1 != d1) - self.assert_(not d1 == d2) + self.assertTrue(not d1 != d1) + self.assertTrue(not d1 == d2) # Note that the module name appears in str/repr, and that varies # depending on whether this test is run standalone or from a framework. - self.assert_(str(d1).find('D object at ') >= 0) + self.assertTrue(str(d1).find('D object at ') >= 0) self.assertEqual(str(d1), repr(d1)) - self.assert_(-1 not in d1) + self.assertTrue(-1 not in d1) for i in range(10): - self.assert_(i in d1) + self.assertTrue(i in d1) self.assertFalse(10 in d1) # Test overridden behavior class Proxy(object): @@ -1717,22 +1717,22 @@ p1 = Proxy(1) p_1 = Proxy(-1) self.assertFalse(p0) - self.assert_(not not p1) + self.assertTrue(not not p1) self.assertEqual(hash(p0), hash(0)) self.assertEqual(p0, p0) self.assertNotEqual(p0, p1) - self.assert_(not p0 != p0) + self.assertTrue(not p0 != p0) self.assertEqual(not p0, p1) - self.assert_(p0 < p1) - self.assert_(p0 <= p1) - self.assert_(p1 > p0) - self.assert_(p1 >= p0) + self.assertTrue(p0 < p1) + self.assertTrue(p0 <= p1) + self.assertTrue(p1 > p0) + self.assertTrue(p1 >= p0) self.assertEqual(str(p0), "Proxy:0") self.assertEqual(repr(p0), "Proxy(0)") p10 = Proxy(range(10)) self.assertFalse(-1 in p10) for i in range(10): - self.assert_(i in p10) + self.assertTrue(i in p10) self.assertFalse(10 in p10) def test_weakrefs(self): @@ -1753,7 +1753,7 @@ try: weakref.ref(no) except TypeError as msg: - self.assert_(str(msg).find("weak reference") >= 0) + self.assertTrue(str(msg).find("weak reference") >= 0) else: self.fail("weakref.ref(no) should be illegal") class Weak(object): @@ -1790,18 +1790,18 @@ self.assertFalse(hasattr(a, "x")) raw = C.__dict__['x'] - self.assert_(isinstance(raw, property)) + self.assertTrue(isinstance(raw, property)) attrs = dir(raw) - self.assert_("__doc__" in attrs) - self.assert_("fget" in attrs) - self.assert_("fset" in attrs) - self.assert_("fdel" in attrs) + self.assertTrue("__doc__" in attrs) + self.assertTrue("fget" in attrs) + self.assertTrue("fset" in attrs) + self.assertTrue("fdel" in attrs) self.assertEqual(raw.__doc__, "I'm the x property.") - self.assert_(raw.fget is C.__dict__['getx']) - self.assert_(raw.fset is C.__dict__['setx']) - self.assert_(raw.fdel is C.__dict__['delx']) + self.assertTrue(raw.fget is C.__dict__['getx']) + self.assertTrue(raw.fset is C.__dict__['setx']) + self.assertTrue(raw.fdel is C.__dict__['delx']) for attr in "__doc__", "fget", "fset", "fdel": try: @@ -1863,7 +1863,7 @@ self.assertEqual(C.foo.__doc__, "hello") self.assertFalse(hasattr(c, "foo")) c.foo = -42 - self.assert_(hasattr(c, '_foo')) + self.assertTrue(hasattr(c, '_foo')) self.assertEqual(c._foo, 42) self.assertEqual(c.foo, 42) del c.foo @@ -2021,12 +2021,12 @@ c = C() self.assertEqual(interesting(dir(c)), cstuff) - ## self.assert_('__self__' in dir(C.Cmethod)) + ## self.assertTrue('__self__' in dir(C.Cmethod)) c.cdata = 2 c.cmethod = lambda self: 0 self.assertEqual(interesting(dir(c)), cstuff + ['cdata', 'cmethod']) - ## self.assert_('__self__' in dir(c.Cmethod)) + ## self.assertTrue('__self__' in dir(c.Cmethod)) class A(C): Adata = 1 @@ -2034,13 +2034,13 @@ astuff = ['Adata', 'Amethod'] + cstuff self.assertEqual(interesting(dir(A)), astuff) - ## self.assert_('__self__' in dir(A.Amethod)) + ## self.assertTrue('__self__' in dir(A.Amethod)) a = A() self.assertEqual(interesting(dir(a)), astuff) a.adata = 42 a.amethod = lambda self: 3 self.assertEqual(interesting(dir(a)), astuff + ['adata', 'amethod']) - ## self.assert_('__self__' in dir(a.Amethod)) + ## self.assertTrue('__self__' in dir(a.Amethod)) # Try a module subclass. import sys @@ -2224,13 +2224,13 @@ a = hexint(12345) self.assertEqual(a, 12345) self.assertEqual(int(a), 12345) - self.assert_(int(a).__class__ is int) + self.assertTrue(int(a).__class__ is int) self.assertEqual(hash(a), hash(12345)) - self.assert_((+a).__class__ is int) - self.assert_((a >> 0).__class__ is int) - self.assert_((a << 0).__class__ is int) - self.assert_((hexint(0) << 12).__class__ is int) - self.assert_((hexint(0) >> 12).__class__ is int) + self.assertTrue((+a).__class__ is int) + self.assertTrue((a >> 0).__class__ is int) + self.assertTrue((a << 0).__class__ is int) + self.assertTrue((hexint(0) << 12).__class__ is int) + self.assertTrue((hexint(0) >> 12).__class__ is int) class octlong(int): __slots__ = [] @@ -2250,36 +2250,36 @@ self.assertEqual(a, 12345) self.assertEqual(int(a), 12345) self.assertEqual(hash(a), hash(12345)) - self.assert_(int(a).__class__ is int) - self.assert_((+a).__class__ is int) - self.assert_((-a).__class__ is int) - self.assert_((-octlong(0)).__class__ is int) - self.assert_((a >> 0).__class__ is int) - self.assert_((a << 0).__class__ is int) - self.assert_((a - 0).__class__ is int) - self.assert_((a * 1).__class__ is int) - self.assert_((a ** 1).__class__ is int) - self.assert_((a // 1).__class__ is int) - self.assert_((1 * a).__class__ is int) - self.assert_((a | 0).__class__ is int) - self.assert_((a ^ 0).__class__ is int) - self.assert_((a & -1).__class__ is int) - self.assert_((octlong(0) << 12).__class__ is int) - self.assert_((octlong(0) >> 12).__class__ is int) - self.assert_(abs(octlong(0)).__class__ is int) + self.assertTrue(int(a).__class__ is int) + self.assertTrue((+a).__class__ is int) + self.assertTrue((-a).__class__ is int) + self.assertTrue((-octlong(0)).__class__ is int) + self.assertTrue((a >> 0).__class__ is int) + self.assertTrue((a << 0).__class__ is int) + self.assertTrue((a - 0).__class__ is int) + self.assertTrue((a * 1).__class__ is int) + self.assertTrue((a ** 1).__class__ is int) + self.assertTrue((a // 1).__class__ is int) + self.assertTrue((1 * a).__class__ is int) + self.assertTrue((a | 0).__class__ is int) + self.assertTrue((a ^ 0).__class__ is int) + self.assertTrue((a & -1).__class__ is int) + self.assertTrue((octlong(0) << 12).__class__ is int) + self.assertTrue((octlong(0) >> 12).__class__ is int) + self.assertTrue(abs(octlong(0)).__class__ is int) # Because octlong overrides __add__, we can't check the absence of +0 # optimizations using octlong. class longclone(int): pass a = longclone(1) - self.assert_((a + 0).__class__ is int) - self.assert_((0 + a).__class__ is int) + self.assertTrue((a + 0).__class__ is int) + self.assertTrue((0 + a).__class__ is int) # Check that negative clones don't segfault a = longclone(-1) self.assertEqual(a.__dict__, {}) - self.assertEqual(int(a), -1) # self.assert_ PyNumber_Long() copies the sign bit + self.assertEqual(int(a), -1) # self.assertTrue PyNumber_Long() copies the sign bit class precfloat(float): __slots__ = ['prec'] @@ -2291,9 +2291,9 @@ a = precfloat(12345) self.assertEqual(a, 12345.0) self.assertEqual(float(a), 12345.0) - self.assert_(float(a).__class__ is float) + self.assertTrue(float(a).__class__ is float) self.assertEqual(hash(a), hash(12345.0)) - self.assert_((+a).__class__ is float) + self.assertTrue((+a).__class__ is float) class madcomplex(complex): def __repr__(self): @@ -2341,20 +2341,20 @@ self.assertEqual(v, t) a = madtuple((1,2,3,4,5)) self.assertEqual(tuple(a), (1,2,3,4,5)) - self.assert_(tuple(a).__class__ is tuple) + self.assertTrue(tuple(a).__class__ is tuple) self.assertEqual(hash(a), hash((1,2,3,4,5))) - self.assert_(a[:].__class__ is tuple) - self.assert_((a * 1).__class__ is tuple) - self.assert_((a * 0).__class__ is tuple) - self.assert_((a + ()).__class__ is tuple) + self.assertTrue(a[:].__class__ is tuple) + self.assertTrue((a * 1).__class__ is tuple) + self.assertTrue((a * 0).__class__ is tuple) + self.assertTrue((a + ()).__class__ is tuple) a = madtuple(()) self.assertEqual(tuple(a), ()) - self.assert_(tuple(a).__class__ is tuple) - self.assert_((a + a).__class__ is tuple) - self.assert_((a * 0).__class__ is tuple) - self.assert_((a * 1).__class__ is tuple) - self.assert_((a * 2).__class__ is tuple) - self.assert_(a[:].__class__ is tuple) + self.assertTrue(tuple(a).__class__ is tuple) + self.assertTrue((a + a).__class__ is tuple) + self.assertTrue((a * 0).__class__ is tuple) + self.assertTrue((a * 1).__class__ is tuple) + self.assertTrue((a * 2).__class__ is tuple) + self.assertTrue(a[:].__class__ is tuple) class madstring(str): _rev = None @@ -2376,48 +2376,48 @@ self.assertEqual(u, s) s = madstring("12345") self.assertEqual(str(s), "12345") - self.assert_(str(s).__class__ is str) + self.assertTrue(str(s).__class__ is str) base = "\x00" * 5 s = madstring(base) self.assertEqual(s, base) self.assertEqual(str(s), base) - self.assert_(str(s).__class__ is str) + self.assertTrue(str(s).__class__ is str) self.assertEqual(hash(s), hash(base)) self.assertEqual({s: 1}[base], 1) self.assertEqual({base: 1}[s], 1) - self.assert_((s + "").__class__ is str) + self.assertTrue((s + "").__class__ is str) self.assertEqual(s + "", base) - self.assert_(("" + s).__class__ is str) + self.assertTrue(("" + s).__class__ is str) self.assertEqual("" + s, base) - self.assert_((s * 0).__class__ is str) + self.assertTrue((s * 0).__class__ is str) self.assertEqual(s * 0, "") - self.assert_((s * 1).__class__ is str) + self.assertTrue((s * 1).__class__ is str) self.assertEqual(s * 1, base) - self.assert_((s * 2).__class__ is str) + self.assertTrue((s * 2).__class__ is str) self.assertEqual(s * 2, base + base) - self.assert_(s[:].__class__ is str) + self.assertTrue(s[:].__class__ is str) self.assertEqual(s[:], base) - self.assert_(s[0:0].__class__ is str) + self.assertTrue(s[0:0].__class__ is str) self.assertEqual(s[0:0], "") - self.assert_(s.strip().__class__ is str) + self.assertTrue(s.strip().__class__ is str) self.assertEqual(s.strip(), base) - self.assert_(s.lstrip().__class__ is str) + self.assertTrue(s.lstrip().__class__ is str) self.assertEqual(s.lstrip(), base) - self.assert_(s.rstrip().__class__ is str) + self.assertTrue(s.rstrip().__class__ is str) self.assertEqual(s.rstrip(), base) identitytab = {} - self.assert_(s.translate(identitytab).__class__ is str) + self.assertTrue(s.translate(identitytab).__class__ is str) self.assertEqual(s.translate(identitytab), base) - self.assert_(s.replace("x", "x").__class__ is str) + self.assertTrue(s.replace("x", "x").__class__ is str) self.assertEqual(s.replace("x", "x"), base) - self.assert_(s.ljust(len(s)).__class__ is str) + self.assertTrue(s.ljust(len(s)).__class__ is str) self.assertEqual(s.ljust(len(s)), base) - self.assert_(s.rjust(len(s)).__class__ is str) + self.assertTrue(s.rjust(len(s)).__class__ is str) self.assertEqual(s.rjust(len(s)), base) - self.assert_(s.center(len(s)).__class__ is str) + self.assertTrue(s.center(len(s)).__class__ is str) self.assertEqual(s.center(len(s)), base) - self.assert_(s.lower().__class__ is str) + self.assertTrue(s.lower().__class__ is str) self.assertEqual(s.lower(), base) class madunicode(str): @@ -2436,47 +2436,47 @@ base = "12345" u = madunicode(base) self.assertEqual(str(u), base) - self.assert_(str(u).__class__ is str) + self.assertTrue(str(u).__class__ is str) self.assertEqual(hash(u), hash(base)) self.assertEqual({u: 1}[base], 1) self.assertEqual({base: 1}[u], 1) - self.assert_(u.strip().__class__ is str) + self.assertTrue(u.strip().__class__ is str) self.assertEqual(u.strip(), base) - self.assert_(u.lstrip().__class__ is str) + self.assertTrue(u.lstrip().__class__ is str) self.assertEqual(u.lstrip(), base) - self.assert_(u.rstrip().__class__ is str) + self.assertTrue(u.rstrip().__class__ is str) self.assertEqual(u.rstrip(), base) - self.assert_(u.replace("x", "x").__class__ is str) + self.assertTrue(u.replace("x", "x").__class__ is str) self.assertEqual(u.replace("x", "x"), base) - self.assert_(u.replace("xy", "xy").__class__ is str) + self.assertTrue(u.replace("xy", "xy").__class__ is str) self.assertEqual(u.replace("xy", "xy"), base) - self.assert_(u.center(len(u)).__class__ is str) + self.assertTrue(u.center(len(u)).__class__ is str) self.assertEqual(u.center(len(u)), base) - self.assert_(u.ljust(len(u)).__class__ is str) + self.assertTrue(u.ljust(len(u)).__class__ is str) self.assertEqual(u.ljust(len(u)), base) - self.assert_(u.rjust(len(u)).__class__ is str) + self.assertTrue(u.rjust(len(u)).__class__ is str) self.assertEqual(u.rjust(len(u)), base) - self.assert_(u.lower().__class__ is str) + self.assertTrue(u.lower().__class__ is str) self.assertEqual(u.lower(), base) - self.assert_(u.upper().__class__ is str) + self.assertTrue(u.upper().__class__ is str) self.assertEqual(u.upper(), base) - self.assert_(u.capitalize().__class__ is str) + self.assertTrue(u.capitalize().__class__ is str) self.assertEqual(u.capitalize(), base) - self.assert_(u.title().__class__ is str) + self.assertTrue(u.title().__class__ is str) self.assertEqual(u.title(), base) - self.assert_((u + "").__class__ is str) + self.assertTrue((u + "").__class__ is str) self.assertEqual(u + "", base) - self.assert_(("" + u).__class__ is str) + self.assertTrue(("" + u).__class__ is str) self.assertEqual("" + u, base) - self.assert_((u * 0).__class__ is str) + self.assertTrue((u * 0).__class__ is str) self.assertEqual(u * 0, "") - self.assert_((u * 1).__class__ is str) + self.assertTrue((u * 1).__class__ is str) self.assertEqual(u * 1, base) - self.assert_((u * 2).__class__ is str) + self.assertTrue((u * 2).__class__ is str) self.assertEqual(u * 2, base + base) - self.assert_(u[:].__class__ is str) + self.assertTrue(u[:].__class__ is str) self.assertEqual(u[:], base) - self.assert_(u[0:0].__class__ is str) + self.assertTrue(u[0:0].__class__ is str) self.assertEqual(u[0:0], "") class sublist(list): @@ -2595,7 +2595,7 @@ self.assertEqual(d[cistr('one')], 1) self.assertEqual(d[cistr('tWo')], 2) self.assertEqual(d[cistr('THrEE')], 3) - self.assert_(cistr('ONe') in d) + self.assertTrue(cistr('ONe') in d) self.assertEqual(d.get(cistr('thrEE')), 3) def test_classic_comparisons(self): @@ -2652,13 +2652,13 @@ for x in 1, 2, 3: for y in 1, 2, 3: for op in "<", "<=", "==", "!=", ">", ">=": - self.assert_(eval("c[x] %s c[y]" % op) == + self.assertTrue(eval("c[x] %s c[y]" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) - self.assert_(eval("c[x] %s y" % op) == + self.assertTrue(eval("c[x] %s y" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) - self.assert_(eval("x %s c[y]" % op) == + self.assertTrue(eval("x %s c[y]" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) @@ -2731,11 +2731,11 @@ for x in 1, 2, 3: for y in 1, 2, 3: for op in "<", "<=", "==", "!=", ">", ">=": - self.assert_(eval("c[x] %s c[y]" % op) == eval("x %s y" % op), + self.assertTrue(eval("c[x] %s c[y]" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) - self.assert_(eval("c[x] %s y" % op) == eval("x %s y" % op), + self.assertTrue(eval("c[x] %s y" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) - self.assert_(eval("x %s c[y]" % op) == eval("x %s y" % op), + self.assertTrue(eval("x %s c[y]" % op) == eval("x %s y" % op), "x=%d, y=%d" % (x, y)) def test_descrdoc(self): @@ -2775,9 +2775,9 @@ for cls2 in C, D, E, F: x = cls() x.__class__ = cls2 - self.assert_(x.__class__ is cls2) + self.assertTrue(x.__class__ is cls2) x.__class__ = cls - self.assert_(x.__class__ is cls) + self.assertTrue(x.__class__ is cls) def cant(x, C): try: x.__class__ = C @@ -2833,11 +2833,11 @@ x = cls() x.a = 1 x.__class__ = cls2 - self.assert_(x.__class__ is cls2, + self.assertTrue(x.__class__ is cls2, "assigning %r as __class__ for %r silently failed" % (cls2, x)) self.assertEqual(x.a, 1) x.__class__ = cls - self.assert_(x.__class__ is cls, + self.assertTrue(x.__class__ is cls, "assigning %r as __class__ for %r silently failed" % (cls, x)) self.assertEqual(x.a, 1) for cls in G, J, K, L, M, N, P, R, list, Int: @@ -3006,7 +3006,7 @@ for cls in C, C1, C2: s = pickle.dumps(cls, bin) cls2 = pickle.loads(s) - self.assert_(cls2 is cls) + self.assertTrue(cls2 is cls) a = C1(1, 2); a.append(42); a.append(24) b = C2("hello", "world", 42) @@ -3036,7 +3036,7 @@ import copy for cls in C, C1, C2: cls2 = copy.deepcopy(cls) - self.assert_(cls2 is cls) + self.assertTrue(cls2 is cls) a = C1(1, 2); a.append(42); a.append(24) b = C2("hello", "world", 42) @@ -3579,8 +3579,8 @@ __slots__=() if support.check_impl_detail(): self.assertEqual(C.__basicsize__, B.__basicsize__) - self.assert_(hasattr(C, '__dict__')) - self.assert_(hasattr(C, '__weakref__')) + self.assertTrue(hasattr(C, '__dict__')) + self.assertTrue(hasattr(C, '__weakref__')) C().x = 2 def test_rmul(self): @@ -3914,29 +3914,29 @@ pass a = C() pa = Proxy(a) - self.assert_(isinstance(a, C)) # Baseline - self.assert_(isinstance(pa, C)) # Test + self.assertTrue(isinstance(a, C)) # Baseline + self.assertTrue(isinstance(pa, C)) # Test # Test with a classic subclass class D(C): pass a = D() pa = Proxy(a) - self.assert_(isinstance(a, C)) # Baseline - self.assert_(isinstance(pa, C)) # Test + self.assertTrue(isinstance(a, C)) # Baseline + self.assertTrue(isinstance(pa, C)) # Test # Test with a new-style class class C(object): pass a = C() pa = Proxy(a) - self.assert_(isinstance(a, C)) # Baseline - self.assert_(isinstance(pa, C)) # Test + self.assertTrue(isinstance(a, C)) # Baseline + self.assertTrue(isinstance(pa, C)) # Test # Test with a new-style subclass class D(C): pass a = D() pa = Proxy(a) - self.assert_(isinstance(a, C)) # Baseline - self.assert_(isinstance(pa, C)) # Test + self.assertTrue(isinstance(a, C)) # Baseline + self.assertTrue(isinstance(pa, C)) # Test def test_proxy_super(self): # Testing super() for a proxy object... @@ -4065,17 +4065,17 @@ l = [] self.assertEqual(l.__add__, l.__add__) self.assertEqual(l.__add__, [].__add__) - self.assert_(l.__add__ != [5].__add__) - self.assert_(l.__add__ != l.__mul__) - self.assert_(l.__add__.__name__ == '__add__') + self.assertTrue(l.__add__ != [5].__add__) + self.assertTrue(l.__add__ != l.__mul__) + self.assertTrue(l.__add__.__name__ == '__add__') if hasattr(l.__add__, '__self__'): # CPython - self.assert_(l.__add__.__self__ is l) - self.assert_(l.__add__.__objclass__ is list) + self.assertTrue(l.__add__.__self__ is l) + self.assertTrue(l.__add__.__objclass__ is list) else: # Python implementations where [].__add__ is a normal bound method - self.assert_(l.__add__.im_self is l) - self.assert_(l.__add__.im_class is list) + self.assertTrue(l.__add__.im_self is l) + self.assertTrue(l.__add__.im_class is list) self.assertEqual(l.__add__.__doc__, list.__add__.__doc__) try: hash(l.__add__) Modified: python/branches/py3k/Lib/test/test_dict.py ============================================================================== --- python/branches/py3k/Lib/test/test_dict.py (original) +++ python/branches/py3k/Lib/test/test_dict.py Wed Jul 1 01:06:06 2009 @@ -10,7 +10,7 @@ def test_constructor(self): # calling built-in types without argument must return empty self.assertEqual(dict(), {}) - self.assert_(dict() is not {}) + self.assertTrue(dict() is not {}) def test_literal_constructor(self): # check literal constructor for different sized dicts (to exercise the BUILD_MAP oparg @@ -24,18 +24,18 @@ self.assertEqual(eval(dictliteral), dict(items)) def test_bool(self): - self.assert_(not {}) - self.assert_({1: 2}) - self.assert_(bool({}) is False) - self.assert_(bool({1: 2}) is True) + self.assertTrue(not {}) + self.assertTrue({1: 2}) + self.assertTrue(bool({}) is False) + self.assertTrue(bool({1: 2}) is True) def test_keys(self): d = {} self.assertEqual(set(d.keys()), set()) d = {'a': 1, 'b': 2} k = d.keys() - self.assert_('a' in d) - self.assert_('b' in d) + self.assertTrue('a' in d) + self.assertTrue('b' in d) self.assertRaises(TypeError, d.keys, None) self.assertEqual(repr(dict(a=1).keys()), "dict_keys(['a'])") @@ -58,12 +58,12 @@ def test_contains(self): d = {} - self.assert_(not ('a' in d)) - self.assert_('a' not in d) + self.assertTrue(not ('a' in d)) + self.assertTrue('a' not in d) d = {'a': 1, 'b': 2} - self.assert_('a' in d) - self.assert_('b' in d) - self.assert_('c' not in d) + self.assertTrue('a' in d) + self.assertTrue('b' in d) + self.assertTrue('c' not in d) self.assertRaises(TypeError, d.__contains__) @@ -197,7 +197,7 @@ def test_fromkeys(self): self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) d = {} - self.assert_(not(d.fromkeys('abc') is d)) + self.assertTrue(not(d.fromkeys('abc') is d)) self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) self.assertEqual(d.fromkeys([]), {}) @@ -208,14 +208,14 @@ class dictlike(dict): pass self.assertEqual(dictlike.fromkeys('a'), {'a':None}) self.assertEqual(dictlike().fromkeys('a'), {'a':None}) - self.assert_(type(dictlike.fromkeys('a')) is dictlike) - self.assert_(type(dictlike().fromkeys('a')) is dictlike) + self.assertTrue(type(dictlike.fromkeys('a')) is dictlike) + self.assertTrue(type(dictlike().fromkeys('a')) is dictlike) class mydict(dict): def __new__(cls): return collections.UserDict() ud = mydict.fromkeys('ab') self.assertEqual(ud, {'a':None, 'b':None}) - self.assert_(isinstance(ud, collections.UserDict)) + self.assertTrue(isinstance(ud, collections.UserDict)) self.assertRaises(TypeError, dict.fromkeys) class Exc(Exception): pass @@ -252,10 +252,10 @@ def test_get(self): d = {} - self.assert_(d.get('c') is None) + self.assertTrue(d.get('c') is None) self.assertEqual(d.get('c', 3), 3) d = {'a' : 1, 'b' : 2} - self.assert_(d.get('c') is None) + self.assertTrue(d.get('c') is None) self.assertEqual(d.get('c', 3), 3) self.assertEqual(d.get('a'), 1) self.assertEqual(d.get('a', 3), 1) @@ -265,9 +265,9 @@ def test_setdefault(self): # dict.setdefault() d = {} - self.assert_(d.setdefault('key0') is None) + self.assertTrue(d.setdefault('key0') is None) d.setdefault('key0', []) - self.assert_(d.setdefault('key0') is None) + self.assertTrue(d.setdefault('key0') is None) d.setdefault('key', []).append(3) self.assertEqual(d['key'][0], 3) d.setdefault('key', []).append(4) @@ -309,9 +309,9 @@ self.assertEqual(va, int(ka)) kb, vb = tb = b.popitem() self.assertEqual(vb, int(kb)) - self.assert_(not(copymode < 0 and ta != tb)) - self.assert_(not a) - self.assert_(not b) + self.assertTrue(not(copymode < 0 and ta != tb)) + self.assertTrue(not a) + self.assertTrue(not b) d = {} self.assertRaises(KeyError, d.popitem) @@ -525,8 +525,8 @@ d = D({1: 2, 3: 4}) self.assertEqual(d[1], 2) self.assertEqual(d[3], 4) - self.assert_(2 not in d) - self.assert_(2 not in d.keys()) + self.assertTrue(2 not in d) + self.assertTrue(2 not in d.keys()) self.assertEqual(d[2], 42) class E(dict): def __missing__(self, key): @@ -663,7 +663,7 @@ obj.x = iter(obj.v) del obj, container gc.collect() - self.assert_(ref() is None, "Cycle was not collected") + self.assertTrue(ref() is None, "Cycle was not collected") def _not_tracked(self, t): # Nested containers can take several collections to untrack Modified: python/branches/py3k/Lib/test/test_dictviews.py ============================================================================== --- python/branches/py3k/Lib/test/test_dictviews.py (original) +++ python/branches/py3k/Lib/test/test_dictviews.py Wed Jul 1 01:06:06 2009 @@ -24,10 +24,10 @@ self.assertNotEqual(keys, {1, "b"}) self.assertNotEqual(keys, {1}) self.assertNotEqual(keys, 42) - self.assert_(1 in keys) - self.assert_("a" in keys) - self.assert_(10 not in keys) - self.assert_("Z" not in keys) + self.assertTrue(1 in keys) + self.assertTrue("a" in keys) + self.assertTrue(10 not in keys) + self.assertTrue("Z" not in keys) self.assertEqual(d.keys(), d.keys()) e = {1: 11, "a": "def"} self.assertEqual(d.keys(), e.keys()) @@ -44,13 +44,13 @@ self.assertNotEqual(items, {(1, 10), ("a", "def")}) self.assertNotEqual(items, {(1, 10)}) self.assertNotEqual(items, 42) - self.assert_((1, 10) in items) - self.assert_(("a", "ABC") in items) - self.assert_((1, 11) not in items) - self.assert_(1 not in items) - self.assert_(() not in items) - self.assert_((1,) not in items) - self.assert_((1, 2, 3) not in items) + self.assertTrue((1, 10) in items) + self.assertTrue(("a", "ABC") in items) + self.assertTrue((1, 11) not in items) + self.assertTrue(1 not in items) + self.assertTrue(() not in items) + self.assertTrue((1,) not in items) + self.assertTrue((1, 2, 3) not in items) self.assertEqual(d.items(), d.items()) e = d.copy() self.assertEqual(d.items(), e.items()) Modified: python/branches/py3k/Lib/test/test_docxmlrpc.py ============================================================================== --- python/branches/py3k/Lib/test/test_docxmlrpc.py (original) +++ python/branches/py3k/Lib/test/test_docxmlrpc.py Wed Jul 1 01:06:06 2009 @@ -104,7 +104,7 @@ self.client.request("GET", "/") response = self.client.getresponse() - self.assert_( + self.assertTrue( b"""
<lambda>(x, y)
""" in response.read()) @@ -118,7 +118,7 @@ self.client.request("GET", "/") response = self.client.getresponse().read() - self.assert_( # This is ugly ... how can it be made better? + self.assertTrue( # This is ugly ... how can it be made better? b"""
add(x, y)
Add two instances together. This follows PEP008, but has nothing
\nto do with RFC1952. Case should matter: pEp008 and rFC1952.  Things
\nthat start with http and ftp should be auto-linked, too:
\nhttp://google.com.
""" in response, response) @@ -131,7 +131,7 @@ self.client.request("GET", "/") response = self.client.getresponse().read() - self.assert_( + self.assertTrue( b"""
system.methodHelp(method_name)
system.methodHelp(\'add\') => "Adds two integers together"
\n 
\nReturns a string containing documentation for the specified method.
\n
system.methodSignature(method_name)
system.methodSignature(\'add\') => [double, int, int]
\n 
\nReturns a list describing the signature of the method. In the
\nabove example, the add method takes two integers as arguments
\nand returns a double result.
\n 
\nThis server does NOT support system.methodSignature.
\n
test_method(arg)
Test method\'s docs. This method truly does very little.
""" in response) def test_autolink_dotted_methods(self): @@ -140,7 +140,7 @@ self.client.request("GET", "/") response = self.client.getresponse() - self.assert_(b"""Try self.add, too.""" in + self.assertTrue(b"""Try self.add, too.""" in response.read()) def test_main(): Modified: python/branches/py3k/Lib/test/test_dummy_thread.py ============================================================================== --- python/branches/py3k/Lib/test/test_dummy_thread.py (original) +++ python/branches/py3k/Lib/test/test_dummy_thread.py Wed Jul 1 01:06:06 2009 @@ -24,43 +24,43 @@ def test_initlock(self): #Make sure locks start locked - self.failUnless(not self.lock.locked(), + self.assertTrue(not self.lock.locked(), "Lock object is not initialized unlocked.") def test_release(self): # Test self.lock.release() self.lock.acquire() self.lock.release() - self.failUnless(not self.lock.locked(), + self.assertTrue(not self.lock.locked(), "Lock object did not release properly.") def test_improper_release(self): #Make sure release of an unlocked thread raises _thread.error - self.failUnlessRaises(_thread.error, self.lock.release) + self.assertRaises(_thread.error, self.lock.release) def test_cond_acquire_success(self): #Make sure the conditional acquiring of the lock works. - self.failUnless(self.lock.acquire(0), + self.assertTrue(self.lock.acquire(0), "Conditional acquiring of the lock failed.") def test_cond_acquire_fail(self): #Test acquiring locked lock returns False self.lock.acquire(0) - self.failUnless(not self.lock.acquire(0), + self.assertTrue(not self.lock.acquire(0), "Conditional acquiring of a locked lock incorrectly " "succeeded.") def test_uncond_acquire_success(self): #Make sure unconditional acquiring of a lock works. self.lock.acquire() - self.failUnless(self.lock.locked(), + self.assertTrue(self.lock.locked(), "Uncondional locking failed.") def test_uncond_acquire_return_val(self): #Make sure that an unconditional locking returns True. - self.failUnless(self.lock.acquire(1) is True, + self.assertTrue(self.lock.acquire(1) is True, "Unconditional locking did not return True.") - self.failUnless(self.lock.acquire() is True) + self.assertTrue(self.lock.acquire() is True) def test_uncond_acquire_blocking(self): #Make sure that unconditional acquiring of a locked lock blocks. @@ -80,7 +80,7 @@ end_time = int(time.time()) if support.verbose: print("done") - self.failUnless((end_time - start_time) >= DELAY, + self.assertTrue((end_time - start_time) >= DELAY, "Blocking by unconditional acquiring failed.") class MiscTests(unittest.TestCase): @@ -88,18 +88,18 @@ def test_exit(self): #Make sure _thread.exit() raises SystemExit - self.failUnlessRaises(SystemExit, _thread.exit) + self.assertRaises(SystemExit, _thread.exit) def test_ident(self): #Test sanity of _thread.get_ident() - self.failUnless(isinstance(_thread.get_ident(), int), + self.assertTrue(isinstance(_thread.get_ident(), int), "_thread.get_ident() returned a non-integer") - self.failUnless(_thread.get_ident() != 0, + self.assertTrue(_thread.get_ident() != 0, "_thread.get_ident() returned 0") def test_LockType(self): #Make sure _thread.LockType is the same type as _thread.allocate_locke() - self.failUnless(isinstance(_thread.allocate_lock(), _thread.LockType), + self.assertTrue(isinstance(_thread.allocate_lock(), _thread.LockType), "_thread.LockType is not an instance of what is " "returned by _thread.allocate_lock()") @@ -108,13 +108,13 @@ # should raise KeyboardInterrupt upon completion. def call_interrupt(): _thread.interrupt_main() - self.failUnlessRaises(KeyboardInterrupt, _thread.start_new_thread, + self.assertRaises(KeyboardInterrupt, _thread.start_new_thread, call_interrupt, tuple()) def test_interrupt_in_main(self): # Make sure that if interrupt_main is called in main threat that # KeyboardInterrupt is raised instantly. - self.failUnlessRaises(KeyboardInterrupt, _thread.interrupt_main) + self.assertRaises(KeyboardInterrupt, _thread.interrupt_main) class ThreadTests(unittest.TestCase): """Test thread creation.""" @@ -128,16 +128,16 @@ testing_queue = queue.Queue(1) _thread.start_new_thread(arg_tester, (testing_queue, True, True)) result = testing_queue.get() - self.failUnless(result[0] and result[1], + self.assertTrue(result[0] and result[1], "Argument passing for thread creation using tuple failed") _thread.start_new_thread(arg_tester, tuple(), {'queue':testing_queue, 'arg1':True, 'arg2':True}) result = testing_queue.get() - self.failUnless(result[0] and result[1], + self.assertTrue(result[0] and result[1], "Argument passing for thread creation using kwargs failed") _thread.start_new_thread(arg_tester, (testing_queue, True), {'arg2':True}) result = testing_queue.get() - self.failUnless(result[0] and result[1], + self.assertTrue(result[0] and result[1], "Argument passing for thread creation using both tuple" " and kwargs failed") @@ -164,7 +164,7 @@ time.sleep(DELAY) if support.verbose: print('done') - self.failUnless(testing_queue.qsize() == thread_count, + self.assertTrue(testing_queue.qsize() == thread_count, "Not all %s threads executed properly after %s sec." % (thread_count, DELAY)) Modified: python/branches/py3k/Lib/test/test_epoll.py ============================================================================== --- python/branches/py3k/Lib/test/test_epoll.py (original) +++ python/branches/py3k/Lib/test/test_epoll.py Wed Jul 1 01:06:06 2009 @@ -71,10 +71,10 @@ ep = select.epoll(16) except OSError as e: raise AssertionError(str(e)) - self.assert_(ep.fileno() > 0, ep.fileno()) - self.assert_(not ep.closed) + self.assertTrue(ep.fileno() > 0, ep.fileno()) + self.assertTrue(not ep.closed) ep.close() - self.assert_(ep.closed) + self.assertTrue(ep.closed) self.assertRaises(ValueError, ep.fileno) def test_badcreate(self): @@ -141,7 +141,7 @@ try: ep2.poll(1, 4) except IOError as e: - self.failUnlessEqual(e.args[0], errno.EBADF, e) + self.assertEqual(e.args[0], errno.EBADF, e) else: self.fail("epoll on closed fd didn't raise EBADF") @@ -157,7 +157,7 @@ now = time.time() events = ep.poll(1, 4) then = time.time() - self.failIf(then - now > 0.1, then - now) + self.assertFalse(then - now > 0.1, then - now) events.sort() expected = [(client.fileno(), select.EPOLLOUT), @@ -165,12 +165,12 @@ expected.sort() self.assertEquals(events, expected) - self.failIf(then - now > 0.01, then - now) + self.assertFalse(then - now > 0.01, then - now) now = time.time() events = ep.poll(timeout=2.1, maxevents=4) then = time.time() - self.failIf(events) + self.assertFalse(events) client.send(b"Hello!") server.send(b"world!!!") @@ -178,7 +178,7 @@ now = time.time() events = ep.poll(1, 4) then = time.time() - self.failIf(then - now > 0.01) + self.assertFalse(then - now > 0.01) events.sort() expected = [(client.fileno(), select.EPOLLIN | select.EPOLLOUT), @@ -192,7 +192,7 @@ now = time.time() events = ep.poll(1, 4) then = time.time() - self.failIf(then - now > 0.01) + self.assertFalse(then - now > 0.01) expected = [(server.fileno(), select.EPOLLOUT)] self.assertEquals(events, expected) @@ -211,7 +211,7 @@ now = time.time() events = ep.poll(1, 4) then = time.time() - self.failIf(then - now > 0.01) + self.assertFalse(then - now > 0.01) server.close() ep.unregister(fd) Modified: python/branches/py3k/Lib/test/test_errno.py ============================================================================== --- python/branches/py3k/Lib/test/test_errno.py (original) +++ python/branches/py3k/Lib/test/test_errno.py Wed Jul 1 01:06:06 2009 @@ -14,13 +14,13 @@ def test_for_improper_attributes(self): # No unexpected attributes should be on the module. for error_code in std_c_errors: - self.assert_(hasattr(errno, error_code), + self.assertTrue(hasattr(errno, error_code), "errno is missing %s" % error_code) def test_using_errorcode(self): # Every key value in errno.errorcode should be on the module. for value in errno.errorcode.values(): - self.assert_(hasattr(errno, value), 'no %s attr in errno' % value) + self.assertTrue(hasattr(errno, value), 'no %s attr in errno' % value) class ErrorcodeTests(unittest.TestCase): @@ -28,7 +28,7 @@ def test_attributes_in_errorcode(self): for attribute in errno.__dict__.keys(): if attribute.isupper(): - self.assert_(getattr(errno, attribute) in errno.errorcode, + self.assertTrue(getattr(errno, attribute) in errno.errorcode, 'no %s attr in errno.errorcode' % attribute) Modified: python/branches/py3k/Lib/test/test_exceptions.py ============================================================================== --- python/branches/py3k/Lib/test/test_exceptions.py (original) +++ python/branches/py3k/Lib/test/test_exceptions.py Wed Jul 1 01:06:06 2009 @@ -155,7 +155,7 @@ exc, err, tb = sys.exc_info() co = tb.tb_frame.f_code self.assertEquals(co.co_name, "test_capi1") - self.assert_(co.co_filename.endswith('test_exceptions.py')) + self.assertTrue(co.co_filename.endswith('test_exceptions.py')) else: self.fail("Expected exception") @@ -167,7 +167,7 @@ exc, err, tb = sys.exc_info() co = tb.tb_frame.f_code self.assertEquals(co.co_name, "__init__") - self.assert_(co.co_filename.endswith('test_exceptions.py')) + self.assertTrue(co.co_filename.endswith('test_exceptions.py')) co2 = tb.tb_frame.f_back.f_code self.assertEquals(co2.co_name, "test_capi2") else: @@ -189,12 +189,12 @@ except NameError: pass else: - self.failUnlessEqual(str(WindowsError(1001)), + self.assertEqual(str(WindowsError(1001)), "1001") - self.failUnlessEqual(str(WindowsError(1001, "message")), + self.assertEqual(str(WindowsError(1001, "message")), "[Error 1001] message") - self.failUnlessEqual(WindowsError(1001, "message").errno, 22) - self.failUnlessEqual(WindowsError(1001, "message").winerror, 1001) + self.assertEqual(WindowsError(1001, "message").errno, 22) + self.assertEqual(WindowsError(1001, "message").winerror, 1001) def testAttributes(self): # test that exception attributes are happy @@ -319,25 +319,25 @@ tb = sys.exc_info()[2] e = BaseException().with_traceback(tb) - self.failUnless(isinstance(e, BaseException)) + self.assertTrue(isinstance(e, BaseException)) self.assertEqual(e.__traceback__, tb) e = IndexError(5).with_traceback(tb) - self.failUnless(isinstance(e, IndexError)) + self.assertTrue(isinstance(e, IndexError)) self.assertEqual(e.__traceback__, tb) class MyException(Exception): pass e = MyException().with_traceback(tb) - self.failUnless(isinstance(e, MyException)) + self.assertTrue(isinstance(e, MyException)) self.assertEqual(e.__traceback__, tb) def testInvalidTraceback(self): try: Exception().__traceback__ = 5 except TypeError as e: - self.failUnless("__traceback__ must be a traceback" in str(e)) + self.assertTrue("__traceback__ must be a traceback" in str(e)) else: self.fail("No exception raised") @@ -402,10 +402,10 @@ def testUnicodeStrUsage(self): # Make sure both instances and classes have a str and unicode # representation. - self.failUnless(str(Exception)) - self.failUnless(str(Exception)) - self.failUnless(str(Exception('a'))) - self.failUnless(str(Exception('a'))) + self.assertTrue(str(Exception)) + self.assertTrue(str(Exception)) + self.assertTrue(str(Exception('a'))) + self.assertTrue(str(Exception('a'))) def testExceptionCleanupNames(self): # Make sure the local variable bound to the exception instance by @@ -413,9 +413,9 @@ try: raise Exception() except Exception as e: - self.failUnless(e) + self.assertTrue(e) del e - self.failIf('e' in locals()) + self.assertFalse('e' in locals()) def testExceptionCleanupState(self): # Make sure exception state is cleaned up as soon as the except @@ -441,7 +441,7 @@ pass obj = None obj = wr() - self.failUnless(obj is None, "%s" % obj) + self.assertTrue(obj is None, "%s" % obj) # Qualified "except" without "as" obj = MyObj() @@ -452,7 +452,7 @@ pass obj = None obj = wr() - self.failUnless(obj is None, "%s" % obj) + self.assertTrue(obj is None, "%s" % obj) # Bare "except" obj = MyObj() @@ -463,7 +463,7 @@ pass obj = None obj = wr() - self.failUnless(obj is None, "%s" % obj) + self.assertTrue(obj is None, "%s" % obj) # "except" with premature block leave obj = MyObj() @@ -475,7 +475,7 @@ break obj = None obj = wr() - self.failUnless(obj is None, "%s" % obj) + self.assertTrue(obj is None, "%s" % obj) # "except" block raising another exception obj = MyObj() @@ -493,7 +493,7 @@ e.__context__ = None obj = None obj = wr() - self.failUnless(obj is None, "%s" % obj) + self.assertTrue(obj is None, "%s" % obj) # Some complicated construct obj = MyObj() @@ -510,7 +510,7 @@ pass obj = None obj = wr() - self.failUnless(obj is None, "%s" % obj) + self.assertTrue(obj is None, "%s" % obj) # Inside an exception-silencing "with" block class Context: @@ -524,7 +524,7 @@ inner_raising_func() obj = None obj = wr() - self.failUnless(obj is None, "%s" % obj) + self.assertTrue(obj is None, "%s" % obj) def test_generator_leaking(self): # Test that generator exception state doesn't leak into the calling @@ -598,8 +598,8 @@ except RuntimeError: return sys.exc_info() e, v, tb = g() - self.assert_(isinstance(v, RuntimeError), type(v)) - self.assert_("maximum recursion depth exceeded" in str(v), str(v)) + self.assertTrue(isinstance(v, RuntimeError), type(v)) + self.assertTrue("maximum recursion depth exceeded" in str(v), str(v)) def test_MemoryError(self): Modified: python/branches/py3k/Lib/test/test_file.py ============================================================================== --- python/branches/py3k/Lib/test/test_file.py (original) +++ python/branches/py3k/Lib/test/test_file.py Wed Jul 1 01:06:06 2009 @@ -83,13 +83,13 @@ def testErrors(self): f = self.f self.assertEquals(f.name, TESTFN) - self.assert_(not f.isatty()) - self.assert_(not f.closed) + self.assertTrue(not f.isatty()) + self.assertTrue(not f.closed) if hasattr(f, "readinto"): self.assertRaises((IOError, TypeError), f.readinto, "") f.close() - self.assert_(f.closed) + self.assertTrue(f.closed) def testMethods(self): methods = [('fileno', ()), @@ -111,7 +111,7 @@ # __exit__ should close the file self.f.__exit__(None, None, None) - self.assert_(self.f.closed) + self.assertTrue(self.f.closed) for methodname, args in methods: method = getattr(self.f, methodname) Modified: python/branches/py3k/Lib/test/test_filecmp.py ============================================================================== --- python/branches/py3k/Lib/test/test_filecmp.py (original) +++ python/branches/py3k/Lib/test/test_filecmp.py Wed Jul 1 01:06:06 2009 @@ -25,19 +25,19 @@ os.unlink(self.name_diff) def test_matching(self): - self.failUnless(filecmp.cmp(self.name, self.name_same), + self.assertTrue(filecmp.cmp(self.name, self.name_same), "Comparing file to itself fails") - self.failUnless(filecmp.cmp(self.name, self.name_same, shallow=False), + self.assertTrue(filecmp.cmp(self.name, self.name_same, shallow=False), "Comparing file to itself fails") - self.failUnless(filecmp.cmp(self.name, self.name, shallow=False), + self.assertTrue(filecmp.cmp(self.name, self.name, shallow=False), "Comparing file to identical file fails") - self.failUnless(filecmp.cmp(self.name, self.name), + self.assertTrue(filecmp.cmp(self.name, self.name), "Comparing file to identical file fails") def test_different(self): - self.failIf(filecmp.cmp(self.name, self.name_diff), + self.assertFalse(filecmp.cmp(self.name, self.name_diff), "Mismatched files compare as equal") - self.failIf(filecmp.cmp(self.name, self.dir), + self.assertFalse(filecmp.cmp(self.name, self.dir), "File and directory compare as equal") class DirCompareTestCase(unittest.TestCase): @@ -69,19 +69,19 @@ shutil.rmtree(self.dir_diff) def test_cmpfiles(self): - self.failUnless(filecmp.cmpfiles(self.dir, self.dir, ['file']) == + self.assertTrue(filecmp.cmpfiles(self.dir, self.dir, ['file']) == (['file'], [], []), "Comparing directory to itself fails") - self.failUnless(filecmp.cmpfiles(self.dir, self.dir_same, ['file']) == + self.assertTrue(filecmp.cmpfiles(self.dir, self.dir_same, ['file']) == (['file'], [], []), "Comparing directory to same fails") # Try it with shallow=False - self.failUnless(filecmp.cmpfiles(self.dir, self.dir, ['file'], + self.assertTrue(filecmp.cmpfiles(self.dir, self.dir, ['file'], shallow=False) == (['file'], [], []), "Comparing directory to itself fails") - self.failUnless(filecmp.cmpfiles(self.dir, self.dir_same, ['file'], + self.assertTrue(filecmp.cmpfiles(self.dir, self.dir_same, ['file'], shallow=False), "Comparing directory to same fails") @@ -90,7 +90,7 @@ output.write('Different contents.\n') output.close() - self.failIf(filecmp.cmpfiles(self.dir, self.dir_same, + self.assertFalse(filecmp.cmpfiles(self.dir, self.dir_same, ['file', 'file2']) == (['file'], ['file2'], []), "Comparing mismatched directories fails") @@ -104,14 +104,14 @@ else: self.assertEqual([d.left_list, d.right_list],[['file'], ['file']]) self.assertEqual(d.common, ['file']) - self.failUnless(d.left_only == d.right_only == []) + self.assertTrue(d.left_only == d.right_only == []) self.assertEqual(d.same_files, ['file']) self.assertEqual(d.diff_files, []) # Check attributes for comparison of two different directories d = filecmp.dircmp(self.dir, self.dir_diff) self.assertEqual(d.left_list, ['file']) - self.failUnless(d.right_list == ['file', 'file2']) + self.assertTrue(d.right_list == ['file', 'file2']) self.assertEqual(d.common, ['file']) self.assertEqual(d.left_only, []) self.assertEqual(d.right_only, ['file2']) Modified: python/branches/py3k/Lib/test/test_fileinput.py ============================================================================== --- python/branches/py3k/Lib/test/test_fileinput.py (original) +++ python/branches/py3k/Lib/test/test_fileinput.py Wed Jul 1 01:06:06 2009 @@ -68,8 +68,8 @@ self.assertEqual(fi.filename(), t2) self.assertEqual(fi.lineno(), 21) self.assertEqual(fi.filelineno(), 6) - self.failIf(fi.isfirstline()) - self.failIf(fi.isstdin()) + self.assertFalse(fi.isfirstline()) + self.assertFalse(fi.isstdin()) if verbose: print('%s. Nextfile (bs=%s)' % (start+2, bs)) @@ -138,7 +138,7 @@ self.assertEqual(fi.filename(), t3) line = fi.readline() - self.failIf(line) + self.assertFalse(line) self.assertEqual(fi.lineno(), 1) self.assertEqual(fi.filelineno(), 0) self.assertEqual(fi.filename(), t4) Modified: python/branches/py3k/Lib/test/test_fileio.py ============================================================================== --- python/branches/py3k/Lib/test/test_fileio.py (original) +++ python/branches/py3k/Lib/test/test_fileio.py Wed Jul 1 01:06:06 2009 @@ -80,17 +80,17 @@ def testErrors(self): f = self.f - self.assert_(not f.isatty()) - self.assert_(not f.closed) + self.assertTrue(not f.isatty()) + self.assertTrue(not f.closed) #self.assertEquals(f.name, TESTFN) self.assertRaises(ValueError, f.read, 10) # Open for reading f.close() - self.assert_(f.closed) + self.assertTrue(f.closed) f = _FileIO(TESTFN, 'r') self.assertRaises(TypeError, f.readinto, "") - self.assert_(not f.closed) + self.assertTrue(not f.closed) f.close() - self.assert_(f.closed) + self.assertTrue(f.closed) def testMethods(self): methods = ['fileno', 'isatty', 'read', 'readinto', @@ -100,7 +100,7 @@ methods.remove('truncate') self.f.close() - self.assert_(self.f.closed) + self.assertTrue(self.f.closed) for methodname in methods: method = getattr(self.f, methodname) Modified: python/branches/py3k/Lib/test/test_float.py ============================================================================== --- python/branches/py3k/Lib/test/test_float.py (original) +++ python/branches/py3k/Lib/test/test_float.py Wed Jul 1 01:06:06 2009 @@ -136,27 +136,27 @@ def test_float_containment(self): floats = (INF, -INF, 0.0, 1.0, NAN) for f in floats: - self.assert_(f in [f], "'%r' not in []" % f) - self.assert_(f in (f,), "'%r' not in ()" % f) - self.assert_(f in {f}, "'%r' not in set()" % f) - self.assert_(f in {f: None}, "'%r' not in {}" % f) + self.assertTrue(f in [f], "'%r' not in []" % f) + self.assertTrue(f in (f,), "'%r' not in ()" % f) + self.assertTrue(f in {f}, "'%r' not in set()" % f) + self.assertTrue(f in {f: None}, "'%r' not in {}" % f) self.assertEqual([f].count(f), 1, "[].count('%r') != 1" % f) - self.assert_(f in floats, "'%r' not in container" % f) + self.assertTrue(f in floats, "'%r' not in container" % f) for f in floats: # nonidentical containers, same type, same contents - self.assert_([f] == [f], "[%r] != [%r]" % (f, f)) - self.assert_((f,) == (f,), "(%r,) != (%r,)" % (f, f)) - self.assert_({f} == {f}, "{%r} != {%r}" % (f, f)) - self.assert_({f : None} == {f: None}, "{%r : None} != " + self.assertTrue([f] == [f], "[%r] != [%r]" % (f, f)) + self.assertTrue((f,) == (f,), "(%r,) != (%r,)" % (f, f)) + self.assertTrue({f} == {f}, "{%r} != {%r}" % (f, f)) + self.assertTrue({f : None} == {f: None}, "{%r : None} != " "{%r : None}" % (f, f)) # identical containers l, t, s, d = [f], (f,), {f}, {f: None} - self.assert_(l == l, "[%r] not equal to itself" % f) - self.assert_(t == t, "(%r,) not equal to itself" % f) - self.assert_(s == s, "{%r} not equal to itself" % f) - self.assert_(d == d, "{%r : None} not equal to itself" % f) + self.assertTrue(l == l, "[%r] not equal to itself" % f) + self.assertTrue(t == t, "(%r,) not equal to itself" % f) + self.assertTrue(s == s, "{%r} not equal to itself" % f) + self.assertTrue(d == d, "{%r : None} not equal to itself" % f) @@ -171,9 +171,9 @@ float.__setformat__('float', self.save_formats['float']) def test_getformat(self): - self.assert_(float.__getformat__('double') in + self.assertTrue(float.__getformat__('double') in ['unknown', 'IEEE, big-endian', 'IEEE, little-endian']) - self.assert_(float.__getformat__('float') in + self.assertTrue(float.__getformat__('float') in ['unknown', 'IEEE, big-endian', 'IEEE, little-endian']) self.assertRaises(ValueError, float.__getformat__, 'chicken') self.assertRaises(TypeError, float.__getformat__, 1) @@ -493,12 +493,12 @@ # ways to create and represent inf and nan class InfNanTest(unittest.TestCase): def test_inf_from_str(self): - self.assert_(isinf(float("inf"))) - self.assert_(isinf(float("+inf"))) - self.assert_(isinf(float("-inf"))) - self.assert_(isinf(float("infinity"))) - self.assert_(isinf(float("+infinity"))) - self.assert_(isinf(float("-infinity"))) + self.assertTrue(isinf(float("inf"))) + self.assertTrue(isinf(float("+inf"))) + self.assertTrue(isinf(float("-inf"))) + self.assertTrue(isinf(float("infinity"))) + self.assertTrue(isinf(float("+infinity"))) + self.assertTrue(isinf(float("-infinity"))) self.assertEqual(repr(float("inf")), "inf") self.assertEqual(repr(float("+inf")), "inf") @@ -545,9 +545,9 @@ self.assertEqual(str(-1e300 * 1e300), "-inf") def test_nan_from_str(self): - self.assert_(isnan(float("nan"))) - self.assert_(isnan(float("+nan"))) - self.assert_(isnan(float("-nan"))) + self.assertTrue(isnan(float("nan"))) + self.assertTrue(isnan(float("+nan"))) + self.assertTrue(isnan(float("-nan"))) self.assertEqual(repr(float("nan")), "nan") self.assertEqual(repr(float("+nan")), "nan") @@ -581,14 +581,14 @@ self.assertEqual(str(-1e300 * 1e300 * 0), "nan") def notest_float_nan(self): - self.assert_(NAN.is_nan()) - self.failIf(INF.is_nan()) - self.failIf((0.).is_nan()) + self.assertTrue(NAN.is_nan()) + self.assertFalse(INF.is_nan()) + self.assertFalse((0.).is_nan()) def notest_float_inf(self): - self.assert_(INF.is_inf()) - self.failIf(NAN.is_inf()) - self.failIf((0.).is_inf()) + self.assertTrue(INF.is_inf()) + self.assertFalse(NAN.is_inf()) + self.assertFalse((0.).is_inf()) fromHex = float.fromhex toHex = float.hex Modified: python/branches/py3k/Lib/test/test_fnmatch.py ============================================================================== --- python/branches/py3k/Lib/test/test_fnmatch.py (original) +++ python/branches/py3k/Lib/test/test_fnmatch.py Wed Jul 1 01:06:06 2009 @@ -9,11 +9,11 @@ class FnmatchTestCase(unittest.TestCase): def check_match(self, filename, pattern, should_match=1): if should_match: - self.assert_(fnmatch(filename, pattern), + self.assertTrue(fnmatch(filename, pattern), "expected %r to match pattern %r" % (filename, pattern)) else: - self.assert_(not fnmatch(filename, pattern), + self.assertTrue(not fnmatch(filename, pattern), "expected %r not to match pattern %r" % (filename, pattern)) Modified: python/branches/py3k/Lib/test/test_ftplib.py ============================================================================== --- python/branches/py3k/Lib/test/test_ftplib.py (original) +++ python/branches/py3k/Lib/test/test_ftplib.py Wed Jul 1 01:06:06 2009 @@ -444,7 +444,7 @@ def testTimeoutDefault(self): # default -- use global socket timeout - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(30) try: ftp = ftplib.FTP("localhost") @@ -456,7 +456,7 @@ def testTimeoutNone(self): # no timeout -- do not use global socket timeout - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(30) try: ftp = ftplib.FTP("localhost", timeout=None) Modified: python/branches/py3k/Lib/test/test_funcattrs.py ============================================================================== --- python/branches/py3k/Lib/test/test_funcattrs.py (original) +++ python/branches/py3k/Lib/test/test_funcattrs.py Wed Jul 1 01:06:06 2009 @@ -35,11 +35,11 @@ def test_dir_includes_correct_attrs(self): self.b.known_attr = 7 - self.assert_('known_attr' in dir(self.b), + self.assertTrue('known_attr' in dir(self.b), "set attributes not in dir listing of method") # Test on underlying function object of method self.F.a.known_attr = 7 - self.assert_('known_attr' in dir(self.fi.a), "set attribute on function " + self.assertTrue('known_attr' in dir(self.fi.a), "set attribute on function " "implementations, should show up in next dir") def test_duplicate_function_equality(self): @@ -248,11 +248,11 @@ # their presence should not be interpreted as providing any # guarantees about the semantics (or even existence) of cell # comparisons in future versions of CPython. - self.assert_(cell(2) < cell(3)) - self.assert_(empty_cell() < cell('saturday')) - self.assert_(empty_cell() == empty_cell()) - self.assert_(cell(-36) == cell(-36.0)) - self.assert_(cell(True) > empty_cell()) + self.assertTrue(cell(2) < cell(3)) + self.assertTrue(empty_cell() < cell('saturday')) + self.assertTrue(empty_cell() == empty_cell()) + self.assertTrue(cell(-36) == cell(-36.0)) + self.assertTrue(cell(True) > empty_cell()) class StaticMethodAttrsTest(unittest.TestCase): def test_func_attribute(self): @@ -260,10 +260,10 @@ pass c = classmethod(f) - self.assert_(c.__func__ is f) + self.assertTrue(c.__func__ is f) s = staticmethod(f) - self.assert_(s.__func__ is f) + self.assertTrue(s.__func__ is f) def test_main(): Modified: python/branches/py3k/Lib/test/test_functools.py ============================================================================== --- python/branches/py3k/Lib/test/test_functools.py (original) +++ python/branches/py3k/Lib/test/test_functools.py Wed Jul 1 01:06:06 2009 @@ -96,7 +96,7 @@ p = self.thetype(capture, *args) expected = args + ('x',) got, empty = p('x') - self.failUnless(expected == got and empty == {}) + self.assertTrue(expected == got and empty == {}) def test_keyword(self): # make sure keyword arguments are captured correctly @@ -104,15 +104,15 @@ p = self.thetype(capture, a=a) expected = {'a':a,'x':None} empty, got = p(x=None) - self.failUnless(expected == got and empty == ()) + self.assertTrue(expected == got and empty == ()) def test_no_side_effects(self): # make sure there are no side effects that affect subsequent calls p = self.thetype(capture, 0, a=1) args1, kw1 = p(1, b=2) - self.failUnless(args1 == (0,1) and kw1 == {'a':1,'b':2}) + self.assertTrue(args1 == (0,1) and kw1 == {'a':1,'b':2}) args2, kw2 = p() - self.failUnless(args2 == (0,) and kw2 == {'a':1}) + self.assertTrue(args2 == (0,) and kw2 == {'a':1}) def test_error_propagation(self): def f(x, y): @@ -172,13 +172,13 @@ updated=functools.WRAPPER_UPDATES): # Check attributes were assigned for name in assigned: - self.failUnless(getattr(wrapper, name) is getattr(wrapped, name)) + self.assertTrue(getattr(wrapper, name) is getattr(wrapped, name)) # Check attributes were updated for name in updated: wrapper_attr = getattr(wrapper, name) wrapped_attr = getattr(wrapped, name) for key in wrapped_attr: - self.failUnless(wrapped_attr[key] is wrapper_attr[key]) + self.assertTrue(wrapped_attr[key] is wrapper_attr[key]) def test_default_update(self): def f(): @@ -204,7 +204,7 @@ self.check_wrapper(wrapper, f, (), ()) self.assertEqual(wrapper.__name__, 'wrapper') self.assertEqual(wrapper.__doc__, None) - self.failIf(hasattr(wrapper, 'attr')) + self.assertFalse(hasattr(wrapper, 'attr')) def test_selective_update(self): def f(): @@ -229,7 +229,7 @@ pass functools.update_wrapper(wrapper, max) self.assertEqual(wrapper.__name__, 'max') - self.assert_(wrapper.__doc__.startswith('max(')) + self.assertTrue(wrapper.__doc__.startswith('max(')) class TestWraps(TestUpdateWrapper): @@ -257,7 +257,7 @@ self.check_wrapper(wrapper, f, (), ()) self.assertEqual(wrapper.__name__, 'wrapper') self.assertEqual(wrapper.__doc__, None) - self.failIf(hasattr(wrapper, 'attr')) + self.assertFalse(hasattr(wrapper, 'attr')) def test_selective_update(self): def f(): Modified: python/branches/py3k/Lib/test/test_genericpath.py ============================================================================== --- python/branches/py3k/Lib/test/test_genericpath.py (original) +++ python/branches/py3k/Lib/test/test_genericpath.py Wed Jul 1 01:06:06 2009 @@ -6,7 +6,7 @@ class AllCommonTest(unittest.TestCase): def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def test_commonprefix(self): self.assertEqual( @@ -50,7 +50,7 @@ f.close() self.assertEqual(d, b"foobar") - self.assert_( + self.assertTrue( genericpath.getctime(support.TESTFN) <= genericpath.getmtime(support.TESTFN) ) Modified: python/branches/py3k/Lib/test/test_getargs2.py ============================================================================== --- python/branches/py3k/Lib/test/test_getargs2.py (original) +++ python/branches/py3k/Lib/test/test_getargs2.py Wed Jul 1 01:06:06 2009 @@ -68,68 +68,68 @@ from _testcapi import getargs_b # b returns 'unsigned char', and does range checking (0 ... UCHAR_MAX) self.assertRaises(TypeError, getargs_b, 3.14) - self.failUnlessEqual(99, getargs_b(Long())) - self.failUnlessEqual(99, getargs_b(Int())) + self.assertEqual(99, getargs_b(Long())) + self.assertEqual(99, getargs_b(Int())) self.assertRaises(OverflowError, getargs_b, -1) - self.failUnlessEqual(0, getargs_b(0)) - self.failUnlessEqual(UCHAR_MAX, getargs_b(UCHAR_MAX)) + self.assertEqual(0, getargs_b(0)) + self.assertEqual(UCHAR_MAX, getargs_b(UCHAR_MAX)) self.assertRaises(OverflowError, getargs_b, UCHAR_MAX + 1) - self.failUnlessEqual(42, getargs_b(42)) - self.failUnlessEqual(42, getargs_b(42)) + self.assertEqual(42, getargs_b(42)) + self.assertEqual(42, getargs_b(42)) self.assertRaises(OverflowError, getargs_b, VERY_LARGE) def test_B(self): from _testcapi import getargs_B # B returns 'unsigned char', no range checking self.assertRaises(TypeError, getargs_B, 3.14) - self.failUnlessEqual(99, getargs_B(Long())) - self.failUnlessEqual(99, getargs_B(Int())) + self.assertEqual(99, getargs_B(Long())) + self.assertEqual(99, getargs_B(Int())) - self.failUnlessEqual(UCHAR_MAX, getargs_B(-1)) - self.failUnlessEqual(UCHAR_MAX, getargs_B(-1)) - self.failUnlessEqual(0, getargs_B(0)) - self.failUnlessEqual(UCHAR_MAX, getargs_B(UCHAR_MAX)) - self.failUnlessEqual(0, getargs_B(UCHAR_MAX+1)) - - self.failUnlessEqual(42, getargs_B(42)) - self.failUnlessEqual(42, getargs_B(42)) - self.failUnlessEqual(UCHAR_MAX & VERY_LARGE, getargs_B(VERY_LARGE)) + self.assertEqual(UCHAR_MAX, getargs_B(-1)) + self.assertEqual(UCHAR_MAX, getargs_B(-1)) + self.assertEqual(0, getargs_B(0)) + self.assertEqual(UCHAR_MAX, getargs_B(UCHAR_MAX)) + self.assertEqual(0, getargs_B(UCHAR_MAX+1)) + + self.assertEqual(42, getargs_B(42)) + self.assertEqual(42, getargs_B(42)) + self.assertEqual(UCHAR_MAX & VERY_LARGE, getargs_B(VERY_LARGE)) def test_H(self): from _testcapi import getargs_H # H returns 'unsigned short', no range checking self.assertRaises(TypeError, getargs_H, 3.14) - self.failUnlessEqual(99, getargs_H(Long())) - self.failUnlessEqual(99, getargs_H(Int())) + self.assertEqual(99, getargs_H(Long())) + self.assertEqual(99, getargs_H(Int())) - self.failUnlessEqual(USHRT_MAX, getargs_H(-1)) - self.failUnlessEqual(0, getargs_H(0)) - self.failUnlessEqual(USHRT_MAX, getargs_H(USHRT_MAX)) - self.failUnlessEqual(0, getargs_H(USHRT_MAX+1)) + self.assertEqual(USHRT_MAX, getargs_H(-1)) + self.assertEqual(0, getargs_H(0)) + self.assertEqual(USHRT_MAX, getargs_H(USHRT_MAX)) + self.assertEqual(0, getargs_H(USHRT_MAX+1)) - self.failUnlessEqual(42, getargs_H(42)) - self.failUnlessEqual(42, getargs_H(42)) + self.assertEqual(42, getargs_H(42)) + self.assertEqual(42, getargs_H(42)) - self.failUnlessEqual(VERY_LARGE & USHRT_MAX, getargs_H(VERY_LARGE)) + self.assertEqual(VERY_LARGE & USHRT_MAX, getargs_H(VERY_LARGE)) def test_I(self): from _testcapi import getargs_I # I returns 'unsigned int', no range checking self.assertRaises(TypeError, getargs_I, 3.14) - self.failUnlessEqual(99, getargs_I(Long())) - self.failUnlessEqual(99, getargs_I(Int())) + self.assertEqual(99, getargs_I(Long())) + self.assertEqual(99, getargs_I(Int())) - self.failUnlessEqual(UINT_MAX, getargs_I(-1)) - self.failUnlessEqual(0, getargs_I(0)) - self.failUnlessEqual(UINT_MAX, getargs_I(UINT_MAX)) - self.failUnlessEqual(0, getargs_I(UINT_MAX+1)) + self.assertEqual(UINT_MAX, getargs_I(-1)) + self.assertEqual(0, getargs_I(0)) + self.assertEqual(UINT_MAX, getargs_I(UINT_MAX)) + self.assertEqual(0, getargs_I(UINT_MAX+1)) - self.failUnlessEqual(42, getargs_I(42)) - self.failUnlessEqual(42, getargs_I(42)) + self.assertEqual(42, getargs_I(42)) + self.assertEqual(42, getargs_I(42)) - self.failUnlessEqual(VERY_LARGE & UINT_MAX, getargs_I(VERY_LARGE)) + self.assertEqual(VERY_LARGE & UINT_MAX, getargs_I(VERY_LARGE)) def test_k(self): from _testcapi import getargs_k @@ -139,47 +139,47 @@ self.assertRaises(TypeError, getargs_k, Long()) self.assertRaises(TypeError, getargs_k, Int()) - self.failUnlessEqual(ULONG_MAX, getargs_k(-1)) - self.failUnlessEqual(0, getargs_k(0)) - self.failUnlessEqual(ULONG_MAX, getargs_k(ULONG_MAX)) - self.failUnlessEqual(0, getargs_k(ULONG_MAX+1)) + self.assertEqual(ULONG_MAX, getargs_k(-1)) + self.assertEqual(0, getargs_k(0)) + self.assertEqual(ULONG_MAX, getargs_k(ULONG_MAX)) + self.assertEqual(0, getargs_k(ULONG_MAX+1)) - self.failUnlessEqual(42, getargs_k(42)) - self.failUnlessEqual(42, getargs_k(42)) + self.assertEqual(42, getargs_k(42)) + self.assertEqual(42, getargs_k(42)) - self.failUnlessEqual(VERY_LARGE & ULONG_MAX, getargs_k(VERY_LARGE)) + self.assertEqual(VERY_LARGE & ULONG_MAX, getargs_k(VERY_LARGE)) class Signed_TestCase(unittest.TestCase): def test_i(self): from _testcapi import getargs_i # i returns 'int', and does range checking (INT_MIN ... INT_MAX) self.assertRaises(TypeError, getargs_i, 3.14) - self.failUnlessEqual(99, getargs_i(Long())) - self.failUnlessEqual(99, getargs_i(Int())) + self.assertEqual(99, getargs_i(Long())) + self.assertEqual(99, getargs_i(Int())) self.assertRaises(OverflowError, getargs_i, INT_MIN-1) - self.failUnlessEqual(INT_MIN, getargs_i(INT_MIN)) - self.failUnlessEqual(INT_MAX, getargs_i(INT_MAX)) + self.assertEqual(INT_MIN, getargs_i(INT_MIN)) + self.assertEqual(INT_MAX, getargs_i(INT_MAX)) self.assertRaises(OverflowError, getargs_i, INT_MAX+1) - self.failUnlessEqual(42, getargs_i(42)) - self.failUnlessEqual(42, getargs_i(42)) + self.assertEqual(42, getargs_i(42)) + self.assertEqual(42, getargs_i(42)) self.assertRaises(OverflowError, getargs_i, VERY_LARGE) def test_l(self): from _testcapi import getargs_l # l returns 'long', and does range checking (LONG_MIN ... LONG_MAX) self.assertRaises(TypeError, getargs_l, 3.14) - self.failUnlessEqual(99, getargs_l(Long())) - self.failUnlessEqual(99, getargs_l(Int())) + self.assertEqual(99, getargs_l(Long())) + self.assertEqual(99, getargs_l(Int())) self.assertRaises(OverflowError, getargs_l, LONG_MIN-1) - self.failUnlessEqual(LONG_MIN, getargs_l(LONG_MIN)) - self.failUnlessEqual(LONG_MAX, getargs_l(LONG_MAX)) + self.assertEqual(LONG_MIN, getargs_l(LONG_MIN)) + self.assertEqual(LONG_MAX, getargs_l(LONG_MAX)) self.assertRaises(OverflowError, getargs_l, LONG_MAX+1) - self.failUnlessEqual(42, getargs_l(42)) - self.failUnlessEqual(42, getargs_l(42)) + self.assertEqual(42, getargs_l(42)) + self.assertEqual(42, getargs_l(42)) self.assertRaises(OverflowError, getargs_l, VERY_LARGE) def test_n(self): @@ -191,12 +191,12 @@ self.assertRaises(TypeError, getargs_n, Int()) self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MIN-1) - self.failUnlessEqual(PY_SSIZE_T_MIN, getargs_n(PY_SSIZE_T_MIN)) - self.failUnlessEqual(PY_SSIZE_T_MAX, getargs_n(PY_SSIZE_T_MAX)) + self.assertEqual(PY_SSIZE_T_MIN, getargs_n(PY_SSIZE_T_MIN)) + self.assertEqual(PY_SSIZE_T_MAX, getargs_n(PY_SSIZE_T_MAX)) self.assertRaises(OverflowError, getargs_n, PY_SSIZE_T_MAX+1) - self.failUnlessEqual(42, getargs_n(42)) - self.failUnlessEqual(42, getargs_n(42)) + self.assertEqual(42, getargs_n(42)) + self.assertEqual(42, getargs_n(42)) self.assertRaises(OverflowError, getargs_n, VERY_LARGE) @@ -204,18 +204,18 @@ def test_L(self): from _testcapi import getargs_L # L returns 'long long', and does range checking (LLONG_MIN ... LLONG_MAX) - self.failUnlessRaises(TypeError, getargs_L, "Hello") - self.failUnlessEqual(3, getargs_L(3.14)) - self.failUnlessEqual(99, getargs_L(Long())) - self.failUnlessEqual(99, getargs_L(Int())) + self.assertRaises(TypeError, getargs_L, "Hello") + self.assertEqual(3, getargs_L(3.14)) + self.assertEqual(99, getargs_L(Long())) + self.assertEqual(99, getargs_L(Int())) self.assertRaises(OverflowError, getargs_L, LLONG_MIN-1) - self.failUnlessEqual(LLONG_MIN, getargs_L(LLONG_MIN)) - self.failUnlessEqual(LLONG_MAX, getargs_L(LLONG_MAX)) + self.assertEqual(LLONG_MIN, getargs_L(LLONG_MIN)) + self.assertEqual(LLONG_MAX, getargs_L(LLONG_MAX)) self.assertRaises(OverflowError, getargs_L, LLONG_MAX+1) - self.failUnlessEqual(42, getargs_L(42)) - self.failUnlessEqual(42, getargs_L(42)) + self.assertEqual(42, getargs_L(42)) + self.assertEqual(42, getargs_L(42)) self.assertRaises(OverflowError, getargs_L, VERY_LARGE) def test_K(self): @@ -224,14 +224,14 @@ self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) - self.failUnlessEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) - self.failUnlessEqual(0, getargs_K(0)) - self.failUnlessEqual(0, getargs_K(ULLONG_MAX+1)) + self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) + self.assertEqual(0, getargs_K(0)) + self.assertEqual(0, getargs_K(ULLONG_MAX+1)) - self.failUnlessEqual(42, getargs_K(42)) - self.failUnlessEqual(42, getargs_K(42)) + self.assertEqual(42, getargs_K(42)) + self.assertEqual(42, getargs_K(42)) - self.failUnlessEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE)) + self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE)) class Tuple_TestCase(unittest.TestCase): Modified: python/branches/py3k/Lib/test/test_getopt.py ============================================================================== --- python/branches/py3k/Lib/test/test_getopt.py (original) +++ python/branches/py3k/Lib/test/test_getopt.py Wed Jul 1 01:06:06 2009 @@ -23,21 +23,21 @@ self.assertRaises(getopt.GetoptError, *args, **kwargs) def test_short_has_arg(self): - self.failUnless(getopt.short_has_arg('a', 'a:')) - self.failIf(getopt.short_has_arg('a', 'a')) + self.assertTrue(getopt.short_has_arg('a', 'a:')) + self.assertFalse(getopt.short_has_arg('a', 'a')) self.assertError(getopt.short_has_arg, 'a', 'b') def test_long_has_args(self): has_arg, option = getopt.long_has_args('abc', ['abc=']) - self.failUnless(has_arg) + self.assertTrue(has_arg) self.assertEqual(option, 'abc') has_arg, option = getopt.long_has_args('abc', ['abc']) - self.failIf(has_arg) + self.assertFalse(has_arg) self.assertEqual(option, 'abc') has_arg, option = getopt.long_has_args('abc', ['abcd']) - self.failIf(has_arg) + self.assertFalse(has_arg) self.assertEqual(option, 'abcd') self.assertError(getopt.long_has_args, 'abc', ['def']) Modified: python/branches/py3k/Lib/test/test_gettext.py ============================================================================== --- python/branches/py3k/Lib/test/test_gettext.py (original) +++ python/branches/py3k/Lib/test/test_gettext.py Wed Jul 1 01:06:06 2009 @@ -306,7 +306,7 @@ self._ = self.t.gettext def test_unicode_msgid(self): - unless = self.failUnless + unless = self.assertTrue unless(isinstance(self._(''), str)) unless(isinstance(self._(''), str)) Modified: python/branches/py3k/Lib/test/test_grammar.py ============================================================================== --- python/branches/py3k/Lib/test/test_grammar.py (original) +++ python/branches/py3k/Lib/test/test_grammar.py Wed Jul 1 01:06:06 2009 @@ -38,9 +38,9 @@ if maxsize == 2147483647: self.assertEquals(-2147483647-1, -0o20000000000) # XXX -2147483648 - self.assert_(0o37777777777 > 0) - self.assert_(0xffffffff > 0) - self.assert_(0b1111111111111111111111111111111 > 0) + self.assertTrue(0o37777777777 > 0) + self.assertTrue(0xffffffff > 0) + self.assertTrue(0b1111111111111111111111111111111 > 0) for s in ('2147483648', '0o40000000000', '0x100000000', '0b10000000000000000000000000000000'): try: @@ -49,9 +49,9 @@ self.fail("OverflowError on huge integer literal %r" % s) elif maxsize == 9223372036854775807: self.assertEquals(-9223372036854775807-1, -0o1000000000000000000000) - self.assert_(0o1777777777777777777777 > 0) - self.assert_(0xffffffffffffffff > 0) - self.assert_(0b11111111111111111111111111111111111111111111111111111111111111 > 0) + self.assertTrue(0o1777777777777777777777 > 0) + self.assertTrue(0xffffffffffffffff > 0) + self.assertTrue(0b11111111111111111111111111111111111111111111111111111111111111 > 0) for s in '9223372036854775808', '0o2000000000000000000000', \ '0x10000000000000000', \ '0b100000000000000000000000000000000000000000000000000000000000000': @@ -87,15 +87,15 @@ x = 3.1e4 def testStringLiterals(self): - x = ''; y = ""; self.assert_(len(x) == 0 and x == y) - x = '\''; y = "'"; self.assert_(len(x) == 1 and x == y and ord(x) == 39) - x = '"'; y = "\""; self.assert_(len(x) == 1 and x == y and ord(x) == 34) + x = ''; y = ""; self.assertTrue(len(x) == 0 and x == y) + x = '\''; y = "'"; self.assertTrue(len(x) == 1 and x == y and ord(x) == 39) + x = '"'; y = "\""; self.assertTrue(len(x) == 1 and x == y and ord(x) == 34) x = "doesn't \"shrink\" does it" y = 'doesn\'t "shrink" does it' - self.assert_(len(x) == 24 and x == y) + self.assertTrue(len(x) == 24 and x == y) x = "does \"shrink\" doesn't it" y = 'does "shrink" doesn\'t it' - self.assert_(len(x) == 24 and x == y) + self.assertTrue(len(x) == 24 and x == y) x = """ The "quick" brown fox @@ -128,7 +128,7 @@ def testEllipsis(self): x = ... - self.assert_(x is Ellipsis) + self.assertTrue(x is Ellipsis) self.assertRaises(SyntaxError, eval, ".. .") class GrammarTests(unittest.TestCase): @@ -494,7 +494,7 @@ nonlocal x, y def testAssert(self): - # assert_stmt: 'assert' test [',' test] + # assertTruestmt: 'assert' test [',' test] assert 1 assert 1, 1 assert lambda x:x Modified: python/branches/py3k/Lib/test/test_grp.py ============================================================================== --- python/branches/py3k/Lib/test/test_grp.py (original) +++ python/branches/py3k/Lib/test/test_grp.py Wed Jul 1 01:06:06 2009 @@ -12,13 +12,13 @@ # attributes promised by the docs self.assertEqual(len(value), 4) self.assertEqual(value[0], value.gr_name) - self.assert_(isinstance(value.gr_name, str)) + self.assertTrue(isinstance(value.gr_name, str)) self.assertEqual(value[1], value.gr_passwd) - self.assert_(isinstance(value.gr_passwd, str)) + self.assertTrue(isinstance(value.gr_passwd, str)) self.assertEqual(value[2], value.gr_gid) - self.assert_(isinstance(value.gr_gid, int)) + self.assertTrue(isinstance(value.gr_gid, int)) self.assertEqual(value[3], value.gr_mem) - self.assert_(isinstance(value.gr_mem, list)) + self.assertTrue(isinstance(value.gr_mem, list)) def test_values(self): entries = grp.getgrall() Modified: python/branches/py3k/Lib/test/test_gzip.py ============================================================================== --- python/branches/py3k/Lib/test/test_gzip.py (original) +++ python/branches/py3k/Lib/test/test_gzip.py Wed Jul 1 01:06:06 2009 @@ -91,7 +91,7 @@ while 1: L = f.readline(line_length) if not L and line_length != 0: break - self.assert_(len(L) <= line_length) + self.assertTrue(len(L) <= line_length) line_length = (line_length + 1) % 50 f.close() @@ -157,7 +157,7 @@ def test_1647484(self): for mode in ('wb', 'rb'): f = gzip.GzipFile(self.filename, mode) - self.assert_(hasattr(f, "name")) + self.assertTrue(hasattr(f, "name")) self.assertEqual(f.name, self.filename) f.close() @@ -169,7 +169,7 @@ fRead = gzip.GzipFile(self.filename) dataRead = fRead.read() self.assertEqual(dataRead, data1) - self.assert_(hasattr(fRead, 'mtime')) + self.assertTrue(hasattr(fRead, 'mtime')) self.assertEqual(fRead.mtime, mtime) fRead.close() Modified: python/branches/py3k/Lib/test/test_hash.py ============================================================================== --- python/branches/py3k/Lib/test/test_hash.py (original) +++ python/branches/py3k/Lib/test/test_hash.py Wed Jul 1 01:06:06 2009 @@ -91,7 +91,7 @@ objects = (self.default_expected + self.fixed_expected) for obj in objects: - self.assert_(isinstance(obj, Hashable), repr(obj)) + self.assertTrue(isinstance(obj, Hashable), repr(obj)) def test_not_hashable(self): for obj in self.error_expected: Modified: python/branches/py3k/Lib/test/test_hashlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_hashlib.py (original) +++ python/branches/py3k/Lib/test/test_hashlib.py Wed Jul 1 01:06:06 2009 @@ -36,7 +36,7 @@ except ValueError: pass else: - self.assert_(0 == "hashlib didn't reject bogus hash name") + self.assertTrue(0 == "hashlib didn't reject bogus hash name") def test_hexdigest(self): for name in self.supported_hash_names: Modified: python/branches/py3k/Lib/test/test_heapq.py ============================================================================== --- python/branches/py3k/Lib/test/test_heapq.py (original) +++ python/branches/py3k/Lib/test/test_heapq.py Wed Jul 1 01:06:06 2009 @@ -46,7 +46,7 @@ for pos, item in enumerate(heap): if pos: # pos 0 has no parent parentpos = (pos-1) >> 1 - self.assert_(heap[parentpos] <= item) + self.assertTrue(heap[parentpos] <= item) def test_heapify(self): for size in range(30): Modified: python/branches/py3k/Lib/test/test_hmac.py ============================================================================== --- python/branches/py3k/Lib/test/test_hmac.py (original) +++ python/branches/py3k/Lib/test/test_hmac.py Wed Jul 1 01:06:06 2009 @@ -280,7 +280,7 @@ # Testing if attributes are of same type. h1 = hmac.HMAC(b"key") h2 = h1.copy() - self.failUnless(h1.digest_cons == h2.digest_cons, + self.assertTrue(h1.digest_cons == h2.digest_cons, "digest constructors don't match.") self.assertEqual(type(h1.inner), type(h2.inner), "Types of inner don't match.") @@ -292,10 +292,10 @@ h1 = hmac.HMAC(b"key") h2 = h1.copy() # Using id() in case somebody has overridden __eq__/__ne__. - self.failUnless(id(h1) != id(h2), "No real copy of the HMAC instance.") - self.failUnless(id(h1.inner) != id(h2.inner), + self.assertTrue(id(h1) != id(h2), "No real copy of the HMAC instance.") + self.assertTrue(id(h1.inner) != id(h2.inner), "No real copy of the attribute 'inner'.") - self.failUnless(id(h1.outer) != id(h2.outer), + self.assertTrue(id(h1.outer) != id(h2.outer), "No real copy of the attribute 'outer'.") def test_equality(self): Modified: python/branches/py3k/Lib/test/test_http_cookiejar.py ============================================================================== --- python/branches/py3k/Lib/test/test_http_cookiejar.py (original) +++ python/branches/py3k/Lib/test/test_http_cookiejar.py Wed Jul 1 01:06:06 2009 @@ -25,7 +25,7 @@ az = time2isoz() bz = time2isoz(500000) for text in (az, bz): - self.assert_(re.search(r"^\d{4}-\d\d-\d\d \d\d:\d\d:\d\dZ$", text), + self.assertTrue(re.search(r"^\d{4}-\d\d-\d\d \d\d:\d\d:\d\dZ$", text), "bad time2isoz format: %s %s" % (az, bz)) def test_http2time(self): @@ -74,7 +74,7 @@ t2 = http2time(s.lower()) t3 = http2time(s.upper()) - self.assert_(t == t2 == t3 == test_t, + self.assertTrue(t == t2 == t3 == test_t, "'%s' => %s, %s, %s (%s)" % (s, t, t2, t3, test_t)) def test_http2time_garbage(self): @@ -90,7 +90,7 @@ '01-01-1980 00:61:00', '01-01-1980 00:00:62', ]: - self.assert_(http2time(test) is None, + self.assertTrue(http2time(test) is None, "http2time(%s) is not None\n" "http2time(test) %s" % (test, http2time(test)) ) @@ -332,8 +332,8 @@ ]: request = urllib.request.Request(url) r = pol.domain_return_ok(domain, request) - if ok: self.assert_(r) - else: self.assert_(not r) + if ok: self.assertTrue(r) + else: self.assertTrue(not r) def test_missing_value(self): # missing = sign in Cookie: header is regarded by Mozilla as a missing @@ -343,10 +343,10 @@ interact_netscape(c, "http://www.acme.com/", 'eggs') interact_netscape(c, "http://www.acme.com/", '"spam"; path=/foo/') cookie = c._cookies["www.acme.com"]["/"]["eggs"] - self.assert_(cookie.value is None) + self.assertTrue(cookie.value is None) self.assertEquals(cookie.name, "eggs") cookie = c._cookies["www.acme.com"]['/foo/']['"spam"'] - self.assert_(cookie.value is None) + self.assertTrue(cookie.value is None) self.assertEquals(cookie.name, '"spam"') self.assertEquals(lwp_cookie_str(cookie), ( r'"spam"; path="/foo/"; domain="www.acme.com"; ' @@ -388,7 +388,7 @@ try: cookie = c._cookies["www.example.com"]["/"]["ni"] except KeyError: - self.assert_(version is None) # didn't expect a stored cookie + self.assertTrue(version is None) # didn't expect a stored cookie else: self.assertEqual(cookie.version, version) # 2965 cookies are unaffected @@ -410,28 +410,28 @@ cookie = c._cookies[".acme.com"]["/"]["spam"] self.assertEquals(cookie.domain, ".acme.com") - self.assert_(cookie.domain_specified) + self.assertTrue(cookie.domain_specified) self.assertEquals(cookie.port, DEFAULT_HTTP_PORT) - self.assert_(not cookie.port_specified) + self.assertTrue(not cookie.port_specified) # case is preserved - self.assert_(cookie.has_nonstandard_attr("blArgh") and + self.assertTrue(cookie.has_nonstandard_attr("blArgh") and not cookie.has_nonstandard_attr("blargh")) cookie = c._cookies["www.acme.com"]["/"]["ni"] self.assertEquals(cookie.domain, "www.acme.com") - self.assert_(not cookie.domain_specified) + self.assertTrue(not cookie.domain_specified) self.assertEquals(cookie.port, "80,8080") - self.assert_(cookie.port_specified) + self.assertTrue(cookie.port_specified) cookie = c._cookies["www.acme.com"]["/"]["nini"] - self.assert_(cookie.port is None) - self.assert_(not cookie.port_specified) + self.assertTrue(cookie.port is None) + self.assertTrue(not cookie.port_specified) # invalid expires should not cause cookie to be dropped foo = c._cookies["www.acme.com"]["/"]["foo"] spam = c._cookies["www.acme.com"]["/"]["foo"] - self.assert_(foo.expires is None) - self.assert_(spam.expires is None) + self.assertTrue(foo.expires is None) + self.assertTrue(spam.expires is None) def test_ns_parser_special_names(self): # names such as 'expires' are not special in first name=value pair @@ -441,8 +441,8 @@ interact_netscape(c, "http://www.acme.com/", 'version=eggs; spam=eggs') cookies = c._cookies["www.acme.com"]["/"] - self.assert_('expires' in cookies) - self.assert_('version' in cookies) + self.assertTrue('expires' in cookies) + self.assertTrue('version' in cookies) def test_expires(self): # if expires is in future, keep cookie... @@ -457,7 +457,7 @@ now) h = interact_netscape(c, "http://www.acme.com/") self.assertEquals(len(c), 1) - self.assert_('spam="bar"' in h and "foo" not in h) + self.assertTrue('spam="bar"' in h and "foo" not in h) # max-age takes precedence over expires, and zero max-age is request to # delete both new cookie and any old matching cookie @@ -478,7 +478,7 @@ self.assertEquals(len(c), 2) c.clear_session_cookies() self.assertEquals(len(c), 1) - self.assert_('spam="bar"' in h) + self.assertTrue('spam="bar"' in h) # XXX RFC 2965 expiry rules (some apply to V0 too) @@ -488,39 +488,39 @@ c = CookieJar(pol) interact_2965(c, "http://www.acme.com/", 'spam="bar"; Version="1"') - self.assert_("/" in c._cookies["www.acme.com"]) + self.assertTrue("/" in c._cookies["www.acme.com"]) c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah", 'eggs="bar"; Version="1"') - self.assert_("/" in c._cookies["www.acme.com"]) + self.assertTrue("/" in c._cookies["www.acme.com"]) c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah/rhubarb", 'eggs="bar"; Version="1"') - self.assert_("/blah/" in c._cookies["www.acme.com"]) + self.assertTrue("/blah/" in c._cookies["www.acme.com"]) c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah/rhubarb/", 'eggs="bar"; Version="1"') - self.assert_("/blah/rhubarb/" in c._cookies["www.acme.com"]) + self.assertTrue("/blah/rhubarb/" in c._cookies["www.acme.com"]) # Netscape c = CookieJar() interact_netscape(c, "http://www.acme.com/", 'spam="bar"') - self.assert_("/" in c._cookies["www.acme.com"]) + self.assertTrue("/" in c._cookies["www.acme.com"]) c = CookieJar() interact_netscape(c, "http://www.acme.com/blah", 'eggs="bar"') - self.assert_("/" in c._cookies["www.acme.com"]) + self.assertTrue("/" in c._cookies["www.acme.com"]) c = CookieJar() interact_netscape(c, "http://www.acme.com/blah/rhubarb", 'eggs="bar"') - self.assert_("/blah" in c._cookies["www.acme.com"]) + self.assertTrue("/blah" in c._cookies["www.acme.com"]) c = CookieJar() interact_netscape(c, "http://www.acme.com/blah/rhubarb/", 'eggs="bar"') - self.assert_("/blah/rhubarb" in c._cookies["www.acme.com"]) + self.assertTrue("/blah/rhubarb" in c._cookies["www.acme.com"]) def test_escape_path(self): cases = [ @@ -589,14 +589,14 @@ self.assertEquals(request_host(req), "www.acme.com") def test_is_HDN(self): - self.assert_(is_HDN("foo.bar.com")) - self.assert_(is_HDN("1foo2.3bar4.5com")) - self.assert_(not is_HDN("192.168.1.1")) - self.assert_(not is_HDN("")) - self.assert_(not is_HDN(".")) - self.assert_(not is_HDN(".foo.bar.com")) - self.assert_(not is_HDN("..foo")) - self.assert_(not is_HDN("foo.")) + self.assertTrue(is_HDN("foo.bar.com")) + self.assertTrue(is_HDN("1foo2.3bar4.5com")) + self.assertTrue(not is_HDN("192.168.1.1")) + self.assertTrue(not is_HDN("")) + self.assertTrue(not is_HDN(".")) + self.assertTrue(not is_HDN(".foo.bar.com")) + self.assertTrue(not is_HDN("..foo")) + self.assertTrue(not is_HDN("foo.")) def test_reach(self): self.assertEquals(reach("www.acme.com"), ".acme.com") @@ -609,40 +609,40 @@ self.assertEquals(reach("192.168.0.1"), "192.168.0.1") def test_domain_match(self): - self.assert_(domain_match("192.168.1.1", "192.168.1.1")) - self.assert_(not domain_match("192.168.1.1", ".168.1.1")) - self.assert_(domain_match("x.y.com", "x.Y.com")) - self.assert_(domain_match("x.y.com", ".Y.com")) - self.assert_(not domain_match("x.y.com", "Y.com")) - self.assert_(domain_match("a.b.c.com", ".c.com")) - self.assert_(not domain_match(".c.com", "a.b.c.com")) - self.assert_(domain_match("example.local", ".local")) - self.assert_(not domain_match("blah.blah", "")) - self.assert_(not domain_match("", ".rhubarb.rhubarb")) - self.assert_(domain_match("", "")) - - self.assert_(user_domain_match("acme.com", "acme.com")) - self.assert_(not user_domain_match("acme.com", ".acme.com")) - self.assert_(user_domain_match("rhubarb.acme.com", ".acme.com")) - self.assert_(user_domain_match("www.rhubarb.acme.com", ".acme.com")) - self.assert_(user_domain_match("x.y.com", "x.Y.com")) - self.assert_(user_domain_match("x.y.com", ".Y.com")) - self.assert_(not user_domain_match("x.y.com", "Y.com")) - self.assert_(user_domain_match("y.com", "Y.com")) - self.assert_(not user_domain_match(".y.com", "Y.com")) - self.assert_(user_domain_match(".y.com", ".Y.com")) - self.assert_(user_domain_match("x.y.com", ".com")) - self.assert_(not user_domain_match("x.y.com", "com")) - self.assert_(not user_domain_match("x.y.com", "m")) - self.assert_(not user_domain_match("x.y.com", ".m")) - self.assert_(not user_domain_match("x.y.com", "")) - self.assert_(not user_domain_match("x.y.com", ".")) - self.assert_(user_domain_match("192.168.1.1", "192.168.1.1")) + self.assertTrue(domain_match("192.168.1.1", "192.168.1.1")) + self.assertTrue(not domain_match("192.168.1.1", ".168.1.1")) + self.assertTrue(domain_match("x.y.com", "x.Y.com")) + self.assertTrue(domain_match("x.y.com", ".Y.com")) + self.assertTrue(not domain_match("x.y.com", "Y.com")) + self.assertTrue(domain_match("a.b.c.com", ".c.com")) + self.assertTrue(not domain_match(".c.com", "a.b.c.com")) + self.assertTrue(domain_match("example.local", ".local")) + self.assertTrue(not domain_match("blah.blah", "")) + self.assertTrue(not domain_match("", ".rhubarb.rhubarb")) + self.assertTrue(domain_match("", "")) + + self.assertTrue(user_domain_match("acme.com", "acme.com")) + self.assertTrue(not user_domain_match("acme.com", ".acme.com")) + self.assertTrue(user_domain_match("rhubarb.acme.com", ".acme.com")) + self.assertTrue(user_domain_match("www.rhubarb.acme.com", ".acme.com")) + self.assertTrue(user_domain_match("x.y.com", "x.Y.com")) + self.assertTrue(user_domain_match("x.y.com", ".Y.com")) + self.assertTrue(not user_domain_match("x.y.com", "Y.com")) + self.assertTrue(user_domain_match("y.com", "Y.com")) + self.assertTrue(not user_domain_match(".y.com", "Y.com")) + self.assertTrue(user_domain_match(".y.com", ".Y.com")) + self.assertTrue(user_domain_match("x.y.com", ".com")) + self.assertTrue(not user_domain_match("x.y.com", "com")) + self.assertTrue(not user_domain_match("x.y.com", "m")) + self.assertTrue(not user_domain_match("x.y.com", ".m")) + self.assertTrue(not user_domain_match("x.y.com", "")) + self.assertTrue(not user_domain_match("x.y.com", ".")) + self.assertTrue(user_domain_match("192.168.1.1", "192.168.1.1")) # not both HDNs, so must string-compare equal to match - self.assert_(not user_domain_match("192.168.1.1", ".168.1.1")) - self.assert_(not user_domain_match("192.168.1.1", ".")) + self.assertTrue(not user_domain_match("192.168.1.1", ".168.1.1")) + self.assertTrue(not user_domain_match("192.168.1.1", ".")) # empty string is a special case - self.assert_(not user_domain_match("192.168.1.1", "")) + self.assertTrue(not user_domain_match("192.168.1.1", "")) def test_wrong_domain(self): # Cookies whose effective request-host name does not domain-match the @@ -789,7 +789,7 @@ self.assertEquals(len(c), 2) # ... and check is doesn't get returned c.add_cookie_header(req) - self.assert_(not req.has_header("Cookie")) + self.assertTrue(not req.has_header("Cookie")) def test_domain_block(self): pol = DefaultCookiePolicy( @@ -813,7 +813,7 @@ self.assertEquals(len(c), 1) req = urllib.request.Request("http://www.roadrunner.net/") c.add_cookie_header(req) - self.assert_((req.has_header("Cookie") and + self.assertTrue((req.has_header("Cookie") and req.has_header("Cookie2"))) c.clear() @@ -829,7 +829,7 @@ self.assertEquals(len(c), 2) # ... and check is doesn't get returned c.add_cookie_header(req) - self.assert_(not req.has_header("Cookie")) + self.assertTrue(not req.has_header("Cookie")) def test_secure(self): for ns in True, False: @@ -847,10 +847,10 @@ url = "http://www.acme.com/" int(c, url, "foo1=bar%s%s" % (vs, whitespace)) int(c, url, "foo2=bar%s; secure%s" % (vs, whitespace)) - self.assert_( + self.assertTrue( not c._cookies["www.acme.com"]["/"]["foo1"].secure, "non-secure cookie registered secure") - self.assert_( + self.assertTrue( c._cookies["www.acme.com"]["/"]["foo2"].secure, "secure cookie registered non-secure") @@ -868,7 +868,7 @@ req = urllib.request.Request(url) self.assertEquals(len(c), 1) c.add_cookie_header(req) - self.assert_(req.has_header("Cookie")) + self.assertTrue(req.has_header("Cookie")) def test_domain_mirror(self): pol = DefaultCookiePolicy(rfc2965=True) @@ -877,21 +877,21 @@ url = "http://foo.bar.com/" interact_2965(c, url, "spam=eggs; Version=1") h = interact_2965(c, url) - self.assert_("Domain" not in h, + self.assertTrue("Domain" not in h, "absent domain returned with domain present") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, 'spam=eggs; Version=1; Domain=.bar.com') h = interact_2965(c, url) - self.assert_('$Domain=".bar.com"' in h, "domain not returned") + self.assertTrue('$Domain=".bar.com"' in h, "domain not returned") c = CookieJar(pol) url = "http://foo.bar.com/" # note missing initial dot in Domain interact_2965(c, url, 'spam=eggs; Version=1; Domain=bar.com') h = interact_2965(c, url) - self.assert_('$Domain="bar.com"' in h, "domain not returned") + self.assertTrue('$Domain="bar.com"' in h, "domain not returned") def test_path_mirror(self): pol = DefaultCookiePolicy(rfc2965=True) @@ -900,14 +900,14 @@ url = "http://foo.bar.com/" interact_2965(c, url, "spam=eggs; Version=1") h = interact_2965(c, url) - self.assert_("Path" not in h, + self.assertTrue("Path" not in h, "absent path returned with path present") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, 'spam=eggs; Version=1; Path=/') h = interact_2965(c, url) - self.assert_('$Path="/"' in h, "path not returned") + self.assertTrue('$Path="/"' in h, "path not returned") def test_port_mirror(self): pol = DefaultCookiePolicy(rfc2965=True) @@ -916,28 +916,28 @@ url = "http://foo.bar.com/" interact_2965(c, url, "spam=eggs; Version=1") h = interact_2965(c, url) - self.assert_("Port" not in h, + self.assertTrue("Port" not in h, "absent port returned with port present") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, "spam=eggs; Version=1; Port") h = interact_2965(c, url) - self.assert_(re.search("\$Port([^=]|$)", h), + self.assertTrue(re.search("\$Port([^=]|$)", h), "port with no value not returned with no value") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, 'spam=eggs; Version=1; Port="80"') h = interact_2965(c, url) - self.assert_('$Port="80"' in h, + self.assertTrue('$Port="80"' in h, "port with single value not returned with single value") c = CookieJar(pol) url = "http://foo.bar.com/" interact_2965(c, url, 'spam=eggs; Version=1; Port="80,8080"') h = interact_2965(c, url) - self.assert_('$Port="80,8080"' in h, + self.assertTrue('$Port="80,8080"' in h, "port with multiple values not returned with multiple " "values") @@ -948,7 +948,7 @@ 'Comment="does anybody read these?"; ' 'CommentURL="http://foo.bar.net/comment.html"') h = interact_2965(c, url) - self.assert_( + self.assertTrue( "Comment" not in h, "Comment or CommentURL cookie-attributes returned to server") @@ -977,7 +977,7 @@ for i in range(4): i = 0 for c in cs: - self.assert_(isinstance(c, Cookie)) + self.assertTrue(isinstance(c, Cookie)) self.assertEquals(c.version, versions[i]) self.assertEquals(c.name, names[i]) self.assertEquals(c.domain, domains[i]) @@ -1030,7 +1030,7 @@ headers = ["Set-Cookie: c=foo; expires=Foo Bar 12 33:22:11 2000"] c = cookiejar_from_cookie_headers(headers) cookie = c._cookies["www.example.com"]["/"]["c"] - self.assert_(cookie.expires is None) + self.assertTrue(cookie.expires is None) class LWPCookieTests(TestCase): @@ -1104,7 +1104,7 @@ c.add_cookie_header(req) h = req.get_header("Cookie") - self.assert_("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and + self.assertTrue("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and "CUSTOMER=WILE_E_COYOTE" in h) headers.append('Set-Cookie: SHIPPING=FEDEX; path=/foo') @@ -1115,7 +1115,7 @@ c.add_cookie_header(req) h = req.get_header("Cookie") - self.assert_("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and + self.assertTrue("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and "CUSTOMER=WILE_E_COYOTE" in h and "SHIPPING=FEDEX" not in h) @@ -1123,7 +1123,7 @@ c.add_cookie_header(req) h = req.get_header("Cookie") - self.assert_(("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and + self.assertTrue(("PART_NUMBER=ROCKET_LAUNCHER_0001" in h and "CUSTOMER=WILE_E_COYOTE" in h and h.startswith("SHIPPING=FEDEX;"))) @@ -1174,7 +1174,7 @@ req = urllib.request.Request("http://www.acme.com/ammo") c.add_cookie_header(req) - self.assert_(re.search(r"PART_NUMBER=RIDING_ROCKET_0023;\s*" + self.assertTrue(re.search(r"PART_NUMBER=RIDING_ROCKET_0023;\s*" "PART_NUMBER=ROCKET_LAUNCHER_0001", req.get_header("Cookie"))) @@ -1209,7 +1209,7 @@ cookie = interact_2965( c, 'http://www.acme.com/acme/login', 'Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"') - self.assert_(not cookie) + self.assertTrue(not cookie) # # 3. User Agent -> Server @@ -1231,7 +1231,7 @@ cookie = interact_2965(c, 'http://www.acme.com/acme/pickitem', 'Part_Number="Rocket_Launcher_0001"; ' 'Version="1"; Path="/acme"'); - self.assert_(re.search( + self.assertTrue(re.search( r'^\$Version="?1"?; Customer="?WILE_E_COYOTE"?; \$Path="/acme"$', cookie)) @@ -1256,10 +1256,10 @@ cookie = interact_2965(c, "http://www.acme.com/acme/shipping", 'Shipping="FedEx"; Version="1"; Path="/acme"') - self.assert_(re.search(r'^\$Version="?1"?;', cookie)) - self.assert_(re.search(r'Part_Number="?Rocket_Launcher_0001"?;' + self.assertTrue(re.search(r'^\$Version="?1"?;', cookie)) + self.assertTrue(re.search(r'Part_Number="?Rocket_Launcher_0001"?;' '\s*\$Path="\/acme"', cookie)) - self.assert_(re.search(r'Customer="?WILE_E_COYOTE"?;\s*\$Path="\/acme"', + self.assertTrue(re.search(r'Customer="?WILE_E_COYOTE"?;\s*\$Path="\/acme"', cookie)) # @@ -1281,7 +1281,7 @@ # Transaction is complete. cookie = interact_2965(c, "http://www.acme.com/acme/process") - self.assert_( + self.assertTrue( re.search(r'Shipping="?FedEx"?;\s*\$Path="\/acme"', cookie) and "WILE_E_COYOTE" in cookie) @@ -1330,7 +1330,7 @@ # than once. cookie = interact_2965(c, "http://www.acme.com/acme/ammo/...") - self.assert_( + self.assertTrue( re.search(r"Riding_Rocket_0023.*Rocket_Launcher_0001", cookie)) # A subsequent request by the user agent to the (same) server for a URL of @@ -1343,7 +1343,7 @@ # the server. cookie = interact_2965(c, "http://www.acme.com/acme/parts/") - self.assert_("Rocket_Launcher_0001" in cookie and + self.assertTrue("Rocket_Launcher_0001" in cookie and "Riding_Rocket_0023" not in cookie) def test_rejection(self): @@ -1357,7 +1357,7 @@ # illegal domain (no embedded dots) cookie = interact_2965(c, "http://www.acme.com", 'foo=bar; domain=".com"; version=1') - self.assert_(not c) + self.assertTrue(not c) # legal domain cookie = interact_2965(c, "http://www.acme.com", @@ -1449,11 +1449,11 @@ c, "http://www.acme.com/foo%2f%25/<<%0anew\345/\346\370\345", 'bar=baz; path="/foo/"; version=1'); version_re = re.compile(r'^\$version=\"?1\"?', re.I) - self.assert_("foo=bar" in cookie and version_re.search(cookie)) + self.assertTrue("foo=bar" in cookie and version_re.search(cookie)) cookie = interact_2965( c, "http://www.acme.com/foo/%25/<<%0anew\345/\346\370\345") - self.assert_(not cookie) + self.assertTrue(not cookie) # unicode URL doesn't raise exception cookie = interact_2965(c, "http://www.acme.com/\xfc") @@ -1493,11 +1493,11 @@ new_c = save_and_restore(c, True) self.assertEquals(len(new_c), 6) # none discarded - self.assert_("name='foo1', value='bar'" in repr(new_c)) + self.assertTrue("name='foo1', value='bar'" in repr(new_c)) new_c = save_and_restore(c, False) self.assertEquals(len(new_c), 4) # 2 of them discarded on save - self.assert_("name='foo1', value='bar'" in repr(new_c)) + self.assertTrue("name='foo1', value='bar'" in repr(new_c)) def test_netscape_misc(self): # Some additional Netscape cookies tests. @@ -1519,7 +1519,7 @@ req = urllib.request.Request("http://foo.bar.acme.com/foo") c.add_cookie_header(req) - self.assert_( + self.assertTrue( "PART_NUMBER=3,4" in req.get_header("Cookie") and "Customer=WILE_E_COYOTE" in req.get_header("Cookie")) @@ -1530,11 +1530,11 @@ "foo1=bar; PORT; Discard; Version=1;") cookie = interact_2965(c, "http://example/", 'foo2=bar; domain=".local"; Version=1') - self.assert_("foo1=bar" in cookie) + self.assertTrue("foo1=bar" in cookie) interact_2965(c, "http://example/", 'foo3=bar; Version=1') cookie = interact_2965(c, "http://example/") - self.assert_("foo2=bar" in cookie and len(c) == 3) + self.assertTrue("foo2=bar" in cookie and len(c) == 3) def test_intranet_domains_ns(self): c = CookieJar(DefaultCookiePolicy(rfc2965 = False)) @@ -1542,10 +1542,10 @@ cookie = interact_netscape(c, "http://example/", 'foo2=bar; domain=.local') self.assertEquals(len(c), 2) - self.assert_("foo1=bar" in cookie) + self.assertTrue("foo1=bar" in cookie) cookie = interact_netscape(c, "http://example/") - self.assert_("foo2=bar" in cookie) + self.assertTrue("foo2=bar" in cookie) self.assertEquals(len(c), 2) def test_empty_path(self): @@ -1614,7 +1614,7 @@ key = "%s_after" % cookie.value counter[key] = counter[key] + 1 - self.assert_(not ( + self.assertTrue(not ( # a permanent cookie got lost accidently counter["perm_after"] != counter["perm_before"] or # a session cookie hasn't been cleared Modified: python/branches/py3k/Lib/test/test_httplib.py ============================================================================== --- python/branches/py3k/Lib/test/test_httplib.py (original) +++ python/branches/py3k/Lib/test/test_httplib.py Wed Jul 1 01:06:06 2009 @@ -265,7 +265,7 @@ # and into the socket. # default -- use global socket timeout - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(30) try: httpConn = client.HTTPConnection(HOST, TimeoutTest.PORT) @@ -276,7 +276,7 @@ httpConn.close() # no timeout -- do not use global socket default - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(30) try: httpConn = client.HTTPConnection(HOST, TimeoutTest.PORT, Modified: python/branches/py3k/Lib/test/test_httpservers.py ============================================================================== --- python/branches/py3k/Lib/test/test_httpservers.py (original) +++ python/branches/py3k/Lib/test/test_httpservers.py Wed Jul 1 01:06:06 2009 @@ -217,9 +217,9 @@ def check_status_and_reason(self, response, status, data=None): body = response.read() - self.assert_(response) + self.assertTrue(response) self.assertEquals(response.status, status) - self.assert_(response.reason != None) + self.assertTrue(response.reason != None) if data: self.assertEqual(data, body) Modified: python/branches/py3k/Lib/test/test_imp.py ============================================================================== --- python/branches/py3k/Lib/test/test_imp.py (original) +++ python/branches/py3k/Lib/test/test_imp.py Wed Jul 1 01:06:06 2009 @@ -12,7 +12,7 @@ """Very basic test of import lock functions.""" def verify_lock_state(self, expected): - self.failUnlessEqual(imp.lock_held(), expected, + self.assertEqual(imp.lock_held(), expected, "expected imp.lock_held() to be %r" % expected) def testLock(self): LOOPS = 50 Modified: python/branches/py3k/Lib/test/test_import.py ============================================================================== --- python/branches/py3k/Lib/test/test_import.py (original) +++ python/branches/py3k/Lib/test/test_import.py Wed Jul 1 01:06:06 2009 @@ -145,12 +145,12 @@ # import x.y.z binds x in the current namespace import test as x import test.support - self.assert_(x is test, x.__name__) - self.assert_(hasattr(test.support, "__file__")) + self.assertTrue(x is test, x.__name__) + self.assertTrue(hasattr(test.support, "__file__")) # import x.y.z as w binds z as w import test.support as y - self.assert_(y is test.support, y.__name__) + self.assertTrue(y is test.support, y.__name__) def test_import_initless_directory_warning(self): with warnings.catch_warnings(): @@ -168,7 +168,7 @@ sys.path.insert(0, os.curdir) try: mod = __import__(TESTFN) - self.assert_(TESTFN in sys.modules, "expected module in sys.modules") + self.assertTrue(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") @@ -185,7 +185,7 @@ self.assertRaises(ZeroDivisionError, imp.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") + self.assertFalse(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. @@ -207,12 +207,12 @@ sys.path.insert(0, os.curdir) try: mod = __import__(TESTFN) - self.failUnless(mod.__file__.endswith('.py')) + self.assertTrue(mod.__file__.endswith('.py')) os.remove(source) del sys.modules[TESTFN] mod = __import__(TESTFN) ext = mod.__file__[-4:] - self.failUnless(ext in ('.pyc', '.pyo'), ext) + self.assertTrue(ext in ('.pyc', '.pyo'), ext) finally: sys.path.pop(0) remove_files(TESTFN) Modified: python/branches/py3k/Lib/test/test_importhooks.py ============================================================================== --- python/branches/py3k/Lib/test/test_importhooks.py (original) +++ python/branches/py3k/Lib/test/test_importhooks.py Wed Jul 1 01:06:06 2009 @@ -177,7 +177,7 @@ TestImporter.modules['reloadmodule'] = (False, test_co) import reloadmodule - self.failIf(hasattr(reloadmodule,'reloaded')) + self.assertFalse(hasattr(reloadmodule,'reloaded')) import hooktestpackage.newrel self.assertEqual(hooktestpackage.newrel.get_name(), Modified: python/branches/py3k/Lib/test/test_index.py ============================================================================== --- python/branches/py3k/Lib/test/test_index.py (original) +++ python/branches/py3k/Lib/test/test_index.py Wed Jul 1 01:06:06 2009 @@ -59,10 +59,10 @@ def test_error(self): self.o.ind = 'dumb' self.n.ind = 'bad' - self.failUnlessRaises(TypeError, operator.index, self.o) - self.failUnlessRaises(TypeError, operator.index, self.n) - self.failUnlessRaises(TypeError, slice(self.o).indices, 0) - self.failUnlessRaises(TypeError, slice(self.n).indices, 0) + self.assertRaises(TypeError, operator.index, self.o) + self.assertRaises(TypeError, operator.index, self.n) + self.assertRaises(TypeError, slice(self.o).indices, 0) + self.assertRaises(TypeError, slice(self.n).indices, 0) class SeqTestCase(unittest.TestCase): @@ -114,11 +114,11 @@ self.o.ind = 'dumb' self.n.ind = 'bad' indexobj = lambda x, obj: obj.seq[x] - self.failUnlessRaises(TypeError, indexobj, self.o, self) - self.failUnlessRaises(TypeError, indexobj, self.n, self) + self.assertRaises(TypeError, indexobj, self.o, self) + self.assertRaises(TypeError, indexobj, self.n, self) sliceobj = lambda x, obj: obj.seq[x:] - self.failUnlessRaises(TypeError, sliceobj, self.o, self) - self.failUnlessRaises(TypeError, sliceobj, self.n, self) + self.assertRaises(TypeError, sliceobj, self.o, self) + self.assertRaises(TypeError, sliceobj, self.n, self) class ListTestCase(SeqTestCase): @@ -151,7 +151,7 @@ lst = [5, 6, 7, 8, 9, 11] l2 = lst.__imul__(self.n) - self.assert_(l2 is lst) + self.assertTrue(l2 is lst) self.assertEqual(lst, [5, 6, 7, 8, 9, 11] * 3) @@ -188,8 +188,8 @@ (0, maxsize, 1)) def test_sequence_repeat(self): - self.failUnlessRaises(OverflowError, lambda: "a" * self.pos) - self.failUnlessRaises(OverflowError, lambda: "a" * self.neg) + self.assertRaises(OverflowError, lambda: "a" * self.pos) + self.assertRaises(OverflowError, lambda: "a" * self.neg) def test_main(): Modified: python/branches/py3k/Lib/test/test_inspect.py ============================================================================== --- python/branches/py3k/Lib/test/test_inspect.py (original) +++ python/branches/py3k/Lib/test/test_inspect.py Wed Jul 1 01:06:06 2009 @@ -52,13 +52,13 @@ def istest(self, predicate, exp): obj = eval(exp) - self.failUnless(predicate(obj), '%s(%s)' % (predicate.__name__, exp)) + self.assertTrue(predicate(obj), '%s(%s)' % (predicate.__name__, exp)) for other in self.predicates - set([predicate]): if predicate == inspect.isgeneratorfunction and\ other == inspect.isfunction: continue - self.failIf(other(obj), 'not %s(%s)' % (other.__name__, exp)) + self.assertFalse(other(obj), 'not %s(%s)' % (other.__name__, exp)) def generator_function_example(self): for i in range(2): @@ -91,15 +91,15 @@ self.istest(inspect.isgetsetdescriptor, 'type(tb.tb_frame).f_locals') else: - self.failIf(inspect.isgetsetdescriptor(type(tb.tb_frame).f_locals)) + self.assertFalse(inspect.isgetsetdescriptor(type(tb.tb_frame).f_locals)) if hasattr(types, 'MemberDescriptorType'): self.istest(inspect.ismemberdescriptor, 'datetime.timedelta.days') else: - self.failIf(inspect.ismemberdescriptor(datetime.timedelta.days)) + self.assertFalse(inspect.ismemberdescriptor(datetime.timedelta.days)) def test_isroutine(self): - self.assert_(inspect.isroutine(mod.spam)) - self.assert_(inspect.isroutine([].count)) + self.assertTrue(inspect.isroutine(mod.spam)) + self.assertTrue(inspect.isroutine([].count)) def test_isclass(self): self.istest(inspect.isclass, 'mod.StupidGit') @@ -117,8 +117,8 @@ x = C() x.a = 42 members = dict(inspect.getmembers(x)) - self.assert_('a' in members) - self.assert_('b' not in members) + self.assertTrue('a' in members) + self.assertTrue('b' not in members) class TestInterpreterStack(IsTestBase): @@ -132,7 +132,7 @@ self.istest(inspect.isframe, 'mod.fr') def test_stack(self): - self.assert_(len(mod.st) >= 5) + self.assertTrue(len(mod.st) >= 5) self.assertEqual(revise(*mod.st[0][1:]), (modfile, 16, 'eggs', [' st = inspect.stack()\n'], 0)) self.assertEqual(revise(*mod.st[1][1:]), @@ -449,25 +449,25 @@ datablob = '1' attrs = attrs_wo_objs(A) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'class method', A) in attrs, 'missing class method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', A) in attrs, + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'class method', A) in attrs, 'missing class method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', A) in attrs, 'missing plain method: %r' % attrs) - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class B(A): def m(self): pass attrs = attrs_wo_objs(B) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'class method', A) in attrs, 'missing class method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', B) in attrs, 'missing plain method') - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'class method', A) in attrs, 'missing class method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', B) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class C(A): @@ -476,24 +476,24 @@ def c(self): pass attrs = attrs_wo_objs(C) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'method', C) in attrs, 'missing plain method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', C) in attrs, 'missing plain method') - self.assert_(('m1', 'method', A) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'method', C) in attrs, 'missing plain method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', C) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', A) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') class D(B, C): def m1(self): pass attrs = attrs_wo_objs(D) - self.assert_(('s', 'static method', A) in attrs, 'missing static method') - self.assert_(('c', 'method', C) in attrs, 'missing plain method') - self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', B) in attrs, 'missing plain method') - self.assert_(('m1', 'method', D) in attrs, 'missing plain method') - self.assert_(('datablob', 'data', A) in attrs, 'missing data') + self.assertTrue(('s', 'static method', A) in attrs, 'missing static method') + self.assertTrue(('c', 'method', C) in attrs, 'missing plain method') + self.assertTrue(('p', 'property', A) in attrs, 'missing property') + self.assertTrue(('m', 'method', B) in attrs, 'missing plain method') + self.assertTrue(('m1', 'method', D) in attrs, 'missing plain method') + self.assertTrue(('datablob', 'data', A) in attrs, 'missing data') def test_main(): run_unittest(TestDecorators, TestRetrievingSourceCode, TestOneliners, Modified: python/branches/py3k/Lib/test/test_int.py ============================================================================== --- python/branches/py3k/Lib/test/test_int.py (original) +++ python/branches/py3k/Lib/test/test_int.py Wed Jul 1 01:06:06 2009 @@ -52,15 +52,15 @@ s = repr(-1-sys.maxsize) x = int(s) self.assertEqual(x+1, -sys.maxsize) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) # should return long self.assertEqual(int(s[1:]), sys.maxsize+1) # should return long x = int(1e100) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) x = int(-1e100) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) # SF bug 434186: 0x80000000/2 != 0x80000000>>1. @@ -78,7 +78,7 @@ self.assertRaises(ValueError, int, '123\x00 245', 20) x = int('1' * 600) - self.assert_(isinstance(x, int)) + self.assertTrue(isinstance(x, int)) self.assertRaises(TypeError, int, 1, 12) @@ -96,8 +96,8 @@ self.assertRaises(ValueError, int, "0b", 0) # Bug #3236: Return small longs from PyLong_FromString - self.assert_(int("10") is 10) - self.assert_(int("-1") is -1) + self.assertTrue(int("10") is 10) + self.assertTrue(int("-1") is -1) # SF bug 1334662: int(string, base) wrong answers # Various representations of 2**32 evaluated to 0 Modified: python/branches/py3k/Lib/test/test_io.py ============================================================================== --- python/branches/py3k/Lib/test/test_io.py (original) +++ python/branches/py3k/Lib/test/test_io.py Wed Jul 1 01:06:06 2009 @@ -391,7 +391,7 @@ with self.open(support.TESTFN, "ab") as f: self.assertEqual(f.tell(), 3) with self.open(support.TESTFN, "a") as f: - self.assert_(f.tell() > 0) + self.assertTrue(f.tell() > 0) def test_destructor(self): record = [] @@ -509,7 +509,7 @@ wr = weakref.ref(f) del f support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) with self.open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"abcxxx") @@ -615,8 +615,8 @@ if s: # The destructor *may* have printed an unraisable error, check it self.assertEqual(len(s.splitlines()), 1) - self.assert_(s.startswith("Exception IOError: "), s) - self.assert_(s.endswith(" ignored"), s) + self.assertTrue(s.startswith("Exception IOError: "), s) + self.assertTrue(s.endswith(" ignored"), s) def test_repr(self): raw = self.MockRawIO() @@ -713,7 +713,7 @@ self.assertEquals(b"e", bufio.read(1)) self.assertEquals(b"fg", bufio.read()) self.assertEquals(b"", bufio.peek(1)) - self.assert_(None is bufio.read()) + self.assertTrue(None is bufio.read()) self.assertEquals(b"", bufio.read()) def test_read_past_eof(self): @@ -815,7 +815,7 @@ wr = weakref.ref(f) del f support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) class PyBufferedReaderTest(BufferedReaderTest): tp = pyio.BufferedReader @@ -864,7 +864,7 @@ flushed = b"".join(writer._write_stack) # At least (total - 8) bytes were implicitly flushed, perhaps more # depending on the implementation. - self.assert_(flushed.startswith(contents[:-8]), flushed) + self.assertTrue(flushed.startswith(contents[:-8]), flushed) def check_writes(self, intermediate_func): # Lots of writes, test the flushed output is as expected. @@ -1075,7 +1075,7 @@ wr = weakref.ref(f) del f support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) with self.open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"123xxx") @@ -1565,7 +1565,7 @@ t = self.TextIOWrapper(b, encoding="utf8") self.assertEqual(t.encoding, "utf8") t = self.TextIOWrapper(b) - self.assert_(t.encoding is not None) + self.assertTrue(t.encoding is not None) codecs.lookup(t.encoding) def test_encoding_errors_reading(self): @@ -1735,8 +1735,8 @@ if s: # The destructor *may* have printed an unraisable error, check it self.assertEqual(len(s.splitlines()), 1) - self.assert_(s.startswith("Exception IOError: "), s) - self.assert_(s.endswith(" ignored"), s) + self.assertTrue(s.startswith("Exception IOError: "), s) + self.assertTrue(s.endswith(" ignored"), s) # Systematic tests of the text I/O API @@ -2054,7 +2054,7 @@ wr = weakref.ref(t) del t support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) with self.open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"456def") @@ -2278,7 +2278,7 @@ wr = weakref.ref(c) del c, b support.gc_collect() - self.assert_(wr() is None, wr) + self.assertTrue(wr() is None, wr) def test_abcs(self): # Test the visible base classes are ABCs. Modified: python/branches/py3k/Lib/test/test_ioctl.py ============================================================================== --- python/branches/py3k/Lib/test/test_ioctl.py (original) +++ python/branches/py3k/Lib/test/test_ioctl.py Wed Jul 1 01:06:06 2009 @@ -24,7 +24,7 @@ tty = open("/dev/tty", "r") r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ") rpgrp = struct.unpack("i", r)[0] - self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + self.assertTrue(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) def test_ioctl_mutate(self): import array @@ -34,7 +34,7 @@ r = fcntl.ioctl(tty, termios.TIOCGPGRP, buf, 1) rpgrp = buf[0] self.assertEquals(r, 0) - self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + self.assertTrue(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) def test_ioctl_signed_unsigned_code_param(self): if not pty: Modified: python/branches/py3k/Lib/test/test_iter.py ============================================================================== --- python/branches/py3k/Lib/test/test_iter.py (original) +++ python/branches/py3k/Lib/test/test_iter.py Wed Jul 1 01:06:06 2009 @@ -75,7 +75,7 @@ seq = list(range(10)) it = iter(seq) it2 = iter(it) - self.assert_(it is it2) + self.assertTrue(it is it2) # Test that for loops over iterators work def test_iter_for_loop(self): @@ -542,23 +542,23 @@ def test_in_and_not_in(self): for sc5 in IteratingSequenceClass(5), SequenceClass(5): for i in range(5): - self.assert_(i in sc5) + self.assertTrue(i in sc5) for i in "abc", -1, 5, 42.42, (3, 4), [], {1: 1}, 3-12j, sc5: - self.assert_(i not in sc5) + self.assertTrue(i not in sc5) self.assertRaises(TypeError, lambda: 3 in 12) self.assertRaises(TypeError, lambda: 3 not in map) d = {"one": 1, "two": 2, "three": 3, 1j: 2j} for k in d: - self.assert_(k in d) - self.assert_(k not in d.values()) + self.assertTrue(k in d) + self.assertTrue(k not in d.values()) for v in d.values(): - self.assert_(v in d.values()) - self.assert_(v not in d) + self.assertTrue(v in d.values()) + self.assertTrue(v not in d) for k, v in d.items(): - self.assert_((k, v) in d.items()) - self.assert_((v, k) not in d.items()) + self.assertTrue((k, v) in d.items()) + self.assertTrue((v, k) not in d.items()) f = open(TESTFN, "w") try: @@ -569,9 +569,9 @@ try: for chunk in "abc": f.seek(0, 0) - self.assert_(chunk not in f) + self.assertTrue(chunk not in f) f.seek(0, 0) - self.assert_((chunk + "\n") in f) + self.assertTrue((chunk + "\n") in f) finally: f.close() try: Modified: python/branches/py3k/Lib/test/test_itertools.py ============================================================================== --- python/branches/py3k/Lib/test/test_itertools.py (original) +++ python/branches/py3k/Lib/test/test_itertools.py Wed Jul 1 01:06:06 2009 @@ -131,7 +131,7 @@ self.assertEqual(len(c), r) # r-length combinations self.assertEqual(len(set(c)), r) # no duplicate elements self.assertEqual(list(c), sorted(c)) # keep original ordering - self.assert_(all(e in values for e in c)) # elements taken from input iterable + self.assertTrue(all(e in values for e in c)) # elements taken from input iterable self.assertEqual(list(c), [e for e in values if e in c]) # comb is a subsequence of the input iterable self.assertEqual(result, list(combinations1(values, r))) # matches first pure python version @@ -195,14 +195,14 @@ if n == 0 or r <= 1: self.assertEquals(result, regular_combs) # cases that should be identical else: - self.assert_(set(result) >= set(regular_combs)) # rest should be supersets of regular combs + self.assertTrue(set(result) >= set(regular_combs)) # rest should be supersets of regular combs for c in result: self.assertEqual(len(c), r) # r-length combinations noruns = [k for k,v in groupby(c)] # combo without consecutive repeats self.assertEqual(len(noruns), len(set(noruns))) # no repeats other than consecutive self.assertEqual(list(c), sorted(c)) # keep original ordering - self.assert_(all(e in values for e in c)) # elements taken from input iterable + self.assertTrue(all(e in values for e in c)) # elements taken from input iterable self.assertEqual(noruns, [e for e in values if e in c]) # comb is a subsequence of the input iterable self.assertEqual(result, list(cwr1(values, r))) # matches first pure python version @@ -265,7 +265,7 @@ for p in result: self.assertEqual(len(p), r) # r-length permutations self.assertEqual(len(set(p)), r) # no duplicate elements - self.assert_(all(e in values for e in p)) # elements taken from input iterable + self.assertTrue(all(e in values for e in p)) # elements taken from input iterable self.assertEqual(result, list(permutations1(values, r))) # matches first pure python version self.assertEqual(result, list(permutations2(values, r))) # matches second pure python version if r == n: @@ -836,7 +836,7 @@ # tee pass-through to copyable iterator a, b = tee('abc') c, d = tee(a) - self.assert_(a is c) + self.assertTrue(a is c) # test tee_new t1, t2 = tee('abc') @@ -844,7 +844,7 @@ self.assertRaises(TypeError, tnew) self.assertRaises(TypeError, tnew, 10) t3 = tnew(t1) - self.assert_(list(t1) == list(t2) == list(t3) == list('abc')) + self.assertTrue(list(t1) == list(t2) == list(t3) == list('abc')) # test that tee objects are weak referencable a, b = tee(range(10)) @@ -1356,7 +1356,7 @@ Subclass(newarg=1) except TypeError as err: # we expect type errors because of wrong argument count - self.failIf("does not take keyword arguments" in err.args[0]) + self.assertFalse("does not take keyword arguments" in err.args[0]) libreftest = """ Doctest for examples in the library reference: libitertools.tex Modified: python/branches/py3k/Lib/test/test_kqueue.py ============================================================================== --- python/branches/py3k/Lib/test/test_kqueue.py (original) +++ python/branches/py3k/Lib/test/test_kqueue.py Wed Jul 1 01:06:06 2009 @@ -15,10 +15,10 @@ class TestKQueue(unittest.TestCase): def test_create_queue(self): kq = select.kqueue() - self.assert_(kq.fileno() > 0, kq.fileno()) - self.assert_(not kq.closed) + self.assertTrue(kq.fileno() > 0, kq.fileno()) + self.assertTrue(not kq.closed) kq.close() - self.assert_(kq.closed) + self.assertTrue(kq.closed) self.assertRaises(ValueError, kq.fileno) def test_create_event(self): @@ -34,8 +34,8 @@ self.assertEqual(ev.udata, 0) self.assertEqual(ev, ev) self.assertNotEqual(ev, other) - self.assert_(ev < other) - self.assert_(other >= ev) + self.assertTrue(ev < other) + self.assertTrue(other >= ev) for op in lt, le, gt, ge: self.assertRaises(TypeError, op, ev, None) self.assertRaises(TypeError, op, ev, 1) Modified: python/branches/py3k/Lib/test/test_largefile.py ============================================================================== --- python/branches/py3k/Lib/test/test_largefile.py (original) +++ python/branches/py3k/Lib/test/test_largefile.py Wed Jul 1 01:06:06 2009 @@ -139,7 +139,7 @@ for pos in (2**31-1, 2**31, 2**31+1): with self.open(TESTFN, 'rb') as f: f.seek(pos) - self.assert_(f.seekable()) + self.assertTrue(f.seekable()) def test_main(): Modified: python/branches/py3k/Lib/test/test_list.py ============================================================================== --- python/branches/py3k/Lib/test/test_list.py (original) +++ python/branches/py3k/Lib/test/test_list.py Wed Jul 1 01:06:06 2009 @@ -9,7 +9,7 @@ l0_3 = [0, 1, 2, 3] l0_3_bis = list(l0_3) self.assertEqual(l0_3, l0_3_bis) - self.assert_(l0_3 is not l0_3_bis) + self.assertTrue(l0_3 is not l0_3_bis) self.assertEqual(list(()), []) self.assertEqual(list((0, 1, 2, 3)), [0, 1, 2, 3]) self.assertEqual(list(''), []) @@ -39,11 +39,11 @@ def test_truth(self): super().test_truth() - self.assert_(not []) - self.assert_([42]) + self.assertTrue(not []) + self.assertTrue([42]) def test_identity(self): - self.assert_([] is not []) + self.assertTrue([] is not []) def test_len(self): super().test_len() Modified: python/branches/py3k/Lib/test/test_logging.py ============================================================================== --- python/branches/py3k/Lib/test/test_logging.py (original) +++ python/branches/py3k/Lib/test/test_logging.py Wed Jul 1 01:06:06 2009 @@ -99,7 +99,7 @@ finally: logging._releaseLock() - def assert_log_lines(self, expected_values, stream=None): + def assertTruelog_lines(self, expected_values, stream=None): """Match the collected log lines against the regular expression self.expected_log_pat, and compare the extracted group values to the expected_values list of tuples.""" @@ -165,7 +165,7 @@ INF.debug(m()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('ERR', 'CRITICAL', '1'), ('ERR', 'ERROR', '2'), ('INF', 'CRITICAL', '3'), @@ -197,7 +197,7 @@ INF_ERR.info(m()) INF_ERR.debug(m()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('INF.ERR', 'CRITICAL', '1'), ('INF.ERR', 'ERROR', '2'), ]) @@ -228,7 +228,7 @@ INF_ERR_UNDEF.info(m()) INF_ERR_UNDEF.debug(m()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('INF.UNDEF', 'CRITICAL', '1'), ('INF.UNDEF', 'ERROR', '2'), ('INF.UNDEF', 'WARNING', '3'), @@ -256,7 +256,7 @@ GRANDCHILD.debug(m()) CHILD.debug(m()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('INF.BADPARENT.UNDEF', 'CRITICAL', '1'), ('INF.BADPARENT.UNDEF', 'INFO', '2'), ('INF.BADPARENT', 'CRITICAL', '3'), @@ -285,7 +285,7 @@ spam_eggs_fish.info(self.next_message()) # Good. spam_bakedbeans.info(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('spam.eggs', 'INFO', '2'), ('spam.eggs.fish', 'INFO', '3'), ]) @@ -367,7 +367,7 @@ self.root_logger.setLevel(VERBOSE) # Levels >= 'Verbose' are good. self.log_at_all_levels(self.root_logger) - self.assert_log_lines([ + self.assertTruelog_lines([ ('Verbose', '5'), ('Sociable', '6'), ('Effusive', '7'), @@ -382,7 +382,7 @@ try: # Levels >= 'Sociable' are good. self.log_at_all_levels(self.root_logger) - self.assert_log_lines([ + self.assertTruelog_lines([ ('Sociable', '6'), ('Effusive', '7'), ('Terse', '8'), @@ -413,12 +413,12 @@ ('Taciturn', '9'), ('Silent', '10'), ] - self.assert_log_lines(first_lines) + self.assertTruelog_lines(first_lines) specific_filter = VerySpecificFilter() self.root_logger.addFilter(specific_filter) self.log_at_all_levels(self.root_logger) - self.assert_log_lines(first_lines + [ + self.assertTruelog_lines(first_lines + [ # Not only 'Garrulous' is still missing, but also 'Sociable' # and 'Taciturn' ('Boring', '11'), @@ -458,9 +458,9 @@ # The memory handler flushes to its target handler based on specific # criteria (message count and message level). self.mem_logger.debug(self.next_message()) - self.assert_log_lines([]) + self.assertTruelog_lines([]) self.mem_logger.info(self.next_message()) - self.assert_log_lines([]) + self.assertTruelog_lines([]) # This will flush because the level is >= logging.WARNING self.mem_logger.warn(self.next_message()) lines = [ @@ -468,19 +468,19 @@ ('INFO', '2'), ('WARNING', '3'), ] - self.assert_log_lines(lines) + self.assertTruelog_lines(lines) for n in (4, 14): for i in range(9): self.mem_logger.debug(self.next_message()) - self.assert_log_lines(lines) + self.assertTruelog_lines(lines) # This will flush because it's the 10th message since the last # flush. self.mem_logger.debug(self.next_message()) lines = lines + [('DEBUG', str(i)) for i in range(n, n + 10)] - self.assert_log_lines(lines) + self.assertTruelog_lines(lines) self.mem_logger.debug(self.next_message()) - self.assert_log_lines(lines) + self.assertTruelog_lines(lines) class ExceptionFormatter(logging.Formatter): @@ -650,11 +650,11 @@ logger.info(self.next_message()) # Outputs a message logger.error(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('ERROR', '2'), ], stream=output) # Original logger output is empty. - self.assert_log_lines([]) + self.assertTruelog_lines([]) def test_config1_ok(self, config=config1): # A config file defining a sub-parser as well. @@ -664,12 +664,12 @@ # Both will output a message logger.info(self.next_message()) logger.error(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('INFO', '1'), ('ERROR', '2'), ], stream=output) # Original logger output is empty. - self.assert_log_lines([]) + self.assertTruelog_lines([]) def test_config2_failure(self): # A simple config file which overrides the default settings. @@ -692,7 +692,7 @@ self.assertEquals(output.getvalue(), "ERROR:root:just testing\nGot a [RuntimeError]\n") # Original logger output is empty - self.assert_log_lines([]) + self.assertTruelog_lines([]) def test_config5_ok(self): self.test_config1_ok(config=self.config5) @@ -826,7 +826,7 @@ key = id(obj), repr(obj) self._survivors[key] = weakref.ref(obj) - def _assert_survival(self): + def _assertTruesurvival(self): """Assert that all objects watched for survival have survived.""" # Trigger cycle breaking. gc.collect() @@ -847,16 +847,16 @@ foo.setLevel(logging.DEBUG) self.root_logger.debug(self.next_message()) foo.debug(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('foo', 'DEBUG', '2'), ]) del foo # foo has survived. - self._assert_survival() + self._assertTruesurvival() # foo has retained its settings. bar = logging.getLogger("foo") bar.debug(self.next_message()) - self.assert_log_lines([ + self.assertTruelog_lines([ ('foo', 'DEBUG', '2'), ('foo', 'DEBUG', '3'), ]) @@ -881,7 +881,7 @@ # check we wrote exactly those bytes, ignoring trailing \n etc f = open(fn, encoding="utf8") try: - self.failUnlessEqual(f.read().rstrip(), data) + self.assertEqual(f.read().rstrip(), data) finally: f.close() finally: Modified: python/branches/py3k/Lib/test/test_long.py ============================================================================== --- python/branches/py3k/Lib/test/test_long.py (original) +++ python/branches/py3k/Lib/test/test_long.py Wed Jul 1 01:06:06 2009 @@ -65,7 +65,7 @@ # The sign of the number is also random. def getran(self, ndigits): - self.assert_(ndigits > 0) + self.assertTrue(ndigits > 0) nbits_hi = ndigits * SHIFT nbits_lo = nbits_hi - SHIFT + 1 answer = 0 @@ -74,13 +74,13 @@ while nbits < nbits_lo: bits = (r >> 1) + 1 bits = min(bits, nbits_hi - nbits) - self.assert_(1 <= bits <= SHIFT) + self.assertTrue(1 <= bits <= SHIFT) nbits = nbits + bits answer = answer << bits if r & 1: answer = answer | ((1 << bits) - 1) r = int(random.random() * (SHIFT * 2)) - self.assert_(nbits_lo <= nbits <= nbits_hi) + self.assertTrue(nbits_lo <= nbits <= nbits_hi) if random.random() < 0.5: answer = -answer return answer @@ -106,9 +106,9 @@ eq(r, r2, Frm("divmod returns different mod than %% for %r and %r", x, y)) eq(x, q*y + r, Frm("x != q*y + r after divmod on x=%r, y=%r", x, y)) if y > 0: - self.assert_(0 <= r < y, Frm("bad mod from divmod on %r and %r", x, y)) + self.assertTrue(0 <= r < y, Frm("bad mod from divmod on %r and %r", x, y)) else: - self.assert_(y < r <= 0, Frm("bad mod from divmod on %r and %r", x, y)) + self.assertTrue(y < r <= 0, Frm("bad mod from divmod on %r and %r", x, y)) def test_division(self): digits = list(range(1, MAXDIGITS+1)) + list(range(KARATSUBA_CUTOFF, @@ -538,7 +538,7 @@ y = int(x) except OverflowError: self.fail("int(long(sys.maxsize) + 1) mustn't overflow") - self.assert_(isinstance(y, int), + self.assertTrue(isinstance(y, int), "int(long(sys.maxsize) + 1) should have returned long") x = hugeneg_aslong - 1 @@ -546,14 +546,14 @@ y = int(x) except OverflowError: self.fail("int(long(-sys.maxsize-1) - 1) mustn't overflow") - self.assert_(isinstance(y, int), + self.assertTrue(isinstance(y, int), "int(long(-sys.maxsize-1) - 1) should have returned long") class long2(int): pass x = long2(1<<100) y = int(x) - self.assert_(type(y) is int, + self.assertTrue(type(y) is int, "overflowing int conversion must return long not long subtype") # ----------------------------------- tests of auto int->long conversion @@ -958,7 +958,7 @@ self.assertEqual(k, len(bin(x).lstrip('-0b'))) # Behaviour as specified in the docs if x != 0: - self.assert_(2**(k-1) <= abs(x) < 2**k) + self.assertTrue(2**(k-1) <= abs(x) < 2**k) else: self.assertEqual(k, 0) # Alternative definition: x.bit_length() == 1 + floor(log_2(x)) @@ -995,7 +995,7 @@ got = round(k+offset, -1) expected = v+offset self.assertEqual(got, expected) - self.assert_(type(got) is int) + self.assertTrue(type(got) is int) # larger second argument self.assertEqual(round(-150, -2), -200) @@ -1034,7 +1034,7 @@ got = round(10**k + 324678, -3) expect = 10**k + 325000 self.assertEqual(got, expect) - self.assert_(type(got) is int) + self.assertTrue(type(got) is int) # nonnegative second argument: round(x, n) should just return x for n in range(5): @@ -1042,7 +1042,7 @@ x = random.randrange(-10000, 10000) got = round(x, n) self.assertEqual(got, x) - self.assert_(type(got) is int) + self.assertTrue(type(got) is int) for huge_n in 2**31-1, 2**31, 2**63-1, 2**63, 2**100, 10**100: self.assertEqual(round(8979323, huge_n), 8979323) @@ -1051,7 +1051,7 @@ x = random.randrange(-10000, 10000) got = round(x) self.assertEqual(got, x) - self.assert_(type(got) is int) + self.assertTrue(type(got) is int) # bad second argument bad_exponents = ('brian', 2.0, 0j, None) Modified: python/branches/py3k/Lib/test/test_macpath.py ============================================================================== --- python/branches/py3k/Lib/test/test_macpath.py (original) +++ python/branches/py3k/Lib/test/test_macpath.py Wed Jul 1 01:06:06 2009 @@ -10,37 +10,37 @@ def test_isabs(self): isabs = macpath.isabs - self.assert_(isabs("xx:yy")) - self.assert_(isabs("xx:yy:")) - self.assert_(isabs("xx:")) - self.failIf(isabs("foo")) - self.failIf(isabs(":foo")) - self.failIf(isabs(":foo:bar")) - self.failIf(isabs(":foo:bar:")) - - self.assert_(isabs(b"xx:yy")) - self.assert_(isabs(b"xx:yy:")) - self.assert_(isabs(b"xx:")) - self.failIf(isabs(b"foo")) - self.failIf(isabs(b":foo")) - self.failIf(isabs(b":foo:bar")) - self.failIf(isabs(b":foo:bar:")) + self.assertTrue(isabs("xx:yy")) + self.assertTrue(isabs("xx:yy:")) + self.assertTrue(isabs("xx:")) + self.assertFalse(isabs("foo")) + self.assertFalse(isabs(":foo")) + self.assertFalse(isabs(":foo:bar")) + self.assertFalse(isabs(":foo:bar:")) + + self.assertTrue(isabs(b"xx:yy")) + self.assertTrue(isabs(b"xx:yy:")) + self.assertTrue(isabs(b"xx:")) + self.assertFalse(isabs(b"foo")) + self.assertFalse(isabs(b":foo")) + self.assertFalse(isabs(b":foo:bar")) + self.assertFalse(isabs(b":foo:bar:")) def test_commonprefix(self): commonprefix = macpath.commonprefix - self.assert_(commonprefix(["home:swenson:spam", "home:swen:spam"]) + self.assertTrue(commonprefix(["home:swenson:spam", "home:swen:spam"]) == "home:swen") - self.assert_(commonprefix([":home:swen:spam", ":home:swen:eggs"]) + self.assertTrue(commonprefix([":home:swen:spam", ":home:swen:eggs"]) == ":home:swen:") - self.assert_(commonprefix([":home:swen:spam", ":home:swen:spam"]) + self.assertTrue(commonprefix([":home:swen:spam", ":home:swen:spam"]) == ":home:swen:spam") - self.assert_(commonprefix([b"home:swenson:spam", b"home:swen:spam"]) + self.assertTrue(commonprefix([b"home:swenson:spam", b"home:swen:spam"]) == b"home:swen") - self.assert_(commonprefix([b":home:swen:spam", b":home:swen:eggs"]) + self.assertTrue(commonprefix([b":home:swen:spam", b":home:swen:eggs"]) == b":home:swen:") - self.assert_(commonprefix([b":home:swen:spam", b":home:swen:spam"]) + self.assertTrue(commonprefix([b":home:swen:spam", b":home:swen:spam"]) == b":home:swen:spam") def test_split(self): Modified: python/branches/py3k/Lib/test/test_mailbox.py ============================================================================== --- python/branches/py3k/Lib/test/test_mailbox.py (original) +++ python/branches/py3k/Lib/test/test_mailbox.py Wed Jul 1 01:06:06 2009 @@ -21,16 +21,16 @@ def _check_sample(self, msg): # Inspect a mailbox.Message representation of the sample message - self.assert_(isinstance(msg, email.message.Message)) - self.assert_(isinstance(msg, mailbox.Message)) + self.assertTrue(isinstance(msg, email.message.Message)) + self.assertTrue(isinstance(msg, mailbox.Message)) for key, value in _sample_headers.items(): - self.assert_(value in msg.get_all(key)) - self.assert_(msg.is_multipart()) + self.assertTrue(value in msg.get_all(key)) + self.assertTrue(msg.is_multipart()) self.assertEqual(len(msg.get_payload()), len(_sample_payloads)) for i, payload in enumerate(_sample_payloads): part = msg.get_payload(i) - self.assert_(isinstance(part, email.message.Message)) - self.assert_(not isinstance(part, mailbox.Message)) + self.assertTrue(isinstance(part, email.message.Message)) + self.assertTrue(not isinstance(part, mailbox.Message)) self.assertEqual(part.get_payload(), payload) def _delete_recursively(self, target): @@ -92,7 +92,7 @@ self.assertEqual(len(self._box), 2) method(key0) l = len(self._box) - self.assert_(l == 1, "actual l: %s" % l) + self.assertTrue(l == 1, "actual l: %s" % l) self.assertRaises(KeyError, lambda: self._box[key0]) self.assertRaises(KeyError, lambda: method(key0)) self.assertEqual(self._box.get_string(key1), self._template % 1) @@ -100,7 +100,7 @@ self.assertEqual(len(self._box), 2) method(key2) l = len(self._box) - self.assert_(l == 1, "actual l: %s" % l) + self.assertTrue(l == 1, "actual l: %s" % l) self.assertRaises(KeyError, lambda: self._box[key2]) self.assertRaises(KeyError, lambda: method(key2)) self.assertEqual(self._box.get_string(key1), self._template % 1) @@ -127,8 +127,8 @@ msg = self._box.get(key0) self.assertEqual(msg['from'], 'foo') self.assertEqual(msg.get_payload(), '0') - self.assert_(self._box.get('foo') is None) - self.assert_(self._box.get('foo', False) is False) + self.assertTrue(self._box.get('foo') is None) + self.assertTrue(self._box.get('foo', False) is False) self._box.close() self._box = self._factory(self._path) key1 = self._box.add(self._template % 1) @@ -151,7 +151,7 @@ key0 = self._box.add(self._template % 0) key1 = self._box.add(_sample_message) msg0 = self._box.get_message(key0) - self.assert_(isinstance(msg0, mailbox.Message)) + self.assertTrue(isinstance(msg0, mailbox.Message)) self.assertEqual(msg0['from'], 'foo') self.assertEqual(msg0.get_payload(), '0') self._check_sample(self._box.get_message(key1)) @@ -228,29 +228,29 @@ count = 0 for value in returned_values: self.assertEqual(value['from'], 'foo') - self.assert_(int(value.get_payload()) < repetitions) + self.assertTrue(int(value.get_payload()) < repetitions) count += 1 self.assertEqual(len(values), count) def test_contains(self): # Check existence of keys using __contains__() method = self._box.__contains__ - self.assert_(not method('foo')) + self.assertTrue(not method('foo')) key0 = self._box.add(self._template % 0) - self.assert_(method(key0)) - self.assert_(not method('foo')) + self.assertTrue(method(key0)) + self.assertTrue(not method('foo')) key1 = self._box.add(self._template % 1) - self.assert_(method(key1)) - self.assert_(method(key0)) - self.assert_(not method('foo')) + self.assertTrue(method(key1)) + self.assertTrue(method(key0)) + self.assertTrue(not method('foo')) self._box.remove(key0) - self.assert_(not method(key0)) - self.assert_(method(key1)) - self.assert_(not method('foo')) + self.assertTrue(not method(key0)) + self.assertTrue(method(key1)) + self.assertTrue(not method('foo')) self._box.remove(key1) - self.assert_(not method(key1)) - self.assert_(not method(key0)) - self.assert_(not method('foo')) + self.assertTrue(not method(key1)) + self.assertTrue(not method(key0)) + self.assertTrue(not method('foo')) def test_len(self, repetitions=10): # Get message count @@ -297,7 +297,7 @@ for i in range(iterations): self._box.add(self._template % i) for i, key in enumerate(keys): - self.assert_(self._box.get_string(key) == self._template % i) + self.assertTrue(self._box.get_string(key) == self._template % i) self._box.clear() self.assertEqual(len(self._box), 0) for i, key in enumerate(keys): @@ -306,19 +306,19 @@ def test_pop(self): # Get and remove a message using pop() key0 = self._box.add(self._template % 0) - self.assert_(key0 in self._box) + self.assertTrue(key0 in self._box) key1 = self._box.add(self._template % 1) - self.assert_(key1 in self._box) + self.assertTrue(key1 in self._box) self.assertEqual(self._box.pop(key0).get_payload(), '0') - self.assert_(key0 not in self._box) - self.assert_(key1 in self._box) + self.assertTrue(key0 not in self._box) + self.assertTrue(key1 in self._box) key2 = self._box.add(self._template % 2) - self.assert_(key2 in self._box) + self.assertTrue(key2 in self._box) self.assertEqual(self._box.pop(key2).get_payload(), '2') - self.assert_(key2 not in self._box) - self.assert_(key1 in self._box) + self.assertTrue(key2 not in self._box) + self.assertTrue(key1 in self._box) self.assertEqual(self._box.pop(key1).get_payload(), '1') - self.assert_(key1 not in self._box) + self.assertTrue(key1 not in self._box) self.assertEqual(len(self._box), 0) def test_popitem(self, iterations=10): @@ -329,8 +329,8 @@ seen = [] for i in range(10): key, msg = self._box.popitem() - self.assert_(key in keys) - self.assert_(key not in seen) + self.assertTrue(key in keys) + self.assertTrue(key not in seen) seen.append(key) self.assertEqual(int(msg.get_payload()), keys.index(key)) self.assertEqual(len(self._box), 0) @@ -377,11 +377,11 @@ def test_lock_unlock(self): # Lock and unlock the mailbox - self.assert_(not os.path.exists(self._get_lock_path())) + self.assertTrue(not os.path.exists(self._get_lock_path())) self._box.lock() - self.assert_(os.path.exists(self._get_lock_path())) + self.assertTrue(os.path.exists(self._get_lock_path())) self._box.unlock() - self.assert_(not os.path.exists(self._get_lock_path())) + self.assertTrue(not os.path.exists(self._get_lock_path())) def test_close(self): # Close mailbox and flush changes to disk @@ -400,7 +400,7 @@ keys = self._box.keys() self.assertEqual(len(keys), 3) for key in keys: - self.assert_(self._box.get_string(key) in contents) + self.assertTrue(self._box.get_string(key) in contents) oldbox.close() def test_dump_message(self): @@ -469,7 +469,7 @@ msg.set_subdir('cur') msg.set_info('foo') key = self._box.add(msg) - self.assert_(os.path.exists(os.path.join(self._path, 'cur', '%s%sfoo' % + self.assertTrue(os.path.exists(os.path.join(self._path, 'cur', '%s%sfoo' % (key, self._box.colon)))) def test_get_MM(self): @@ -479,7 +479,7 @@ msg.set_flags('RF') key = self._box.add(msg) msg_returned = self._box.get_message(key) - self.assert_(isinstance(msg_returned, mailbox.MaildirMessage)) + self.assertTrue(isinstance(msg_returned, mailbox.MaildirMessage)) self.assertEqual(msg_returned.get_subdir(), 'cur') self.assertEqual(msg_returned.get_flags(), 'FR') @@ -519,7 +519,7 @@ box = mailbox.Maildir(self._path, factory=FakeMessage) box.colon = self._box.colon msg2 = box.get_message(key) - self.assert_(isinstance(msg2, FakeMessage)) + self.assertTrue(isinstance(msg2, FakeMessage)) def test_initialize_new(self): # Initialize a non-existent mailbox @@ -545,7 +545,7 @@ for subdir in '', 'tmp', 'new', 'cur': path = os.path.join(self._path, subdir) mode = os.stat(path)[stat.ST_MODE] - self.assert_(stat.S_ISDIR(mode), "Not a directory: '%s'" % path) + self.assertTrue(stat.S_ISDIR(mode), "Not a directory: '%s'" % path) def test_list_folders(self): # List folders @@ -561,7 +561,7 @@ self._box.add_folder('foo.bar') folder0 = self._box.get_folder('foo.bar') folder0.add(self._template % 'bar') - self.assert_(os.path.isdir(os.path.join(self._path, '.foo.bar'))) + self.assertTrue(os.path.isdir(os.path.join(self._path, '.foo.bar'))) folder1 = self._box.get_folder('foo.bar') self.assertEqual(folder1.get_string(folder1.keys()[0]), self._template % 'bar') @@ -571,7 +571,7 @@ self._box.add_folder('one') self._box.add_folder('two') self.assertEqual(len(self._box.list_folders()), 2) - self.assert_(set(self._box.list_folders()) == set(('one', 'two'))) + self.assertTrue(set(self._box.list_folders()) == set(('one', 'two'))) self._box.remove_folder('one') self.assertEqual(len(self._box.list_folders()), 1) self.assertEqual(set(self._box.list_folders()), set(('two',))) @@ -596,14 +596,14 @@ f.write("@") f.close() self._box.clean() - self.assert_(os.path.exists(foo_path)) - self.assert_(os.path.exists(bar_path)) + self.assertTrue(os.path.exists(foo_path)) + self.assertTrue(os.path.exists(bar_path)) foo_stat = os.stat(foo_path) os.utime(foo_path, (time.time() - 129600 - 2, foo_stat.st_mtime)) self._box.clean() - self.assert_(not os.path.exists(foo_path)) - self.assert_(os.path.exists(bar_path)) + self.assertTrue(not os.path.exists(foo_path)) + self.assertTrue(os.path.exists(bar_path)) def test_create_tmp(self, repetitions=10): # Create files in tmp directory @@ -623,13 +623,13 @@ "tmp")), "File in wrong location: '%s'" % head) match = pattern.match(tail) - self.assert_(match is not None, "Invalid file name: '%s'" % tail) + self.assertTrue(match is not None, "Invalid file name: '%s'" % tail) groups = match.groups() if previous_groups is not None: - self.assert_(int(groups[0] >= previous_groups[0]), + self.assertTrue(int(groups[0] >= previous_groups[0]), "Non-monotonic seconds: '%s' before '%s'" % (previous_groups[0], groups[0])) - self.assert_(int(groups[1] >= previous_groups[1]) or + self.assertTrue(int(groups[1] >= previous_groups[1]) or groups[0] != groups[1], "Non-monotonic milliseconds: '%s' before '%s'" % (previous_groups[1], groups[1])) @@ -691,10 +691,10 @@ return None box = self._factory(self._path, factory=dummy_factory) folder = box.add_folder('folder1') - self.assert_(folder._factory is dummy_factory) + self.assertTrue(folder._factory is dummy_factory) folder1_alias = box.get_folder('folder1') - self.assert_(folder1_alias._factory is dummy_factory) + self.assertTrue(folder1_alias._factory is dummy_factory) def test_directory_in_folder (self): # Test that mailboxes still work if there's a stray extra directory @@ -721,7 +721,7 @@ os.umask(orig_umask) path = os.path.join(self._path, self._box._lookup(key)) mode = os.stat(path).st_mode - self.assert_(mode & 0o111 == 0) + self.assertTrue(mode & 0o111 == 0) def test_folder_file_perms(self): # From bug #3228, we want to verify that the file created inside a Maildir @@ -802,7 +802,7 @@ self._box = self._factory(self._path) self.assertEqual(len(self._box), 3) for key in self._box.keys(): - self.assert_(self._box.get_string(key) in values) + self.assertTrue(self._box.get_string(key) in values) self._box.close() self.assertEqual(mtime, os.path.getmtime(self._path)) @@ -859,7 +859,7 @@ self._box.lock() key2 = self._box.add(msg) self._box.flush() - self.assert_(self._box._locked) + self.assertTrue(self._box._locked) self._box.close() @@ -913,15 +913,15 @@ new_folder = self._box.add_folder('foo.bar') folder0 = self._box.get_folder('foo.bar') folder0.add(self._template % 'bar') - self.assert_(os.path.isdir(os.path.join(self._path, 'foo.bar'))) + self.assertTrue(os.path.isdir(os.path.join(self._path, 'foo.bar'))) folder1 = self._box.get_folder('foo.bar') self.assertEqual(folder1.get_string(folder1.keys()[0]), self._template % 'bar') # Test for bug #1569790: verify that folders returned by .get_folder() # use the same factory function. - self.assert_(new_folder._factory is self._box._factory) - self.assert_(folder0._factory is self._box._factory) + self.assertTrue(new_folder._factory is self._box._factory) + self.assertTrue(folder0._factory is self._box._factory) def test_add_and_remove_folders(self): # Delete folders @@ -990,7 +990,7 @@ {'foo':[key0,key1,key3], 'unseen':[key0], 'bar':[key3], 'replied':[key3]}) self._box.pack() - self.assert_(self._box.keys() == [1, 2, 3]) + self.assertTrue(self._box.keys() == [1, 2, 3]) key0 = key0 key1 = key0 + 1 key2 = key1 + 1 @@ -1082,11 +1082,11 @@ # Initialize without arguments msg = self._factory() self._post_initialize_hook(msg) - self.assert_(isinstance(msg, email.message.Message)) - self.assert_(isinstance(msg, mailbox.Message)) - self.assert_(isinstance(msg, self._factory)) + self.assertTrue(isinstance(msg, email.message.Message)) + self.assertTrue(isinstance(msg, mailbox.Message)) + self.assertTrue(isinstance(msg, self._factory)) self.assertEqual(msg.keys(), []) - self.assert_(not msg.is_multipart()) + self.assertTrue(not msg.is_multipart()) self.assertEqual(msg.get_payload(), None) def test_initialize_incorrectly(self): @@ -1159,7 +1159,7 @@ def test_date(self): # Use get_date() and set_date() msg = mailbox.MaildirMessage(_sample_message) - self.assert_(abs(msg.get_date() - time.time()) < 60) + self.assertTrue(abs(msg.get_date() - time.time()) < 60) msg.set_date(0.0) self.assertEqual(msg.get_date(), 0.0) @@ -1234,7 +1234,7 @@ # Check contents of "From " line if sender is None: sender = "MAILER-DAEMON" - self.assert_(re.match(sender + r" \w{3} \w{3} [\d ]\d [\d ]\d:\d{2}:" + self.assertTrue(re.match(sender + r" \w{3} \w{3} [\d ]\d [\d ]\d:\d{2}:" r"\d{2} \d{4}", msg.get_from()) is not None) @@ -1309,19 +1309,19 @@ msg = mailbox.BabylMessage(_sample_message) visible = msg.get_visible() self.assertEqual(visible.keys(), []) - self.assert_(visible.get_payload() is None) + self.assertTrue(visible.get_payload() is None) visible['User-Agent'] = 'FooBar 1.0' visible['X-Whatever'] = 'Blah' self.assertEqual(msg.get_visible().keys(), []) msg.set_visible(visible) visible = msg.get_visible() - self.assert_(visible.keys() == ['User-Agent', 'X-Whatever']) - self.assert_(visible['User-Agent'] == 'FooBar 1.0') + self.assertTrue(visible.keys() == ['User-Agent', 'X-Whatever']) + self.assertTrue(visible['User-Agent'] == 'FooBar 1.0') self.assertEqual(visible['X-Whatever'], 'Blah') - self.assert_(visible.get_payload() is None) + self.assertTrue(visible.get_payload() is None) msg.update_visible() self.assertEqual(visible.keys(), ['User-Agent', 'X-Whatever']) - self.assert_(visible.get_payload() is None) + self.assertTrue(visible.get_payload() is None) visible = msg.get_visible() self.assertEqual(visible.keys(), ['User-Agent', 'Date', 'From', 'To', 'Subject']) @@ -1423,7 +1423,7 @@ msg_mboxMMDF.set_flags(setting) msg = mailbox.MaildirMessage(msg_mboxMMDF) self.assertEqual(msg.get_flags(), result) - self.assert_(msg.get_date() == 0.0, msg.get_date()) + self.assertTrue(msg.get_date() == 0.0, msg.get_date()) msg_mboxMMDF.set_flags('O') self.assertEqual(mailbox.MaildirMessage(msg_mboxMMDF).get_subdir(), 'cur') @@ -1655,7 +1655,7 @@ proxy.seek(2, 0) self.assertEqual(proxy.read(), b'o' + linesep + b'bar' + linesep) proxy.seek(100) - self.failIf(proxy.read()) + self.assertFalse(proxy.read()) def _test_close(self, proxy): # Close a file @@ -1820,36 +1820,36 @@ # Test for regression on bug #117490: # Make sure the boxes attribute actually gets set. self.mbox = mailbox.Maildir(support.TESTFN) - #self.assert_(hasattr(self.mbox, "boxes")) + #self.assertTrue(hasattr(self.mbox, "boxes")) #self.assertEqual(len(self.mbox.boxes), 0) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_cur(self): self.createMessage("cur") self.mbox = mailbox.Maildir(support.TESTFN) #self.assertEqual(len(self.mbox.boxes), 1) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_new(self): self.createMessage("new") self.mbox = mailbox.Maildir(support.TESTFN) #self.assertEqual(len(self.mbox.boxes), 1) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) def test_nonempty_maildir_both(self): self.createMessage("cur") self.createMessage("new") self.mbox = mailbox.Maildir(support.TESTFN) #self.assertEqual(len(self.mbox.boxes), 2) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is not None) - self.assert_(self.mbox.next() is None) - self.assert_(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is not None) + self.assertTrue(self.mbox.next() is None) + self.assertTrue(self.mbox.next() is None) ## End: tests from the original module (for backward compatibility). Modified: python/branches/py3k/Lib/test/test_math.py ============================================================================== --- python/branches/py3k/Lib/test/test_math.py (original) +++ python/branches/py3k/Lib/test/test_math.py Wed Jul 1 01:06:06 2009 @@ -72,7 +72,7 @@ self.ftest('acos(1)', math.acos(1), 0) self.assertRaises(ValueError, math.acos, INF) self.assertRaises(ValueError, math.acos, NINF) - self.assert_(math.isnan(math.acos(NAN))) + self.assertTrue(math.isnan(math.acos(NAN))) def testAcosh(self): self.assertRaises(TypeError, math.acosh) @@ -82,7 +82,7 @@ self.assertRaises(ValueError, math.acosh, -1) self.assertEquals(math.acosh(INF), INF) self.assertRaises(ValueError, math.acosh, NINF) - self.assert_(math.isnan(math.acosh(NAN))) + self.assertTrue(math.isnan(math.acosh(NAN))) def testAsin(self): self.assertRaises(TypeError, math.asin) @@ -91,7 +91,7 @@ self.ftest('asin(1)', math.asin(1), math.pi/2) self.assertRaises(ValueError, math.asin, INF) self.assertRaises(ValueError, math.asin, NINF) - self.assert_(math.isnan(math.asin(NAN))) + self.assertTrue(math.isnan(math.asin(NAN))) def testAsinh(self): self.assertRaises(TypeError, math.asinh) @@ -100,7 +100,7 @@ self.ftest('asinh(-1)', math.asinh(-1), -0.88137358701954305) self.assertEquals(math.asinh(INF), INF) self.assertEquals(math.asinh(NINF), NINF) - self.assert_(math.isnan(math.asinh(NAN))) + self.assertTrue(math.isnan(math.asinh(NAN))) def testAtan(self): self.assertRaises(TypeError, math.atan) @@ -109,7 +109,7 @@ self.ftest('atan(1)', math.atan(1), math.pi/4) self.ftest('atan(inf)', math.atan(INF), math.pi/2) self.ftest('atan(-inf)', math.atan(NINF), -math.pi/2) - self.assert_(math.isnan(math.atan(NAN))) + self.assertTrue(math.isnan(math.atan(NAN))) def testAtanh(self): self.assertRaises(TypeError, math.atan) @@ -120,7 +120,7 @@ self.assertRaises(ValueError, math.atanh, -1) self.assertRaises(ValueError, math.atanh, INF) self.assertRaises(ValueError, math.atanh, NINF) - self.assert_(math.isnan(math.atanh(NAN))) + self.assertTrue(math.isnan(math.atanh(NAN))) def testAtan2(self): self.assertRaises(TypeError, math.atan2) @@ -137,7 +137,7 @@ self.assertEqual(math.atan2(0., 0.), 0.) self.assertEqual(math.atan2(0., 2.3), 0.) self.assertEqual(math.atan2(0., INF), 0.) - self.assert_(math.isnan(math.atan2(0., NAN))) + self.assertTrue(math.isnan(math.atan2(0., NAN))) # math.atan2(-0, x) self.ftest('atan2(-0., -inf)', math.atan2(-0., NINF), -math.pi) self.ftest('atan2(-0., -2.3)', math.atan2(-0., -2.3), -math.pi) @@ -145,7 +145,7 @@ self.assertEqual(math.atan2(-0., 0.), -0.) self.assertEqual(math.atan2(-0., 2.3), -0.) self.assertEqual(math.atan2(-0., INF), -0.) - self.assert_(math.isnan(math.atan2(-0., NAN))) + self.assertTrue(math.isnan(math.atan2(-0., NAN))) # math.atan2(INF, x) self.ftest('atan2(inf, -inf)', math.atan2(INF, NINF), math.pi*3/4) self.ftest('atan2(inf, -2.3)', math.atan2(INF, -2.3), math.pi/2) @@ -153,7 +153,7 @@ self.ftest('atan2(inf, 0.)', math.atan2(INF, 0.0), math.pi/2) self.ftest('atan2(inf, 2.3)', math.atan2(INF, 2.3), math.pi/2) self.ftest('atan2(inf, inf)', math.atan2(INF, INF), math.pi/4) - self.assert_(math.isnan(math.atan2(INF, NAN))) + self.assertTrue(math.isnan(math.atan2(INF, NAN))) # math.atan2(NINF, x) self.ftest('atan2(-inf, -inf)', math.atan2(NINF, NINF), -math.pi*3/4) self.ftest('atan2(-inf, -2.3)', math.atan2(NINF, -2.3), -math.pi/2) @@ -161,27 +161,27 @@ self.ftest('atan2(-inf, 0.)', math.atan2(NINF, 0.0), -math.pi/2) self.ftest('atan2(-inf, 2.3)', math.atan2(NINF, 2.3), -math.pi/2) self.ftest('atan2(-inf, inf)', math.atan2(NINF, INF), -math.pi/4) - self.assert_(math.isnan(math.atan2(NINF, NAN))) + self.assertTrue(math.isnan(math.atan2(NINF, NAN))) # math.atan2(+finite, x) self.ftest('atan2(2.3, -inf)', math.atan2(2.3, NINF), math.pi) self.ftest('atan2(2.3, -0.)', math.atan2(2.3, -0.), math.pi/2) self.ftest('atan2(2.3, 0.)', math.atan2(2.3, 0.), math.pi/2) self.assertEqual(math.atan2(2.3, INF), 0.) - self.assert_(math.isnan(math.atan2(2.3, NAN))) + self.assertTrue(math.isnan(math.atan2(2.3, NAN))) # math.atan2(-finite, x) self.ftest('atan2(-2.3, -inf)', math.atan2(-2.3, NINF), -math.pi) self.ftest('atan2(-2.3, -0.)', math.atan2(-2.3, -0.), -math.pi/2) self.ftest('atan2(-2.3, 0.)', math.atan2(-2.3, 0.), -math.pi/2) self.assertEqual(math.atan2(-2.3, INF), -0.) - self.assert_(math.isnan(math.atan2(-2.3, NAN))) + self.assertTrue(math.isnan(math.atan2(-2.3, NAN))) # math.atan2(NAN, x) - self.assert_(math.isnan(math.atan2(NAN, NINF))) - self.assert_(math.isnan(math.atan2(NAN, -2.3))) - self.assert_(math.isnan(math.atan2(NAN, -0.))) - self.assert_(math.isnan(math.atan2(NAN, 0.))) - self.assert_(math.isnan(math.atan2(NAN, 2.3))) - self.assert_(math.isnan(math.atan2(NAN, INF))) - self.assert_(math.isnan(math.atan2(NAN, NAN))) + self.assertTrue(math.isnan(math.atan2(NAN, NINF))) + self.assertTrue(math.isnan(math.atan2(NAN, -2.3))) + self.assertTrue(math.isnan(math.atan2(NAN, -0.))) + self.assertTrue(math.isnan(math.atan2(NAN, 0.))) + self.assertTrue(math.isnan(math.atan2(NAN, 2.3))) + self.assertTrue(math.isnan(math.atan2(NAN, INF))) + self.assertTrue(math.isnan(math.atan2(NAN, NAN))) def testCeil(self): self.assertRaises(TypeError, math.ceil) @@ -194,7 +194,7 @@ self.ftest('ceil(-1.5)', math.ceil(-1.5), -1) #self.assertEquals(math.ceil(INF), INF) #self.assertEquals(math.ceil(NINF), NINF) - #self.assert_(math.isnan(math.ceil(NAN))) + #self.assertTrue(math.isnan(math.ceil(NAN))) class TestCeil: def __ceil__(self): @@ -226,14 +226,14 @@ self.assertEquals(copysign(INF, NINF), NINF) self.assertEquals(copysign(NINF, INF), INF) self.assertEquals(copysign(NINF, NINF), NINF) - self.assert_(math.isnan(copysign(NAN, 1.))) - self.assert_(math.isnan(copysign(NAN, INF))) - self.assert_(math.isnan(copysign(NAN, NINF))) - self.assert_(math.isnan(copysign(NAN, NAN))) + self.assertTrue(math.isnan(copysign(NAN, 1.))) + self.assertTrue(math.isnan(copysign(NAN, INF))) + self.assertTrue(math.isnan(copysign(NAN, NINF))) + self.assertTrue(math.isnan(copysign(NAN, NAN))) # copysign(INF, NAN) may be INF or it may be NINF, since # we don't know whether the sign bit of NAN is set on any # given platform. - self.assert_(math.isinf(copysign(INF, NAN))) + self.assertTrue(math.isinf(copysign(INF, NAN))) # similarly, copysign(2., NAN) could be 2. or -2. self.assertEquals(abs(copysign(2., NAN)), 2.) @@ -244,12 +244,12 @@ self.ftest('cos(pi/2)', math.cos(math.pi/2), 0) self.ftest('cos(pi)', math.cos(math.pi), -1) try: - self.assert_(math.isnan(math.cos(INF))) - self.assert_(math.isnan(math.cos(NINF))) + self.assertTrue(math.isnan(math.cos(INF))) + self.assertTrue(math.isnan(math.cos(NINF))) except ValueError: self.assertRaises(ValueError, math.cos, INF) self.assertRaises(ValueError, math.cos, NINF) - self.assert_(math.isnan(math.cos(NAN))) + self.assertTrue(math.isnan(math.cos(NAN))) def testCosh(self): self.assertRaises(TypeError, math.cosh) @@ -257,7 +257,7 @@ self.ftest('cosh(2)-2*cosh(1)**2', math.cosh(2)-2*math.cosh(1)**2, -1) # Thanks to Lambert self.assertEquals(math.cosh(INF), INF) self.assertEquals(math.cosh(NINF), INF) - self.assert_(math.isnan(math.cosh(NAN))) + self.assertTrue(math.isnan(math.cosh(NAN))) def testDegrees(self): self.assertRaises(TypeError, math.degrees) @@ -272,7 +272,7 @@ self.ftest('exp(1)', math.exp(1), math.e) self.assertEquals(math.exp(INF), INF) self.assertEquals(math.exp(NINF), 0.) - self.assert_(math.isnan(math.exp(NAN))) + self.assertTrue(math.isnan(math.exp(NAN))) def testFabs(self): self.assertRaises(TypeError, math.fabs) @@ -309,7 +309,7 @@ self.ftest('floor(-1.23e167)', math.floor(-1.23e167), -1.23e167) #self.assertEquals(math.ceil(INF), INF) #self.assertEquals(math.ceil(NINF), NINF) - #self.assert_(math.isnan(math.floor(NAN))) + #self.assertTrue(math.isnan(math.floor(NAN))) class TestFloor: def __floor__(self): @@ -332,9 +332,9 @@ self.ftest('fmod(-10,1)', math.fmod(-10,1), 0) self.ftest('fmod(-10,0.5)', math.fmod(-10,0.5), 0) self.ftest('fmod(-10,1.5)', math.fmod(-10,1.5), -1) - self.assert_(math.isnan(math.fmod(NAN, 1.))) - self.assert_(math.isnan(math.fmod(1., NAN))) - self.assert_(math.isnan(math.fmod(NAN, NAN))) + self.assertTrue(math.isnan(math.fmod(NAN, 1.))) + self.assertTrue(math.isnan(math.fmod(1., NAN))) + self.assertTrue(math.isnan(math.fmod(NAN, NAN))) self.assertRaises(ValueError, math.fmod, 1., 0.) self.assertRaises(ValueError, math.fmod, INF, 1.) self.assertRaises(ValueError, math.fmod, NINF, 1.) @@ -362,7 +362,7 @@ self.assertEquals(math.frexp(INF)[0], INF) self.assertEquals(math.frexp(NINF)[0], NINF) - self.assert_(math.isnan(math.frexp(NAN)[0])) + self.assertTrue(math.isnan(math.frexp(NAN)[0])) @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"), "test requires IEEE 754 doubles") @@ -464,8 +464,8 @@ self.assertEqual(math.hypot(INF, NAN), INF) self.assertEqual(math.hypot(NAN, NINF), INF) self.assertEqual(math.hypot(NINF, NAN), INF) - self.assert_(math.isnan(math.hypot(1.0, NAN))) - self.assert_(math.isnan(math.hypot(NAN, -2.0))) + self.assertTrue(math.isnan(math.hypot(1.0, NAN))) + self.assertTrue(math.isnan(math.hypot(NAN, -2.0))) def testLdexp(self): self.assertRaises(TypeError, math.ldexp) @@ -479,7 +479,7 @@ self.assertEquals(math.ldexp(-1., -1000000), -0.) self.assertEquals(math.ldexp(INF, 30), INF) self.assertEquals(math.ldexp(NINF, -213), NINF) - self.assert_(math.isnan(math.ldexp(NAN, 0))) + self.assertTrue(math.isnan(math.ldexp(NAN, 0))) # large second argument for n in [10**5, 10**10, 10**20, 10**40]: @@ -489,7 +489,7 @@ self.assertEquals(math.ldexp(-1., -n), -0.) self.assertEquals(math.ldexp(0., -n), 0.) self.assertEquals(math.ldexp(-0., -n), -0.) - self.assert_(math.isnan(math.ldexp(NAN, -n))) + self.assertTrue(math.isnan(math.ldexp(NAN, -n))) self.assertRaises(OverflowError, math.ldexp, 1., n) self.assertRaises(OverflowError, math.ldexp, -1., n) @@ -497,7 +497,7 @@ self.assertEquals(math.ldexp(-0., n), -0.) self.assertEquals(math.ldexp(INF, n), INF) self.assertEquals(math.ldexp(NINF, n), NINF) - self.assert_(math.isnan(math.ldexp(NAN, n))) + self.assertTrue(math.isnan(math.ldexp(NAN, n))) def testLog(self): self.assertRaises(TypeError, math.log) @@ -509,7 +509,7 @@ self.ftest('log(10**40, 10**20)', math.log(10**40, 10**20), 2) self.assertEquals(math.log(INF), INF) self.assertRaises(ValueError, math.log, NINF) - self.assert_(math.isnan(math.log(NAN))) + self.assertTrue(math.isnan(math.log(NAN))) def testLog1p(self): self.assertRaises(TypeError, math.log1p) @@ -519,7 +519,7 @@ self.ftest('log1p(1)', math.log1p(1), math.log(2)) self.assertEquals(math.log1p(INF), INF) self.assertRaises(ValueError, math.log1p, NINF) - self.assert_(math.isnan(math.log1p(NAN))) + self.assertTrue(math.isnan(math.log1p(NAN))) n= 2**90 self.assertAlmostEquals(math.log1p(n), 62.383246250395075) self.assertAlmostEquals(math.log1p(n), math.log1p(float(n))) @@ -531,7 +531,7 @@ self.ftest('log10(10)', math.log10(10), 1) self.assertEquals(math.log(INF), INF) self.assertRaises(ValueError, math.log10, NINF) - self.assert_(math.isnan(math.log10(NAN))) + self.assertTrue(math.isnan(math.log10(NAN))) def testModf(self): self.assertRaises(TypeError, math.modf) @@ -549,8 +549,8 @@ self.assertEquals(math.modf(NINF), (-0.0, NINF)) modf_nan = math.modf(NAN) - self.assert_(math.isnan(modf_nan[0])) - self.assert_(math.isnan(modf_nan[1])) + self.assertTrue(math.isnan(modf_nan[0])) + self.assertTrue(math.isnan(modf_nan[1])) def testPow(self): self.assertRaises(TypeError, math.pow) @@ -562,9 +562,9 @@ self.assertEqual(math.pow(NINF, 1), NINF) self.assertEqual((math.pow(1, INF)), 1.) self.assertEqual((math.pow(1, NINF)), 1.) - self.assert_(math.isnan(math.pow(NAN, 1))) - self.assert_(math.isnan(math.pow(2, NAN))) - self.assert_(math.isnan(math.pow(0, NAN))) + self.assertTrue(math.isnan(math.pow(NAN, 1))) + self.assertTrue(math.isnan(math.pow(2, NAN))) + self.assertTrue(math.isnan(math.pow(0, NAN))) self.assertEqual(math.pow(1, NAN), 1) # pow(0., x) @@ -578,7 +578,7 @@ self.assertRaises(ValueError, math.pow, 0., -2.3) self.assertRaises(ValueError, math.pow, 0., -3.) self.assertRaises(ValueError, math.pow, 0., NINF) - self.assert_(math.isnan(math.pow(0., NAN))) + self.assertTrue(math.isnan(math.pow(0., NAN))) # pow(INF, x) self.assertEqual(math.pow(INF, INF), INF) @@ -591,7 +591,7 @@ self.assertEqual(math.pow(INF, -2.3), 0.) self.assertEqual(math.pow(INF, -3.), 0.) self.assertEqual(math.pow(INF, NINF), 0.) - self.assert_(math.isnan(math.pow(INF, NAN))) + self.assertTrue(math.isnan(math.pow(INF, NAN))) # pow(-0., x) self.assertEqual(math.pow(-0., INF), 0.) @@ -604,7 +604,7 @@ self.assertRaises(ValueError, math.pow, -0., -2.3) self.assertRaises(ValueError, math.pow, -0., -3.) self.assertRaises(ValueError, math.pow, -0., NINF) - self.assert_(math.isnan(math.pow(-0., NAN))) + self.assertTrue(math.isnan(math.pow(-0., NAN))) # pow(NINF, x) self.assertEqual(math.pow(NINF, INF), INF) @@ -617,7 +617,7 @@ self.assertEqual(math.pow(NINF, -2.3), 0.) self.assertEqual(math.pow(NINF, -3.), -0.) self.assertEqual(math.pow(NINF, NINF), 0.) - self.assert_(math.isnan(math.pow(NINF, NAN))) + self.assertTrue(math.isnan(math.pow(NINF, NAN))) # pow(-1, x) self.assertEqual(math.pow(-1., INF), 1.) @@ -630,7 +630,7 @@ self.assertRaises(ValueError, math.pow, -1., -2.3) self.assertEqual(math.pow(-1., -3.), -1.) self.assertEqual(math.pow(-1., NINF), 1.) - self.assert_(math.isnan(math.pow(-1., NAN))) + self.assertTrue(math.isnan(math.pow(-1., NAN))) # pow(1, x) self.assertEqual(math.pow(1., INF), 1.) @@ -713,12 +713,12 @@ self.ftest('sin(pi/2)', math.sin(math.pi/2), 1) self.ftest('sin(-pi/2)', math.sin(-math.pi/2), -1) try: - self.assert_(math.isnan(math.sin(INF))) - self.assert_(math.isnan(math.sin(NINF))) + self.assertTrue(math.isnan(math.sin(INF))) + self.assertTrue(math.isnan(math.sin(NINF))) except ValueError: self.assertRaises(ValueError, math.sin, INF) self.assertRaises(ValueError, math.sin, NINF) - self.assert_(math.isnan(math.sin(NAN))) + self.assertTrue(math.isnan(math.sin(NAN))) def testSinh(self): self.assertRaises(TypeError, math.sinh) @@ -727,7 +727,7 @@ self.ftest('sinh(1)+sinh(-1)', math.sinh(1)+math.sinh(-1), 0) self.assertEquals(math.sinh(INF), INF) self.assertEquals(math.sinh(NINF), NINF) - self.assert_(math.isnan(math.sinh(NAN))) + self.assertTrue(math.isnan(math.sinh(NAN))) def testSqrt(self): self.assertRaises(TypeError, math.sqrt) @@ -736,7 +736,7 @@ self.ftest('sqrt(4)', math.sqrt(4), 2) self.assertEquals(math.sqrt(INF), INF) self.assertRaises(ValueError, math.sqrt, NINF) - self.assert_(math.isnan(math.sqrt(NAN))) + self.assertTrue(math.isnan(math.sqrt(NAN))) def testTan(self): self.assertRaises(TypeError, math.tan) @@ -744,12 +744,12 @@ self.ftest('tan(pi/4)', math.tan(math.pi/4), 1) self.ftest('tan(-pi/4)', math.tan(-math.pi/4), -1) try: - self.assert_(math.isnan(math.tan(INF))) - self.assert_(math.isnan(math.tan(NINF))) + self.assertTrue(math.isnan(math.tan(INF))) + self.assertTrue(math.isnan(math.tan(NINF))) except: self.assertRaises(ValueError, math.tan, INF) self.assertRaises(ValueError, math.tan, NINF) - self.assert_(math.isnan(math.tan(NAN))) + self.assertTrue(math.isnan(math.tan(NAN))) def testTanh(self): self.assertRaises(TypeError, math.tanh) @@ -757,7 +757,7 @@ self.ftest('tanh(1)+tanh(-1)', math.tanh(1)+math.tanh(-1), 0) self.ftest('tanh(inf)', math.tanh(INF), 1) self.ftest('tanh(-inf)', math.tanh(NINF), -1) - self.assert_(math.isnan(math.tanh(NAN))) + self.assertTrue(math.isnan(math.tanh(NAN))) # check that tanh(-0.) == -0. on IEEE 754 systems if float.__getformat__("double").startswith("IEEE"): self.assertEqual(math.tanh(-0.), -0.) @@ -804,20 +804,20 @@ self.assertEqual(math.copysign(4., -0.), -4.0) def testIsnan(self): - self.assert_(math.isnan(float("nan"))) - self.assert_(math.isnan(float("inf")* 0.)) - self.failIf(math.isnan(float("inf"))) - self.failIf(math.isnan(0.)) - self.failIf(math.isnan(1.)) + self.assertTrue(math.isnan(float("nan"))) + self.assertTrue(math.isnan(float("inf")* 0.)) + self.assertFalse(math.isnan(float("inf"))) + self.assertFalse(math.isnan(0.)) + self.assertFalse(math.isnan(1.)) def testIsinf(self): - self.assert_(math.isinf(float("inf"))) - self.assert_(math.isinf(float("-inf"))) - self.assert_(math.isinf(1E400)) - self.assert_(math.isinf(-1E400)) - self.failIf(math.isinf(float("nan"))) - self.failIf(math.isinf(0.)) - self.failIf(math.isinf(1.)) + self.assertTrue(math.isinf(float("inf"))) + self.assertTrue(math.isinf(float("-inf"))) + self.assertTrue(math.isinf(1E400)) + self.assertTrue(math.isinf(-1E400)) + self.assertFalse(math.isinf(float("nan"))) + self.assertFalse(math.isinf(0.)) + self.assertFalse(math.isinf(1.)) # RED_FLAG 16-Oct-2000 Tim # While 2.0 is more consistent about exceptions than previous releases, it Modified: python/branches/py3k/Lib/test/test_memoryio.py ============================================================================== --- python/branches/py3k/Lib/test/test_memoryio.py (original) +++ python/branches/py3k/Lib/test/test_memoryio.py Wed Jul 1 01:06:06 2009 @@ -222,8 +222,8 @@ memio = self.ioclass(buf * 10) self.assertEqual(iter(memio), memio) - self.failUnless(hasattr(memio, '__iter__')) - self.failUnless(hasattr(memio, '__next__')) + self.assertTrue(hasattr(memio, '__iter__')) + self.assertTrue(hasattr(memio, '__next__')) i = 0 for line in memio: self.assertEqual(line, buf) Modified: python/branches/py3k/Lib/test/test_memoryview.py ============================================================================== --- python/branches/py3k/Lib/test/test_memoryview.py (original) +++ python/branches/py3k/Lib/test/test_memoryview.py Wed Jul 1 01:06:06 2009 @@ -28,7 +28,7 @@ oldrefcount = sys.getrefcount(b) m = self._view(b) self.assertEquals(m[0], item(b"a")) - self.assert_(isinstance(m[0], bytes), type(m[0])) + self.assertTrue(isinstance(m[0], bytes), type(m[0])) self.assertEquals(m[5], item(b"f")) self.assertEquals(m[-1], item(b"f")) self.assertEquals(m[-6], item(b"a")) @@ -119,7 +119,7 @@ expected = b"".join( self.getitem_type(bytes([c])) for c in b"abcdef") self.assertEquals(b, expected) - self.assert_(isinstance(b, bytes), type(b)) + self.assertTrue(isinstance(b, bytes), type(b)) def test_tolist(self): for tp in self._types: @@ -214,7 +214,7 @@ b = m = o = None # The cycle must be broken gc.collect() - self.assert_(wr() is None, wr()) + self.assertTrue(wr() is None, wr()) # Variations on source objects for the buffer: bytes-like objects, then arrays @@ -291,8 +291,8 @@ def test_constructor(self): for tp in self._types: ob = tp(self._source) - self.assert_(memoryview(ob)) - self.assert_(memoryview(object=ob)) + self.assertTrue(memoryview(ob)) + self.assertTrue(memoryview(object=ob)) self.assertRaises(TypeError, memoryview) self.assertRaises(TypeError, memoryview, ob, ob) self.assertRaises(TypeError, memoryview, argument=ob) Modified: python/branches/py3k/Lib/test/test_mimetypes.py ============================================================================== --- python/branches/py3k/Lib/test/test_mimetypes.py (original) +++ python/branches/py3k/Lib/test/test_mimetypes.py Wed Jul 1 01:06:06 2009 @@ -47,7 +47,7 @@ def test_guess_all_types(self): eq = self.assertEqual - unless = self.failUnless + unless = self.assertTrue # First try strict. Use a set here for testing the results because if # test_urllib2 is run before test_mimetypes, global state is modified # such that the 'all' set will have more items in it. Modified: python/branches/py3k/Lib/test/test_minidom.py ============================================================================== --- python/branches/py3k/Lib/test/test_minidom.py (original) +++ python/branches/py3k/Lib/test/test_minidom.py Wed Jul 1 01:06:06 2009 @@ -733,7 +733,7 @@ def check_clone_attribute(self, deep, testName): doc = parseString("") attr = doc.documentElement.getAttributeNode("attr") - self.failIfEqual(attr, None) + self.assertNotEqual(attr, None) clone = attr.cloneNode(deep) self.confirm(not clone.isSameNode(attr)) self.confirm(not attr.isSameNode(clone)) Modified: python/branches/py3k/Lib/test/test_mmap.py ============================================================================== --- python/branches/py3k/Lib/test/test_mmap.py (original) +++ python/branches/py3k/Lib/test/test_mmap.py Wed Jul 1 01:06:06 2009 @@ -501,8 +501,8 @@ f.close() def test_error(self): - self.assert_(issubclass(mmap.error, EnvironmentError)) - self.assert_("mmap.error" in str(mmap.error)) + self.assertTrue(issubclass(mmap.error, EnvironmentError)) + self.assertTrue("mmap.error" in str(mmap.error)) def test_io_methods(self): data = b"0123456789" Modified: python/branches/py3k/Lib/test/test_module.py ============================================================================== --- python/branches/py3k/Lib/test/test_module.py (original) +++ python/branches/py3k/Lib/test/test_module.py Wed Jul 1 01:06:06 2009 @@ -10,7 +10,7 @@ # An uninitialized module has no __dict__ or __name__, # and __doc__ is None foo = ModuleType.__new__(ModuleType) - self.failUnless(foo.__dict__ is None) + self.assertTrue(foo.__dict__ is None) try: s = foo.__name__ self.fail("__name__ = %s" % repr(s)) @@ -52,7 +52,7 @@ self.assertEqual(foo.bar, 42) self.assertEqual(foo.__dict__, {"__name__": "foo", "__doc__": "foodoc", "bar": 42}) - self.failUnless(foo.__dict__ is d) + self.assertTrue(foo.__dict__ is d) def test_main(): run_unittest(ModuleTests) Modified: python/branches/py3k/Lib/test/test_modulefinder.py ============================================================================== --- python/branches/py3k/Lib/test/test_modulefinder.py (original) +++ python/branches/py3k/Lib/test/test_modulefinder.py Wed Jul 1 01:06:06 2009 @@ -233,12 +233,12 @@ more = list(found - modules) less = list(modules - found) # check if we found what we expected, not more, not less - self.failUnlessEqual((more, less), ([], [])) + self.assertEqual((more, less), ([], [])) # check for missing and maybe missing modules bad, maybe = mf.any_missing_maybe() - self.failUnlessEqual(bad, missing) - self.failUnlessEqual(maybe, maybe_missing) + self.assertEqual(bad, missing) + self.assertEqual(maybe, maybe_missing) finally: distutils.dir_util.remove_tree(TEST_DIR) Modified: python/branches/py3k/Lib/test/test_multibytecodec.py ============================================================================== --- python/branches/py3k/Lib/test/test_multibytecodec.py (original) +++ python/branches/py3k/Lib/test/test_multibytecodec.py Wed Jul 1 01:06:06 2009 @@ -242,10 +242,10 @@ self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni) def test_iso2022_jp_g0(self): - self.failIf(b'\x0e' in '\N{SOFT HYPHEN}'.encode('iso-2022-jp-2')) + self.assertFalse(b'\x0e' in '\N{SOFT HYPHEN}'.encode('iso-2022-jp-2')) for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'): e = '\u3406'.encode(encoding) - self.failIf(any(x > 0x80 for x in e)) + self.assertFalse(any(x > 0x80 for x in e)) def test_bug1572832(self): if sys.maxunicode >= 0x10000: Modified: python/branches/py3k/Lib/test/test_multibytecodec_support.py ============================================================================== --- python/branches/py3k/Lib/test/test_multibytecodec_support.py (original) +++ python/branches/py3k/Lib/test/test_multibytecodec_support.py Wed Jul 1 01:06:06 2009 @@ -53,9 +53,9 @@ if expected: result = func(source, scheme)[0] if func is self.decode: - self.assert_(type(result) is str, type(result)) + self.assertTrue(type(result) is str, type(result)) else: - self.assert_(type(result) is bytes, type(result)) + self.assertTrue(type(result) is bytes, type(result)) self.assertEqual(result, expected) else: self.assertRaises(UnicodeError, func, source, scheme) Modified: python/branches/py3k/Lib/test/test_netrc.py ============================================================================== --- python/branches/py3k/Lib/test/test_netrc.py (original) +++ python/branches/py3k/Lib/test/test_netrc.py Wed Jul 1 01:06:06 2009 @@ -34,11 +34,11 @@ def test_case_1(self): nrc = netrc.netrc(temp_filename) - self.assert_(nrc.macros == {'macro1':['line1\n', 'line2\n'], + self.assertTrue(nrc.macros == {'macro1':['line1\n', 'line2\n'], 'macro2':['line3\n', 'line4\n']} ) - self.assert_(nrc.hosts['foo'] == ('log1', 'acct1', 'pass1')) - self.assert_(nrc.hosts['default'] == ('log2', None, 'pass2')) + self.assertTrue(nrc.hosts['foo'] == ('log1', 'acct1', 'pass1')) + self.assertTrue(nrc.hosts['default'] == ('log2', None, 'pass2')) def test_main(): support.run_unittest(NetrcTestCase) Modified: python/branches/py3k/Lib/test/test_normalization.py ============================================================================== --- python/branches/py3k/Lib/test/test_normalization.py (original) +++ python/branches/py3k/Lib/test/test_normalization.py Wed Jul 1 01:06:06 2009 @@ -67,14 +67,14 @@ continue # Perform tests - self.failUnless(c2 == NFC(c1) == NFC(c2) == NFC(c3), line) - self.failUnless(c4 == NFC(c4) == NFC(c5), line) - self.failUnless(c3 == NFD(c1) == NFD(c2) == NFD(c3), line) - self.failUnless(c5 == NFD(c4) == NFD(c5), line) - self.failUnless(c4 == NFKC(c1) == NFKC(c2) == \ + self.assertTrue(c2 == NFC(c1) == NFC(c2) == NFC(c3), line) + self.assertTrue(c4 == NFC(c4) == NFC(c5), line) + self.assertTrue(c3 == NFD(c1) == NFD(c2) == NFD(c3), line) + self.assertTrue(c5 == NFD(c4) == NFD(c5), line) + self.assertTrue(c4 == NFKC(c1) == NFKC(c2) == \ NFKC(c3) == NFKC(c4) == NFKC(c5), line) - self.failUnless(c5 == NFKD(c1) == NFKD(c2) == \ + self.assertTrue(c5 == NFKD(c1) == NFKD(c2) == \ NFKD(c3) == NFKD(c4) == NFKD(c5), line) @@ -87,7 +87,7 @@ X = chr(c) if X in part1_data: continue - self.failUnless(X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X), c) + self.assertTrue(X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X), c) def test_bug_834676(self): # Check for bug 834676 Modified: python/branches/py3k/Lib/test/test_opcodes.py ============================================================================== --- python/branches/py3k/Lib/test/test_opcodes.py (original) +++ python/branches/py3k/Lib/test/test_opcodes.py Wed Jul 1 01:06:06 2009 @@ -60,7 +60,7 @@ try: raise DClass(a) except DClass as v: - self.assert_(isinstance(v, DClass)) + self.assertTrue(isinstance(v, DClass)) else: self.fail("no exception") Modified: python/branches/py3k/Lib/test/test_operator.py ============================================================================== --- python/branches/py3k/Lib/test/test_operator.py (original) +++ python/branches/py3k/Lib/test/test_operator.py Wed Jul 1 01:06:06 2009 @@ -34,237 +34,237 @@ class OperatorTestCase(unittest.TestCase): def test_lt(self): - self.failUnlessRaises(TypeError, operator.lt) - self.failUnlessRaises(TypeError, operator.lt, 1j, 2j) - self.failIf(operator.lt(1, 0)) - self.failIf(operator.lt(1, 0.0)) - self.failIf(operator.lt(1, 1)) - self.failIf(operator.lt(1, 1.0)) - self.failUnless(operator.lt(1, 2)) - self.failUnless(operator.lt(1, 2.0)) + self.assertRaises(TypeError, operator.lt) + self.assertRaises(TypeError, operator.lt, 1j, 2j) + self.assertFalse(operator.lt(1, 0)) + self.assertFalse(operator.lt(1, 0.0)) + self.assertFalse(operator.lt(1, 1)) + self.assertFalse(operator.lt(1, 1.0)) + self.assertTrue(operator.lt(1, 2)) + self.assertTrue(operator.lt(1, 2.0)) def test_le(self): - self.failUnlessRaises(TypeError, operator.le) - self.failUnlessRaises(TypeError, operator.le, 1j, 2j) - self.failIf(operator.le(1, 0)) - self.failIf(operator.le(1, 0.0)) - self.failUnless(operator.le(1, 1)) - self.failUnless(operator.le(1, 1.0)) - self.failUnless(operator.le(1, 2)) - self.failUnless(operator.le(1, 2.0)) + self.assertRaises(TypeError, operator.le) + self.assertRaises(TypeError, operator.le, 1j, 2j) + self.assertFalse(operator.le(1, 0)) + self.assertFalse(operator.le(1, 0.0)) + self.assertTrue(operator.le(1, 1)) + self.assertTrue(operator.le(1, 1.0)) + self.assertTrue(operator.le(1, 2)) + self.assertTrue(operator.le(1, 2.0)) def test_eq(self): class C(object): def __eq__(self, other): raise SyntaxError - self.failUnlessRaises(TypeError, operator.eq) - self.failUnlessRaises(SyntaxError, operator.eq, C(), C()) - self.failIf(operator.eq(1, 0)) - self.failIf(operator.eq(1, 0.0)) - self.failUnless(operator.eq(1, 1)) - self.failUnless(operator.eq(1, 1.0)) - self.failIf(operator.eq(1, 2)) - self.failIf(operator.eq(1, 2.0)) + self.assertRaises(TypeError, operator.eq) + self.assertRaises(SyntaxError, operator.eq, C(), C()) + self.assertFalse(operator.eq(1, 0)) + self.assertFalse(operator.eq(1, 0.0)) + self.assertTrue(operator.eq(1, 1)) + self.assertTrue(operator.eq(1, 1.0)) + self.assertFalse(operator.eq(1, 2)) + self.assertFalse(operator.eq(1, 2.0)) def test_ne(self): class C(object): def __ne__(self, other): raise SyntaxError - self.failUnlessRaises(TypeError, operator.ne) - self.failUnlessRaises(SyntaxError, operator.ne, C(), C()) - self.failUnless(operator.ne(1, 0)) - self.failUnless(operator.ne(1, 0.0)) - self.failIf(operator.ne(1, 1)) - self.failIf(operator.ne(1, 1.0)) - self.failUnless(operator.ne(1, 2)) - self.failUnless(operator.ne(1, 2.0)) + self.assertRaises(TypeError, operator.ne) + self.assertRaises(SyntaxError, operator.ne, C(), C()) + self.assertTrue(operator.ne(1, 0)) + self.assertTrue(operator.ne(1, 0.0)) + self.assertFalse(operator.ne(1, 1)) + self.assertFalse(operator.ne(1, 1.0)) + self.assertTrue(operator.ne(1, 2)) + self.assertTrue(operator.ne(1, 2.0)) def test_ge(self): - self.failUnlessRaises(TypeError, operator.ge) - self.failUnlessRaises(TypeError, operator.ge, 1j, 2j) - self.failUnless(operator.ge(1, 0)) - self.failUnless(operator.ge(1, 0.0)) - self.failUnless(operator.ge(1, 1)) - self.failUnless(operator.ge(1, 1.0)) - self.failIf(operator.ge(1, 2)) - self.failIf(operator.ge(1, 2.0)) + self.assertRaises(TypeError, operator.ge) + self.assertRaises(TypeError, operator.ge, 1j, 2j) + self.assertTrue(operator.ge(1, 0)) + self.assertTrue(operator.ge(1, 0.0)) + self.assertTrue(operator.ge(1, 1)) + self.assertTrue(operator.ge(1, 1.0)) + self.assertFalse(operator.ge(1, 2)) + self.assertFalse(operator.ge(1, 2.0)) def test_gt(self): - self.failUnlessRaises(TypeError, operator.gt) - self.failUnlessRaises(TypeError, operator.gt, 1j, 2j) - self.failUnless(operator.gt(1, 0)) - self.failUnless(operator.gt(1, 0.0)) - self.failIf(operator.gt(1, 1)) - self.failIf(operator.gt(1, 1.0)) - self.failIf(operator.gt(1, 2)) - self.failIf(operator.gt(1, 2.0)) + self.assertRaises(TypeError, operator.gt) + self.assertRaises(TypeError, operator.gt, 1j, 2j) + self.assertTrue(operator.gt(1, 0)) + self.assertTrue(operator.gt(1, 0.0)) + self.assertFalse(operator.gt(1, 1)) + self.assertFalse(operator.gt(1, 1.0)) + self.assertFalse(operator.gt(1, 2)) + self.assertFalse(operator.gt(1, 2.0)) def test_abs(self): - self.failUnlessRaises(TypeError, operator.abs) - self.failUnlessRaises(TypeError, operator.abs, None) + self.assertRaises(TypeError, operator.abs) + self.assertRaises(TypeError, operator.abs, None) self.assertEqual(operator.abs(-1), 1) self.assertEqual(operator.abs(1), 1) def test_add(self): - self.failUnlessRaises(TypeError, operator.add) - self.failUnlessRaises(TypeError, operator.add, None, None) - self.failUnless(operator.add(3, 4) == 7) + self.assertRaises(TypeError, operator.add) + self.assertRaises(TypeError, operator.add, None, None) + self.assertTrue(operator.add(3, 4) == 7) def test_bitwise_and(self): - self.failUnlessRaises(TypeError, operator.and_) - self.failUnlessRaises(TypeError, operator.and_, None, None) - self.failUnless(operator.and_(0xf, 0xa) == 0xa) + self.assertRaises(TypeError, operator.and_) + self.assertRaises(TypeError, operator.and_, None, None) + self.assertTrue(operator.and_(0xf, 0xa) == 0xa) def test_concat(self): - self.failUnlessRaises(TypeError, operator.concat) - self.failUnlessRaises(TypeError, operator.concat, None, None) - self.failUnless(operator.concat('py', 'thon') == 'python') - self.failUnless(operator.concat([1, 2], [3, 4]) == [1, 2, 3, 4]) - self.failUnless(operator.concat(Seq1([5, 6]), Seq1([7])) == [5, 6, 7]) - self.failUnless(operator.concat(Seq2([5, 6]), Seq2([7])) == [5, 6, 7]) - self.failUnlessRaises(TypeError, operator.concat, 13, 29) + self.assertRaises(TypeError, operator.concat) + self.assertRaises(TypeError, operator.concat, None, None) + self.assertTrue(operator.concat('py', 'thon') == 'python') + self.assertTrue(operator.concat([1, 2], [3, 4]) == [1, 2, 3, 4]) + self.assertTrue(operator.concat(Seq1([5, 6]), Seq1([7])) == [5, 6, 7]) + self.assertTrue(operator.concat(Seq2([5, 6]), Seq2([7])) == [5, 6, 7]) + self.assertRaises(TypeError, operator.concat, 13, 29) def test_countOf(self): - self.failUnlessRaises(TypeError, operator.countOf) - self.failUnlessRaises(TypeError, operator.countOf, None, None) - self.failUnless(operator.countOf([1, 2, 1, 3, 1, 4], 3) == 1) - self.failUnless(operator.countOf([1, 2, 1, 3, 1, 4], 5) == 0) + self.assertRaises(TypeError, operator.countOf) + self.assertRaises(TypeError, operator.countOf, None, None) + self.assertTrue(operator.countOf([1, 2, 1, 3, 1, 4], 3) == 1) + self.assertTrue(operator.countOf([1, 2, 1, 3, 1, 4], 5) == 0) def test_delitem(self): a = [4, 3, 2, 1] - self.failUnlessRaises(TypeError, operator.delitem, a) - self.failUnlessRaises(TypeError, operator.delitem, a, None) - self.failUnless(operator.delitem(a, 1) is None) - self.assert_(a == [4, 2, 1]) + self.assertRaises(TypeError, operator.delitem, a) + self.assertRaises(TypeError, operator.delitem, a, None) + self.assertTrue(operator.delitem(a, 1) is None) + self.assertTrue(a == [4, 2, 1]) def test_floordiv(self): - self.failUnlessRaises(TypeError, operator.floordiv, 5) - self.failUnlessRaises(TypeError, operator.floordiv, None, None) - self.failUnless(operator.floordiv(5, 2) == 2) + self.assertRaises(TypeError, operator.floordiv, 5) + self.assertRaises(TypeError, operator.floordiv, None, None) + self.assertTrue(operator.floordiv(5, 2) == 2) def test_truediv(self): - self.failUnlessRaises(TypeError, operator.truediv, 5) - self.failUnlessRaises(TypeError, operator.truediv, None, None) - self.failUnless(operator.truediv(5, 2) == 2.5) + self.assertRaises(TypeError, operator.truediv, 5) + self.assertRaises(TypeError, operator.truediv, None, None) + self.assertTrue(operator.truediv(5, 2) == 2.5) def test_getitem(self): a = range(10) - self.failUnlessRaises(TypeError, operator.getitem) - self.failUnlessRaises(TypeError, operator.getitem, a, None) - self.failUnless(operator.getitem(a, 2) == 2) + self.assertRaises(TypeError, operator.getitem) + self.assertRaises(TypeError, operator.getitem, a, None) + self.assertTrue(operator.getitem(a, 2) == 2) def test_indexOf(self): - self.failUnlessRaises(TypeError, operator.indexOf) - self.failUnlessRaises(TypeError, operator.indexOf, None, None) - self.failUnless(operator.indexOf([4, 3, 2, 1], 3) == 1) + self.assertRaises(TypeError, operator.indexOf) + self.assertRaises(TypeError, operator.indexOf, None, None) + self.assertTrue(operator.indexOf([4, 3, 2, 1], 3) == 1) self.assertRaises(ValueError, operator.indexOf, [4, 3, 2, 1], 0) def test_invert(self): - self.failUnlessRaises(TypeError, operator.invert) - self.failUnlessRaises(TypeError, operator.invert, None) + self.assertRaises(TypeError, operator.invert) + self.assertRaises(TypeError, operator.invert, None) self.assertEqual(operator.inv(4), -5) def test_lshift(self): - self.failUnlessRaises(TypeError, operator.lshift) - self.failUnlessRaises(TypeError, operator.lshift, None, 42) - self.failUnless(operator.lshift(5, 1) == 10) - self.failUnless(operator.lshift(5, 0) == 5) + self.assertRaises(TypeError, operator.lshift) + self.assertRaises(TypeError, operator.lshift, None, 42) + self.assertTrue(operator.lshift(5, 1) == 10) + self.assertTrue(operator.lshift(5, 0) == 5) self.assertRaises(ValueError, operator.lshift, 2, -1) def test_mod(self): - self.failUnlessRaises(TypeError, operator.mod) - self.failUnlessRaises(TypeError, operator.mod, None, 42) - self.failUnless(operator.mod(5, 2) == 1) + self.assertRaises(TypeError, operator.mod) + self.assertRaises(TypeError, operator.mod, None, 42) + self.assertTrue(operator.mod(5, 2) == 1) def test_mul(self): - self.failUnlessRaises(TypeError, operator.mul) - self.failUnlessRaises(TypeError, operator.mul, None, None) - self.failUnless(operator.mul(5, 2) == 10) + self.assertRaises(TypeError, operator.mul) + self.assertRaises(TypeError, operator.mul, None, None) + self.assertTrue(operator.mul(5, 2) == 10) def test_neg(self): - self.failUnlessRaises(TypeError, operator.neg) - self.failUnlessRaises(TypeError, operator.neg, None) + self.assertRaises(TypeError, operator.neg) + self.assertRaises(TypeError, operator.neg, None) self.assertEqual(operator.neg(5), -5) self.assertEqual(operator.neg(-5), 5) self.assertEqual(operator.neg(0), 0) self.assertEqual(operator.neg(-0), 0) def test_bitwise_or(self): - self.failUnlessRaises(TypeError, operator.or_) - self.failUnlessRaises(TypeError, operator.or_, None, None) - self.failUnless(operator.or_(0xa, 0x5) == 0xf) + self.assertRaises(TypeError, operator.or_) + self.assertRaises(TypeError, operator.or_, None, None) + self.assertTrue(operator.or_(0xa, 0x5) == 0xf) def test_pos(self): - self.failUnlessRaises(TypeError, operator.pos) - self.failUnlessRaises(TypeError, operator.pos, None) + self.assertRaises(TypeError, operator.pos) + self.assertRaises(TypeError, operator.pos, None) self.assertEqual(operator.pos(5), 5) self.assertEqual(operator.pos(-5), -5) self.assertEqual(operator.pos(0), 0) self.assertEqual(operator.pos(-0), 0) def test_pow(self): - self.failUnlessRaises(TypeError, operator.pow) - self.failUnlessRaises(TypeError, operator.pow, None, None) + self.assertRaises(TypeError, operator.pow) + self.assertRaises(TypeError, operator.pow, None, None) self.assertEqual(operator.pow(3,5), 3**5) self.assertEqual(operator.__pow__(3,5), 3**5) self.assertRaises(TypeError, operator.pow, 1) self.assertRaises(TypeError, operator.pow, 1, 2, 3) def test_rshift(self): - self.failUnlessRaises(TypeError, operator.rshift) - self.failUnlessRaises(TypeError, operator.rshift, None, 42) - self.failUnless(operator.rshift(5, 1) == 2) - self.failUnless(operator.rshift(5, 0) == 5) + self.assertRaises(TypeError, operator.rshift) + self.assertRaises(TypeError, operator.rshift, None, 42) + self.assertTrue(operator.rshift(5, 1) == 2) + self.assertTrue(operator.rshift(5, 0) == 5) self.assertRaises(ValueError, operator.rshift, 2, -1) def test_contains(self): - self.failUnlessRaises(TypeError, operator.contains) - self.failUnlessRaises(TypeError, operator.contains, None, None) - self.failUnless(operator.contains(range(4), 2)) - self.failIf(operator.contains(range(4), 5)) + self.assertRaises(TypeError, operator.contains) + self.assertRaises(TypeError, operator.contains, None, None) + self.assertTrue(operator.contains(range(4), 2)) + self.assertFalse(operator.contains(range(4), 5)) def test_setitem(self): a = list(range(3)) - self.failUnlessRaises(TypeError, operator.setitem, a) - self.failUnlessRaises(TypeError, operator.setitem, a, None, None) - self.failUnless(operator.setitem(a, 0, 2) is None) - self.assert_(a == [2, 1, 2]) + self.assertRaises(TypeError, operator.setitem, a) + self.assertRaises(TypeError, operator.setitem, a, None, None) + self.assertTrue(operator.setitem(a, 0, 2) is None) + self.assertTrue(a == [2, 1, 2]) self.assertRaises(IndexError, operator.setitem, a, 4, 2) def test_sub(self): - self.failUnlessRaises(TypeError, operator.sub) - self.failUnlessRaises(TypeError, operator.sub, None, None) - self.failUnless(operator.sub(5, 2) == 3) + self.assertRaises(TypeError, operator.sub) + self.assertRaises(TypeError, operator.sub, None, None) + self.assertTrue(operator.sub(5, 2) == 3) def test_truth(self): class C(object): def __bool__(self): raise SyntaxError - self.failUnlessRaises(TypeError, operator.truth) - self.failUnlessRaises(SyntaxError, operator.truth, C()) - self.failUnless(operator.truth(5)) - self.failUnless(operator.truth([0])) - self.failIf(operator.truth(0)) - self.failIf(operator.truth([])) + self.assertRaises(TypeError, operator.truth) + self.assertRaises(SyntaxError, operator.truth, C()) + self.assertTrue(operator.truth(5)) + self.assertTrue(operator.truth([0])) + self.assertFalse(operator.truth(0)) + self.assertFalse(operator.truth([])) def test_bitwise_xor(self): - self.failUnlessRaises(TypeError, operator.xor) - self.failUnlessRaises(TypeError, operator.xor, None, None) - self.failUnless(operator.xor(0xb, 0xc) == 0x7) + self.assertRaises(TypeError, operator.xor) + self.assertRaises(TypeError, operator.xor, None, None) + self.assertTrue(operator.xor(0xb, 0xc) == 0x7) def test_is(self): a = b = 'xyzpdq' c = a[:3] + b[3:] - self.failUnlessRaises(TypeError, operator.is_) - self.failUnless(operator.is_(a, b)) - self.failIf(operator.is_(a,c)) + self.assertRaises(TypeError, operator.is_) + self.assertTrue(operator.is_(a, b)) + self.assertFalse(operator.is_(a,c)) def test_is_not(self): a = b = 'xyzpdq' c = a[:3] + b[3:] - self.failUnlessRaises(TypeError, operator.is_not) - self.failIf(operator.is_not(a, b)) - self.failUnless(operator.is_not(a,c)) + self.assertRaises(TypeError, operator.is_not) + self.assertFalse(operator.is_not(a, b)) + self.assertTrue(operator.is_not(a,c)) def test_attrgetter(self): class A: @@ -290,7 +290,7 @@ class C(object): def __getattr__(self, name): raise SyntaxError - self.failUnlessRaises(SyntaxError, operator.attrgetter('foo'), C()) + self.assertRaises(SyntaxError, operator.attrgetter('foo'), C()) # recursive gets a = A() @@ -322,7 +322,7 @@ class C(object): def __getitem__(self, name): raise SyntaxError - self.failUnlessRaises(SyntaxError, operator.itemgetter(42), C()) + self.assertRaises(SyntaxError, operator.itemgetter(42), C()) f = operator.itemgetter('name') self.assertRaises(TypeError, f, a) Modified: python/branches/py3k/Lib/test/test_optparse.py ============================================================================== --- python/branches/py3k/Lib/test/test_optparse.py (original) +++ python/branches/py3k/Lib/test/test_optparse.py Wed Jul 1 01:06:06 2009 @@ -109,7 +109,7 @@ except expected_exception as err: actual_message = str(err) if isinstance(expected_message, retype): - self.assert_(expected_message.search(actual_message), + self.assertTrue(expected_message.search(actual_message), """\ expected exception message pattern: /%s/ @@ -165,7 +165,7 @@ sys.stdout = save_stdout except InterceptedError as err: - self.assert_( + self.assertTrue( isinstance(output, str), "expected output to be an ordinary string, not %r" % type(output)) @@ -338,7 +338,7 @@ def test_get_option(self): opt1 = self.parser.get_option("-v") - self.assert_(isinstance(opt1, Option)) + self.assertTrue(isinstance(opt1, Option)) self.assertEqual(opt1._short_opts, ["-v", "-n"]) self.assertEqual(opt1._long_opts, ["--verbose", "--noisy"]) self.assertEqual(opt1.action, "store_true") @@ -349,33 +349,33 @@ opt2 = self.parser.get_option("--verbose") opt3 = self.parser.get_option("-n") opt4 = self.parser.get_option("--noisy") - self.assert_(opt1 is opt2 is opt3 is opt4) + self.assertTrue(opt1 is opt2 is opt3 is opt4) def test_has_option(self): - self.assert_(self.parser.has_option("-v")) - self.assert_(self.parser.has_option("--verbose")) + self.assertTrue(self.parser.has_option("-v")) + self.assertTrue(self.parser.has_option("--verbose")) - def assert_removed(self): - self.assert_(self.parser.get_option("-v") is None) - self.assert_(self.parser.get_option("--verbose") is None) - self.assert_(self.parser.get_option("-n") is None) - self.assert_(self.parser.get_option("--noisy") is None) - - self.failIf(self.parser.has_option("-v")) - self.failIf(self.parser.has_option("--verbose")) - self.failIf(self.parser.has_option("-n")) - self.failIf(self.parser.has_option("--noisy")) + def assertTrueremoved(self): + self.assertTrue(self.parser.get_option("-v") is None) + self.assertTrue(self.parser.get_option("--verbose") is None) + self.assertTrue(self.parser.get_option("-n") is None) + self.assertTrue(self.parser.get_option("--noisy") is None) + + self.assertFalse(self.parser.has_option("-v")) + self.assertFalse(self.parser.has_option("--verbose")) + self.assertFalse(self.parser.has_option("-n")) + self.assertFalse(self.parser.has_option("--noisy")) - self.assert_(self.parser.has_option("-q")) - self.assert_(self.parser.has_option("--silent")) + self.assertTrue(self.parser.has_option("-q")) + self.assertTrue(self.parser.has_option("--silent")) def test_remove_short_opt(self): self.parser.remove_option("-n") - self.assert_removed() + self.assertTrueremoved() def test_remove_long_opt(self): self.parser.remove_option("--verbose") - self.assert_removed() + self.assertTrueremoved() def test_remove_nonexistent(self): self.assertRaises(self.parser.remove_option, ('foo',), None, @@ -779,14 +779,14 @@ {'verbose': 0}, []) if hasattr(__builtins__, 'False'): - self.failUnless(options.verbose is False) + self.assertTrue(options.verbose is False) def test_bool_true(self): (options, args) = self.assertParseOK(["-v"], {'verbose': 1}, []) if hasattr(__builtins__, 'True'): - self.failUnless(options.verbose is True) + self.assertTrue(options.verbose is True) def test_bool_flicker_on_and_off(self): self.assertParseOK(["-qvq", "-q", "-v"], @@ -992,7 +992,7 @@ description="Some more options") group.set_title("Bacon") group.add_option("--bacon", type="int") - self.assert_(self.parser.get_option_group("--bacon"), group) + self.assertTrue(self.parser.get_option_group("--bacon"), group) # -- Test extending and parser.parse_args() ---------------------------- @@ -1088,15 +1088,15 @@ if opt == "-x": self.assertEqual(option._short_opts, ["-x"]) self.assertEqual(option._long_opts, []) - self.assert_(parser_ is self.parser) - self.assert_(value is None) + self.assertTrue(parser_ is self.parser) + self.assertTrue(value is None) self.assertEqual(vars(parser_.values), {'filename': None}) parser_.values.x = 42 elif opt == "--file": self.assertEqual(option._short_opts, ["-f"]) self.assertEqual(option._long_opts, ["--file"]) - self.assert_(parser_ is self.parser) + self.assertTrue(parser_ is self.parser) self.assertEqual(value, "foo") self.assertEqual(vars(parser_.values), {'filename': None, 'x': 42}) @@ -1134,7 +1134,7 @@ def process_tuple(self, option, opt, value, parser_, len, type): self.assertEqual(len, 3) - self.assert_(type is int) + self.assertTrue(type is int) if opt == "-p": self.assertEqual(value, "1,2,3") @@ -1225,7 +1225,7 @@ option_list=options) def variable_args(self, option, opt, value, parser): - self.assert_(value is None) + self.assertTrue(value is None) done = 0 value = [] rargs = parser.rargs @@ -1281,7 +1281,7 @@ class TestConflict(ConflictBase): """Use the default conflict resolution for Optik 1.2: error.""" - def assert_conflict_error(self, func): + def assertTrueconflict_error(self, func): err = self.assertRaises( func, ("-v", "--version"), {'action' : "callback", 'callback' : self.show_version, @@ -1293,11 +1293,11 @@ self.assertEqual(err.option_id, "-v/--version") def test_conflict_error(self): - self.assert_conflict_error(self.parser.add_option) + self.assertTrueconflict_error(self.parser.add_option) def test_conflict_error_group(self): group = OptionGroup(self.parser, "Group 1") - self.assert_conflict_error(group.add_option) + self.assertTrueconflict_error(group.add_option) def test_no_such_conflict_handler(self): self.assertRaises( @@ -1317,8 +1317,8 @@ verbose_opt = self.parser.get_option("--verbose") version_opt = self.parser.get_option("--version") - self.assert_(v_opt is version_opt) - self.assert_(v_opt is not verbose_opt) + self.assertTrue(v_opt is version_opt) + self.assertTrue(v_opt is not verbose_opt) self.assertEqual(v_opt._long_opts, ["--version"]) self.assertEqual(version_opt._short_opts, ["-v"]) self.assertEqual(version_opt._long_opts, ["--version"]) Modified: python/branches/py3k/Lib/test/test_os.py ============================================================================== --- python/branches/py3k/Lib/test/test_os.py (original) +++ python/branches/py3k/Lib/test/test_os.py Wed Jul 1 01:06:06 2009 @@ -20,7 +20,7 @@ def test_access(self): f = os.open(support.TESTFN, os.O_CREAT|os.O_RDWR) os.close(f) - self.assert_(os.access(support.TESTFN, os.W_OK)) + self.assertTrue(os.access(support.TESTFN, os.W_OK)) def test_closerange(self): first = os.open(support.TESTFN, os.O_CREAT|os.O_RDWR) @@ -85,7 +85,7 @@ def check_tempfile(self, name): # make sure it doesn't already exist: - self.failIf(os.path.exists(name), + self.assertFalse(os.path.exists(name), "file already exists for temporary file") # make sure we can create the file open(name, "w") @@ -102,7 +102,7 @@ self.check_tempfile(name) name = os.tempnam(support.TESTFN, "pfx") - self.assert_(os.path.basename(name)[:3] == "pfx") + self.assertTrue(os.path.basename(name)[:3] == "pfx") self.check_tempfile(name) def test_tmpfile(self): @@ -151,7 +151,7 @@ fp.seek(0,0) s = fp.read() fp.close() - self.assert_(s == "foobar") + self.assertTrue(s == "foobar") def test_tmpnam(self): import sys @@ -176,7 +176,7 @@ # the root of the current drive. That's a terrible place to # put temp files, and, depending on privileges, the user # may not even be able to open a file in the root directory. - self.failIf(os.path.exists(name), + self.assertFalse(os.path.exists(name), "file already exists for temporary file") else: self.check_tempfile(name) @@ -228,7 +228,7 @@ def trunc(x): return x self.assertEquals(trunc(getattr(result, attr)), result[getattr(stat, name)]) - self.assert_(attr in members) + self.assertTrue(attr in members) try: result[200] @@ -520,7 +520,7 @@ os.makedirs(path) # Try paths with a '.' in them - self.failUnlessRaises(OSError, os.makedirs, os.curdir) + self.assertRaises(OSError, os.makedirs, os.curdir) path = os.path.join(base, 'dir1', 'dir2', 'dir3', 'dir4', 'dir5', os.curdir) os.makedirs(path) path = os.path.join(base, 'dir1', os.curdir, 'dir2', 'dir3', 'dir4', Modified: python/branches/py3k/Lib/test/test_ossaudiodev.py ============================================================================== --- python/branches/py3k/Lib/test/test_ossaudiodev.py (original) +++ python/branches/py3k/Lib/test/test_ossaudiodev.py Wed Jul 1 01:06:06 2009 @@ -58,7 +58,7 @@ dsp.fileno() # Make sure the read-only attributes work. - self.failIf(dsp.closed) + self.assertFalse(dsp.closed) self.assertEqual(dsp.name, "/dev/dsp") self.assertEqual(dsp.mode, "w", "bad dsp.mode: %r" % dsp.mode) @@ -84,7 +84,7 @@ elapsed_time = t2 - t1 percent_diff = (abs(elapsed_time - expected_time) / expected_time) * 100 - self.failUnless(percent_diff <= 10.0, + self.assertTrue(percent_diff <= 10.0, "elapsed time (%s) > 10%% off of expected time (%s)" % (elapsed_time, expected_time)) @@ -133,7 +133,7 @@ ]: (fmt, channels, rate) = config result = dsp.setparameters(fmt, channels, rate, False) - self.failIfEqual(result, config, + self.assertNotEqual(result, config, "unexpectedly got requested configuration") try: @@ -157,7 +157,7 @@ #self.set_bad_parameters(dsp) finally: dsp.close() - self.failUnless(dsp.closed) + self.assertTrue(dsp.closed) def test_main(): Modified: python/branches/py3k/Lib/test/test_parser.py ============================================================================== --- python/branches/py3k/Lib/test/test_parser.py (original) +++ python/branches/py3k/Lib/test/test_parser.py Wed Jul 1 01:06:06 2009 @@ -546,15 +546,15 @@ bottom = min(st1, st2, st3) top = max(st1, st2, st3) mid = sorted([st1, st2, st3])[1] - self.assert_(bottom < mid) - self.assert_(bottom < top) - self.assert_(mid < top) - self.assert_(bottom <= mid) - self.assert_(bottom <= top) - self.assert_(mid <= top) - self.assert_(bottom <= bottom) - self.assert_(mid <= mid) - self.assert_(top <= top) + self.assertTrue(bottom < mid) + self.assertTrue(bottom < top) + self.assertTrue(mid < top) + self.assertTrue(bottom <= mid) + self.assertTrue(bottom <= top) + self.assertTrue(mid <= top) + self.assertTrue(bottom <= bottom) + self.assertTrue(mid <= mid) + self.assertTrue(top <= top) # interaction with other types self.assertEquals(st1 == 1588.602459, False) self.assertEquals('spanish armada' != st2, True) Modified: python/branches/py3k/Lib/test/test_peepholer.py ============================================================================== --- python/branches/py3k/Lib/test/test_peepholer.py (original) +++ python/branches/py3k/Lib/test/test_peepholer.py Wed Jul 1 01:06:06 2009 @@ -25,9 +25,9 @@ del x asm = disassemble(unot) for elem in ('UNARY_NOT', 'POP_JUMP_IF_FALSE'): - self.assert_(elem not in asm) + self.assertTrue(elem not in asm) for elem in ('POP_JUMP_IF_TRUE',): - self.assert_(elem in asm) + self.assertTrue(elem in asm) def test_elim_inversion_of_is_or_in(self): for line, elem in ( @@ -37,7 +37,7 @@ ('not a not in b', '(in)',), ): asm = dis_single(line) - self.assert_(elem in asm) + self.assertTrue(elem in asm) def test_global_as_constant(self): # LOAD_GLOBAL None/True/False --> LOAD_CONST None/True/False @@ -54,14 +54,14 @@ for func, name in ((f, 'None'), (g, 'True'), (h, 'False')): asm = disassemble(func) for elem in ('LOAD_GLOBAL',): - self.assert_(elem not in asm) + self.assertTrue(elem not in asm) for elem in ('LOAD_CONST', '('+name+')'): - self.assert_(elem in asm) + self.assertTrue(elem in asm) def f(): 'Adding a docstring made this test fail in Py2.5.0' return None - self.assert_('LOAD_CONST' in disassemble(f)) - self.assert_('LOAD_GLOBAL' not in disassemble(f)) + self.assertTrue('LOAD_CONST' in disassemble(f)) + self.assertTrue('LOAD_GLOBAL' not in disassemble(f)) def test_while_one(self): # Skip over: LOAD_CONST trueconst POP_JUMP_IF_FALSE xx @@ -71,9 +71,9 @@ return list asm = disassemble(f) for elem in ('LOAD_CONST', 'POP_JUMP_IF_FALSE'): - self.assert_(elem not in asm) + self.assertTrue(elem not in asm) for elem in ('JUMP_ABSOLUTE',): - self.assert_(elem in asm) + self.assertTrue(elem in asm) def test_pack_unpack(self): for line, elem in ( @@ -82,9 +82,9 @@ ('a, b, c = a, b, c', 'ROT_THREE',), ): asm = dis_single(line) - self.assert_(elem in asm) - self.assert_('BUILD_TUPLE' not in asm) - self.assert_('UNPACK_TUPLE' not in asm) + self.assertTrue(elem in asm) + self.assertTrue('BUILD_TUPLE' not in asm) + self.assertTrue('UNPACK_TUPLE' not in asm) def test_folding_of_tuples_of_constants(self): for line, elem in ( @@ -95,8 +95,8 @@ ('((1, 2), 3, 4)', '(((1, 2), 3, 4))'), ): asm = dis_single(line) - self.assert_(elem in asm) - self.assert_('BUILD_TUPLE' not in asm) + self.assertTrue(elem in asm) + self.assertTrue('BUILD_TUPLE' not in asm) # Bug 1053819: Tuple of constants misidentified when presented with: # . . . opcode_with_arg 100 unary_opcode BUILD_TUPLE 1 . . . @@ -134,17 +134,17 @@ ('a = 13 | 7', '(15)'), # binary or ): asm = dis_single(line) - self.assert_(elem in asm, asm) - self.assert_('BINARY_' not in asm) + self.assertTrue(elem in asm, asm) + self.assertTrue('BINARY_' not in asm) # Verify that unfoldables are skipped asm = dis_single('a=2+"b"') - self.assert_('(2)' in asm) - self.assert_("('b')" in asm) + self.assertTrue('(2)' in asm) + self.assertTrue("('b')" in asm) # Verify that large sequences do not result from folding asm = dis_single('a="x"*1000') - self.assert_('(1000)' in asm) + self.assertTrue('(1000)' in asm) def test_folding_of_unaryops_on_constants(self): for line, elem in ( @@ -152,8 +152,8 @@ ('~-2', '(1)'), # unary invert ): asm = dis_single(line) - self.assert_(elem in asm, asm) - self.assert_('UNARY_' not in asm) + self.assertTrue(elem in asm, asm) + self.assertTrue('UNARY_' not in asm) # Verify that unfoldables are skipped for line, elem in ( @@ -161,16 +161,16 @@ ('~"abc"', "('abc')"), # unary invert ): asm = dis_single(line) - self.assert_(elem in asm, asm) - self.assert_('UNARY_' in asm) + self.assertTrue(elem in asm, asm) + self.assertTrue('UNARY_' in asm) def test_elim_extra_return(self): # RETURN LOAD_CONST None RETURN --> RETURN def f(x): return x asm = disassemble(f) - self.assert_('LOAD_CONST' not in asm) - self.assert_('(None)' not in asm) + self.assertTrue('LOAD_CONST' not in asm) + self.assertTrue('(None)' not in asm) self.assertEqual(asm.split().count('RETURN_VALUE'), 1) def test_elim_jump_to_return(self): @@ -178,8 +178,8 @@ def f(cond, true_value, false_value): return true_value if cond else false_value asm = disassemble(f) - self.assert_('JUMP_FORWARD' not in asm) - self.assert_('JUMP_ABSOLUTE' not in asm) + self.assertTrue('JUMP_FORWARD' not in asm) + self.assertTrue('JUMP_ABSOLUTE' not in asm) self.assertEqual(asm.split().count('RETURN_VALUE'), 2) def test_elim_jump_after_return1(self): @@ -194,8 +194,8 @@ return 5 return 6 asm = disassemble(f) - self.assert_('JUMP_FORWARD' not in asm) - self.assert_('JUMP_ABSOLUTE' not in asm) + self.assertTrue('JUMP_FORWARD' not in asm) + self.assertTrue('JUMP_ABSOLUTE' not in asm) self.assertEqual(asm.split().count('RETURN_VALUE'), 6) def test_elim_jump_after_return2(self): @@ -204,7 +204,7 @@ while 1: if cond1: return 4 asm = disassemble(f) - self.assert_('JUMP_FORWARD' not in asm) + self.assertTrue('JUMP_FORWARD' not in asm) # There should be one jump for the while loop. self.assertEqual(asm.split().count('JUMP_ABSOLUTE'), 1) self.assertEqual(asm.split().count('RETURN_VALUE'), 2) @@ -215,7 +215,7 @@ pass return g asm = disassemble(f) - self.assert_('BINARY_ADD' not in asm) + self.assertTrue('BINARY_ADD' not in asm) def test_main(verbose=None): Modified: python/branches/py3k/Lib/test/test_pep247.py ============================================================================== --- python/branches/py3k/Lib/test/test_pep247.py (original) +++ python/branches/py3k/Lib/test/test_pep247.py Wed Jul 1 01:06:06 2009 @@ -11,8 +11,8 @@ class Pep247Test(unittest.TestCase): def check_module(self, module, key=None): - self.assert_(hasattr(module, 'digest_size')) - self.assert_(module.digest_size is None or module.digest_size > 0) + self.assertTrue(hasattr(module, 'digest_size')) + self.assertTrue(module.digest_size is None or module.digest_size > 0) self.check_object(module.new, module.digest_size, key) def check_object(self, cls, digest_size, key): @@ -31,7 +31,7 @@ obj3.update(b'string') h2 = obj3.digest() self.assertEquals(h1, h2) - self.assert_(hasattr(obj1, 'digest_size')) + self.assertTrue(hasattr(obj1, 'digest_size')) if digest_size is not None: self.assertEquals(obj1.digest_size, digest_size) Modified: python/branches/py3k/Lib/test/test_pep277.py ============================================================================== --- python/branches/py3k/Lib/test/test_pep277.py (original) +++ python/branches/py3k/Lib/test/test_pep277.py Wed Jul 1 01:06:06 2009 @@ -82,8 +82,8 @@ sys.getfilesystemencoding())) sf2 = set("\\".join((str(support.TESTFN), f)) for f in f2) - self.failUnlessEqual(len(f1), len(self.files)) - self.failUnlessEqual(sf2, set(self.files)) + self.assertEqual(len(f1), len(self.files)) + self.assertEqual(sf2, set(self.files)) def test_rename(self): for name in self.files: Modified: python/branches/py3k/Lib/test/test_pep3120.py ============================================================================== Binary files. No diff available. Modified: python/branches/py3k/Lib/test/test_pep352.py ============================================================================== --- python/branches/py3k/Lib/test/test_pep352.py (original) +++ python/branches/py3k/Lib/test/test_pep352.py Wed Jul 1 01:06:06 2009 @@ -12,7 +12,7 @@ inheritance hierarchy)""" def test_builtins_new_style(self): - self.failUnless(issubclass(Exception, object)) + self.assertTrue(issubclass(Exception, object)) def verify_instance_interface(self, ins): for attr in ("args", "__str__", "__repr__"): @@ -38,7 +38,7 @@ last_exc = getattr(builtins, superclass_name) except AttributeError: self.fail("base class %s not a built-in" % superclass_name) - self.failUnless(superclass_name in exc_set, + self.assertTrue(superclass_name in exc_set, '%s not found' % superclass_name) exc_set.discard(superclass_name) superclasses = [] # Loop will insert base exception @@ -66,20 +66,20 @@ elif last_depth > depth: while superclasses[-1][0] >= depth: superclasses.pop() - self.failUnless(issubclass(exc, superclasses[-1][1]), + self.assertTrue(issubclass(exc, superclasses[-1][1]), "%s is not a subclass of %s" % (exc.__name__, superclasses[-1][1].__name__)) try: # Some exceptions require arguments; just skip them self.verify_instance_interface(exc()) except TypeError: pass - self.failUnless(exc_name in exc_set) + self.assertTrue(exc_name in exc_set) exc_set.discard(exc_name) last_exc = exc last_depth = depth finally: inheritance_tree.close() - self.failUnlessEqual(len(exc_set), 0, "%s not accounted for" % exc_set) + self.assertEqual(len(exc_set), 0, "%s not accounted for" % exc_set) interface_tests = ("length", "args", "str", "repr") Modified: python/branches/py3k/Lib/test/test_pkg.py ============================================================================== --- python/branches/py3k/Lib/test/test_pkg.py (original) +++ python/branches/py3k/Lib/test/test_pkg.py Wed Jul 1 01:06:06 2009 @@ -130,7 +130,7 @@ self.assertEqual(subsub.__name__, "t2.sub.subsub") self.assertEqual(sub.subsub.__name__, "t2.sub.subsub") for name in ['spam', 'sub', 'subsub', 't2']: - self.failUnless(locals()["name"], "Failed to import %s" % name) + self.assertTrue(locals()["name"], "Failed to import %s" % name) import t2.sub import t2.sub.subsub @@ -140,7 +140,7 @@ s = """ from t2 import * - self.failUnless(dir(), ['self', 'sub']) + self.assertTrue(dir(), ['self', 'sub']) """ self.run_code(s) @@ -258,25 +258,25 @@ self.assertEqual(fixdir(dir(tas)), ['__doc__', '__file__', '__name__', '__package__', '__path__']) - self.failIf(t7) + self.assertFalse(t7) from t7 import sub as subpar self.assertEqual(fixdir(dir(subpar)), ['__doc__', '__file__', '__name__', '__package__', '__path__']) - self.failIf(t7) - self.failIf(sub) + self.assertFalse(t7) + self.assertFalse(sub) from t7.sub import subsub as subsubsub self.assertEqual(fixdir(dir(subsubsub)), ['__doc__', '__file__', '__name__', '__package__', '__path__', 'spam']) - self.failIf(t7) - self.failIf(sub) - self.failIf(subsub) + self.assertFalse(t7) + self.assertFalse(sub) + self.assertFalse(subsub) from t7.sub.subsub import spam as ham self.assertEqual(ham, 1) - self.failIf(t7) - self.failIf(sub) - self.failIf(subsub) + self.assertFalse(t7) + self.assertFalse(sub) + self.assertFalse(subsub) def test_main(): Modified: python/branches/py3k/Lib/test/test_pkgimport.py ============================================================================== --- python/branches/py3k/Lib/test/test_pkgimport.py (original) +++ python/branches/py3k/Lib/test/test_pkgimport.py Wed Jul 1 01:06:06 2009 @@ -52,7 +52,7 @@ try: __import__(self.module_name) except SyntaxError: pass else: raise RuntimeError('Failed to induce SyntaxError') - self.assert_(self.module_name not in sys.modules and + self.assertTrue(self.module_name not in sys.modules and not hasattr(sys.modules[self.package_name], 'foo')) # ...make up a variable name that isn't bound in __builtins__ Modified: python/branches/py3k/Lib/test/test_platform.py ============================================================================== --- python/branches/py3k/Lib/test/test_platform.py (original) +++ python/branches/py3k/Lib/test/test_platform.py Wed Jul 1 01:06:06 2009 @@ -125,12 +125,12 @@ def test_uname(self): res = platform.uname() - self.assert_(any(res)) + self.assertTrue(any(res)) def test_java_ver(self): res = platform.java_ver() if sys.platform == 'java': - self.assert_(all(res)) + self.assertTrue(all(res)) def test_win32_ver(self): res = platform.win32_ver() @@ -148,7 +148,7 @@ real_ver = ln.strip().split()[-1] break fd.close() - self.failIf(real_ver is None) + self.assertFalse(real_ver is None) self.assertEquals(res[0], real_ver) # res[1] claims to contain Modified: python/branches/py3k/Lib/test/test_poplib.py ============================================================================== --- python/branches/py3k/Lib/test/test_poplib.py (original) +++ python/branches/py3k/Lib/test/test_poplib.py Wed Jul 1 01:06:06 2009 @@ -251,7 +251,7 @@ self.client = poplib.POP3_SSL(self.server.host, self.server.port) def test__all__(self): - self.assert_('POP3_SSL' in poplib.__all__) + self.assertTrue('POP3_SSL' in poplib.__all__) class TestTimeouts(TestCase): Modified: python/branches/py3k/Lib/test/test_posix.py ============================================================================== --- python/branches/py3k/Lib/test/test_posix.py (original) +++ python/branches/py3k/Lib/test/test_posix.py Wed Jul 1 01:06:06 2009 @@ -42,13 +42,13 @@ def test_statvfs(self): if hasattr(posix, 'statvfs'): - self.assert_(posix.statvfs(os.curdir)) + self.assertTrue(posix.statvfs(os.curdir)) def test_fstatvfs(self): if hasattr(posix, 'fstatvfs'): fp = open(support.TESTFN) try: - self.assert_(posix.fstatvfs(fp.fileno())) + self.assertTrue(posix.fstatvfs(fp.fileno())) finally: fp.close() @@ -68,7 +68,7 @@ fp = open(support.TESTFN) try: fd = posix.dup(fp.fileno()) - self.assert_(isinstance(fd, int)) + self.assertTrue(isinstance(fd, int)) os.close(fd) finally: fp.close() @@ -123,13 +123,13 @@ if hasattr(posix, 'fstat'): fp = open(support.TESTFN) try: - self.assert_(posix.fstat(fp.fileno())) + self.assertTrue(posix.fstat(fp.fileno())) finally: fp.close() def test_stat(self): if hasattr(posix, 'stat'): - self.assert_(posix.stat(support.TESTFN)) + self.assertTrue(posix.stat(support.TESTFN)) if hasattr(posix, 'chown'): def test_chown(self): @@ -165,21 +165,21 @@ def test_lsdir(self): if hasattr(posix, 'lsdir'): - self.assert_(support.TESTFN in posix.lsdir(os.curdir)) + self.assertTrue(support.TESTFN in posix.lsdir(os.curdir)) def test_access(self): if hasattr(posix, 'access'): - self.assert_(posix.access(support.TESTFN, os.R_OK)) + self.assertTrue(posix.access(support.TESTFN, os.R_OK)) def test_umask(self): if hasattr(posix, 'umask'): old_mask = posix.umask(0) - self.assert_(isinstance(old_mask, int)) + self.assertTrue(isinstance(old_mask, int)) posix.umask(old_mask) def test_strerror(self): if hasattr(posix, 'strerror'): - self.assert_(posix.strerror(0)) + self.assertTrue(posix.strerror(0)) def test_pipe(self): if hasattr(posix, 'pipe'): Modified: python/branches/py3k/Lib/test/test_posixpath.py ============================================================================== --- python/branches/py3k/Lib/test/test_posixpath.py (original) +++ python/branches/py3k/Lib/test/test_posixpath.py Wed Jul 1 01:06:06 2009 @@ -26,7 +26,7 @@ safe_rmdir(support.TESTFN + suffix) def assertIs(self, a, b): - self.assert_(a is b) + self.assertTrue(a is b) def test_normcase(self): # Check that normcase() is idempotent @@ -200,8 +200,8 @@ for s1 in testlist: for s2 in testlist: p = posixpath.commonprefix([s1, s2]) - self.assert_(s1.startswith(p)) - self.assert_(s2.startswith(p)) + self.assertTrue(s1.startswith(p)) + self.assertTrue(s2.startswith(p)) if s1 != s2: n = len(p) self.assertNotEqual(s1[n:n+1], s2[n:n+1]) @@ -229,7 +229,7 @@ f.close() self.assertEqual(d, b"foobar") - self.assert_( + self.assertTrue( posixpath.getctime(support.TESTFN) <= posixpath.getmtime(support.TESTFN) ) @@ -402,8 +402,8 @@ except ImportError: pass else: - self.assert_(isinstance(posixpath.expanduser("~/"), str)) - self.assert_(isinstance(posixpath.expanduser(b"~/"), bytes)) + self.assertTrue(isinstance(posixpath.expanduser("~/"), str)) + self.assertTrue(isinstance(posixpath.expanduser(b"~/"), bytes)) # if home directory == root directory, this test makes no sense if posixpath.expanduser("~") != '/': self.assertEqual( @@ -414,10 +414,10 @@ posixpath.expanduser(b"~") + b"/", posixpath.expanduser(b"~/") ) - self.assert_(isinstance(posixpath.expanduser("~root/"), str)) - self.assert_(isinstance(posixpath.expanduser("~foo/"), str)) - self.assert_(isinstance(posixpath.expanduser(b"~root/"), bytes)) - self.assert_(isinstance(posixpath.expanduser(b"~foo/"), bytes)) + self.assertTrue(isinstance(posixpath.expanduser("~root/"), str)) + self.assertTrue(isinstance(posixpath.expanduser("~foo/"), str)) + self.assertTrue(isinstance(posixpath.expanduser(b"~root/"), bytes)) + self.assertTrue(isinstance(posixpath.expanduser(b"~foo/"), bytes)) with support.EnvironmentVarGuard() as env: env['HOME'] = '/' @@ -481,14 +481,14 @@ self.assertRaises(TypeError, posixpath.normpath) def test_abspath(self): - self.assert_("foo" in posixpath.abspath("foo")) - self.assert_(b"foo" in posixpath.abspath(b"foo")) + self.assertTrue("foo" in posixpath.abspath("foo")) + self.assertTrue(b"foo" in posixpath.abspath(b"foo")) self.assertRaises(TypeError, posixpath.abspath) def test_realpath(self): - self.assert_("foo" in realpath("foo")) - self.assert_(b"foo" in realpath(b"foo")) + self.assertTrue("foo" in realpath("foo")) + self.assertTrue(b"foo" in realpath(b"foo")) self.assertRaises(TypeError, posixpath.realpath) if hasattr(os, "symlink"): Modified: python/branches/py3k/Lib/test/test_pprint.py ============================================================================== --- python/branches/py3k/Lib/test/test_pprint.py (original) +++ python/branches/py3k/Lib/test/test_pprint.py Wed Jul 1 01:06:06 2009 @@ -34,7 +34,7 @@ def test_basic(self): # Verify .isrecursive() and .isreadable() w/o recursion - verify = self.assert_ + verify = self.assertTrue pp = pprint.PrettyPrinter() for safe in (2, 2.0, 2j, "abc", [3], (2,2), {3: 3}, "yaddayadda", self.a, self.b): @@ -57,7 +57,7 @@ self.d = {} self.d[0] = self.d[1] = self.d[2] = self.d - verify = self.assert_ + verify = self.assertTrue pp = pprint.PrettyPrinter() for icky in self.a, self.b, self.d, (self.d, self.d): @@ -85,7 +85,7 @@ def test_unreadable(self): # Not recursive but not readable anyway - verify = self.assert_ + verify = self.assertTrue pp = pprint.PrettyPrinter() for unreadable in type(3), pprint, pprint.isrecursive: # module-level convenience functions @@ -108,7 +108,7 @@ # it sorted a dict display if and only if the display required # multiple lines. For that reason, dicts with more than one element # aren't tested here. - verify = self.assert_ + verify = self.assertTrue for simple in (0, 0, 0+0j, 0.0, "", b"", (), tuple2(), tuple3(), [], list2(), list3(), Modified: python/branches/py3k/Lib/test/test_property.py ============================================================================== --- python/branches/py3k/Lib/test/test_property.py (original) +++ python/branches/py3k/Lib/test/test_property.py Wed Jul 1 01:06:06 2009 @@ -86,8 +86,8 @@ self.assertEqual(base.spam, 10) self.assertEqual(base._spam, 10) delattr(base, "spam") - self.assert_(not hasattr(base, "spam")) - self.assert_(not hasattr(base, "_spam")) + self.assertTrue(not hasattr(base, "spam")) + self.assertTrue(not hasattr(base, "_spam")) base.spam = 20 self.assertEqual(base.spam, 20) self.assertEqual(base._spam, 20) Modified: python/branches/py3k/Lib/test/test_pwd.py ============================================================================== --- python/branches/py3k/Lib/test/test_pwd.py (original) +++ python/branches/py3k/Lib/test/test_pwd.py Wed Jul 1 01:06:06 2009 @@ -13,19 +13,19 @@ for e in entries: self.assertEqual(len(e), 7) self.assertEqual(e[0], e.pw_name) - self.assert_(isinstance(e.pw_name, str)) + self.assertTrue(isinstance(e.pw_name, str)) self.assertEqual(e[1], e.pw_passwd) - self.assert_(isinstance(e.pw_passwd, str)) + self.assertTrue(isinstance(e.pw_passwd, str)) self.assertEqual(e[2], e.pw_uid) - self.assert_(isinstance(e.pw_uid, int)) + self.assertTrue(isinstance(e.pw_uid, int)) self.assertEqual(e[3], e.pw_gid) - self.assert_(isinstance(e.pw_gid, int)) + self.assertTrue(isinstance(e.pw_gid, int)) self.assertEqual(e[4], e.pw_gecos) - self.assert_(isinstance(e.pw_gecos, str)) + self.assertTrue(isinstance(e.pw_gecos, str)) self.assertEqual(e[5], e.pw_dir) - self.assert_(isinstance(e.pw_dir, str)) + self.assertTrue(isinstance(e.pw_dir, str)) self.assertEqual(e[6], e.pw_shell) - self.assert_(isinstance(e.pw_shell, str)) + self.assertTrue(isinstance(e.pw_shell, str)) # The following won't work, because of duplicate entries # for one uid @@ -43,8 +43,8 @@ for e in entries: if not e[0] or e[0] == '+': continue # skip NIS entries etc. - self.assert_(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name]) - self.assert_(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid]) + self.assertTrue(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name]) + self.assertTrue(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid]) def test_errors(self): self.assertRaises(TypeError, pwd.getpwuid) Modified: python/branches/py3k/Lib/test/test_pyclbr.py ============================================================================== --- python/branches/py3k/Lib/test/test_pyclbr.py (original) +++ python/branches/py3k/Lib/test/test_pyclbr.py Wed Jul 1 01:06:06 2009 @@ -31,7 +31,7 @@ ''' succeed iff hasattr(obj,attr) or attr in ignore. ''' if attr in ignore: return if not hasattr(obj, attr): print("???", attr) - self.failUnless(hasattr(obj, attr), + self.assertTrue(hasattr(obj, attr), 'expected hasattr(%r, %r)' % (obj, attr)) @@ -40,7 +40,7 @@ if key in ignore: return if key not in obj: print("***",key, file=sys.stderr) - self.failUnless(key in obj, "%r in %r" % (key, obj)) + self.assertTrue(key in obj, "%r in %r" % (key, obj)) def assertEqualsOrIgnored(self, a, b, ignore): ''' succeed iff a == b or a in ignore or b in ignore ''' @@ -84,12 +84,12 @@ self.assertHasattr(module, name, ignore) py_item = getattr(module, name) if isinstance(value, pyclbr.Function): - self.assert_(isinstance(py_item, (FunctionType, BuiltinFunctionType))) + self.assertTrue(isinstance(py_item, (FunctionType, BuiltinFunctionType))) if py_item.__module__ != moduleName: continue # skip functions that came from somewhere else self.assertEquals(py_item.__module__, value.module) else: - self.failUnless(isinstance(py_item, type)) + self.assertTrue(isinstance(py_item, type)) if py_item.__module__ != moduleName: continue # skip classes that came from somewhere else Modified: python/branches/py3k/Lib/test/test_pydoc.py ============================================================================== --- python/branches/py3k/Lib/test/test_pydoc.py (original) +++ python/branches/py3k/Lib/test/test_pydoc.py Wed Jul 1 01:06:06 2009 @@ -309,7 +309,7 @@ # Check that pydocfodder module can be described from test import pydocfodder doc = pydoc.render_doc(pydocfodder) - self.assert_("pydocfodder" in doc) + self.assertTrue("pydocfodder" in doc) def test_classic_class(self): class C: "Classic class" @@ -317,7 +317,7 @@ self.assertEqual(pydoc.describe(C), 'class C') self.assertEqual(pydoc.describe(c), 'C') expected = 'C in module %s' % __name__ - self.assert_(expected in pydoc.render_doc(c)) + self.assertTrue(expected in pydoc.render_doc(c)) def test_class(self): class C(object): "New-style class" @@ -326,7 +326,7 @@ self.assertEqual(pydoc.describe(C), 'class C') self.assertEqual(pydoc.describe(c), 'C') expected = 'C in module %s object' % __name__ - self.assert_(expected in pydoc.render_doc(c)) + self.assertTrue(expected in pydoc.render_doc(c)) def test_main(): Modified: python/branches/py3k/Lib/test/test_queue.py ============================================================================== --- python/branches/py3k/Lib/test/test_queue.py (original) +++ python/branches/py3k/Lib/test/test_queue.py Wed Jul 1 01:06:06 2009 @@ -103,12 +103,12 @@ "Didn't seem to queue the correct data!") for i in range(QUEUE_SIZE-1): q.put(i) - self.assert_(q.qsize(), "Queue should not be empty") - self.assert_(not qfull(q), "Queue should not be full") + self.assertTrue(q.qsize(), "Queue should not be empty") + self.assertTrue(not qfull(q), "Queue should not be full") last = 2 * QUEUE_SIZE full = 3 * 2 * QUEUE_SIZE q.put(last) - self.assert_(qfull(q), "Queue should be full") + self.assertTrue(qfull(q), "Queue should be full") try: q.put(full, block=0) self.fail("Didn't appear to block with a full queue") @@ -125,7 +125,7 @@ # Empty it for i in range(QUEUE_SIZE): q.get() - self.assert_(not q.qsize(), "Queue should be empty") + self.assertTrue(not q.qsize(), "Queue should be empty") try: q.get(block=0) self.fail("Didn't appear to block with an empty queue") @@ -247,7 +247,7 @@ except FailingQueueException: pass q.put("last") - self.assert_(qfull(q), "Queue should be full") + self.assertTrue(qfull(q), "Queue should be full") # Test a failing blocking put q.fail_next_put = True try: @@ -269,17 +269,17 @@ # Check the Queue isn't damaged. # put failed, but get succeeded - re-add q.put("last") - self.assert_(qfull(q), "Queue should be full") + self.assertTrue(qfull(q), "Queue should be full") q.get() - self.assert_(not qfull(q), "Queue should not be full") + self.assertTrue(not qfull(q), "Queue should not be full") q.put("last") - self.assert_(qfull(q), "Queue should be full") + self.assertTrue(qfull(q), "Queue should be full") # Test a blocking put self.do_blocking_test(q.put, ("full",), q.get, ()) # Empty it for i in range(QUEUE_SIZE): q.get() - self.assert_(not q.qsize(), "Queue should be empty") + self.assertTrue(not q.qsize(), "Queue should be empty") q.put("first") q.fail_next_get = True try: @@ -287,16 +287,16 @@ self.fail("The queue didn't fail when it should have") except FailingQueueException: pass - self.assert_(q.qsize(), "Queue should not be empty") + self.assertTrue(q.qsize(), "Queue should not be empty") q.fail_next_get = True try: q.get(timeout=0.1) self.fail("The queue didn't fail when it should have") except FailingQueueException: pass - self.assert_(q.qsize(), "Queue should not be empty") + self.assertTrue(q.qsize(), "Queue should not be empty") q.get() - self.assert_(not q.qsize(), "Queue should be empty") + self.assertTrue(not q.qsize(), "Queue should be empty") q.fail_next_get = True try: self.do_exceptional_blocking_test(q.get, (), q.put, ('empty',), @@ -305,9 +305,9 @@ except FailingQueueException: pass # put succeeded, but get failed. - self.assert_(q.qsize(), "Queue should not be empty") + self.assertTrue(q.qsize(), "Queue should not be empty") q.get() - self.assert_(not q.qsize(), "Queue should be empty") + self.assertTrue(not q.qsize(), "Queue should be empty") def test_failing_queue(self): # Test to make sure a queue is functioning correctly. Modified: python/branches/py3k/Lib/test/test_raise.py ============================================================================== --- python/branches/py3k/Lib/test/test_raise.py (original) +++ python/branches/py3k/Lib/test/test_raise.py Wed Jul 1 01:06:06 2009 @@ -28,7 +28,7 @@ try: raise except RuntimeError as e: - self.failUnless("No active exception" in str(e)) + self.assertTrue("No active exception" in str(e)) else: self.fail("No exception raised") @@ -40,7 +40,7 @@ exc1 = e raise except IndexError as exc2: - self.failUnless(exc1 is exc2) + self.assertTrue(exc1 is exc2) else: self.fail("No exception raised") @@ -127,7 +127,7 @@ try: raise IndexError from 5 except TypeError as e: - self.failUnless("exception cause" in str(e)) + self.assertTrue("exception cause" in str(e)) else: self.fail("No exception raised") @@ -135,7 +135,7 @@ try: raise IndexError from KeyError except IndexError as e: - self.failUnless(isinstance(e.__cause__, KeyError)) + self.assertTrue(isinstance(e.__cause__, KeyError)) else: self.fail("No exception raised") @@ -144,7 +144,7 @@ try: raise IndexError from cause except IndexError as e: - self.failUnless(e.__cause__ is cause) + self.assertTrue(e.__cause__ is cause) else: self.fail("No exception raised") @@ -166,7 +166,7 @@ try: raise IndexError() except IndexError as e: - self.failUnless(isinstance(e.__traceback__, types.TracebackType)) + self.assertTrue(isinstance(e.__traceback__, types.TracebackType)) else: self.fail("No exception raised") @@ -203,7 +203,7 @@ raise OSError() except OSError as e: self.assertNotEqual(e.__context__, context) - self.failUnless(isinstance(e.__context__, context)) + self.assertTrue(isinstance(e.__context__, context)) else: self.fail("No exception raised") @@ -216,7 +216,7 @@ raise OSError except OSError as e: self.assertNotEqual(e.__context__, context) - self.failUnless(isinstance(e.__context__, context)) + self.assertTrue(isinstance(e.__context__, context)) else: self.fail("No exception raised") @@ -227,7 +227,7 @@ except: raise OSError except OSError as e: - self.failUnless(isinstance(e.__context__, ZeroDivisionError)) + self.assertTrue(isinstance(e.__context__, ZeroDivisionError)) else: self.fail("No exception raised") @@ -238,7 +238,7 @@ except: xyzzy except NameError as e: - self.failUnless(isinstance(e.__context__, ZeroDivisionError)) + self.assertTrue(isinstance(e.__context__, ZeroDivisionError)) else: self.fail("No exception raised") @@ -249,7 +249,7 @@ finally: raise OSError except OSError as e: - self.failUnless(e.__context__ is None) + self.assertTrue(e.__context__ is None) else: self.fail("No exception raised") @@ -260,7 +260,7 @@ finally: raise OSError except OSError as e: - self.failUnless(isinstance(e.__context__, ZeroDivisionError)) + self.assertTrue(isinstance(e.__context__, ZeroDivisionError)) else: self.fail("No exception raised") @@ -274,7 +274,7 @@ with ContextManager(): 1/0 except NameError as e: - self.failUnless(isinstance(e.__context__, ZeroDivisionError)) + self.assertTrue(isinstance(e.__context__, ZeroDivisionError)) else: self.fail("No exception raised") @@ -286,7 +286,7 @@ except ZeroDivisionError as e: raise e except ZeroDivisionError as e: - self.failUnless(e.__context__ is None, e.__context__) + self.assertTrue(e.__context__ is None, e.__context__) def test_reraise_cycle_broken(self): # Non-trivial context cycles (through re-raising a previous exception) @@ -300,7 +300,7 @@ except ZeroDivisionError: raise a except NameError as e: - self.failUnless(e.__context__.__context__ is None) + self.assertTrue(e.__context__.__context__ is None) def test_3118(self): # deleting the generator caused the __context__ to be cleared @@ -320,7 +320,7 @@ del g raise KeyError except Exception as e: - self.assert_(isinstance(e.__context__, ValueError)) + self.assertTrue(isinstance(e.__context__, ValueError)) f() @@ -344,7 +344,7 @@ raise TypeError except Exception as e: self.assertNotEqual(e.__context__, None) - self.assert_(isinstance(e.__context__, AttributeError)) + self.assertTrue(isinstance(e.__context__, AttributeError)) with support.captured_output("stderr"): f() Modified: python/branches/py3k/Lib/test/test_random.py ============================================================================== --- python/branches/py3k/Lib/test/test_random.py (original) +++ python/branches/py3k/Lib/test/test_random.py Wed Jul 1 01:06:06 2009 @@ -52,7 +52,7 @@ self.assertEqual(len(s), k) uniq = set(s) self.assertEqual(len(uniq), k) - self.failUnless(uniq <= set(population)) + self.assertTrue(uniq <= set(population)) self.assertEqual(self.gen.sample([], 0), []) # test edge case N==k==0 def test_sample_distribution(self): @@ -161,7 +161,7 @@ cum = 0 for i in range(100): r = self.gen.randrange(span) - self.assert_(0 <= r < span) + self.assertTrue(0 <= r < span) cum |= r self.assertEqual(cum, span-1) @@ -171,7 +171,7 @@ stop = self.gen.randrange(2 ** (i-2)) if stop <= start: return - self.assert_(start <= self.gen.randrange(start, stop) < stop) + self.assertTrue(start <= self.gen.randrange(start, stop) < stop) def test_rangelimits(self): for start, stop in [(-2,0), (-(2**60)-2,-(2**60)), (2**60,2**60+2)]: @@ -181,7 +181,7 @@ def test_genrandbits(self): # Verify ranges for k in range(1, 1000): - self.assert_(0 <= self.gen.getrandbits(k) < 2**k) + self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k) # Verify all bits active getbits = self.gen.getrandbits @@ -211,13 +211,13 @@ n += n - 1 # check 1 below the next power of two k = int(1.00001 + _log(n, 2)) - self.assert_(k in [numbits, numbits+1]) - self.assert_(2**k > n > 2**(k-2)) + self.assertTrue(k in [numbits, numbits+1]) + self.assertTrue(2**k > n > 2**(k-2)) n -= n >> 15 # check a little farther below the next power of two k = int(1.00001 + _log(n, 2)) self.assertEqual(k, numbits) # note the stronger assertion - self.assert_(2**k > n > 2**(k-1)) # note the stronger assertion + self.assertTrue(2**k > n > 2**(k-1)) # note the stronger assertion class MersenneTwister_TestBasicOps(TestBasicOps): @@ -313,7 +313,7 @@ cum = 0 for i in range(100): r = self.gen.randrange(span) - self.assert_(0 <= r < span) + self.assertTrue(0 <= r < span) cum |= r self.assertEqual(cum, span-1) @@ -323,7 +323,7 @@ stop = self.gen.randrange(2 ** (i-2)) if stop <= start: return - self.assert_(start <= self.gen.randrange(start, stop) < stop) + self.assertTrue(start <= self.gen.randrange(start, stop) < stop) def test_rangelimits(self): for start, stop in [(-2,0), (-(2**60)-2,-(2**60)), (2**60,2**60+2)]: @@ -337,7 +337,7 @@ 97904845777343510404718956115) # Verify ranges for k in range(1, 1000): - self.assert_(0 <= self.gen.getrandbits(k) < 2**k) + self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k) # Verify all bits active getbits = self.gen.getrandbits @@ -367,20 +367,20 @@ n += n - 1 # check 1 below the next power of two k = int(1.00001 + _log(n, 2)) - self.assert_(k in [numbits, numbits+1]) - self.assert_(2**k > n > 2**(k-2)) + self.assertTrue(k in [numbits, numbits+1]) + self.assertTrue(2**k > n > 2**(k-2)) n -= n >> 15 # check a little farther below the next power of two k = int(1.00001 + _log(n, 2)) self.assertEqual(k, numbits) # note the stronger assertion - self.assert_(2**k > n > 2**(k-1)) # note the stronger assertion + self.assertTrue(2**k > n > 2**(k-1)) # note the stronger assertion def test_randrange_bug_1590891(self): start = 1000000000000 stop = -100000000000000000000 step = -200 x = self.gen.randrange(start, stop, step) - self.assert_(stop < x <= start) + self.assertTrue(stop < x <= start) self.assertEqual((x+stop)%step, 0) def gamma(z, sqrt2pi=(2.0*pi)**0.5): @@ -458,7 +458,7 @@ def test__all__(self): # tests validity but not completeness of the __all__ list - self.failUnless(set(random.__all__) <= set(dir(random))) + self.assertTrue(set(random.__all__) <= set(dir(random))) def test_random_subclass_with_kwargs(self): # SF bug #1486663 -- this used to erroneously raise a TypeError Modified: python/branches/py3k/Lib/test/test_range.py ============================================================================== --- python/branches/py3k/Lib/test/test_range.py (original) +++ python/branches/py3k/Lib/test/test_range.py Wed Jul 1 01:06:06 2009 @@ -26,18 +26,18 @@ self.assertEqual(list(range(a+4, a, -2)), [a+4, a+2]) seq = list(range(a, b, c)) - self.assert_(a in seq) - self.assert_(b not in seq) + self.assertTrue(a in seq) + self.assertTrue(b not in seq) self.assertEqual(len(seq), 2) seq = list(range(b, a, -c)) - self.assert_(b in seq) - self.assert_(a not in seq) + self.assertTrue(b in seq) + self.assertTrue(a not in seq) self.assertEqual(len(seq), 2) seq = list(range(-a, -b, -c)) - self.assert_(-a in seq) - self.assert_(-b not in seq) + self.assertTrue(-a in seq) + self.assertTrue(-b not in seq) self.assertEqual(len(seq), 2) self.assertRaises(TypeError, range) Modified: python/branches/py3k/Lib/test/test_re.py ============================================================================== --- python/branches/py3k/Lib/test/test_re.py (original) +++ python/branches/py3k/Lib/test/test_re.py Wed Jul 1 01:06:06 2009 @@ -585,7 +585,7 @@ [":", "::", ":::"]) def test_bug_926075(self): - self.assert_(re.compile('bug_926075') is not + self.assertTrue(re.compile('bug_926075') is not re.compile(b'bug_926075')) def test_bug_931848(self): Modified: python/branches/py3k/Lib/test/test_reprlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_reprlib.py (original) +++ python/branches/py3k/Lib/test/test_reprlib.py Wed Jul 1 01:06:06 2009 @@ -123,12 +123,12 @@ eq(r(i3), (""%id(i3))) s = r(ClassWithFailingRepr) - self.failUnless(s.startswith("")) - self.failUnless(s.find("...") in [12, 13]) + self.assertTrue(s.startswith("")) + self.assertTrue(s.find("...") in [12, 13]) def test_lambda(self): - self.failUnless(repr(lambda x: x).startswith( + self.assertTrue(repr(lambda x: x).startswith( "') # Methods - self.failUnless(repr(''.split).startswith( + self.assertTrue(repr(''.split).startswith( ' p) - self.assert_(q >= p) - self.failIf(q < r) - self.failIf(q <= r) - self.failIf(q > r) - self.failIf(q >= r) - self.assert_(set('a').issubset('abc')) - self.assert_(set('abc').issuperset('a')) - self.failIf(set('a').issubset('cbs')) - self.failIf(set('cbs').issuperset('a')) + self.assertTrue(p < q) + self.assertTrue(p <= q) + self.assertTrue(q <= q) + self.assertTrue(q > p) + self.assertTrue(q >= p) + self.assertFalse(q < r) + self.assertFalse(q <= r) + self.assertFalse(q > r) + self.assertFalse(q >= r) + self.assertTrue(set('a').issubset('abc')) + self.assertTrue(set('abc').issuperset('a')) + self.assertFalse(set('a').issubset('cbs')) + self.assertFalse(set('cbs').issuperset('a')) def test_pickling(self): for i in range(pickle.HIGHEST_PROTOCOL + 1): @@ -265,7 +265,7 @@ s=H() f=set() f.add(s) - self.assert_(s in f) + self.assertTrue(s in f) f.remove(s) f.add(s) f.discard(s) @@ -334,7 +334,7 @@ obj.x = iter(container) del obj, container gc.collect() - self.assert_(ref() is None, "Cycle was not collected") + self.assertTrue(ref() is None, "Cycle was not collected") class TestSet(TestJointOps): thetype = set @@ -375,7 +375,7 @@ def test_add(self): self.s.add('Q') - self.assert_('Q' in self.s) + self.assertTrue('Q' in self.s) dup = self.s.copy() self.s.add('Q') self.assertEqual(self.s, dup) @@ -383,13 +383,13 @@ def test_remove(self): self.s.remove('a') - self.assert_('a' not in self.s) + self.assertTrue('a' not in self.s) self.assertRaises(KeyError, self.s.remove, 'Q') self.assertRaises(TypeError, self.s.remove, []) s = self.thetype([frozenset(self.word)]) - self.assert_(self.thetype(self.word) in s) + self.assertTrue(self.thetype(self.word) in s) s.remove(self.thetype(self.word)) - self.assert_(self.thetype(self.word) not in s) + self.assertTrue(self.thetype(self.word) not in s) self.assertRaises(KeyError, self.s.remove, self.thetype(self.word)) def test_remove_keyerror_unpacking(self): @@ -408,7 +408,7 @@ try: self.s.remove(key) except KeyError as e: - self.assert_(e.args[0] is key, + self.assertTrue(e.args[0] is key, "KeyError should be {0}, not {1}".format(key, e.args[0])) else: @@ -416,26 +416,26 @@ def test_discard(self): self.s.discard('a') - self.assert_('a' not in self.s) + self.assertTrue('a' not in self.s) self.s.discard('Q') self.assertRaises(TypeError, self.s.discard, []) s = self.thetype([frozenset(self.word)]) - self.assert_(self.thetype(self.word) in s) + self.assertTrue(self.thetype(self.word) in s) s.discard(self.thetype(self.word)) - self.assert_(self.thetype(self.word) not in s) + self.assertTrue(self.thetype(self.word) not in s) s.discard(self.thetype(self.word)) def test_pop(self): for i in range(len(self.s)): elem = self.s.pop() - self.assert_(elem not in self.s) + self.assertTrue(elem not in self.s) self.assertRaises(KeyError, self.s.pop) def test_update(self): retval = self.s.update(self.otherword) self.assertEqual(retval, None) for c in (self.word + self.otherword): - self.assert_(c in self.s) + self.assertTrue(c in self.s) self.assertRaises(PassThru, self.s.update, check_pass_thru()) self.assertRaises(TypeError, self.s.update, [[]]) for p, q in (('cdc', 'abcd'), ('efgfe', 'abcefg'), ('ccb', 'abc'), ('ef', 'abcef')): @@ -453,16 +453,16 @@ def test_ior(self): self.s |= set(self.otherword) for c in (self.word + self.otherword): - self.assert_(c in self.s) + self.assertTrue(c in self.s) def test_intersection_update(self): retval = self.s.intersection_update(self.otherword) self.assertEqual(retval, None) for c in (self.word + self.otherword): if c in self.otherword and c in self.word: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(PassThru, self.s.intersection_update, check_pass_thru()) self.assertRaises(TypeError, self.s.intersection_update, [[]]) for p, q in (('cdc', 'c'), ('efgfe', ''), ('ccb', 'bc'), ('ef', '')): @@ -480,18 +480,18 @@ self.s &= set(self.otherword) for c in (self.word + self.otherword): if c in self.otherword and c in self.word: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_difference_update(self): retval = self.s.difference_update(self.otherword) self.assertEqual(retval, None) for c in (self.word + self.otherword): if c in self.word and c not in self.otherword: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(PassThru, self.s.difference_update, check_pass_thru()) self.assertRaises(TypeError, self.s.difference_update, [[]]) self.assertRaises(TypeError, self.s.symmetric_difference_update, [[]]) @@ -517,18 +517,18 @@ self.s -= set(self.otherword) for c in (self.word + self.otherword): if c in self.word and c not in self.otherword: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_symmetric_difference_update(self): retval = self.s.symmetric_difference_update(self.otherword) self.assertEqual(retval, None) for c in (self.word + self.otherword): if (c in self.word) ^ (c in self.otherword): - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(PassThru, self.s.symmetric_difference_update, check_pass_thru()) self.assertRaises(TypeError, self.s.symmetric_difference_update, [[]]) for p, q in (('cdc', 'abd'), ('efgfe', 'abcefg'), ('ccb', 'a'), ('ef', 'abcef')): @@ -541,9 +541,9 @@ self.s ^= set(self.otherword) for c in (self.word + self.otherword): if (c in self.word) ^ (c in self.otherword): - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_inplace_on_self(self): t = self.s.copy() @@ -586,19 +586,19 @@ myobj = TestRichSetCompare() myset < myobj - self.assert_(myobj.gt_called) + self.assertTrue(myobj.gt_called) myobj = TestRichSetCompare() myset > myobj - self.assert_(myobj.lt_called) + self.assertTrue(myobj.lt_called) myobj = TestRichSetCompare() myset <= myobj - self.assert_(myobj.ge_called) + self.assertTrue(myobj.ge_called) myobj = TestRichSetCompare() myset >= myobj - self.assert_(myobj.le_called) + self.assertTrue(myobj.le_called) # C API test only available in a debug build if hasattr(set, "test_c_api"): @@ -810,7 +810,7 @@ def test_iteration(self): for v in self.set: - self.assert_(v in self.values) + self.assertTrue(v in self.values) setiter = iter(self.set) # note: __length_hint__ is an internal undocumented API, # don't rely on it in your own programs @@ -845,10 +845,10 @@ self.repr = "{3}" def test_in(self): - self.failUnless(3 in self.set) + self.assertTrue(3 in self.set) def test_not_in(self): - self.failUnless(2 not in self.set) + self.assertTrue(2 not in self.set) #------------------------------------------------------------------------------ @@ -862,10 +862,10 @@ self.repr = "{(0, 'zero')}" def test_in(self): - self.failUnless((0, "zero") in self.set) + self.assertTrue((0, "zero") in self.set) def test_not_in(self): - self.failUnless(9 not in self.set) + self.assertTrue(9 not in self.set) #------------------------------------------------------------------------------ @@ -1182,7 +1182,7 @@ popped[self.set.pop()] = None self.assertEqual(len(popped), len(self.values)) for v in self.values: - self.failUnless(v in popped) + self.assertTrue(v in popped) def test_update_empty_tuple(self): self.set.update(()) @@ -1451,7 +1451,7 @@ set_list = sorted(self.set, key=repr) self.assertEqual(len(dup_list), len(set_list)) for i in range(len(dup_list)): - self.failUnless(dup_list[i] is set_list[i]) + self.assertTrue(dup_list[i] is set_list[i]) def test_deep_copy(self): dup = copy.deepcopy(self.set) @@ -1501,13 +1501,13 @@ def test_binopsVsSubsets(self): a, b = self.a, self.b - self.assert_(a - b < a) - self.assert_(b - a < b) - self.assert_(a & b < a) - self.assert_(a & b < b) - self.assert_(a | b > a) - self.assert_(a | b > b) - self.assert_(a ^ b < a | b) + self.assertTrue(a - b < a) + self.assertTrue(b - a < b) + self.assertTrue(a & b < a) + self.assertTrue(a & b < b) + self.assertTrue(a | b > a) + self.assertTrue(a | b > b) + self.assertTrue(a ^ b < a | b) def test_commutativity(self): a, b = self.a, self.b @@ -1756,7 +1756,7 @@ edge = vertex # Cuboctahedron vertices are edges in Cube self.assertEqual(len(edge), 2) # Two cube vertices define an edge for cubevert in edge: - self.assert_(cubevert in g) + self.assertTrue(cubevert in g) #============================================================================== Modified: python/branches/py3k/Lib/test/test_shutil.py ============================================================================== --- python/branches/py3k/Lib/test/test_shutil.py (original) +++ python/branches/py3k/Lib/test/test_shutil.py Wed Jul 1 01:06:06 2009 @@ -63,12 +63,12 @@ self.assertIs(func, os.listdir, "func must be either os.remove or os.listdir") self.assertEqual(arg, TESTFN) - self.failUnless(issubclass(exc[0], OSError)) + self.assertTrue(issubclass(exc[0], OSError)) self.errorState = 1 else: self.assertEqual(func, os.rmdir) self.assertEqual(arg, TESTFN) - self.failUnless(issubclass(exc[0], OSError)) + self.assertTrue(issubclass(exc[0], OSError)) self.errorState = 2 def test_rmtree_dont_delete_file(self): @@ -158,9 +158,9 @@ patterns = shutil.ignore_patterns('*.tmp', 'test_dir2') shutil.copytree(src_dir, dst_dir, ignore=patterns) # checking the result: some elements should not be copied - self.assert_(exists(join(dst_dir, 'test.txt'))) - self.assert_(not exists(join(dst_dir, 'test.tmp'))) - self.assert_(not exists(join(dst_dir, 'test_dir2'))) + self.assertTrue(exists(join(dst_dir, 'test.txt'))) + self.assertTrue(not exists(join(dst_dir, 'test.tmp'))) + self.assertTrue(not exists(join(dst_dir, 'test_dir2'))) finally: if os.path.exists(dst_dir): shutil.rmtree(dst_dir) @@ -168,9 +168,9 @@ patterns = shutil.ignore_patterns('*.tmp', 'subdir*') shutil.copytree(src_dir, dst_dir, ignore=patterns) # checking the result: some elements should not be copied - self.assert_(not exists(join(dst_dir, 'test.tmp'))) - self.assert_(not exists(join(dst_dir, 'test_dir2', 'subdir2'))) - self.assert_(not exists(join(dst_dir, 'test_dir2', 'subdir'))) + self.assertTrue(not exists(join(dst_dir, 'test.tmp'))) + self.assertTrue(not exists(join(dst_dir, 'test_dir2', 'subdir2'))) + self.assertTrue(not exists(join(dst_dir, 'test_dir2', 'subdir'))) finally: if os.path.exists(dst_dir): shutil.rmtree(dst_dir) @@ -192,9 +192,9 @@ shutil.copytree(src_dir, dst_dir, ignore=_filter) # checking the result: some elements should not be copied - self.assert_(not exists(join(dst_dir, 'test_dir2', 'subdir2', + self.assertTrue(not exists(join(dst_dir, 'test_dir2', 'subdir2', 'test.py'))) - self.assert_(not exists(join(dst_dir, 'test_dir2', 'subdir'))) + self.assertTrue(not exists(join(dst_dir, 'test_dir2', 'subdir'))) finally: if os.path.exists(dst_dir): @@ -393,7 +393,7 @@ for src, dst in [('srcdir', 'srcdir/dest')]: src = os.path.join(TESTFN, src) dst = os.path.join(TESTFN, dst) - self.assert_(shutil._destinsrc(src, dst), + self.assertTrue(shutil._destinsrc(src, dst), msg='_destinsrc() wrongly concluded that ' 'dst (%s) is not in src (%s)' % (dst, src)) finally: @@ -405,7 +405,7 @@ for src, dst in [('srcdir', 'src/dest'), ('srcdir', 'srcdir.new')]: src = os.path.join(TESTFN, src) dst = os.path.join(TESTFN, dst) - self.failIf(shutil._destinsrc(src, dst), + self.assertFalse(shutil._destinsrc(src, dst), msg='_destinsrc() wrongly concluded that ' 'dst (%s) is in src (%s)' % (dst, src)) finally: Modified: python/branches/py3k/Lib/test/test_signal.py ============================================================================== --- python/branches/py3k/Lib/test/test_signal.py (original) +++ python/branches/py3k/Lib/test/test_signal.py Wed Jul 1 01:06:06 2009 @@ -217,10 +217,10 @@ # before select is called time.sleep(self.TIMEOUT_FULL) mid_time = time.time() - self.assert_(mid_time - before_time < self.TIMEOUT_HALF) + self.assertTrue(mid_time - before_time < self.TIMEOUT_HALF) select.select([self.read], [], [], self.TIMEOUT_FULL) after_time = time.time() - self.assert_(after_time - mid_time < self.TIMEOUT_HALF) + self.assertTrue(after_time - mid_time < self.TIMEOUT_HALF) def test_wakeup_fd_during(self): import select @@ -231,7 +231,7 @@ self.assertRaises(select.error, select.select, [self.read], [], [], self.TIMEOUT_FULL) after_time = time.time() - self.assert_(after_time - before_time < self.TIMEOUT_HALF) + self.assertTrue(after_time - before_time < self.TIMEOUT_HALF) def setUp(self): import fcntl Modified: python/branches/py3k/Lib/test/test_site.py ============================================================================== --- python/branches/py3k/Lib/test/test_site.py (original) +++ python/branches/py3k/Lib/test/test_site.py Wed Jul 1 01:06:06 2009 @@ -47,26 +47,26 @@ path_parts = ("Beginning", "End") original_dir = os.path.join(*path_parts) abs_dir, norm_dir = site.makepath(*path_parts) - self.failUnlessEqual(os.path.abspath(original_dir), abs_dir) + self.assertEqual(os.path.abspath(original_dir), abs_dir) if original_dir == os.path.normcase(original_dir): - self.failUnlessEqual(abs_dir, norm_dir) + self.assertEqual(abs_dir, norm_dir) else: - self.failUnlessEqual(os.path.normcase(abs_dir), norm_dir) + self.assertEqual(os.path.normcase(abs_dir), norm_dir) def test_init_pathinfo(self): dir_set = site._init_pathinfo() for entry in [site.makepath(path)[1] for path in sys.path if path and os.path.isdir(path)]: - self.failUnless(entry in dir_set, + self.assertTrue(entry in dir_set, "%s from sys.path not found in set returned " "by _init_pathinfo(): %s" % (entry, dir_set)) def pth_file_tests(self, pth_file): """Contain common code for testing results of reading a .pth file""" - self.failUnless(pth_file.imported in sys.modules, + self.assertTrue(pth_file.imported in sys.modules, "%s not in sys.path" % pth_file.imported) - self.failUnless(site.makepath(pth_file.good_dir_path)[0] in sys.path) - self.failUnless(not os.path.exists(pth_file.bad_dir_path)) + self.assertTrue(site.makepath(pth_file.good_dir_path)[0] in sys.path) + self.assertTrue(not os.path.exists(pth_file.bad_dir_path)) def test_addpackage(self): # Make sure addpackage() imports if the line starts with 'import', @@ -98,7 +98,7 @@ def test_s_option(self): usersite = site.USER_SITE - self.assert_(usersite in sys.path) + self.assertTrue(usersite in sys.path) rc = subprocess.call([sys.executable, '-c', 'import sys; sys.exit(%r in sys.path)' % usersite]) @@ -196,7 +196,7 @@ site.abs__file__() for module in (sys, os, builtins): try: - self.failUnless(os.path.isabs(module.__file__), repr(module)) + self.assertTrue(os.path.isabs(module.__file__), repr(module)) except AttributeError: continue # We could try everything in sys.modules; however, when regrtest.py @@ -209,7 +209,7 @@ site.removeduppaths() seen_paths = set() for path in sys.path: - self.failUnless(path not in seen_paths) + self.assertTrue(path not in seen_paths) seen_paths.add(path) def test_add_build_dir(self): @@ -220,17 +220,17 @@ def test_setting_quit(self): # 'quit' and 'exit' should be injected into builtins - self.failUnless(hasattr(builtins, "quit")) - self.failUnless(hasattr(builtins, "exit")) + self.assertTrue(hasattr(builtins, "quit")) + self.assertTrue(hasattr(builtins, "exit")) def test_setting_copyright(self): # 'copyright' and 'credits' should be in builtins - self.failUnless(hasattr(builtins, "copyright")) - self.failUnless(hasattr(builtins, "credits")) + self.assertTrue(hasattr(builtins, "copyright")) + self.assertTrue(hasattr(builtins, "credits")) def test_setting_help(self): # 'help' should be set in builtins - self.failUnless(hasattr(builtins, "help")) + self.assertTrue(hasattr(builtins, "help")) def test_aliasing_mbcs(self): if sys.platform == "win32": @@ -244,7 +244,7 @@ def test_setdefaultencoding_removed(self): # Make sure sys.setdefaultencoding is gone - self.failUnless(not hasattr(sys, "setdefaultencoding")) + self.assertTrue(not hasattr(sys, "setdefaultencoding")) def test_sitecustomize_executed(self): # If sitecustomize is available, it should have been imported. Modified: python/branches/py3k/Lib/test/test_slice.py ============================================================================== --- python/branches/py3k/Lib/test/test_slice.py (original) +++ python/branches/py3k/Lib/test/test_slice.py Wed Jul 1 01:06:06 2009 @@ -73,7 +73,7 @@ obj = AnyClass() s = slice(obj) - self.assert_(s.stop is obj) + self.assertTrue(s.stop is obj) def test_indices(self): self.assertEqual(slice(None ).indices(10), (0, 10, 1)) Modified: python/branches/py3k/Lib/test/test_socket.py ============================================================================== --- python/branches/py3k/Lib/test/test_socket.py (original) +++ python/branches/py3k/Lib/test/test_socket.py Wed Jul 1 01:06:06 2009 @@ -224,7 +224,7 @@ def test_repr(self): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.assert_(repr(s).startswith("= 0, "Error resolving host to ip.") + self.assertTrue(ip.find('.') >= 0, "Error resolving host to ip.") try: hname, aliases, ipaddrs = socket.gethostbyaddr(ip) except socket.error: @@ -501,7 +501,7 @@ # it reasonable to get the host's addr in addition to 0.0.0.0. # At least for eCos. This is required for the S/390 to pass. my_ip_addr = socket.gethostbyname(socket.gethostname()) - self.assert_(name[0] in ("0.0.0.0", my_ip_addr), '%s invalid' % name[0]) + self.assertTrue(name[0] in ("0.0.0.0", my_ip_addr), '%s invalid' % name[0]) self.assertEqual(name[1], port) def testGetSockOpt(self): @@ -509,14 +509,14 @@ # We know a socket should start without reuse==0 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) reuse = sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) - self.failIf(reuse != 0, "initial mode is reuse") + self.assertFalse(reuse != 0, "initial mode is reuse") def testSetSockOpt(self): # Testing setsockopt() sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) reuse = sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) - self.failIf(reuse == 0, "failed to set reuse mode") + self.assertFalse(reuse == 0, "failed to set reuse mode") def testSendAfterClose(self): # testing send() after close() with timeout @@ -549,10 +549,10 @@ def test_sock_ioctl(self): if os.name != "nt": return - self.assert_(hasattr(socket.socket, 'ioctl')) - self.assert_(hasattr(socket, 'SIO_RCVALL')) - self.assert_(hasattr(socket, 'RCVALL_ON')) - self.assert_(hasattr(socket, 'RCVALL_OFF')) + self.assertTrue(hasattr(socket.socket, 'ioctl')) + self.assertTrue(hasattr(socket, 'SIO_RCVALL')) + self.assertTrue(hasattr(socket, 'RCVALL_ON')) + self.assertTrue(hasattr(socket, 'RCVALL_OFF')) class BasicTCPTest(SocketConnectedTest): @@ -724,7 +724,7 @@ except socket.error: pass end = time.time() - self.assert_((end - start) < 1.0, "Error setting non-blocking mode.") + self.assertTrue((end - start) < 1.0, "Error setting non-blocking mode.") def _testSetBlocking(self): pass @@ -801,7 +801,7 @@ def tearDown(self): self.serv_file.close() - self.assert_(self.serv_file.closed) + self.assertTrue(self.serv_file.closed) self.serv_file = None SocketConnectedTest.tearDown(self) @@ -811,7 +811,7 @@ def clientTearDown(self): self.cli_file.close() - self.assert_(self.cli_file.closed) + self.assertTrue(self.cli_file.closed) self.cli_file = None SocketConnectedTest.clientTearDown(self) @@ -879,10 +879,10 @@ self.cli_file.flush() def testClosedAttr(self): - self.assert_(not self.serv_file.closed) + self.assertTrue(not self.serv_file.closed) def _testClosedAttr(self): - self.assert_(not self.cli_file.closed) + self.assertTrue(not self.cli_file.closed) def testAttributes(self): self.assertEqual(self.serv_file.mode, 'rb') @@ -977,7 +977,7 @@ def testWithoutServer(self): port = support.find_unused_port() - self.failUnlessRaises( + self.assertRaises( socket.error, lambda: socket.create_connection((HOST, port)) ) @@ -1007,7 +1007,7 @@ testTimeoutDefault = _justAccept def _testTimeoutDefault(self): # passing no explicit timeout uses socket's global default - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(42) try: self.cli = socket.create_connection((HOST, self.port)) @@ -1018,7 +1018,7 @@ testTimeoutNone = _justAccept def _testTimeoutNone(self): # None timeout means the same as sock.settimeout(None) - self.assert_(socket.getdefaulttimeout() is None) + self.assertTrue(socket.getdefaulttimeout() is None) socket.setdefaulttimeout(30) try: self.cli = socket.create_connection((HOST, self.port), timeout=None) @@ -1063,7 +1063,7 @@ def _testOutsideTimeout(self): self.cli = sock = socket.create_connection((HOST, self.port), timeout=1) - self.failUnlessRaises(socket.timeout, lambda: sock.recv(5)) + self.assertRaises(socket.timeout, lambda: sock.recv(5)) class TCPTimeoutTest(SocketTCPTest): @@ -1072,7 +1072,7 @@ def raise_timeout(*args, **kwargs): self.serv.settimeout(1.0) self.serv.accept() - self.failUnlessRaises(socket.timeout, raise_timeout, + self.assertRaises(socket.timeout, raise_timeout, "Error generating a timeout exception (TCP)") def testTimeoutZero(self): @@ -1129,7 +1129,7 @@ def raise_timeout(*args, **kwargs): self.serv.settimeout(1.0) self.serv.recv(1024) - self.failUnlessRaises(socket.timeout, raise_timeout, + self.assertRaises(socket.timeout, raise_timeout, "Error generating a timeout exception (UDP)") def testTimeoutZero(self): @@ -1149,10 +1149,10 @@ class TestExceptions(unittest.TestCase): def testExceptionTree(self): - self.assert_(issubclass(socket.error, Exception)) - self.assert_(issubclass(socket.herror, socket.error)) - self.assert_(issubclass(socket.gaierror, socket.error)) - self.assert_(issubclass(socket.timeout, socket.error)) + self.assertTrue(issubclass(socket.error, Exception)) + self.assertTrue(issubclass(socket.herror, socket.error)) + self.assertTrue(issubclass(socket.gaierror, socket.error)) + self.assertTrue(issubclass(socket.timeout, socket.error)) class TestLinuxAbstractNamespace(unittest.TestCase): Modified: python/branches/py3k/Lib/test/test_stringprep.py ============================================================================== --- python/branches/py3k/Lib/test/test_stringprep.py (original) +++ python/branches/py3k/Lib/test/test_stringprep.py Wed Jul 1 01:06:06 2009 @@ -8,66 +8,66 @@ class StringprepTests(unittest.TestCase): def test(self): - self.failUnless(in_table_a1("\u0221")) - self.failIf(in_table_a1("\u0222")) + self.assertTrue(in_table_a1("\u0221")) + self.assertFalse(in_table_a1("\u0222")) - self.failUnless(in_table_b1("\u00ad")) - self.failIf(in_table_b1("\u00ae")) + self.assertTrue(in_table_b1("\u00ad")) + self.assertFalse(in_table_b1("\u00ae")) - self.failUnless(map_table_b2("\u0041"), "\u0061") - self.failUnless(map_table_b2("\u0061"), "\u0061") + self.assertTrue(map_table_b2("\u0041"), "\u0061") + self.assertTrue(map_table_b2("\u0061"), "\u0061") - self.failUnless(map_table_b3("\u0041"), "\u0061") - self.failUnless(map_table_b3("\u0061"), "\u0061") + self.assertTrue(map_table_b3("\u0041"), "\u0061") + self.assertTrue(map_table_b3("\u0061"), "\u0061") - self.failUnless(in_table_c11("\u0020")) - self.failIf(in_table_c11("\u0021")) + self.assertTrue(in_table_c11("\u0020")) + self.assertFalse(in_table_c11("\u0021")) - self.failUnless(in_table_c12("\u00a0")) - self.failIf(in_table_c12("\u00a1")) + self.assertTrue(in_table_c12("\u00a0")) + self.assertFalse(in_table_c12("\u00a1")) - self.failUnless(in_table_c12("\u00a0")) - self.failIf(in_table_c12("\u00a1")) + self.assertTrue(in_table_c12("\u00a0")) + self.assertFalse(in_table_c12("\u00a1")) - self.failUnless(in_table_c11_c12("\u00a0")) - self.failIf(in_table_c11_c12("\u00a1")) + self.assertTrue(in_table_c11_c12("\u00a0")) + self.assertFalse(in_table_c11_c12("\u00a1")) - self.failUnless(in_table_c21("\u001f")) - self.failIf(in_table_c21("\u0020")) + self.assertTrue(in_table_c21("\u001f")) + self.assertFalse(in_table_c21("\u0020")) - self.failUnless(in_table_c22("\u009f")) - self.failIf(in_table_c22("\u00a0")) + self.assertTrue(in_table_c22("\u009f")) + self.assertFalse(in_table_c22("\u00a0")) - self.failUnless(in_table_c21_c22("\u009f")) - self.failIf(in_table_c21_c22("\u00a0")) + self.assertTrue(in_table_c21_c22("\u009f")) + self.assertFalse(in_table_c21_c22("\u00a0")) - self.failUnless(in_table_c3("\ue000")) - self.failIf(in_table_c3("\uf900")) + self.assertTrue(in_table_c3("\ue000")) + self.assertFalse(in_table_c3("\uf900")) - self.failUnless(in_table_c4("\uffff")) - self.failIf(in_table_c4("\u0000")) + self.assertTrue(in_table_c4("\uffff")) + self.assertFalse(in_table_c4("\u0000")) - self.failUnless(in_table_c5("\ud800")) - self.failIf(in_table_c5("\ud7ff")) + self.assertTrue(in_table_c5("\ud800")) + self.assertFalse(in_table_c5("\ud7ff")) - self.failUnless(in_table_c6("\ufff9")) - self.failIf(in_table_c6("\ufffe")) + self.assertTrue(in_table_c6("\ufff9")) + self.assertFalse(in_table_c6("\ufffe")) - self.failUnless(in_table_c7("\u2ff0")) - self.failIf(in_table_c7("\u2ffc")) + self.assertTrue(in_table_c7("\u2ff0")) + self.assertFalse(in_table_c7("\u2ffc")) - self.failUnless(in_table_c8("\u0340")) - self.failIf(in_table_c8("\u0342")) + self.assertTrue(in_table_c8("\u0340")) + self.assertFalse(in_table_c8("\u0342")) # C.9 is not in the bmp - # self.failUnless(in_table_c9(u"\U000E0001")) - # self.failIf(in_table_c8(u"\U000E0002")) + # self.assertTrue(in_table_c9(u"\U000E0001")) + # self.assertFalse(in_table_c8(u"\U000E0002")) - self.failUnless(in_table_d1("\u05be")) - self.failIf(in_table_d1("\u05bf")) + self.assertTrue(in_table_d1("\u05be")) + self.assertFalse(in_table_d1("\u05bf")) - self.failUnless(in_table_d2("\u0041")) - self.failIf(in_table_d2("\u0040")) + self.assertTrue(in_table_d2("\u0041")) + self.assertFalse(in_table_d2("\u0040")) # This would generate a hash of all predicates. However, running # it is quite expensive, and only serves to detect changes in the Modified: python/branches/py3k/Lib/test/test_strptime.py ============================================================================== --- python/branches/py3k/Lib/test/test_strptime.py (original) +++ python/branches/py3k/Lib/test/test_strptime.py Wed Jul 1 01:06:06 2009 @@ -13,7 +13,7 @@ class getlang_Tests(unittest.TestCase): """Test _getlang""" def test_basic(self): - self.failUnlessEqual(_strptime._getlang(), locale.getlocale(locale.LC_TIME)) + self.assertEqual(_strptime._getlang(), locale.getlocale(locale.LC_TIME)) class LocaleTime_Tests(unittest.TestCase): """Tests for _strptime.LocaleTime. @@ -36,9 +36,9 @@ """ strftime_output = time.strftime(directive, self.time_tuple).lower() comparison = testing[self.time_tuple[tuple_position]] - self.failUnless(strftime_output in testing, "%s: not found in tuple" % + self.assertTrue(strftime_output in testing, "%s: not found in tuple" % error_msg) - self.failUnless(comparison == strftime_output, + self.assertTrue(comparison == strftime_output, "%s: position within tuple incorrect; %s != %s" % (error_msg, comparison, strftime_output)) @@ -61,18 +61,18 @@ def test_am_pm(self): # Make sure AM/PM representation done properly strftime_output = time.strftime("%p", self.time_tuple).lower() - self.failUnless(strftime_output in self.LT_ins.am_pm, + self.assertTrue(strftime_output in self.LT_ins.am_pm, "AM/PM representation not in tuple") if self.time_tuple[3] < 12: position = 0 else: position = 1 - self.failUnless(strftime_output == self.LT_ins.am_pm[position], + self.assertTrue(strftime_output == self.LT_ins.am_pm[position], "AM/PM representation in the wrong position within the tuple") def test_timezone(self): # Make sure timezone is correct timezone = time.strftime("%Z", self.time_tuple).lower() if timezone: - self.failUnless(timezone in self.LT_ins.timezone[0] or \ + self.assertTrue(timezone in self.LT_ins.timezone[0] or \ timezone in self.LT_ins.timezone[1], "timezone %s not found in %s" % (timezone, self.LT_ins.timezone)) @@ -86,26 +86,26 @@ # output. magic_date = (1999, 3, 17, 22, 44, 55, 2, 76, 0) strftime_output = time.strftime("%c", magic_date) - self.failUnless(strftime_output == time.strftime(self.LT_ins.LC_date_time, + self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_date_time, magic_date), "LC_date_time incorrect") strftime_output = time.strftime("%x", magic_date) - self.failUnless(strftime_output == time.strftime(self.LT_ins.LC_date, + self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_date, magic_date), "LC_date incorrect") strftime_output = time.strftime("%X", magic_date) - self.failUnless(strftime_output == time.strftime(self.LT_ins.LC_time, + self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_time, magic_date), "LC_time incorrect") LT = _strptime.LocaleTime() LT.am_pm = ('', '') - self.failUnless(LT.LC_time, "LocaleTime's LC directives cannot handle " + self.assertTrue(LT.LC_time, "LocaleTime's LC directives cannot handle " "empty strings") def test_lang(self): # Make sure lang is set to what _getlang() returns # Assuming locale has not changed between now and when self.LT_ins was created - self.failUnlessEqual(self.LT_ins.lang, _strptime._getlang()) + self.assertEqual(self.LT_ins.lang, _strptime._getlang()) class TimeRETests(unittest.TestCase): @@ -119,13 +119,13 @@ def test_pattern(self): # Test TimeRE.pattern pattern_string = self.time_re.pattern(r"%a %A %d") - self.failUnless(pattern_string.find(self.locale_time.a_weekday[2]) != -1, + self.assertTrue(pattern_string.find(self.locale_time.a_weekday[2]) != -1, "did not find abbreviated weekday in pattern string '%s'" % pattern_string) - self.failUnless(pattern_string.find(self.locale_time.f_weekday[4]) != -1, + self.assertTrue(pattern_string.find(self.locale_time.f_weekday[4]) != -1, "did not find full weekday in pattern string '%s'" % pattern_string) - self.failUnless(pattern_string.find(self.time_re['d']) != -1, + self.assertTrue(pattern_string.find(self.time_re['d']) != -1, "did not find 'd' directive pattern string '%s'" % pattern_string) @@ -133,23 +133,23 @@ # Make sure any characters in the format string that might be taken as # regex syntax is escaped. pattern_string = self.time_re.pattern("\d+") - self.failUnless(r"\\d\+" in pattern_string, + self.assertTrue(r"\\d\+" in pattern_string, "%s does not have re characters escaped properly" % pattern_string) def test_compile(self): # Check that compiled regex is correct found = self.time_re.compile(r"%A").match(self.locale_time.f_weekday[6]) - self.failUnless(found and found.group('A') == self.locale_time.f_weekday[6], + self.assertTrue(found and found.group('A') == self.locale_time.f_weekday[6], "re object for '%A' failed") compiled = self.time_re.compile(r"%a %b") found = compiled.match("%s %s" % (self.locale_time.a_weekday[4], self.locale_time.a_month[4])) - self.failUnless(found, + self.assertTrue(found, "Match failed with '%s' regex and '%s' string" % (compiled.pattern, "%s %s" % (self.locale_time.a_weekday[4], self.locale_time.a_month[4]))) - self.failUnless(found.group('a') == self.locale_time.a_weekday[4] and + self.assertTrue(found.group('a') == self.locale_time.a_weekday[4] and found.group('b') == self.locale_time.a_month[4], "re object couldn't find the abbreviated weekday month in " "'%s' using '%s'; group 'a' = '%s', group 'b' = %s'" % @@ -159,7 +159,7 @@ 'U','w','W','x','X','y','Y','Z','%'): compiled = self.time_re.compile("%" + directive) found = compiled.match(time.strftime("%" + directive)) - self.failUnless(found, "Matching failed on '%s' using '%s' regex" % + self.assertTrue(found, "Matching failed on '%s' using '%s' regex" % (time.strftime("%" + directive), compiled.pattern)) @@ -168,14 +168,14 @@ # Fixes bug #661354 test_locale = _strptime.LocaleTime() test_locale.timezone = (frozenset(), frozenset()) - self.failUnless(_strptime.TimeRE(test_locale).pattern("%Z") == '', + self.assertTrue(_strptime.TimeRE(test_locale).pattern("%Z") == '', "with timezone == ('',''), TimeRE().pattern('%Z') != ''") def test_matching_with_escapes(self): # Make sure a format that requires escaping of characters works compiled_re = self.time_re.compile("\w+ %m") found = compiled_re.match("\w+ 10") - self.failUnless(found, "Escaping failed of format '\w+ 10'") + self.assertTrue(found, "Escaping failed of format '\w+ 10'") def test_locale_data_w_regex_metacharacters(self): # Check that if locale data contains regex metacharacters they are @@ -186,7 +186,7 @@ "Tokyo (standard time)")), frozenset("Tokyo (daylight time)")) time_re = _strptime.TimeRE(locale_time) - self.failUnless(time_re.compile("%Z").match("Tokyo (standard time)"), + self.assertTrue(time_re.compile("%Z").match("Tokyo (standard time)"), "locale data that contains regex metacharacters is not" " properly escaped") @@ -195,8 +195,8 @@ # 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")) + self.assertTrue(not re.match(pattern, "180")) + self.assertTrue(re.match(pattern, "18 0")) class StrptimeTests(unittest.TestCase): @@ -229,7 +229,7 @@ """Helper fxn in testing.""" strf_output = time.strftime("%" + directive, self.time_tuple) strp_output = _strptime._strptime_time(strf_output, "%" + directive) - self.failUnless(strp_output[position] == self.time_tuple[position], + self.assertTrue(strp_output[position] == self.time_tuple[position], "testing of '%s' directive failed; '%s' -> %s != %s" % (directive, strf_output, strp_output[position], self.time_tuple[position])) @@ -243,7 +243,7 @@ for bound in bounds: strp_output = _strptime._strptime_time(bound, '%y') expected_result = century + int(bound) - self.failUnless(strp_output[0] == expected_result, + self.assertTrue(strp_output[0] == expected_result, "'y' test failed; passed in '%s' " "and returned '%s'" % (bound, strp_output[0])) @@ -261,7 +261,7 @@ self.helper('H', 3) strf_output = time.strftime("%I %p", self.time_tuple) strp_output = _strptime._strptime_time(strf_output, "%I %p") - self.failUnless(strp_output[3] == self.time_tuple[3], + self.assertTrue(strp_output[3] == self.time_tuple[3], "testing of '%%I %%p' directive failed; '%s' -> %s != %s" % (strf_output, strp_output[3], self.time_tuple[3])) @@ -294,9 +294,9 @@ # Check for equal timezone names deals with bad locale info when this # occurs; first found in FreeBSD 4.4. strp_output = _strptime._strptime_time("UTC", "%Z") - self.failUnlessEqual(strp_output.tm_isdst, 0) + self.assertEqual(strp_output.tm_isdst, 0) strp_output = _strptime._strptime_time("GMT", "%Z") - self.failUnlessEqual(strp_output.tm_isdst, 0) + self.assertEqual(strp_output.tm_isdst, 0) if sys.platform == "mac": # Timezones don't really work on MacOS9 return @@ -305,11 +305,11 @@ strp_output = _strptime._strptime_time(strf_output, "%Z") locale_time = _strptime.LocaleTime() if time.tzname[0] != time.tzname[1] or not time.daylight: - self.failUnless(strp_output[8] == time_tuple[8], + self.assertTrue(strp_output[8] == time_tuple[8], "timezone check failed; '%s' -> %s != %s" % (strf_output, strp_output[8], time_tuple[8])) else: - self.failUnless(strp_output[8] == -1, + self.assertTrue(strp_output[8] == -1, "LocaleTime().timezone has duplicate values and " "time.daylight but timezone value not set to -1") @@ -327,7 +327,7 @@ time.tzname = (tz_name, tz_name) time.daylight = 1 tz_value = _strptime._strptime_time(tz_name, "%Z")[8] - self.failUnlessEqual(tz_value, -1, + self.assertEqual(tz_value, -1, "%s lead to a timezone value of %s instead of -1 when " "time.daylight set to %s and passing in %s" % (time.tzname, tz_value, time.daylight, tz_name)) @@ -354,25 +354,25 @@ # Make sure % signs are handled properly strf_output = time.strftime("%m %% %Y", self.time_tuple) strp_output = _strptime._strptime_time(strf_output, "%m %% %Y") - self.failUnless(strp_output[0] == self.time_tuple[0] and + self.assertTrue(strp_output[0] == self.time_tuple[0] and strp_output[1] == self.time_tuple[1], "handling of percent sign failed") def test_caseinsensitive(self): # Should handle names case-insensitively. strf_output = time.strftime("%B", self.time_tuple) - self.failUnless(_strptime._strptime_time(strf_output.upper(), "%B"), + self.assertTrue(_strptime._strptime_time(strf_output.upper(), "%B"), "strptime does not handle ALL-CAPS names properly") - self.failUnless(_strptime._strptime_time(strf_output.lower(), "%B"), + self.assertTrue(_strptime._strptime_time(strf_output.lower(), "%B"), "strptime does not handle lowercase names properly") - self.failUnless(_strptime._strptime_time(strf_output.capitalize(), "%B"), + self.assertTrue(_strptime._strptime_time(strf_output.capitalize(), "%B"), "strptime does not handle capword names properly") def test_defaults(self): # Default return value should be (1900, 1, 1, 0, 0, 0, 0, 1, 0) defaults = (1900, 1, 1, 0, 0, 0, 0, 1, -1) strp_output = _strptime._strptime_time('1', '%m') - self.failUnless(strp_output == defaults, + self.assertTrue(strp_output == defaults, "Default values for strptime() are incorrect;" " %s != %s" % (strp_output, defaults)) @@ -383,7 +383,7 @@ # escaped. # Test instigated by bug #796149 . need_escaping = ".^$*+?{}\[]|)(" - self.failUnless(_strptime._strptime_time(need_escaping, need_escaping)) + self.assertTrue(_strptime._strptime_time(need_escaping, need_escaping)) class Strptime12AMPMTests(unittest.TestCase): """Test a _strptime regression in '%I %p' at 12 noon (12 PM)""" @@ -416,7 +416,7 @@ format_string = "%Y %m %d %H %M %S %w %Z" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) - self.failUnless(result.tm_yday == self.time_tuple.tm_yday, + self.assertTrue(result.tm_yday == self.time_tuple.tm_yday, "Calculation of tm_yday failed; %s != %s" % (result.tm_yday, self.time_tuple.tm_yday)) @@ -425,7 +425,7 @@ format_string = "%Y %H %M %S %w %j %Z" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) - self.failUnless(result.tm_year == self.time_tuple.tm_year and + self.assertTrue(result.tm_year == self.time_tuple.tm_year and result.tm_mon == self.time_tuple.tm_mon and result.tm_mday == self.time_tuple.tm_mday, "Calculation of Gregorian date failed;" @@ -439,7 +439,7 @@ format_string = "%Y %m %d %H %S %j %Z" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) - self.failUnless(result.tm_wday == self.time_tuple.tm_wday, + self.assertTrue(result.tm_wday == self.time_tuple.tm_wday, "Calculation of day of the week failed;" "%s != %s" % (result.tm_wday, self.time_tuple.tm_wday)) @@ -452,7 +452,7 @@ dt_date = datetime_date(*ymd_tuple) strp_input = dt_date.strftime(format_string) strp_output = _strptime._strptime_time(strp_input, format_string) - self.failUnless(strp_output[:3] == ymd_tuple, + self.assertTrue(strp_output[:3] == ymd_tuple, "%s(%s) test failed w/ '%s': %s != %s (%s != %s)" % (test_reason, directive, strp_input, strp_output[:3], ymd_tuple, @@ -495,8 +495,8 @@ _strptime._TimeRE_cache.locale_time.lang = "Ni" original_time_re = id(_strptime._TimeRE_cache) _strptime._strptime_time("10", "%d") - self.failIfEqual(original_time_re, id(_strptime._TimeRE_cache)) - self.failUnlessEqual(len(_strptime._regex_cache), 1) + self.assertNotEqual(original_time_re, id(_strptime._TimeRE_cache)) + self.assertEqual(len(_strptime._regex_cache), 1) def test_regex_cleanup(self): # Make sure cached regexes are discarded when cache becomes "full". @@ -509,7 +509,7 @@ _strptime._regex_cache[bogus_key] = None bogus_key += 1 _strptime._strptime_time("10", "%d") - self.failUnlessEqual(len(_strptime._regex_cache), 1) + self.assertEqual(len(_strptime._regex_cache), 1) def test_new_localetime(self): # A new LocaleTime instance should be created when a new TimeRE object @@ -517,7 +517,7 @@ locale_time_id = id(_strptime._TimeRE_cache.locale_time) _strptime._TimeRE_cache.locale_time.lang = "Ni" _strptime._strptime_time("10", "%d") - self.failIfEqual(locale_time_id, + self.assertNotEqual(locale_time_id, id(_strptime._TimeRE_cache.locale_time)) def test_TimeRE_recreation(self): @@ -538,7 +538,7 @@ # Get the new cache object's id. second_time_re_id = id(_strptime._TimeRE_cache) # They should not be equal. - self.failIfEqual(first_time_re_id, second_time_re_id) + self.assertNotEqual(first_time_re_id, second_time_re_id) # Possible test locale is not supported while initial locale is. # If this is the case just suppress the exception and fall-through # to the reseting to the original locale. Modified: python/branches/py3k/Lib/test/test_struct.py ============================================================================== --- python/branches/py3k/Lib/test/test_struct.py (original) +++ python/branches/py3k/Lib/test/test_struct.py Wed Jul 1 01:06:06 2009 @@ -126,7 +126,7 @@ # encoding of the string when packed. arg = bytes(arg, 'latin1') if rev != arg: - self.assert_(asy) + self.assertTrue(asy) def test_native_qQ(self): # can't pack -1 as unsigned regardless @@ -192,7 +192,7 @@ expected = x if x < 0: expected += 1 << self.bitsize - self.assert_(expected > 0) + self.assertTrue(expected > 0) expected = hex(expected)[2:] # chop "0x" if len(expected) & 1: expected = "0" + expected Modified: python/branches/py3k/Lib/test/test_structseq.py ============================================================================== --- python/branches/py3k/Lib/test/test_structseq.py (original) +++ python/branches/py3k/Lib/test/test_structseq.py Wed Jul 1 01:06:06 2009 @@ -28,7 +28,7 @@ def test_repr(self): t = time.gmtime() - self.assert_(repr(t)) + self.assertTrue(repr(t)) t = time.gmtime(0) self.assertEqual(repr(t), "time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, " @@ -50,8 +50,8 @@ def test_contains(self): t1 = time.gmtime() for item in t1: - self.assert_(item in t1) - self.assert_(-42 not in t1) + self.assertTrue(item in t1) + self.assertTrue(-42 not in t1) def test_hash(self): t1 = time.gmtime() @@ -61,11 +61,11 @@ t1 = time.gmtime() t2 = type(t1)(t1) self.assertEqual(t1, t2) - self.assert_(not (t1 < t2)) - self.assert_(t1 <= t2) - self.assert_(not (t1 > t2)) - self.assert_(t1 >= t2) - self.assert_(not (t1 != t2)) + self.assertTrue(not (t1 < t2)) + self.assertTrue(t1 <= t2) + self.assertTrue(not (t1 > t2)) + self.assertTrue(t1 >= t2) + self.assertTrue(not (t1 != t2)) def test_fields(self): t = time.gmtime() Modified: python/branches/py3k/Lib/test/test_subprocess.py ============================================================================== --- python/branches/py3k/Lib/test/test_subprocess.py (original) +++ python/branches/py3k/Lib/test/test_subprocess.py Wed Jul 1 01:06:06 2009 @@ -491,7 +491,7 @@ # but, based on system scheduling we can't control, it's possible # poll() never returned None. It "should be" very rare that it # didn't go around at least twice. - self.assert_(count >= 2) + self.assertTrue(count >= 2) # Subsequent invocations should just return the returncode self.assertEqual(p.poll(), 0) @@ -657,7 +657,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.send_signal(signal.SIGINT) self.assertNotEqual(p.wait(), 0) @@ -665,7 +665,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.kill() self.assertEqual(p.wait(), -signal.SIGKILL) @@ -673,7 +673,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.terminate() self.assertEqual(p.wait(), -signal.SIGTERM) @@ -751,7 +751,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.send_signal(signal.SIGTERM) self.assertNotEqual(p.wait(), 0) @@ -759,7 +759,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.kill() self.assertNotEqual(p.wait(), 0) @@ -767,7 +767,7 @@ p = subprocess.Popen([sys.executable, "-c", "input()"]) - self.assert_(p.poll() is None, p.poll()) + self.assertTrue(p.poll() is None, p.poll()) p.terminate() self.assertNotEqual(p.wait(), 0) Modified: python/branches/py3k/Lib/test/test_symtable.py ============================================================================== --- python/branches/py3k/Lib/test/test_symtable.py (original) +++ python/branches/py3k/Lib/test/test_symtable.py Wed Jul 1 01:06:06 2009 @@ -122,7 +122,7 @@ self.assertTrue(self.top.lookup("namespace_test").is_namespace()) self.assertFalse(self.spam.lookup("x").is_namespace()) - self.assert_(self.top.lookup("spam").get_namespace() is self.spam) + self.assertTrue(self.top.lookup("spam").get_namespace() is self.spam) ns_test = self.top.lookup("namespace_test") self.assertEqual(len(ns_test.get_namespaces()), 2) self.assertRaises(ValueError, ns_test.get_namespace) Modified: python/branches/py3k/Lib/test/test_sys.py ============================================================================== --- python/branches/py3k/Lib/test/test_sys.py (original) +++ python/branches/py3k/Lib/test/test_sys.py Wed Jul 1 01:06:06 2009 @@ -30,7 +30,7 @@ dh(None) self.assertEqual(out.getvalue(), "") - self.assert_(not hasattr(builtins, "_")) + self.assertTrue(not hasattr(builtins, "_")) dh(42) self.assertEqual(out.getvalue(), "42\n") self.assertEqual(builtins._, 42) @@ -62,12 +62,12 @@ except ValueError as exc: eh(*sys.exc_info()) - self.assert_(err.getvalue().endswith("ValueError: 42\n")) + self.assertTrue(err.getvalue().endswith("ValueError: 42\n")) def test_excepthook(self): with test.support.captured_output("stderr") as stderr: sys.excepthook(1, '1', 1) - self.assert_("TypeError: print_exception(): Exception expected for " \ + self.assertTrue("TypeError: print_exception(): Exception expected for " \ "value, str found" in stderr.getvalue()) # FIXME: testing the code for a lost or replaced excepthook in @@ -136,7 +136,7 @@ def test_getdefaultencoding(self): self.assertRaises(TypeError, sys.getdefaultencoding, 42) # can't check more than the type, as the user might have changed it - self.assert_(isinstance(sys.getdefaultencoding(), str)) + self.assertTrue(isinstance(sys.getdefaultencoding(), str)) # testing sys.settrace() is done in test_trace.py # testing sys.setprofile() is done in test_profile.py @@ -203,20 +203,20 @@ def test_getwindowsversion(self): if hasattr(sys, "getwindowsversion"): v = sys.getwindowsversion() - self.assert_(isinstance(v, tuple)) + self.assertTrue(isinstance(v, tuple)) self.assertEqual(len(v), 5) - self.assert_(isinstance(v[0], int)) - self.assert_(isinstance(v[1], int)) - self.assert_(isinstance(v[2], int)) - self.assert_(isinstance(v[3], int)) - self.assert_(isinstance(v[4], str)) + self.assertTrue(isinstance(v[0], int)) + self.assertTrue(isinstance(v[1], int)) + self.assertTrue(isinstance(v[2], int)) + self.assertTrue(isinstance(v[3], int)) + self.assertTrue(isinstance(v[4], str)) def test_call_tracing(self): self.assertRaises(TypeError, sys.call_tracing, type, 2) def test_dlopenflags(self): if hasattr(sys, "setdlopenflags"): - self.assert_(hasattr(sys, "getdlopenflags")) + self.assertTrue(hasattr(sys, "getdlopenflags")) self.assertRaises(TypeError, sys.getdlopenflags, 42) oldflags = sys.getdlopenflags() self.assertRaises(TypeError, sys.setdlopenflags) @@ -237,12 +237,12 @@ del n self.assertEqual(sys.getrefcount(None), c) if hasattr(sys, "gettotalrefcount"): - self.assert_(isinstance(sys.gettotalrefcount(), int)) + self.assertTrue(isinstance(sys.gettotalrefcount(), int)) def test_getframe(self): self.assertRaises(TypeError, sys._getframe, 42, 42) self.assertRaises(ValueError, sys._getframe, 2000000000) - self.assert_( + self.assertTrue( SysModuleTest.test_getframe.__code__ \ is sys._getframe().f_code ) @@ -293,12 +293,12 @@ d = sys._current_frames() main_id = _thread.get_ident() - self.assert_(main_id in d) - self.assert_(thread_id in d) + self.assertTrue(main_id in d) + self.assertTrue(thread_id in d) # Verify that the captured main-thread frame is _this_ frame. frame = d.pop(main_id) - self.assert_(frame is sys._getframe()) + self.assertTrue(frame is sys._getframe()) # Verify that the captured thread frame is blocked in g456, called # from f123. This is a litte tricky, since various bits of @@ -316,7 +316,7 @@ # And the next record must be for g456(). filename, lineno, funcname, sourceline = stack[i+1] self.assertEqual(funcname, "g456") - self.assert_(sourceline in ["leave_g.wait()", "entered_g.set()"]) + self.assertTrue(sourceline in ["leave_g.wait()", "entered_g.set()"]) # Reap the spawned thread. leave_g.set() @@ -328,50 +328,50 @@ # "thread id" 0. d = sys._current_frames() self.assertEqual(len(d), 1) - self.assert_(0 in d) - self.assert_(d[0] is sys._getframe()) + self.assertTrue(0 in d) + self.assertTrue(d[0] is sys._getframe()) def test_attributes(self): - self.assert_(isinstance(sys.api_version, int)) - self.assert_(isinstance(sys.argv, list)) - self.assert_(sys.byteorder in ("little", "big")) - self.assert_(isinstance(sys.builtin_module_names, tuple)) - self.assert_(isinstance(sys.copyright, str)) - self.assert_(isinstance(sys.exec_prefix, str)) - self.assert_(isinstance(sys.executable, str)) + self.assertTrue(isinstance(sys.api_version, int)) + self.assertTrue(isinstance(sys.argv, list)) + self.assertTrue(sys.byteorder in ("little", "big")) + self.assertTrue(isinstance(sys.builtin_module_names, tuple)) + self.assertTrue(isinstance(sys.copyright, str)) + self.assertTrue(isinstance(sys.exec_prefix, str)) + self.assertTrue(isinstance(sys.executable, str)) self.assertEqual(len(sys.float_info), 11) self.assertEqual(sys.float_info.radix, 2) self.assertEqual(len(sys.int_info), 2) - self.assert_(sys.int_info.bits_per_digit % 5 == 0) - self.assert_(sys.int_info.sizeof_digit >= 1) + self.assertTrue(sys.int_info.bits_per_digit % 5 == 0) + self.assertTrue(sys.int_info.sizeof_digit >= 1) self.assertEqual(type(sys.int_info.bits_per_digit), int) self.assertEqual(type(sys.int_info.sizeof_digit), int) - self.assert_(isinstance(sys.hexversion, int)) - self.assert_(isinstance(sys.maxsize, int)) - self.assert_(isinstance(sys.maxunicode, int)) - self.assert_(isinstance(sys.platform, str)) - self.assert_(isinstance(sys.prefix, str)) - self.assert_(isinstance(sys.version, str)) + self.assertTrue(isinstance(sys.hexversion, int)) + self.assertTrue(isinstance(sys.maxsize, int)) + self.assertTrue(isinstance(sys.maxunicode, int)) + self.assertTrue(isinstance(sys.platform, str)) + self.assertTrue(isinstance(sys.prefix, str)) + self.assertTrue(isinstance(sys.version, str)) vi = sys.version_info - self.assert_(isinstance(vi[:], tuple)) + self.assertTrue(isinstance(vi[:], tuple)) self.assertEqual(len(vi), 5) - self.assert_(isinstance(vi[0], int)) - self.assert_(isinstance(vi[1], int)) - self.assert_(isinstance(vi[2], int)) - self.assert_(vi[3] in ("alpha", "beta", "candidate", "final")) - self.assert_(isinstance(vi[4], int)) - self.assert_(isinstance(vi.major, int)) - self.assert_(isinstance(vi.minor, int)) - self.assert_(isinstance(vi.micro, int)) - self.assert_(vi.releaselevel in + self.assertTrue(isinstance(vi[0], int)) + self.assertTrue(isinstance(vi[1], int)) + self.assertTrue(isinstance(vi[2], int)) + self.assertTrue(vi[3] in ("alpha", "beta", "candidate", "final")) + self.assertTrue(isinstance(vi[4], int)) + self.assertTrue(isinstance(vi.major, int)) + self.assertTrue(isinstance(vi.minor, int)) + self.assertTrue(isinstance(vi.micro, int)) + self.assertTrue(vi.releaselevel in ("alpha", "beta", "candidate", "final")) - self.assert_(isinstance(vi.serial, int)) + self.assertTrue(isinstance(vi.serial, int)) self.assertEqual(vi[0], vi.major) self.assertEqual(vi[1], vi.minor) self.assertEqual(vi[2], vi.micro) self.assertEqual(vi[3], vi.releaselevel) self.assertEqual(vi[4], vi.serial) - self.assert_(vi > (1,0,0)) + self.assertTrue(vi > (1,0,0)) def test_43581(self): # Can't use sys.stdout, as this is a StringIO object when @@ -381,9 +381,9 @@ def test_intern(self): self.assertRaises(TypeError, sys.intern) s = "never interned before" - self.assert_(sys.intern(s) is s) + self.assertTrue(sys.intern(s) is s) s2 = s.swapcase().swapcase() - self.assert_(sys.intern(s2) is s) + self.assertTrue(sys.intern(s2) is s) # Subclasses of string can't be interned, because they # provide too much opportunity for insane things to happen. @@ -398,15 +398,15 @@ def test_sys_flags(self): - self.failUnless(sys.flags) + self.assertTrue(sys.flags) attrs = ("debug", "division_warning", "inspect", "interactive", "optimize", "dont_write_bytecode", "no_user_site", "no_site", "ignore_environment", "verbose", "bytes_warning") for attr in attrs: - self.assert_(hasattr(sys.flags, attr), attr) + self.assertTrue(hasattr(sys.flags, attr), attr) self.assertEqual(type(getattr(sys.flags, attr)), int, attr) - self.assert_(repr(sys.flags)) + self.assertTrue(repr(sys.flags)) self.assertEqual(len(sys.flags), len(attrs)) def test_clear_type_cache(self): Modified: python/branches/py3k/Lib/test/test_tarfile.py ============================================================================== --- python/branches/py3k/Lib/test/test_tarfile.py (original) +++ python/branches/py3k/Lib/test/test_tarfile.py Wed Jul 1 01:06:06 2009 @@ -57,7 +57,7 @@ tarinfo = self.tar.getmember("ustar/regtype") fobj = self.tar.extractfile(tarinfo) data = fobj.read() - self.assert_((len(data), md5sum(data)) == (tarinfo.size, md5_regtype), + self.assertTrue((len(data), md5sum(data)) == (tarinfo.size, md5_regtype), "regular file extraction failed") def test_fileobj_readlines(self): @@ -68,11 +68,11 @@ lines1 = fobj1.readlines() lines2 = fobj2.readlines() - self.assert_(lines1 == lines2, + self.assertTrue(lines1 == lines2, "fileobj.readlines() failed") - self.assert_(len(lines2) == 114, + self.assertTrue(len(lines2) == 114, "fileobj.readlines() failed") - self.assert_(lines2[83] == \ + self.assertTrue(lines2[83] == \ "I will gladly admit that Python is not the fastest running scripting language.\n", "fileobj.readlines() failed") @@ -83,7 +83,7 @@ fobj2 = self.tar.extractfile(tarinfo) lines1 = fobj1.readlines() lines2 = list(io.TextIOWrapper(fobj2)) - self.assert_(lines1 == lines2, + self.assertTrue(lines1 == lines2, "fileobj.__iter__() failed") def test_fileobj_seek(self): @@ -109,12 +109,12 @@ self.assertEqual(2048, fobj.tell(), "seek() to positive relative position failed") s = fobj.read(10) - self.assert_(s == data[2048:2058], + self.assertTrue(s == data[2048:2058], "read() after seek failed") fobj.seek(0, 2) self.assertEqual(tarinfo.size, fobj.tell(), "seek() to file's end failed") - self.assert_(fobj.read() == b"", + self.assertTrue(fobj.read() == b"", "read() at file's end did not return empty string") fobj.seek(-tarinfo.size, 2) self.assertEqual(0, fobj.tell(), @@ -123,13 +123,13 @@ s1 = fobj.readlines() fobj.seek(512) s2 = fobj.readlines() - self.assert_(s1 == s2, + self.assertTrue(s1 == s2, "readlines() after seek failed") fobj.seek(0) self.assertEqual(len(fobj.readline()), fobj.tell(), "tell() after readline() failed") fobj.seek(512) - self.assert_(len(fobj.readline()) + 512 == fobj.tell(), + self.assertTrue(len(fobj.readline()) + 512 == fobj.tell(), "tell() after seek() and readline() failed") fobj.seek(0) line = fobj.readline() @@ -204,7 +204,7 @@ # Old V7 tars create directory members using an AREGTYPE # header with a "/" appended to the filename field. tarinfo = self.tar.getmember("misc/dirtype-old-v7") - self.assert_(tarinfo.type == tarfile.DIRTYPE, + self.assertTrue(tarinfo.type == tarfile.DIRTYPE, "v7 dirtype failed") def test_xstar_type(self): @@ -218,15 +218,15 @@ def test_check_members(self): for tarinfo in self.tar: - self.assert_(int(tarinfo.mtime) == 0o7606136617, + self.assertTrue(int(tarinfo.mtime) == 0o7606136617, "wrong mtime for %s" % tarinfo.name) if not tarinfo.name.startswith("ustar/"): continue - self.assert_(tarinfo.uname == "tarfile", + self.assertTrue(tarinfo.uname == "tarfile", "wrong uname for %s" % tarinfo.name) def test_find_members(self): - self.assert_(self.tar.getmembers()[-1].name == "misc/eof", + self.assertTrue(self.tar.getmembers()[-1].name == "misc/eof", "could not find all members") def test_extract_hardlink(self): @@ -275,7 +275,7 @@ tarinfo = self.tar.next() # get "regtype" (can't use getmember) fobj = self.tar.extractfile(tarinfo) data = fobj.read() - self.assert_((len(data), md5sum(data)) == (tarinfo.size, md5_regtype), + self.assertTrue((len(data), md5sum(data)) == (tarinfo.size, md5_regtype), "regular file extraction failed") def test_provoke_stream_error(self): @@ -292,7 +292,7 @@ t2 = tar2.next() if t1 is None: break - self.assert_(t2 is not None, "stream.next() failed.") + self.assertTrue(t2 is not None, "stream.next() failed.") if t2.islnk() or t2.issym(): self.assertRaises(tarfile.StreamError, tar2.extractfile, t2) @@ -302,7 +302,7 @@ v2 = tar2.extractfile(t2) if v1 is None: continue - self.assert_(v2 is not None, "stream.extractfile() failed") + self.assertTrue(v2 is not None, "stream.extractfile() failed") self.assertEqual(v1.read(), v2.read(), "stream extraction failed") tar1.close() @@ -364,7 +364,7 @@ def _test_member(self, tarinfo, chksum=None, **kwargs): if chksum is not None: - self.assert_(md5sum(self.tar.extractfile(tarinfo).read()) == chksum, + self.assertTrue(md5sum(self.tar.extractfile(tarinfo).read()) == chksum, "wrong md5sum for %s" % tarinfo.name) kwargs["mtime"] = 0o7606136617 @@ -375,7 +375,7 @@ kwargs["uname"] = "tarfile" kwargs["gname"] = "tarfile" for k, v in kwargs.items(): - self.assert_(getattr(tarinfo, k) == v, + self.assertTrue(getattr(tarinfo, k) == v, "wrong value in %s field of %s" % (k, tarinfo.name)) def test_find_regtype(self): @@ -424,7 +424,7 @@ def test_find_ustar_longname(self): name = "ustar/" + "12345/" * 39 + "1234567/longname" - self.assert_(name in self.tar.getnames()) + self.assertTrue(name in self.tar.getnames()) def test_find_regtype_oldv7(self): tarinfo = self.tar.getmember("misc/regtype-old-v7") @@ -445,7 +445,7 @@ tarinfo = self.tar.getmember(longname) except KeyError: self.fail("longname not found") - self.assert_(tarinfo.type != tarfile.DIRTYPE, "read longname as dirtype") + self.assertTrue(tarinfo.type != tarfile.DIRTYPE, "read longname as dirtype") def test_read_longlink(self): longname = self.subdir + "/" + "123/" * 125 + "longname" @@ -454,7 +454,7 @@ tarinfo = self.tar.getmember(longlink) except KeyError: self.fail("longlink not found") - self.assert_(tarinfo.linkname == longname, "linkname wrong") + self.assertTrue(tarinfo.linkname == longname, "linkname wrong") def test_truncated_longname(self): longname = self.subdir + "/" + "123/" * 125 + "longname" @@ -534,7 +534,7 @@ tar = tarfile.open(fileobj=fobj, mode=self.mode) tar.addfile(tarfile.TarInfo("foo")) tar.close() - self.assert_(fobj.closed is False, "external fileobjs must never closed") + self.assertTrue(fobj.closed is False, "external fileobjs must never closed") class WriteTest(WriteTestBase): @@ -553,7 +553,7 @@ tar.close() tar = tarfile.open(tmpname) - self.assert_(tar.getnames()[0] == name, + self.assertTrue(tar.getnames()[0] == name, "failed to store 100 char filename") tar.close() @@ -566,7 +566,7 @@ fobj.close() tar.add(path) tar.close() - self.assert_(os.path.getsize(tmpname) > 0, + self.assertTrue(os.path.getsize(tmpname) > 0, "tarfile is empty") # The test_*_size tests test for bug #1167128. @@ -627,16 +627,16 @@ dstname = os.path.abspath(tmpname) tar = tarfile.open(tmpname, self.mode) - self.assert_(tar.name == dstname, "archive name must be absolute") + self.assertTrue(tar.name == dstname, "archive name must be absolute") tar.add(dstname) - self.assert_(tar.getnames() == [], "added the archive to itself") + self.assertTrue(tar.getnames() == [], "added the archive to itself") cwd = os.getcwd() os.chdir(TEMPDIR) tar.add(dstname) os.chdir(cwd) - self.assert_(tar.getnames() == [], "added the archive to itself") + self.assertTrue(tar.getnames() == [], "added the archive to itself") def test_exclude(self): tempdir = os.path.join(TEMPDIR, "exclude") @@ -677,14 +677,14 @@ dec = bz2.BZ2Decompressor() data = open(tmpname, "rb").read() data = dec.decompress(data) - self.assert_(len(dec.unused_data) == 0, + self.assertTrue(len(dec.unused_data) == 0, "found trailing data") else: fobj = open(tmpname, "rb") data = fobj.read() fobj.close() - self.assert_(data.count(b"\0") == tarfile.RECORDSIZE, + self.assertTrue(data.count(b"\0") == tarfile.RECORDSIZE, "incorrect zero padding") @@ -724,14 +724,14 @@ v1 = self._calc_size(name, link) v2 = tar.offset - self.assert_(v1 == v2, "GNU longname/longlink creation failed") + self.assertTrue(v1 == v2, "GNU longname/longlink creation failed") tar.close() tar = tarfile.open(tmpname) member = tar.next() - self.failIf(member is None, "unable to read longname member") - self.assert_(tarinfo.name == member.name and \ + self.assertFalse(member is None, "unable to read longname member") + self.assertTrue(tarinfo.name == member.name and \ tarinfo.linkname == member.linkname, \ "unable to read longname member") @@ -791,18 +791,18 @@ # The same name will be added as a REGTYPE every # time regardless of st_nlink. tarinfo = self.tar.gettarinfo(self.foo) - self.assert_(tarinfo.type == tarfile.REGTYPE, + self.assertTrue(tarinfo.type == tarfile.REGTYPE, "add file as regular failed") def test_add_hardlink(self): tarinfo = self.tar.gettarinfo(self.bar) - self.assert_(tarinfo.type == tarfile.LNKTYPE, + self.assertTrue(tarinfo.type == tarfile.LNKTYPE, "add file as hardlink failed") def test_dereference_hardlink(self): self.tar.dereference = True tarinfo = self.tar.gettarinfo(self.bar) - self.assert_(tarinfo.type == tarfile.REGTYPE, + self.assertTrue(tarinfo.type == tarfile.REGTYPE, "dereferencing hardlink failed") @@ -822,10 +822,10 @@ tar = tarfile.open(tmpname) if link: l = tar.getmembers()[0].linkname - self.assert_(link == l, "PAX longlink creation failed") + self.assertTrue(link == l, "PAX longlink creation failed") else: n = tar.getmembers()[0].name - self.assert_(name == n, "PAX longname creation failed") + self.assertTrue(name == n, "PAX longname creation failed") def test_pax_global_header(self): pax_headers = { @@ -847,8 +847,8 @@ # Test if all the fields are strings. for key, val in tar.pax_headers.items(): - self.assert_(type(key) is not bytes) - self.assert_(type(val) is not bytes) + self.assertTrue(type(key) is not bytes) + self.assertTrue(type(val) is not bytes) if key in tarfile.PAX_NUMBER_FIELDS: try: tarfile.PAX_NUMBER_FIELDS[key](val) @@ -916,10 +916,10 @@ 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) + self.assertTrue(type(t.name) is str) + self.assertTrue(type(t.linkname) is str) + self.assertTrue(type(t.uname) is str) + self.assertTrue(type(t.gname) is str) tar.close() def test_uname_unicode(self): Modified: python/branches/py3k/Lib/test/test_tempfile.py ============================================================================== --- python/branches/py3k/Lib/test/test_tempfile.py (original) +++ python/branches/py3k/Lib/test/test_tempfile.py Wed Jul 1 01:06:06 2009 @@ -59,7 +59,7 @@ "file '%s' does not end with '%s'" % (nbase, suf)) nbase = nbase[len(pre):len(nbase)-len(suf)] - self.assert_(self.str_check.match(nbase), + self.assertTrue(self.str_check.match(nbase), "random string '%s' does not match /^[a-zA-Z0-9_-]{6}$/" % nbase) @@ -88,7 +88,7 @@ for key in dict: if key[0] != '_' and key not in expected: unexp.append(key) - self.failUnless(len(unexp) == 0, + self.assertTrue(len(unexp) == 0, "unexpected keys: %s" % unexp) test_classes.append(test_exports) @@ -113,7 +113,7 @@ for i in range(TEST_FILES): s = next(r) self.nameCheck(s, '', '', '') - self.failIf(s in dict) + self.assertFalse(s in dict) dict[s] = 1 def supports_iter(self): @@ -140,9 +140,9 @@ cand = tempfile._candidate_tempdir_list() - self.failIf(len(cand) == 0) + self.assertFalse(len(cand) == 0) for c in cand: - self.assert_(isinstance(c, str), + self.assertTrue(isinstance(c, str), "%s is not a string" % c) def test_wanted_dirs(self): @@ -160,14 +160,14 @@ for envname in 'TMPDIR', 'TEMP', 'TMP': dirname = os.getenv(envname) if not dirname: raise ValueError - self.assert_(dirname in cand) + self.assertTrue(dirname in cand) try: dirname = os.getcwd() except (AttributeError, os.error): dirname = os.curdir - self.assert_(dirname in cand) + self.assertTrue(dirname in cand) # Not practical to try to verify the presence of OS-specific # paths in this list. @@ -184,14 +184,14 @@ def test_retval(self): # _get_candidate_names returns a _RandomNameSequence object obj = tempfile._get_candidate_names() - self.assert_(isinstance(obj, tempfile._RandomNameSequence)) + self.assertTrue(isinstance(obj, tempfile._RandomNameSequence)) def test_same_thing(self): # _get_candidate_names always returns the same object a = tempfile._get_candidate_names() b = tempfile._get_candidate_names() - self.assert_(a is b) + self.assertTrue(a is b) test_classes.append(test__get_candidate_names) @@ -300,9 +300,9 @@ decorated = sys.executable retval = os.spawnl(os.P_WAIT, sys.executable, decorated, tester, v, fd) - self.failIf(retval < 0, + self.assertFalse(retval < 0, "child process caught fatal signal %d" % -retval) - self.failIf(retval > 0, "child process reports failure %d"%retval) + self.assertFalse(retval > 0, "child process reports failure %d"%retval) def test_textmode(self): # _mkstemp_inner can create files in text mode @@ -322,8 +322,8 @@ # gettempprefix returns a nonempty prefix string p = tempfile.gettempprefix() - self.assert_(isinstance(p, str)) - self.assert_(len(p) > 0) + self.assertTrue(isinstance(p, str)) + self.assertTrue(len(p) > 0) def test_usable_template(self): # gettempprefix returns a usable prefix string @@ -354,9 +354,9 @@ # gettempdir returns a directory which exists dir = tempfile.gettempdir() - self.assert_(os.path.isabs(dir) or dir == os.curdir, + self.assertTrue(os.path.isabs(dir) or dir == os.curdir, "%s is not an absolute path" % dir) - self.assert_(os.path.isdir(dir), + self.assertTrue(os.path.isdir(dir), "%s is not a directory" % dir) def test_directory_writable(self): @@ -377,7 +377,7 @@ a = tempfile.gettempdir() b = tempfile.gettempdir() - self.assert_(a is b) + self.assertTrue(a is b) test_classes.append(test_gettempdir) @@ -580,7 +580,7 @@ def test_creates_named(self): # NamedTemporaryFile creates files with names f = tempfile.NamedTemporaryFile() - self.failUnless(os.path.exists(f.name), + self.assertTrue(os.path.exists(f.name), "NamedTemporaryFile %s does not exist" % f.name) def test_del_on_close(self): @@ -590,7 +590,7 @@ f = tempfile.NamedTemporaryFile(dir=dir) f.write(b'blat') f.close() - self.failIf(os.path.exists(f.name), + self.assertFalse(os.path.exists(f.name), "NamedTemporaryFile %s exists after close" % f.name) finally: os.rmdir(dir) @@ -604,7 +604,7 @@ tmp = f.name f.write(b'blat') f.close() - self.failUnless(os.path.exists(f.name), + self.assertTrue(os.path.exists(f.name), "NamedTemporaryFile %s missing after close" % f.name) finally: if tmp is not None: @@ -625,12 +625,12 @@ def test_context_manager(self): # A NamedTemporaryFile can be used as a context manager with tempfile.NamedTemporaryFile() as f: - self.failUnless(os.path.exists(f.name)) - self.failIf(os.path.exists(f.name)) + self.assertTrue(os.path.exists(f.name)) + self.assertFalse(os.path.exists(f.name)) def use_closed(): with f: pass - self.failUnlessRaises(ValueError, use_closed) + self.assertRaises(ValueError, use_closed) # How to test the mode and bufsize parameters? @@ -653,21 +653,21 @@ def test_basic(self): # SpooledTemporaryFile can create files f = self.do_create() - self.failIf(f._rolled) + self.assertFalse(f._rolled) f = self.do_create(max_size=100, pre="a", suf=".txt") - self.failIf(f._rolled) + self.assertFalse(f._rolled) def test_del_on_close(self): # A SpooledTemporaryFile is deleted when closed dir = tempfile.mkdtemp() try: f = tempfile.SpooledTemporaryFile(max_size=10, dir=dir) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write(b'blat ' * 5) - self.failUnless(f._rolled) + self.assertTrue(f._rolled) filename = f.name f.close() - self.failIf(isinstance(filename, str) and os.path.exists(filename), + self.assertFalse(isinstance(filename, str) and os.path.exists(filename), "SpooledTemporaryFile %s exists after close" % filename) finally: os.rmdir(dir) @@ -675,46 +675,46 @@ def test_rewrite_small(self): # A SpooledTemporaryFile can be written to multiple within the max_size f = self.do_create(max_size=30) - self.failIf(f._rolled) + self.assertFalse(f._rolled) for i in range(5): f.seek(0, 0) f.write(b'x' * 20) - self.failIf(f._rolled) + self.assertFalse(f._rolled) def test_write_sequential(self): # A SpooledTemporaryFile should hold exactly max_size bytes, and roll # over afterward f = self.do_create(max_size=30) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write(b'x' * 20) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write(b'x' * 10) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write(b'x') - self.failUnless(f._rolled) + self.assertTrue(f._rolled) def test_sparse(self): # A SpooledTemporaryFile that is written late in the file will extend # when that occurs f = self.do_create(max_size=30) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.seek(100, 0) - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write(b'x') - self.failUnless(f._rolled) + self.assertTrue(f._rolled) def test_fileno(self): # A SpooledTemporaryFile should roll over to a real file on fileno() f = self.do_create(max_size=30) - self.failIf(f._rolled) - self.failUnless(f.fileno() > 0) - self.failUnless(f._rolled) + self.assertFalse(f._rolled) + self.assertTrue(f.fileno() > 0) + self.assertTrue(f._rolled) def test_multiple_close_before_rollover(self): # A SpooledTemporaryFile can be closed many times without error f = tempfile.SpooledTemporaryFile() f.write(b'abc\n') - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.close() try: f.close() @@ -726,7 +726,7 @@ # A SpooledTemporaryFile can be closed many times without error f = tempfile.SpooledTemporaryFile(max_size=1) f.write(b'abc\n') - self.failUnless(f._rolled) + self.assertTrue(f._rolled) f.close() try: f.close() @@ -768,51 +768,51 @@ f.write("\u039B\r\n") f.seek(0) self.assertEqual(f.read(), "\u039B\r\n") - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write("\u039B" * 20 + "\r\n") f.seek(0) self.assertEqual(f.read(), "\u039B\r\n" + ("\u039B" * 20) + "\r\n") - self.failUnless(f._rolled) + self.assertTrue(f._rolled) def test_context_manager_before_rollover(self): # A SpooledTemporaryFile can be used as a context manager with tempfile.SpooledTemporaryFile(max_size=1) as f: - self.failIf(f._rolled) - self.failIf(f.closed) - self.failUnless(f.closed) + self.assertFalse(f._rolled) + self.assertFalse(f.closed) + self.assertTrue(f.closed) def use_closed(): with f: pass - self.failUnlessRaises(ValueError, use_closed) + self.assertRaises(ValueError, use_closed) def test_context_manager_during_rollover(self): # A SpooledTemporaryFile can be used as a context manager with tempfile.SpooledTemporaryFile(max_size=1) as f: - self.failIf(f._rolled) + self.assertFalse(f._rolled) f.write(b'abc\n') f.flush() - self.failUnless(f._rolled) - self.failIf(f.closed) - self.failUnless(f.closed) + self.assertTrue(f._rolled) + self.assertFalse(f.closed) + self.assertTrue(f.closed) def use_closed(): with f: pass - self.failUnlessRaises(ValueError, use_closed) + self.assertRaises(ValueError, use_closed) def test_context_manager_after_rollover(self): # A SpooledTemporaryFile can be used as a context manager f = tempfile.SpooledTemporaryFile(max_size=1) f.write(b'abc\n') f.flush() - self.failUnless(f._rolled) + self.assertTrue(f._rolled) with f: - self.failIf(f.closed) - self.failUnless(f.closed) + self.assertFalse(f.closed) + self.assertTrue(f.closed) def use_closed(): with f: pass - self.failUnlessRaises(ValueError, use_closed) + self.assertRaises(ValueError, use_closed) test_classes.append(test_SpooledTemporaryFile) Modified: python/branches/py3k/Lib/test/test_threading.py ============================================================================== --- python/branches/py3k/Lib/test/test_threading.py (original) +++ python/branches/py3k/Lib/test/test_threading.py Wed Jul 1 01:06:06 2009 @@ -41,7 +41,7 @@ self.nrunning.inc() if verbose: print(self.nrunning.get(), 'tasks are running') - self.testcase.assert_(self.nrunning.get() <= 3) + self.testcase.assertTrue(self.nrunning.get() <= 3) time.sleep(delay) if verbose: @@ -49,7 +49,7 @@ with self.mutex: self.nrunning.dec() - self.testcase.assert_(self.nrunning.get() >= 0) + self.testcase.assertTrue(self.nrunning.get() >= 0) if verbose: print('%s is finished. %d tasks are running' % (self.name, self.nrunning.get())) @@ -74,18 +74,18 @@ for i in range(NUMTASKS): t = TestThread(""%i, self, sema, mutex, numrunning) threads.append(t) - self.failUnlessEqual(t.ident, None) - self.assert_(re.match('', repr(t))) + self.assertEqual(t.ident, None) + self.assertTrue(re.match('', repr(t))) t.start() if verbose: print('waiting for all tasks to complete') for t in threads: t.join(NUMTASKS) - self.assert_(not t.is_alive()) - self.failIfEqual(t.ident, 0) + self.assertTrue(not t.is_alive()) + self.assertNotEqual(t.ident, 0) self.assertFalse(t.ident is None) - self.assert_(re.match('', repr(t))) + self.assertTrue(re.match('', repr(t))) if verbose: print('all tasks done') self.assertEqual(numrunning.get(), 0) @@ -143,8 +143,8 @@ tid = _thread.start_new_thread(f, (mutex,)) # Wait for the thread to finish. mutex.acquire() - self.assert_(tid in threading._active) - self.assert_(isinstance(threading._active[tid], + self.assertTrue(tid in threading._active) + self.assertTrue(isinstance(threading._active[tid], threading._DummyThread)) del threading._active[tid] @@ -204,7 +204,7 @@ self.assertTrue(ret) if verbose: print(" verifying worker hasn't exited") - self.assert_(not t.finished) + self.assertTrue(not t.finished) if verbose: print(" attempting to raise asynch exception in worker") result = set_async_exc(ctypes.c_long(t.id), exception) @@ -212,7 +212,7 @@ if verbose: print(" waiting for worker to say it caught the exception") worker_saw_exception.wait(timeout=10) - self.assert_(t.finished) + self.assertTrue(t.finished) if verbose: print(" all OK -- joining worker") if t.finished: @@ -283,8 +283,8 @@ sys.settrace(func) """]) - self.failIf(rc == 2, "interpreted was blocked") - self.failUnless(rc == 0, "Unexpected error") + self.assertFalse(rc == 2, "interpreted was blocked") + self.assertTrue(rc == 0, "Unexpected error") def test_enumerate_after_join(self): @@ -371,8 +371,8 @@ rc = p.wait() data = p.stdout.read().decode().replace('\r', '') self.assertEqual(data, "end of main\nend of thread\n") - self.failIf(rc == 2, "interpreter was blocked") - self.failUnless(rc == 0, "Unexpected error") + self.assertFalse(rc == 2, "interpreter was blocked") + self.assertTrue(rc == 0, "Unexpected error") def test_1_join_on_shutdown(self): # The usual case: on exit, wait for a non-daemon thread Modified: python/branches/py3k/Lib/test/test_threading_local.py ============================================================================== --- python/branches/py3k/Lib/test/test_threading_local.py (original) +++ python/branches/py3k/Lib/test/test_threading_local.py Wed Jul 1 01:06:06 2009 @@ -40,7 +40,7 @@ local.someothervar = None gc.collect() deadlist = [weak for weak in weaklist if weak() is None] - self.assert_(len(deadlist) in (n-1, n), (n, len(deadlist))) + self.assertTrue(len(deadlist) in (n-1, n), (n, len(deadlist))) def test_derived(self): # Issue 3088: if there is a threads switch inside the __init__ Modified: python/branches/py3k/Lib/test/test_time.py ============================================================================== --- python/branches/py3k/Lib/test/test_time.py (original) +++ python/branches/py3k/Lib/test/test_time.py Wed Jul 1 01:06:06 2009 @@ -18,9 +18,9 @@ time.clock() def test_conversions(self): - self.assert_(time.ctime(self.t) + self.assertTrue(time.ctime(self.t) == time.asctime(time.localtime(self.t))) - self.assert_(int(time.mktime(time.localtime(self.t))) + self.assertTrue(int(time.mktime(time.localtime(self.t))) == int(self.t)) def test_sleep(self): @@ -153,36 +153,36 @@ time.tzset() environ['TZ'] = utc time.tzset() - self.failUnlessEqual( + self.assertEqual( time.gmtime(xmas2002), time.localtime(xmas2002) ) - self.failUnlessEqual(time.daylight, 0) - self.failUnlessEqual(time.timezone, 0) - self.failUnlessEqual(time.localtime(xmas2002).tm_isdst, 0) + self.assertEqual(time.daylight, 0) + self.assertEqual(time.timezone, 0) + self.assertEqual(time.localtime(xmas2002).tm_isdst, 0) # Make sure we can switch to US/Eastern environ['TZ'] = eastern time.tzset() - self.failIfEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) - self.failUnlessEqual(time.tzname, ('EST', 'EDT')) - self.failUnlessEqual(len(time.tzname), 2) - self.failUnlessEqual(time.daylight, 1) - self.failUnlessEqual(time.timezone, 18000) - self.failUnlessEqual(time.altzone, 14400) - self.failUnlessEqual(time.localtime(xmas2002).tm_isdst, 0) - self.failUnlessEqual(len(time.tzname), 2) + self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) + self.assertEqual(time.tzname, ('EST', 'EDT')) + self.assertEqual(len(time.tzname), 2) + self.assertEqual(time.daylight, 1) + self.assertEqual(time.timezone, 18000) + self.assertEqual(time.altzone, 14400) + self.assertEqual(time.localtime(xmas2002).tm_isdst, 0) + self.assertEqual(len(time.tzname), 2) # Now go to the southern hemisphere. environ['TZ'] = victoria time.tzset() - self.failIfEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) - self.failUnless(time.tzname[0] == 'AEST', str(time.tzname[0])) - self.failUnless(time.tzname[1] == 'AEDT', str(time.tzname[1])) - self.failUnlessEqual(len(time.tzname), 2) - self.failUnlessEqual(time.daylight, 1) - self.failUnlessEqual(time.timezone, -36000) - self.failUnlessEqual(time.altzone, -39600) - self.failUnlessEqual(time.localtime(xmas2002).tm_isdst, 1) + self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002)) + self.assertTrue(time.tzname[0] == 'AEST', str(time.tzname[0])) + self.assertTrue(time.tzname[1] == 'AEDT', str(time.tzname[1])) + self.assertEqual(len(time.tzname), 2) + self.assertEqual(time.daylight, 1) + self.assertEqual(time.timezone, -36000) + self.assertEqual(time.altzone, -39600) + self.assertEqual(time.localtime(xmas2002).tm_isdst, 1) finally: # Repair TZ environment variable in case any other tests @@ -214,14 +214,14 @@ gt1 = time.gmtime(None) t0 = time.mktime(gt0) t1 = time.mktime(gt1) - self.assert_(0 <= (t1-t0) < 0.2) + self.assertTrue(0 <= (t1-t0) < 0.2) def test_localtime_without_arg(self): lt0 = time.localtime() lt1 = time.localtime(None) t0 = time.mktime(lt0) t1 = time.mktime(lt1) - self.assert_(0 <= (t1-t0) < 0.2) + self.assertTrue(0 <= (t1-t0) < 0.2) class TestLocale(unittest.TestCase): def setUp(self): Modified: python/branches/py3k/Lib/test/test_timeout.py ============================================================================== --- python/branches/py3k/Lib/test/test_timeout.py (original) +++ python/branches/py3k/Lib/test/test_timeout.py Wed Jul 1 01:06:06 2009 @@ -119,11 +119,11 @@ self.sock.settimeout(_timeout) _t1 = time.time() - self.failUnlessRaises(socket.error, self.sock.connect, addr) + self.assertRaises(socket.error, self.sock.connect, addr) _t2 = time.time() _delta = abs(_t1 - _t2) - self.assert_(_delta < _timeout + self.fuzz, + self.assertTrue(_delta < _timeout + self.fuzz, "timeout (%g) is more than %g seconds more than expected (%g)" %(_delta, self.fuzz, _timeout)) @@ -134,11 +134,11 @@ self.sock.settimeout(_timeout) _t1 = time.time() - self.failUnlessRaises(socket.error, self.sock.recv, 1024) + self.assertRaises(socket.error, self.sock.recv, 1024) _t2 = time.time() _delta = abs(_t1 - _t2) - self.assert_(_delta < _timeout + self.fuzz, + self.assertTrue(_delta < _timeout + self.fuzz, "timeout (%g) is %g seconds more than expected (%g)" %(_delta, self.fuzz, _timeout)) @@ -150,11 +150,11 @@ self.sock.listen(5) _t1 = time.time() - self.failUnlessRaises(socket.error, self.sock.accept) + self.assertRaises(socket.error, self.sock.accept) _t2 = time.time() _delta = abs(_t1 - _t2) - self.assert_(_delta < _timeout + self.fuzz, + self.assertTrue(_delta < _timeout + self.fuzz, "timeout (%g) is %g seconds more than expected (%g)" %(_delta, self.fuzz, _timeout)) @@ -166,11 +166,11 @@ self.sock.bind(self.addr_local) _t1 = time.time() - self.failUnlessRaises(socket.error, self.sock.recvfrom, 8192) + self.assertRaises(socket.error, self.sock.recvfrom, 8192) _t2 = time.time() _delta = abs(_t1 - _t2) - self.assert_(_delta < _timeout + self.fuzz, + self.assertTrue(_delta < _timeout + self.fuzz, "timeout (%g) is %g seconds more than expected (%g)" %(_delta, self.fuzz, _timeout)) Modified: python/branches/py3k/Lib/test/test_tokenize.py ============================================================================== --- python/branches/py3k/Lib/test/test_tokenize.py (original) +++ python/branches/py3k/Lib/test/test_tokenize.py Wed Jul 1 01:06:06 2009 @@ -629,7 +629,7 @@ behaviour of the interpreter when it encounters a similar condition. """ f = 'tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt' - self.failUnlessRaises(SyntaxError, self._testFile, f) + self.assertRaises(SyntaxError, self._testFile, f) def test_no_coding_cookie_and_utf8_bom(self): f = 'tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt' Modified: python/branches/py3k/Lib/test/test_traceback.py ============================================================================== --- python/branches/py3k/Lib/test/test_traceback.py (original) +++ python/branches/py3k/Lib/test/test_traceback.py Wed Jul 1 01:06:06 2009 @@ -40,15 +40,15 @@ err = self.get_exception_format(self.syntax_error_with_caret, SyntaxError) self.assertEqual(len(err), 4) - self.assert_(err[1].strip() == "return x!") - self.assert_("^" in err[2]) # third line has caret + self.assertTrue(err[1].strip() == "return x!") + self.assertTrue("^" in err[2]) # third line has caret self.assertEqual(err[1].find("!"), err[2].find("^")) # in the right place err = self.get_exception_format(self.syntax_error_with_caret_2, SyntaxError) - self.assert_("^" in err[2]) # third line has caret - self.assert_(err[2].count('\n') == 1) # and no additional newline - self.assert_(err[1].find("+") == err[2].find("^")) # in the right place + self.assertTrue("^" in err[2]) # third line has caret + self.assertTrue(err[2].count('\n') == 1) # and no additional newline + self.assertTrue(err[1].find("+") == err[2].find("^")) # in the right place def test_nocaret(self): if is_jython: @@ -57,14 +57,14 @@ err = self.get_exception_format(self.syntax_error_without_caret, SyntaxError) self.assertEqual(len(err), 3) - self.assert_(err[1].strip() == "[x for x in x] = x") + self.assertTrue(err[1].strip() == "[x for x in x] = x") def test_bad_indentation(self): err = self.get_exception_format(self.syntax_error_bad_indentation, IndentationError) self.assertEqual(len(err), 4) self.assertEqual(err[1].strip(), "print(2)") - self.assert_("^" in err[2]) + self.assertTrue("^" in err[2]) self.assertEqual(err[1].find(")"), err[2].find("^")) def test_base_exception(self): @@ -131,13 +131,13 @@ err_line = "raise RuntimeError('{0}')".format(message_ascii) err_msg = "RuntimeError: {0}".format(message_ascii) - self.assert_(("line %s" % lineno) in stdout[1], + self.assertTrue(("line %s" % lineno) in stdout[1], "Invalid line number: {0!r} instead of {1}".format( stdout[1], lineno)) - self.assert_(stdout[2].endswith(err_line), + self.assertTrue(stdout[2].endswith(err_line), "Invalid traceback line: {0!r} instead of {1!r}".format( stdout[2], err_line)) - self.assert_(stdout[3] == err_msg, + self.assertTrue(stdout[3] == err_msg, "Invalid error message: {0!r} instead of {1!r}".format( stdout[3], err_msg)) @@ -177,9 +177,9 @@ tb_lines = python_fmt.splitlines() self.assertEquals(len(tb_lines), 3) banner, location, source_line = tb_lines - self.assert_(banner.startswith('Traceback')) - self.assert_(location.startswith(' File')) - self.assert_(source_line.startswith(' raise')) + self.assertTrue(banner.startswith('Traceback')) + self.assertTrue(location.startswith(' File')) + self.assertTrue(source_line.startswith(' raise')) cause_message = ( @@ -209,9 +209,9 @@ def check_zero_div(self, msg): lines = msg.splitlines() - self.assert_(lines[-3].startswith(' File')) - self.assert_('1/0 # In zero_div' in lines[-2], lines[-2]) - self.assert_(lines[-1].startswith('ZeroDivisionError'), lines[-1]) + self.assertTrue(lines[-3].startswith(' File')) + self.assertTrue('1/0 # In zero_div' in lines[-2], lines[-2]) + self.assertTrue(lines[-1].startswith('ZeroDivisionError'), lines[-1]) def test_simple(self): try: @@ -220,10 +220,10 @@ e = _ lines = self.get_report(e).splitlines() self.assertEquals(len(lines), 4) - self.assert_(lines[0].startswith('Traceback')) - self.assert_(lines[1].startswith(' File')) - self.assert_('1/0 # Marker' in lines[2]) - self.assert_(lines[3].startswith('ZeroDivisionError')) + self.assertTrue(lines[0].startswith('Traceback')) + self.assertTrue(lines[1].startswith(' File')) + self.assertTrue('1/0 # Marker' in lines[2]) + self.assertTrue(lines[3].startswith('ZeroDivisionError')) def test_cause(self): def inner_raise(): @@ -237,7 +237,7 @@ self.assertEquals(len(blocks), 3) self.assertEquals(blocks[1], cause_message) self.check_zero_div(blocks[0]) - self.assert_('inner_raise() # Marker' in blocks[2]) + self.assertTrue('inner_raise() # Marker' in blocks[2]) def test_context(self): def inner_raise(): @@ -251,7 +251,7 @@ self.assertEquals(len(blocks), 3) self.assertEquals(blocks[1], context_message) self.check_zero_div(blocks[0]) - self.assert_('inner_raise() # Marker' in blocks[2]) + self.assertTrue('inner_raise() # Marker' in blocks[2]) def test_cause_recursive(self): def inner_raise(): @@ -269,11 +269,11 @@ self.assertEquals(len(blocks), 3) self.assertEquals(blocks[1], cause_message) # The first block is the KeyError raised from the ZeroDivisionError - self.assert_('raise KeyError from e' in blocks[0]) - self.assert_('1/0' not in blocks[0]) + self.assertTrue('raise KeyError from e' in blocks[0]) + self.assertTrue('1/0' not in blocks[0]) # The second block (apart from the boundary) is the ZeroDivisionError # re-raised from the KeyError - self.assert_('inner_raise() # Marker' in blocks[2]) + self.assertTrue('inner_raise() # Marker' in blocks[2]) self.check_zero_div(blocks[2]) Modified: python/branches/py3k/Lib/test/test_tuple.py ============================================================================== --- python/branches/py3k/Lib/test/test_tuple.py (original) +++ python/branches/py3k/Lib/test/test_tuple.py Wed Jul 1 01:06:06 2009 @@ -11,7 +11,7 @@ self.assertEqual(tuple(), ()) t0_3 = (0, 1, 2, 3) t0_3_bis = tuple(t0_3) - self.assert_(t0_3 is t0_3_bis) + self.assertTrue(t0_3 is t0_3_bis) self.assertEqual(tuple([]), ()) self.assertEqual(tuple([0, 1, 2, 3]), (0, 1, 2, 3)) self.assertEqual(tuple(''), ()) @@ -19,8 +19,8 @@ def test_truth(self): super().test_truth() - self.assert_(not ()) - self.assert_((42, )) + self.assertTrue(not ()) + self.assertTrue((42, )) def test_len(self): super().test_len() @@ -33,14 +33,14 @@ u = (0, 1) u2 = u u += (2, 3) - self.assert_(u is not u2) + self.assertTrue(u is not u2) def test_imul(self): super().test_imul() u = (0, 1) u2 = u u *= 3 - self.assert_(u is not u2) + self.assertTrue(u is not u2) def test_tupleresizebug(self): # Check that a specific bug in _PyTuple_Resize() is squashed. @@ -71,7 +71,7 @@ inps = base + [(i, j) for i in base for j in xp] + \ [(i, j) for i in xp for j in base] + xp + list(zip(base)) collisions = len(inps) - len(set(map(hash, inps))) - self.assert_(collisions <= 15) + self.assertTrue(collisions <= 15) def test_repr(self): l0 = tuple() Modified: python/branches/py3k/Lib/test/test_types.py ============================================================================== --- python/branches/py3k/Lib/test/test_types.py (original) +++ python/branches/py3k/Lib/test/test_types.py Wed Jul 1 01:06:06 2009 @@ -549,13 +549,13 @@ result = f.__format__(fmt) self.assertEqual(len(result), 98) self.assertEqual(result[-7], '.') - self.assert_(result[:12] in ('112340000000', '112339999999')) + self.assertTrue(result[:12] in ('112340000000', '112339999999')) f = 1.1234e200 for fmt in 'f', 'F': result = f.__format__(fmt) self.assertEqual(len(result), 208) self.assertEqual(result[-7], '.') - self.assert_(result[:12] in ('112340000000', '112339999999')) + self.assertTrue(result[:12] in ('112340000000', '112339999999')) test( 1.0, 'e', '1.000000e+00') Modified: python/branches/py3k/Lib/test/test_unary.py ============================================================================== --- python/branches/py3k/Lib/test/test_unary.py (original) +++ python/branches/py3k/Lib/test/test_unary.py Wed Jul 1 01:06:06 2009 @@ -6,12 +6,12 @@ class UnaryOpTestCase(unittest.TestCase): def test_negative(self): - self.assert_(-2 == 0 - 2) + self.assertTrue(-2 == 0 - 2) self.assertEqual(-0, 0) self.assertEqual(--2, 2) - self.assert_(-2 == 0 - 2) - self.assert_(-2.0 == 0 - 2.0) - self.assert_(-2j == 0 - 2j) + self.assertTrue(-2 == 0 - 2) + self.assertTrue(-2.0 == 0 - 2.0) + self.assertTrue(-2j == 0 - 2j) def test_positive(self): self.assertEqual(+2, 2) @@ -22,16 +22,16 @@ self.assertEqual(+2j, 2j) def test_invert(self): - self.assert_(-2 == 0 - 2) + self.assertTrue(-2 == 0 - 2) self.assertEqual(-0, 0) self.assertEqual(--2, 2) - self.assert_(-2 == 0 - 2) + self.assertTrue(-2 == 0 - 2) def test_no_overflow(self): nines = "9" * 32 - self.assert_(eval("+" + nines) == 10**32-1) - self.assert_(eval("-" + nines) == -(10**32-1)) - self.assert_(eval("~" + nines) == ~(10**32-1)) + self.assertTrue(eval("+" + nines) == 10**32-1) + self.assertTrue(eval("-" + nines) == -(10**32-1)) + self.assertTrue(eval("~" + nines) == ~(10**32-1)) def test_negation_of_exponentiation(self): # Make sure '**' does the right thing; these form a Modified: python/branches/py3k/Lib/test/test_unicode.py ============================================================================== --- python/branches/py3k/Lib/test/test_unicode.py (original) +++ python/branches/py3k/Lib/test/test_unicode.py Wed Jul 1 01:06:06 2009 @@ -48,7 +48,7 @@ method = getattr(object, methodname) realresult = method(*args) self.assertEqual(realresult, result) - self.assert_(type(realresult) is type(result)) + self.assertTrue(type(realresult) is type(result)) # if the original is returned make sure that # this doesn't happen with subclasses @@ -60,7 +60,7 @@ method = getattr(object, methodname) realresult = method(*args) self.assertEqual(realresult, result) - self.assert_(object is not realresult) + self.assertTrue(object is not realresult) def test_literals(self): self.assertEqual('\xff', '\u00ff') @@ -294,25 +294,25 @@ self.assertEqual('abc', 'abc') self.assertEqual('abc', 'abc') self.assertEqual('abc', 'abc') - self.assert_('abcd' > 'abc') - self.assert_('abcd' > 'abc') - self.assert_('abcd' > 'abc') - self.assert_('abc' < 'abcd') - self.assert_('abc' < 'abcd') - self.assert_('abc' < 'abcd') + self.assertTrue('abcd' > 'abc') + self.assertTrue('abcd' > 'abc') + self.assertTrue('abcd' > 'abc') + self.assertTrue('abc' < 'abcd') + self.assertTrue('abc' < 'abcd') + self.assertTrue('abc' < 'abcd') if 0: # Move these tests to a Unicode collation module test... # Testing UTF-16 code point order comparisons... # No surrogates, no fixup required. - self.assert_('\u0061' < '\u20ac') + self.assertTrue('\u0061' < '\u20ac') # Non surrogate below surrogate value, no fixup required - self.assert_('\u0061' < '\ud800\udc02') + self.assertTrue('\u0061' < '\ud800\udc02') # Non surrogate above surrogate value, fixup required def test_lecmp(s, s2): - self.assert_(s < s2) + self.assertTrue(s < s2) def test_fixup(s): s2 = '\ud800\udc01' @@ -352,7 +352,7 @@ test_fixup('\uff61') # Surrogates on both sides, no fixup required - self.assert_('\ud800\udc02' < '\ud84d\udc56') + self.assertTrue('\ud800\udc02' < '\ud84d\udc56') def test_islower(self): string_tests.MixinStrUnicodeUserStringTest.test_islower(self) @@ -436,32 +436,32 @@ def test_contains(self): # Testing Unicode contains method - self.assert_('a' in 'abdb') - self.assert_('a' in 'bdab') - self.assert_('a' in 'bdaba') - self.assert_('a' in 'bdba') - self.assert_('a' not in 'bdb') - self.assert_('a' in 'bdba') - self.assert_('a' in ('a',1,None)) - self.assert_('a' in (1,None,'a')) - self.assert_('a' in ('a',1,None)) - self.assert_('a' in (1,None,'a')) - self.assert_('a' not in ('x',1,'y')) - self.assert_('a' not in ('x',1,None)) - self.assert_('abcd' not in 'abcxxxx') - self.assert_('ab' in 'abcd') - self.assert_('ab' in 'abc') - self.assert_('ab' in (1,None,'ab')) - self.assert_('' in 'abc') - self.assert_('' in '') - self.assert_('' in 'abc') - self.assert_('\0' not in 'abc') - self.assert_('\0' in '\0abc') - self.assert_('\0' in 'abc\0') - self.assert_('a' in '\0abc') - self.assert_('asdf' in 'asdf') - self.assert_('asdf' not in 'asd') - self.assert_('asdf' not in '') + self.assertTrue('a' in 'abdb') + self.assertTrue('a' in 'bdab') + self.assertTrue('a' in 'bdaba') + self.assertTrue('a' in 'bdba') + self.assertTrue('a' not in 'bdb') + self.assertTrue('a' in 'bdba') + self.assertTrue('a' in ('a',1,None)) + self.assertTrue('a' in (1,None,'a')) + self.assertTrue('a' in ('a',1,None)) + self.assertTrue('a' in (1,None,'a')) + self.assertTrue('a' not in ('x',1,'y')) + self.assertTrue('a' not in ('x',1,None)) + self.assertTrue('abcd' not in 'abcxxxx') + self.assertTrue('ab' in 'abcd') + self.assertTrue('ab' in 'abc') + self.assertTrue('ab' in (1,None,'ab')) + self.assertTrue('' in 'abc') + self.assertTrue('' in '') + self.assertTrue('' in 'abc') + self.assertTrue('\0' not in 'abc') + self.assertTrue('\0' in '\0abc') + self.assertTrue('\0' in 'abc\0') + self.assertTrue('a' in '\0abc') + self.assertTrue('asdf' in 'asdf') + self.assertTrue('asdf' not in 'asd') + self.assertTrue('asdf' not in '') self.assertRaises(TypeError, "abc".__contains__) Modified: python/branches/py3k/Lib/test/test_unicode_file.py ============================================================================== --- python/branches/py3k/Lib/test/test_unicode_file.py (original) +++ python/branches/py3k/Lib/test/test_unicode_file.py Wed Jul 1 01:06:06 2009 @@ -25,19 +25,19 @@ # Do all the tests we can given only a single filename. The file should # exist. def _do_single(self, filename): - self.failUnless(os.path.exists(filename)) - self.failUnless(os.path.isfile(filename)) - self.failUnless(os.access(filename, os.R_OK)) - 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)) + self.assertTrue(os.path.exists(filename)) + self.assertTrue(os.path.isfile(filename)) + self.assertTrue(os.access(filename, os.R_OK)) + self.assertTrue(os.path.exists(os.path.abspath(filename))) + self.assertTrue(os.path.isfile(os.path.abspath(filename))) + self.assertTrue(os.access(os.path.abspath(filename), os.R_OK)) os.chmod(filename, 0o777) os.utime(filename, None) os.utime(filename, (time.time(), time.time())) # Copy/rename etc tests using the same filename self._do_copyish(filename, filename) # Filename should appear in glob output - self.failUnless( + self.assertTrue( os.path.abspath(filename)==os.path.abspath(glob.glob(filename)[0])) # basename should appear in listdir. path, base = os.path.split(os.path.abspath(filename)) @@ -47,7 +47,7 @@ base = unicodedata.normalize("NFD", base) file_list = [unicodedata.normalize("NFD", f) for f in file_list] - self.failUnless(base in file_list) + self.assertTrue(base in file_list) # Do as many "equivalancy' tests as we can - ie, check that although we # have different types for the filename, they refer to the same file. @@ -55,12 +55,12 @@ # Note we only check "filename1 against filename2" - we don't bother # checking "filename2 against 1", as we assume we are called again with # the args reversed. - self.failUnless(type(filename1)!=type(filename2), + self.assertTrue(type(filename1)!=type(filename2), "No point checking equivalent filenames of the same type") # stat and lstat should return the same results. - self.failUnlessEqual(os.stat(filename1), + self.assertEqual(os.stat(filename1), os.stat(filename2)) - self.failUnlessEqual(os.lstat(filename1), + self.assertEqual(os.lstat(filename1), os.lstat(filename2)) # Copy/rename etc tests using equivalent filename self._do_copyish(filename1, filename2) @@ -68,19 +68,19 @@ # Tests that copy, move, etc one file to another. def _do_copyish(self, filename1, filename2): # Should be able to rename the file using either name. - self.failUnless(os.path.isfile(filename1)) # must exist. + self.assertTrue(os.path.isfile(filename1)) # must exist. os.rename(filename1, filename2 + ".new") - self.failUnless(os.path.isfile(filename1+".new")) + self.assertTrue(os.path.isfile(filename1+".new")) os.rename(filename1 + ".new", filename2) - self.failUnless(os.path.isfile(filename2)) + self.assertTrue(os.path.isfile(filename2)) shutil.copy(filename1, filename2 + ".new") os.unlink(filename1 + ".new") # remove using equiv name. # And a couple of moves, one using each name. shutil.move(filename1, filename2 + ".new") - self.failUnless(not os.path.exists(filename2)) + self.assertTrue(not os.path.exists(filename2)) shutil.move(filename1 + ".new", filename2) - self.failUnless(os.path.exists(filename1)) + self.assertTrue(os.path.exists(filename1)) # Note - due to the implementation of shutil.move, # it tries a rename first. This only fails on Windows when on # different file systems - and this test can't ensure that. @@ -107,7 +107,7 @@ cwd_result = unicodedata.normalize("NFD", cwd_result) name_result = unicodedata.normalize("NFD", name_result) - self.failUnlessEqual(os.path.basename(cwd_result),name_result) + self.assertEqual(os.path.basename(cwd_result),name_result) finally: os.chdir(cwd) finally: @@ -123,7 +123,7 @@ self._do_single(filename) finally: os.unlink(filename) - self.failUnless(not os.path.exists(filename)) + self.assertTrue(not os.path.exists(filename)) # and again with os.open. f = os.open(filename, os.O_CREAT) os.close(f) @@ -134,7 +134,7 @@ def _test_equivalent(self, filename1, filename2): remove_if_exists(filename1) - self.failUnless(not os.path.exists(filename2)) + self.assertTrue(not os.path.exists(filename2)) f = file(filename1, "w") f.close() try: Modified: python/branches/py3k/Lib/test/test_unicodedata.py ============================================================================== --- python/branches/py3k/Lib/test/test_unicodedata.py (original) +++ python/branches/py3k/Lib/test/test_unicodedata.py Wed Jul 1 01:06:06 2009 @@ -232,7 +232,7 @@ if dec != -1: self.assertEqual(dec, self.db.numeric(c)) count += 1 - self.assert_(count >= 10) # should have tested at least the ASCII digits + self.assertTrue(count >= 10) # should have tested at least the ASCII digits def test_digit_numeric_consistent(self): # Test that digit and numeric are consistent, @@ -245,7 +245,7 @@ if dec != -1: self.assertEqual(dec, self.db.numeric(c)) count += 1 - self.assert_(count >= 10) # should have tested at least the ASCII digits + self.assertTrue(count >= 10) # should have tested at least the ASCII digits def test_bug_1704793(self): self.assertEquals(self.db.lookup("GOTHIC LETTER FAIHU"), '\U00010346') @@ -253,13 +253,13 @@ def test_ucd_510(self): import unicodedata # In UCD 5.1.0, a mirrored property changed wrt. UCD 3.2.0 - self.assert_(unicodedata.mirrored("\u0f3a")) - self.assert_(not unicodedata.ucd_3_2_0.mirrored("\u0f3a")) + self.assertTrue(unicodedata.mirrored("\u0f3a")) + self.assertTrue(not unicodedata.ucd_3_2_0.mirrored("\u0f3a")) # Also, we now have two ways of representing # the upper-case mapping: as delta, or as absolute value - self.assert_("a".upper()=='A') - self.assert_("\u1d79".upper()=='\ua77d') - self.assert_(".".upper()=='.') + self.assertTrue("a".upper()=='A') + self.assertTrue("\u1d79".upper()=='\ua77d') + self.assertTrue(".".upper()=='.') def test_bug_5828(self): self.assertEqual("\u1d79".lower(), "\u1d79") Modified: python/branches/py3k/Lib/test/test_urllib.py ============================================================================== --- python/branches/py3k/Lib/test/test_urllib.py (original) +++ python/branches/py3k/Lib/test/test_urllib.py Wed Jul 1 01:06:06 2009 @@ -63,7 +63,7 @@ # Make sure object returned by urlopen() has the specified methods for attr in ("read", "readline", "readlines", "fileno", "close", "info", "geturl", "getcode", "__iter__"): - self.assert_(hasattr(self.returned_obj, attr), + self.assertTrue(hasattr(self.returned_obj, attr), "object returned by urlopen() lacks %s attribute" % attr) @@ -85,7 +85,7 @@ def test_fileno(self): file_num = self.returned_obj.fileno() - self.assert_(isinstance(file_num, int), + self.assertTrue(isinstance(file_num, int), "fileno() did not return an int") self.assertEqual(os.read(file_num, len(self.text)), self.text, "Reading on the file descriptor returned by fileno() " @@ -97,7 +97,7 @@ self.returned_obj.close() def test_info(self): - self.assert_(isinstance(self.returned_obj.info(), email.message.Message)) + self.assertTrue(isinstance(self.returned_obj.info(), email.message.Message)) def test_geturl(self): self.assertEqual(self.returned_obj.geturl(), self.pathname) @@ -246,7 +246,7 @@ # a headers value is returned. result = urllib.request.urlretrieve("file:%s" % support.TESTFN) self.assertEqual(result[0], support.TESTFN) - self.assert_(isinstance(result[1], email.message.Message), + self.assertTrue(isinstance(result[1], email.message.Message), "did not get a email.message.Message instance as second " "returned value") @@ -257,7 +257,7 @@ result = urllib.request.urlretrieve(self.constructLocalFileUrl( support.TESTFN), second_temp) self.assertEqual(second_temp, result[0]) - self.assert_(os.path.exists(second_temp), "copy of the file was not " + self.assertTrue(os.path.exists(second_temp), "copy of the file was not " "made") FILE = open(second_temp, 'rb') try: @@ -271,9 +271,9 @@ def test_reporthook(self): # Make sure that the reporthook works. def hooktester(count, block_size, total_size, count_holder=[0]): - self.assert_(isinstance(count, int)) - self.assert_(isinstance(block_size, int)) - self.assert_(isinstance(total_size, int)) + self.assertTrue(isinstance(count, int)) + self.assertTrue(isinstance(block_size, int)) + self.assertTrue(isinstance(total_size, int)) self.assertEqual(count, count_holder[0]) count_holder[0] = count_holder[0] + 1 second_temp = "%s.2" % support.TESTFN @@ -727,7 +727,7 @@ expect_somewhere = ["1st=1", "2nd=2", "3rd=3"] result = urllib.parse.urlencode(given) for expected in expect_somewhere: - self.assert_(expected in result, + self.assertTrue(expected in result, "testing %s: %s not found in %s" % (test_type, expected, result)) self.assertEqual(result.count('&'), 2, @@ -736,7 +736,7 @@ amp_location = result.index('&') on_amp_left = result[amp_location - 1] on_amp_right = result[amp_location + 1] - self.assert_(on_amp_left.isdigit() and on_amp_right.isdigit(), + self.assertTrue(on_amp_left.isdigit() and on_amp_right.isdigit(), "testing %s: '&' not located in proper place in %s" % (test_type, result)) self.assertEqual(len(result), (5 * 3) + 2, #5 chars per thing and amps @@ -774,7 +774,7 @@ result = urllib.parse.urlencode(given, True) for value in given["sequence"]: expect = "sequence=%s" % value - self.assert_(expect in result, + self.assertTrue(expect in result, "%s not found in %s" % (expect, result)) self.assertEqual(result.count('&'), 2, "Expected 2 '&'s, got %s" % result.count('&')) @@ -915,7 +915,7 @@ # def testTimeoutNone(self): # # global default timeout is ignored # import socket -# self.assert_(socket.getdefaulttimeout() is None) +# self.assertTrue(socket.getdefaulttimeout() is None) # socket.setdefaulttimeout(30) # try: # ftp = urllib.ftpwrapper("myuser", "mypass", "localhost", 9093, []) @@ -927,7 +927,7 @@ # def testTimeoutDefault(self): # # global default timeout is used # import socket -# self.assert_(socket.getdefaulttimeout() is None) +# self.assertTrue(socket.getdefaulttimeout() is None) # socket.setdefaulttimeout(30) # try: # ftp = urllib.ftpwrapper("myuser", "mypass", "localhost", 9093, []) Modified: python/branches/py3k/Lib/test/test_urllib2.py ============================================================================== --- python/branches/py3k/Lib/test/test_urllib2.py (original) +++ python/branches/py3k/Lib/test/test_urllib2.py Wed Jul 1 01:06:06 2009 @@ -519,15 +519,15 @@ # *_request self.assertEqual((handler, name), calls[i]) self.assertEqual(len(args), 1) - self.assert_(isinstance(args[0], Request)) + self.assertTrue(isinstance(args[0], Request)) else: # *_response self.assertEqual((handler, name), calls[i]) self.assertEqual(len(args), 2) - self.assert_(isinstance(args[0], Request)) + self.assertTrue(isinstance(args[0], Request)) # response from opener.open is None, because there's no # handler that defines http_open to handle it - self.assert_(args[1] is None or + self.assertTrue(args[1] is None or isinstance(args[1], MockResponse)) @@ -577,7 +577,7 @@ req.timeout = None r = h.ftp_open(req) # ftp authentication not yet implemented by FTPHandler - self.assert_(h.user == h.passwd == "") + self.assertTrue(h.user == h.passwd == "") self.assertEqual(h.host, socket.gethostbyname(host)) self.assertEqual(h.port, port) self.assertEqual(h.dirs, dirs) @@ -671,9 +671,9 @@ h.file_open(req) # XXXX remove OSError when bug fixed except (urllib.error.URLError, OSError): - self.assert_(not ftp) + self.assertTrue(not ftp) else: - self.assert_(o.req is req) + self.assertTrue(o.req is req) self.assertEqual(req.type, "ftp") def test_http(self): @@ -754,8 +754,8 @@ r = MockResponse(200, "OK", {}, "") newreq = h.do_request_(req) if data is None: # GET - self.assert_("Content-length" not in req.unredirected_hdrs) - self.assert_("Content-type" not in req.unredirected_hdrs) + self.assertTrue("Content-length" not in req.unredirected_hdrs) + self.assertTrue("Content-type" not in req.unredirected_hdrs) else: # POST self.assertEqual(req.unredirected_hdrs["Content-length"], "0") self.assertEqual(req.unredirected_hdrs["Content-type"], @@ -812,19 +812,19 @@ # all 2xx are passed through r = MockResponse(200, "OK", {}, "", url) newr = h.http_response(req, r) - self.assert_(r is newr) - self.assert_(not hasattr(o, "proto")) # o.error not called + self.assertTrue(r is newr) + self.assertTrue(not hasattr(o, "proto")) # o.error not called r = MockResponse(202, "Accepted", {}, "", url) newr = h.http_response(req, r) - self.assert_(r is newr) - self.assert_(not hasattr(o, "proto")) # o.error not called + self.assertTrue(r is newr) + self.assertTrue(not hasattr(o, "proto")) # o.error not called r = MockResponse(206, "Partial content", {}, "", url) newr = h.http_response(req, r) - self.assert_(r is newr) - self.assert_(not hasattr(o, "proto")) # o.error not called + self.assertTrue(r is newr) + self.assertTrue(not hasattr(o, "proto")) # o.error not called # anything else calls o.error (and MockOpener returns None, here) r = MockResponse(502, "Bad gateway", {}, "", url) - self.assert_(h.http_response(req, r) is None) + self.assertTrue(h.http_response(req, r) is None) self.assertEqual(o.proto, "http") # o.error called self.assertEqual(o.args, (req, r, 502, "Bad gateway", {})) @@ -836,12 +836,12 @@ req = Request("http://example.com/") r = MockResponse(200, "OK", {}, "") newreq = h.http_request(req) - self.assert_(cj.ach_req is req is newreq) + self.assertTrue(cj.ach_req is req is newreq) self.assertEquals(req.get_origin_req_host(), "example.com") - self.assert_(not req.is_unverifiable()) + self.assertTrue(not req.is_unverifiable()) newr = h.http_response(req, r) - self.assert_(cj.ec_req is req) - self.assert_(cj.ec_r is r is newr) + self.assertTrue(cj.ec_req is req) + self.assertTrue(cj.ec_r is r is newr) def test_redirect(self): from_url = "http://example.com/a.html" @@ -863,12 +863,12 @@ MockHeaders({"location": to_url})) except urllib.error.HTTPError: # 307 in response to POST requires user OK - self.assert_(code == 307 and data is not None) + self.assertTrue(code == 307 and data is not None) self.assertEqual(o.req.get_full_url(), to_url) try: self.assertEqual(o.req.get_method(), "GET") except AttributeError: - self.assert_(not o.req.has_data()) + self.assertTrue(not o.req.has_data()) # now it's a GET, there should not be headers regarding content # (possibly dragged from before being a POST) @@ -878,8 +878,8 @@ self.assertEqual(o.req.headers["Nonsense"], "viking=withhold") - self.assert_("Spam" not in o.req.headers) - self.assert_("Spam" not in o.req.unredirected_hdrs) + self.assertTrue("Spam" not in o.req.headers) + self.assertTrue("Spam" not in o.req.unredirected_hdrs) # loop detection req = Request(from_url) @@ -924,7 +924,7 @@ cp = urllib.request.HTTPCookieProcessor(cj) o = build_test_opener(hh, hdeh, hrh, cp) o.open("http://www.example.com/") - self.assert_(not hh.req.has_header("Cookie")) + self.assertTrue(not hh.req.has_header("Cookie")) def test_proxy(self): o = OpenerDirector() @@ -1107,7 +1107,7 @@ if h.__class__ == handler_class: break else: - self.assert_(False) + self.assertTrue(False) class RequestTests(unittest.TestCase): @@ -1122,10 +1122,10 @@ self.assertEqual("GET", self.get.get_method()) def test_add_data(self): - self.assert_(not self.get.has_data()) + self.assertTrue(not self.get.has_data()) self.assertEqual("GET", self.get.get_method()) self.get.add_data("spam") - self.assert_(self.get.has_data()) + self.assertTrue(self.get.has_data()) self.assertEqual("POST", self.get.get_method()) def test_get_full_url(self): @@ -1148,9 +1148,9 @@ self.assertEqual("www.python.org", req.get_host()) def test_proxy(self): - self.assert_(not self.get.has_proxy()) + self.assertTrue(not self.get.has_proxy()) self.get.set_proxy("www.perl.org", "http") - self.assert_(self.get.has_proxy()) + self.assertTrue(self.get.has_proxy()) self.assertEqual("www.python.org", self.get.get_origin_req_host()) self.assertEqual("www.perl.org", self.get.get_host()) Modified: python/branches/py3k/Lib/test/test_urllib2_localnet.py ============================================================================== --- python/branches/py3k/Lib/test/test_urllib2_localnet.py (original) +++ python/branches/py3k/Lib/test/test_urllib2_localnet.py Wed Jul 1 01:06:06 2009 @@ -438,10 +438,10 @@ handler = self.start_server() open_url = urllib.request.urlopen("http://localhost:%s" % handler.port) for attr in ("read", "close", "info", "geturl"): - self.assert_(hasattr(open_url, attr), "object returned from " + self.assertTrue(hasattr(open_url, attr), "object returned from " "urlopen lacks the %s attribute" % attr) try: - self.assert_(open_url.read(), "calling 'read' failed") + self.assertTrue(open_url.read(), "calling 'read' failed") finally: open_url.close() @@ -451,7 +451,7 @@ open_url = urllib.request.urlopen( "http://localhost:%s" % handler.port) info_obj = open_url.info() - self.assert_(isinstance(info_obj, email.message.Message), + self.assertTrue(isinstance(info_obj, email.message.Message), "object returned by 'info' is not an instance of " "email.message.Message") self.assertEqual(info_obj.get_content_subtype(), "plain") Modified: python/branches/py3k/Lib/test/test_urllib2net.py ============================================================================== --- python/branches/py3k/Lib/test/test_urllib2net.py (original) +++ python/branches/py3k/Lib/test/test_urllib2net.py Wed Jul 1 01:06:06 2009 @@ -82,9 +82,9 @@ response = _urlopen_with_retry("http://www.python.org/") sock = response.fp - self.assert_(not sock.closed) + self.assertTrue(not sock.closed) response.close() - self.assert_(sock.closed) + self.assertTrue(sock.closed) class OtherNetworkTests(unittest.TestCase): def setUp(self): @@ -172,7 +172,7 @@ if expected_err: msg = ("Didn't get expected error(s) %s for %s %s, got %s: %s" % (expected_err, url, req, type(err), err)) - self.assert_(isinstance(err, expected_err), msg) + self.assertTrue(isinstance(err, expected_err), msg) else: with support.time_out, \ support.socket_peer_reset, \ Modified: python/branches/py3k/Lib/test/test_urllibnet.py ============================================================================== --- python/branches/py3k/Lib/test/test_urllibnet.py (original) +++ python/branches/py3k/Lib/test/test_urllibnet.py Wed Jul 1 01:06:06 2009 @@ -62,10 +62,10 @@ open_url = self.urlopen("http://www.python.org/") for attr in ("read", "readline", "readlines", "fileno", "close", "info", "geturl"): - self.assert_(hasattr(open_url, attr), "object returned from " + self.assertTrue(hasattr(open_url, attr), "object returned from " "urlopen lacks the %s attribute" % attr) try: - self.assert_(open_url.read(), "calling 'read' failed") + self.assertTrue(open_url.read(), "calling 'read' failed") finally: open_url.close() @@ -73,9 +73,9 @@ # Test both readline and readlines. open_url = self.urlopen("http://www.python.org/") try: - self.assert_(isinstance(open_url.readline(), bytes), + self.assertTrue(isinstance(open_url.readline(), bytes), "readline did not return bytes") - self.assert_(isinstance(open_url.readlines(), list), + self.assertTrue(isinstance(open_url.readlines(), list), "readlines did not return a list") finally: open_url.close() @@ -87,7 +87,7 @@ info_obj = open_url.info() finally: open_url.close() - self.assert_(isinstance(info_obj, email.message.Message), + self.assertTrue(isinstance(info_obj, email.message.Message), "object returned by 'info' is not an instance of " "email.message.Message") self.assertEqual(info_obj.get_content_subtype(), "html") @@ -122,7 +122,7 @@ fd = open_url.fileno() FILE = os.fdopen(fd, encoding='utf-8') try: - self.assert_(FILE.read(), "reading from file created using fd " + self.assertTrue(FILE.read(), "reading from file created using fd " "returned by fileno failed") finally: FILE.close() @@ -150,11 +150,11 @@ def test_basic(self): # Test basic functionality. file_location,info = self.urlretrieve("http://www.python.org/") - self.assert_(os.path.exists(file_location), "file location returned by" + self.assertTrue(os.path.exists(file_location), "file location returned by" " urlretrieve is not a valid path") FILE = open(file_location, encoding='utf-8') try: - self.assert_(FILE.read(), "reading from the file location returned" + self.assertTrue(FILE.read(), "reading from the file location returned" " by urlretrieve failed") finally: FILE.close() @@ -165,10 +165,10 @@ file_location,info = self.urlretrieve("http://www.python.org/", support.TESTFN) self.assertEqual(file_location, support.TESTFN) - self.assert_(os.path.exists(file_location)) + self.assertTrue(os.path.exists(file_location)) FILE = open(file_location, encoding='utf-8') try: - self.assert_(FILE.read(), "reading from temporary file failed") + self.assertTrue(FILE.read(), "reading from temporary file failed") finally: FILE.close() os.unlink(file_location) @@ -177,7 +177,7 @@ # Make sure header returned as 2nd value from urlretrieve is good. file_location, header = self.urlretrieve("http://www.python.org/") os.unlink(file_location) - self.assert_(isinstance(header, email.message.Message), + self.assertTrue(isinstance(header, email.message.Message), "header is not an instance of email.message.Message") Modified: python/branches/py3k/Lib/test/test_userdict.py ============================================================================== --- python/branches/py3k/Lib/test/test_userdict.py (original) +++ python/branches/py3k/Lib/test/test_userdict.py Wed Jul 1 01:06:06 2009 @@ -38,9 +38,9 @@ self.assertEqual(collections.UserDict().fromkeys('one two'.split()), d4) self.assertEqual(collections.UserDict.fromkeys('one two'.split(), 1), d5) self.assertEqual(collections.UserDict().fromkeys('one two'.split(), 1), d5) - self.assert_(u1.fromkeys('one two'.split()) is not u1) - self.assert_(isinstance(u1.fromkeys('one two'.split()), collections.UserDict)) - self.assert_(isinstance(u2.fromkeys('one two'.split()), collections.UserDict)) + self.assertTrue(u1.fromkeys('one two'.split()) is not u1) + self.assertTrue(isinstance(u1.fromkeys('one two'.split()), collections.UserDict)) + self.assertTrue(isinstance(u2.fromkeys('one two'.split()), collections.UserDict)) # Test __repr__ self.assertEqual(str(u0), str(d0)) @@ -95,7 +95,7 @@ # Test "in". for i in u2.keys(): - self.assert_(i in u2) + self.assertTrue(i in u2) self.assertEqual(i in u1, i in d1) self.assertEqual(i in u0, i in d0) @@ -122,7 +122,7 @@ # Test setdefault t = collections.UserDict() self.assertEqual(t.setdefault("x", 42), 42) - self.assert_("x" in t) + self.assertTrue("x" in t) self.assertEqual(t.setdefault("x", 23), 42) # Test pop @@ -152,8 +152,8 @@ d = D({1: 2, 3: 4}) self.assertEqual(d[1], 2) self.assertEqual(d[3], 4) - self.assert_(2 not in d) - self.assert_(2 not in d.keys()) + self.assertTrue(2 not in d) + self.assertTrue(2 not in d.keys()) self.assertEqual(d[2], 42) class E(collections.UserDict): def __missing__(self, key): Modified: python/branches/py3k/Lib/test/test_uuid.py ============================================================================== --- python/branches/py3k/Lib/test/test_uuid.py (original) +++ python/branches/py3k/Lib/test/test_uuid.py Wed Jul 1 01:06:06 2009 @@ -293,8 +293,8 @@ self.assertEqual(universal_local_bit, 0, message) self.assertNotEqual(node, 0, message) self.assertNotEqual(node, 0xffffffffffff, message) - self.assert_(0 <= node, message) - self.assert_(node < (1 << 48), message) + self.assertTrue(0 <= node, message) + self.assertTrue(node < (1 << 48), message) TestUUID.source2node[source] = node if TestUUID.last_node: @@ -335,8 +335,8 @@ def test_random_getnode(self): node = uuid._random_getnode() - self.assert_(0 <= node) - self.assert_(node < (1 <<48)) + self.assertTrue(0 <= node) + self.assertTrue(node < (1 <<48)) def test_unixdll_getnode(self): import sys Modified: python/branches/py3k/Lib/test/test_warnings.py ============================================================================== --- python/branches/py3k/Lib/test/test_warnings.py (original) +++ python/branches/py3k/Lib/test/test_warnings.py Wed Jul 1 01:06:06 2009 @@ -83,9 +83,9 @@ self.module.filterwarnings("always", category=UserWarning) message = "FilterTests.test_always" self.module.warn(message, UserWarning) - self.assert_(message, w[-1].message) + self.assertTrue(message, w[-1].message) self.module.warn(message, UserWarning) - self.assert_(w[-1].message, message) + self.assertTrue(w[-1].message, message) def test_default(self): with original_warnings.catch_warnings(record=True, @@ -165,7 +165,7 @@ text = 'handle normally' self.module.warn(text) self.assertEqual(str(w[-1].message), text) - self.assert_(w[-1].category is UserWarning) + self.assertTrue(w[-1].category is UserWarning) self.module.filterwarnings("ignore", "", Warning, "", 0) text = 'filtered out' @@ -178,7 +178,7 @@ text = 'nonmatching text' self.module.warn(text) self.assertEqual(str(w[-1].message), text) - self.assert_(w[-1].category is UserWarning) + self.assertTrue(w[-1].category is UserWarning) class CFilterTests(BaseTest, FilterTests): module = c_warnings @@ -198,7 +198,7 @@ text = 'multi %d' %i # Different text on each call. self.module.warn(text) self.assertEqual(str(w[-1].message), text) - self.assert_(w[-1].category is UserWarning) + self.assertTrue(w[-1].category is UserWarning) # Issue 3639 def test_warn_nonstandard_types(self): @@ -407,7 +407,7 @@ self.module.resetwarnings() self.module.filterwarnings("once", category=UserWarning) self.module.warn_explicit(message, UserWarning, "file", 42) - self.failUnlessEqual(w[-1].message, message) + self.assertEqual(w[-1].message, message) del w[:] self.module.warn_explicit(message, UserWarning, "file", 42) self.assertEquals(len(w), 0) @@ -415,7 +415,7 @@ self.module.onceregistry = {} __warningregistry__ = {} self.module.warn('onceregistry test') - self.failUnlessEqual(w[-1].message.args, message.args) + self.assertEqual(w[-1].message.args, message.args) # Removal of onceregistry is okay. del w[:] del self.module.onceregistry @@ -469,7 +469,7 @@ with support.captured_output('stderr') as stream: self.module.warn(text) result = stream.getvalue() - self.failUnless(text in result) + self.assertTrue(text in result) def test_showwarning_not_callable(self): with original_warnings.catch_warnings(module=self.module): @@ -490,19 +490,19 @@ with support.captured_output('stderr') as stream: warning_tests.inner(text) result = stream.getvalue() - self.failUnlessEqual(result.count('\n'), 2, + self.assertEqual(result.count('\n'), 2, "Too many newlines in %r" % result) first_line, second_line = result.split('\n', 1) expected_file = os.path.splitext(warning_tests.__file__)[0] + '.py' first_line_parts = first_line.rsplit(':', 3) path, line, warning_class, message = first_line_parts line = int(line) - self.failUnlessEqual(expected_file, path) - self.failUnlessEqual(warning_class, ' ' + UserWarning.__name__) - self.failUnlessEqual(message, ' ' + text) + self.assertEqual(expected_file, path) + self.assertEqual(warning_class, ' ' + UserWarning.__name__) + self.assertEqual(message, ' ' + text) expected_line = ' ' + linecache.getline(path, line).strip() + '\n' assert expected_line - self.failUnlessEqual(second_line, expected_line) + self.assertEqual(second_line, expected_line) class WarningsDisplayTests(unittest.TestCase): @@ -519,13 +519,13 @@ format = "%s:%s: %s: %s\n %s\n" expect = format % (file_name, line_num, category.__name__, message, file_line) - self.failUnlessEqual(expect, self.module.formatwarning(message, + self.assertEqual(expect, self.module.formatwarning(message, category, file_name, line_num)) # Test the 'line' argument. file_line += " for the win!" expect = format % (file_name, line_num, category.__name__, message, file_line) - self.failUnlessEqual(expect, self.module.formatwarning(message, + self.assertEqual(expect, self.module.formatwarning(message, category, file_name, line_num, file_line)) def test_showwarning(self): @@ -539,7 +539,7 @@ line_num) self.module.showwarning(message, category, file_name, line_num, file_object) - self.failUnlessEqual(file_object.getvalue(), expect) + self.assertEqual(file_object.getvalue(), expect) # Test 'line' argument. expected_file_line += "for the win!" expect = self.module.formatwarning(message, category, file_name, @@ -547,7 +547,7 @@ file_object = StringIO() self.module.showwarning(message, category, file_name, line_num, file_object, expected_file_line) - self.failUnlessEqual(expect, file_object.getvalue()) + self.assertEqual(expect, file_object.getvalue()) class CWarningsDisplayTests(BaseTest, WarningsDisplayTests): module = c_warnings @@ -567,20 +567,20 @@ # Ensure both showwarning and filters are restored when recording with wmod.catch_warnings(module=wmod, record=True): wmod.filters = wmod.showwarning = object() - self.assert_(wmod.filters is orig_filters) - self.assert_(wmod.showwarning is orig_showwarning) + self.assertTrue(wmod.filters is orig_filters) + self.assertTrue(wmod.showwarning is orig_showwarning) # Same test, but with recording disabled with wmod.catch_warnings(module=wmod, record=False): wmod.filters = wmod.showwarning = object() - self.assert_(wmod.filters is orig_filters) - self.assert_(wmod.showwarning is orig_showwarning) + self.assertTrue(wmod.filters is orig_filters) + self.assertTrue(wmod.showwarning is orig_showwarning) def test_catch_warnings_recording(self): wmod = self.module # Ensure warnings are recorded when requested with wmod.catch_warnings(module=wmod, record=True) as w: self.assertEqual(w, []) - self.assert_(type(w) is list) + self.assertTrue(type(w) is list) wmod.simplefilter("always") wmod.warn("foo") self.assertEqual(str(w[-1].message), "foo") @@ -593,8 +593,8 @@ # Ensure warnings are not recorded when not requested orig_showwarning = wmod.showwarning with wmod.catch_warnings(module=wmod, record=False) as w: - self.assert_(w is None) - self.assert_(wmod.showwarning is orig_showwarning) + self.assertTrue(w is None) + self.assertTrue(wmod.showwarning is orig_showwarning) def test_catch_warnings_reentry_guard(self): wmod = self.module @@ -615,17 +615,17 @@ orig_showwarning = wmod.showwarning # Ensure default behaviour is not to record warnings with wmod.catch_warnings(module=wmod) as w: - self.assert_(w is None) - self.assert_(wmod.showwarning is orig_showwarning) - self.assert_(wmod.filters is not orig_filters) - self.assert_(wmod.filters is orig_filters) + self.assertTrue(w is None) + self.assertTrue(wmod.showwarning is orig_showwarning) + self.assertTrue(wmod.filters is not orig_filters) + self.assertTrue(wmod.filters is orig_filters) if wmod is sys.modules['warnings']: # Ensure the default module is this one with wmod.catch_warnings() as w: - self.assert_(w is None) - self.assert_(wmod.showwarning is orig_showwarning) - self.assert_(wmod.filters is not orig_filters) - self.assert_(wmod.filters is orig_filters) + self.assertTrue(w is None) + self.assertTrue(wmod.showwarning is orig_showwarning) + self.assertTrue(wmod.filters is not orig_filters) + self.assertTrue(wmod.filters is orig_filters) def test_check_warnings(self): # Explicit tests for the test.support convenience wrapper Modified: python/branches/py3k/Lib/test/test_weakref.py ============================================================================== --- python/branches/py3k/Lib/test/test_weakref.py (original) +++ python/branches/py3k/Lib/test/test_weakref.py Wed Jul 1 01:06:06 2009 @@ -65,11 +65,11 @@ ref1 = weakref.ref(o, self.callback) ref2 = weakref.ref(o, self.callback) del o - self.assert_(ref1() is None, + self.assertTrue(ref1() is None, "expected reference to be invalidated") - self.assert_(ref2() is None, + self.assertTrue(ref2() is None, "expected reference to be invalidated") - self.assert_(self.cbcalled == 2, + self.assertTrue(self.cbcalled == 2, "callback not called the right number of times") def test_multiple_selfref_callbacks(self): @@ -108,10 +108,10 @@ def check_basic_ref(self, factory): o = factory() ref = weakref.ref(o) - self.assert_(ref() is not None, + self.assertTrue(ref() is not None, "weak reference to live object should be live") o2 = ref() - self.assert_(o is o2, + self.assertTrue(o is o2, "() should return original object if live") def check_basic_callback(self, factory): @@ -119,9 +119,9 @@ o = factory() ref = weakref.ref(o, self.callback) del o - self.assert_(self.cbcalled == 1, + self.assertTrue(self.cbcalled == 1, "callback did not properly set 'cbcalled'") - self.assert_(ref() is None, + self.assertTrue(ref() is None, "ref2 should be dead after deleting object reference") def test_ref_reuse(self): @@ -131,19 +131,19 @@ # between these two; it should make no difference proxy = weakref.proxy(o) ref2 = weakref.ref(o) - self.assert_(ref1 is ref2, + self.assertTrue(ref1 is ref2, "reference object w/out callback should be re-used") o = C() proxy = weakref.proxy(o) ref1 = weakref.ref(o) ref2 = weakref.ref(o) - self.assert_(ref1 is ref2, + self.assertTrue(ref1 is ref2, "reference object w/out callback should be re-used") - self.assert_(weakref.getweakrefcount(o) == 2, + self.assertTrue(weakref.getweakrefcount(o) == 2, "wrong weak ref count for object") del proxy - self.assert_(weakref.getweakrefcount(o) == 1, + self.assertTrue(weakref.getweakrefcount(o) == 1, "wrong weak ref count for object after deleting proxy") def test_proxy_reuse(self): @@ -151,7 +151,7 @@ proxy1 = weakref.proxy(o) ref = weakref.ref(o) proxy2 = weakref.proxy(o) - self.assert_(proxy1 is proxy2, + self.assertTrue(proxy1 is proxy2, "proxy object w/out callback should have been re-used") def test_basic_proxy(self): @@ -160,14 +160,14 @@ L = collections.UserList() p = weakref.proxy(L) - self.failIf(p, "proxy for empty UserList should be false") + self.assertFalse(p, "proxy for empty UserList should be false") p.append(12) self.assertEqual(len(L), 1) - self.failUnless(p, "proxy for non-empty UserList should be true") + self.assertTrue(p, "proxy for non-empty UserList should be true") p[:] = [2, 3] self.assertEqual(len(L), 2) self.assertEqual(len(p), 2) - self.failUnless(3 in p, + self.assertTrue(3 in p, "proxy didn't support __contains__() properly") p[1] = 5 self.assertEqual(L[1], 5) @@ -221,19 +221,19 @@ o = Object(1) p1 = makeref(o, None) p2 = makeref(o, None) - self.assert_(p1 is p2, "both callbacks were None in the C API") + self.assertTrue(p1 is p2, "both callbacks were None in the C API") del p1, p2 p1 = makeref(o) p2 = makeref(o, None) - self.assert_(p1 is p2, "callbacks were NULL, None in the C API") + self.assertTrue(p1 is p2, "callbacks were NULL, None in the C API") del p1, p2 p1 = makeref(o) p2 = makeref(o) - self.assert_(p1 is p2, "both callbacks were NULL in the C API") + self.assertTrue(p1 is p2, "both callbacks were NULL in the C API") del p1, p2 p1 = makeref(o, None) p2 = makeref(o) - self.assert_(p1 is p2, "callbacks were None, NULL in the C API") + self.assertTrue(p1 is p2, "callbacks were None, NULL in the C API") def test_callable_proxy(self): o = Callable() @@ -241,13 +241,13 @@ self.check_proxy(o, ref1) - self.assert_(type(ref1) is weakref.CallableProxyType, + self.assertTrue(type(ref1) is weakref.CallableProxyType, "proxy is not of callable type") ref1('twinkies!') - self.assert_(o.bar == 'twinkies!', + self.assertTrue(o.bar == 'twinkies!', "call through proxy not passed through to original") ref1(x='Splat.') - self.assert_(o.bar == 'Splat.', + self.assertTrue(o.bar == 'Splat.', "call through proxy not passed through to original") # expect due to too few args @@ -258,24 +258,24 @@ def check_proxy(self, o, proxy): o.foo = 1 - self.assert_(proxy.foo == 1, + self.assertTrue(proxy.foo == 1, "proxy does not reflect attribute addition") o.foo = 2 - self.assert_(proxy.foo == 2, + self.assertTrue(proxy.foo == 2, "proxy does not reflect attribute modification") del o.foo - self.assert_(not hasattr(proxy, 'foo'), + self.assertTrue(not hasattr(proxy, 'foo'), "proxy does not reflect attribute removal") proxy.foo = 1 - self.assert_(o.foo == 1, + self.assertTrue(o.foo == 1, "object does not reflect attribute addition via proxy") proxy.foo = 2 - self.assert_( + self.assertTrue( o.foo == 2, "object does not reflect attribute modification via proxy") del proxy.foo - self.assert_(not hasattr(o, 'foo'), + self.assertTrue(not hasattr(o, 'foo'), "object does not reflect attribute removal via proxy") def test_proxy_deletion(self): @@ -299,21 +299,21 @@ o = C() ref1 = weakref.ref(o) ref2 = weakref.ref(o, self.callback) - self.assert_(weakref.getweakrefcount(o) == 2, + self.assertTrue(weakref.getweakrefcount(o) == 2, "got wrong number of weak reference objects") proxy1 = weakref.proxy(o) proxy2 = weakref.proxy(o, self.callback) - self.assert_(weakref.getweakrefcount(o) == 4, + self.assertTrue(weakref.getweakrefcount(o) == 4, "got wrong number of weak reference objects") del ref1, ref2, proxy1, proxy2 - self.assert_(weakref.getweakrefcount(o) == 0, + self.assertTrue(weakref.getweakrefcount(o) == 0, "weak reference objects not unlinked from" " referent when discarded.") # assumes ints do not support weakrefs - self.assert_(weakref.getweakrefcount(1) == 0, + self.assertTrue(weakref.getweakrefcount(1) == 0, "got wrong number of weak reference objects for int") def test_getweakrefs(self): @@ -321,22 +321,22 @@ ref1 = weakref.ref(o, self.callback) ref2 = weakref.ref(o, self.callback) del ref1 - self.assert_(weakref.getweakrefs(o) == [ref2], + self.assertTrue(weakref.getweakrefs(o) == [ref2], "list of refs does not match") o = C() ref1 = weakref.ref(o, self.callback) ref2 = weakref.ref(o, self.callback) del ref2 - self.assert_(weakref.getweakrefs(o) == [ref1], + self.assertTrue(weakref.getweakrefs(o) == [ref1], "list of refs does not match") del ref1 - self.assert_(weakref.getweakrefs(o) == [], + self.assertTrue(weakref.getweakrefs(o) == [], "list of refs not cleared") # assumes ints do not support weakrefs - self.assert_(weakref.getweakrefs(1) == [], + self.assertTrue(weakref.getweakrefs(1) == [], "list of refs does not match for int") def test_newstyle_number_ops(self): @@ -344,8 +344,8 @@ pass f = F(2.0) p = weakref.proxy(f) - self.assert_(p + 1.0 == 3.0) - self.assert_(1.0 + p == 3.0) # this used to SEGV + self.assertTrue(p + 1.0 == 3.0) + self.assertTrue(1.0 + p == 3.0) # this used to SEGV def test_callbacks_protected(self): # Callbacks protected from already-set exceptions? @@ -598,7 +598,7 @@ c.wr = weakref.ref(d, callback) # this won't trigger d.wr = weakref.ref(callback, d.cb) # ditto external_wr = weakref.ref(callback, safe_callback) # but this will - self.assert_(external_wr() is callback) + self.assertTrue(external_wr() is callback) # The weakrefs attached to c and d should get cleared, so that # C.cb is never called. But external_wr isn't part of the cyclic @@ -681,12 +681,12 @@ return super().__call__() o = Object("foo") mr = MyRef(o, value=24) - self.assert_(mr() is o) - self.assert_(mr.called) + self.assertTrue(mr() is o) + self.assertTrue(mr.called) self.assertEqual(mr.value, 24) del o - self.assert_(mr() is None) - self.assert_(mr.called) + self.assertTrue(mr() is None) + self.assertTrue(mr.called) def test_subclass_refs_dont_replace_standard_refs(self): class MyRef(weakref.ref): @@ -694,16 +694,16 @@ o = Object(42) r1 = MyRef(o) r2 = weakref.ref(o) - self.assert_(r1 is not r2) + self.assertTrue(r1 is not r2) self.assertEqual(weakref.getweakrefs(o), [r2, r1]) self.assertEqual(weakref.getweakrefcount(o), 2) r3 = MyRef(o) self.assertEqual(weakref.getweakrefcount(o), 3) refs = weakref.getweakrefs(o) self.assertEqual(len(refs), 3) - self.assert_(r2 is refs[0]) - self.assert_(r1 in refs[1:]) - self.assert_(r3 in refs[1:]) + self.assertTrue(r2 is refs[0]) + self.assertTrue(r1 in refs[1:]) + self.assertTrue(r3 in refs[1:]) def test_subclass_refs_dont_conflate_callbacks(self): class MyRef(weakref.ref): @@ -711,10 +711,10 @@ o = Object(42) r1 = MyRef(o, id) r2 = MyRef(o, str) - self.assert_(r1 is not r2) + self.assertTrue(r1 is not r2) refs = weakref.getweakrefs(o) - self.assert_(r1 in refs) - self.assert_(r2 in refs) + self.assertTrue(r1 in refs) + self.assertTrue(r2 in refs) def test_subclass_refs_with_slots(self): class MyRef(weakref.ref): @@ -731,7 +731,7 @@ self.assertEqual(r.slot1, "abc") self.assertEqual(r.slot2, "def") self.assertEqual(r.meth(), "abcdef") - self.failIf(hasattr(r, "__dict__")) + self.assertFalse(hasattr(r, "__dict__")) def test_subclass_refs_with_cycle(self): # Bug #3110 @@ -796,7 +796,7 @@ dict, objects = self.make_weak_valued_dict() for o in objects: self.assertEqual(weakref.getweakrefcount(o), 1) - self.assert_(o is dict[o.arg], + self.assertTrue(o is dict[o.arg], "wrong object returned by weak dict!") items1 = list(dict.items()) items2 = list(dict.copy().items()) @@ -825,9 +825,9 @@ # dict, objects = self.make_weak_keyed_dict() for o in objects: - self.assert_(weakref.getweakrefcount(o) == 1, + self.assertTrue(weakref.getweakrefcount(o) == 1, "wrong number of weak references to %r!" % o) - self.assert_(o.arg is dict[o], + self.assertTrue(o.arg is dict[o], "wrong object returned by weak dict!") items1 = dict.items() items2 = dict.copy().items() @@ -836,15 +836,15 @@ del items1, items2 self.assertEqual(len(dict), self.COUNT) del objects[0] - self.assert_(len(dict) == (self.COUNT - 1), + self.assertTrue(len(dict) == (self.COUNT - 1), "deleting object did not cause dictionary update") del objects, o - self.assert_(len(dict) == 0, + self.assertTrue(len(dict) == 0, "deleting the keys did not clear the dictionary") o = Object(42) dict[o] = "What is the meaning of the universe?" - self.assert_(o in dict) - self.assert_(34 not in dict) + self.assertTrue(o in dict) + self.assertTrue(34 not in dict) def test_weak_keyed_iters(self): dict, objects = self.make_weak_keyed_dict() @@ -856,8 +856,8 @@ objects2 = list(objects) for wr in refs: ob = wr() - self.assert_(ob in dict) - self.assert_(ob in dict) + self.assertTrue(ob in dict) + self.assertTrue(ob in dict) self.assertEqual(ob.arg, dict[ob]) objects2.remove(ob) self.assertEqual(len(objects2), 0) @@ -867,8 +867,8 @@ self.assertEqual(len(list(dict.keyrefs())), len(objects)) for wr in dict.keyrefs(): ob = wr() - self.assert_(ob in dict) - self.assert_(ob in dict) + self.assertTrue(ob in dict) + self.assertTrue(ob in dict) self.assertEqual(ob.arg, dict[ob]) objects2.remove(ob) self.assertEqual(len(objects2), 0) @@ -968,15 +968,15 @@ k, v = weakdict.popitem() self.assertEqual(len(weakdict), 1) if k is key1: - self.assert_(v is value1) + self.assertTrue(v is value1) else: - self.assert_(v is value2) + self.assertTrue(v is value2) k, v = weakdict.popitem() self.assertEqual(len(weakdict), 0) if k is key1: - self.assert_(v is value1) + self.assertTrue(v is value1) else: - self.assert_(v is value2) + self.assertTrue(v is value2) def test_weak_valued_dict_popitem(self): self.check_popitem(weakref.WeakValueDictionary, @@ -987,21 +987,21 @@ C(), "value 1", C(), "value 2") def check_setdefault(self, klass, key, value1, value2): - self.assert_(value1 is not value2, + self.assertTrue(value1 is not value2, "invalid test" " -- value parameters must be distinct objects") weakdict = klass() o = weakdict.setdefault(key, value1) - self.assert_(o is value1) - self.assert_(key in weakdict) - self.assert_(weakdict.get(key) is value1) - self.assert_(weakdict[key] is value1) + self.assertTrue(o is value1) + self.assertTrue(key in weakdict) + self.assertTrue(weakdict.get(key) is value1) + self.assertTrue(weakdict[key] is value1) o = weakdict.setdefault(key, value2) - self.assert_(o is value1) - self.assert_(key in weakdict) - self.assert_(weakdict.get(key) is value1) - self.assert_(weakdict[key] is value1) + self.assertTrue(o is value1) + self.assertTrue(key in weakdict) + self.assertTrue(weakdict.get(key) is value1) + self.assertTrue(weakdict[key] is value1) def test_weak_valued_dict_setdefault(self): self.check_setdefault(weakref.WeakValueDictionary, @@ -1020,17 +1020,17 @@ weakdict.update(dict) self.assertEqual(len(weakdict), len(dict)) for k in weakdict.keys(): - self.assert_(k in dict, + self.assertTrue(k in dict, "mysterious new key appeared in weak dict") v = dict.get(k) - self.assert_(v is weakdict[k]) - self.assert_(v is weakdict.get(k)) + self.assertTrue(v is weakdict[k]) + self.assertTrue(v is weakdict.get(k)) for k in dict.keys(): - self.assert_(k in weakdict, + self.assertTrue(k in weakdict, "original key disappeared in weak dict") v = dict[k] - self.assert_(v is weakdict[k]) - self.assert_(v is weakdict.get(k)) + self.assertTrue(v is weakdict[k]) + self.assertTrue(v is weakdict.get(k)) def test_weak_valued_dict_update(self): self.check_update(weakref.WeakValueDictionary, @@ -1060,7 +1060,7 @@ self.assertEqual(len(d), 2) del d['something'] self.assertEqual(len(d), 1) - self.assert_(list(d.items()) == [('something else', o2)]) + self.assertTrue(list(d.items()) == [('something else', o2)]) def test_weak_keyed_bad_delitem(self): d = weakref.WeakKeyDictionary() Modified: python/branches/py3k/Lib/test/test_weakset.py ============================================================================== --- python/branches/py3k/Lib/test/test_weakset.py (original) +++ python/branches/py3k/Lib/test/test_weakset.py Wed Jul 1 01:06:06 2009 @@ -33,7 +33,7 @@ for method in dir(set): if method == 'test_c_api' or method.startswith('_'): continue - self.assert_(method in weaksetmethods, + self.assertTrue(method in weaksetmethods, "WeakSet missing method " + method) def test_new_or_init(self): @@ -49,9 +49,9 @@ for c in self.letters: self.assertEqual(c in self.s, c in self.d) self.assertRaises(TypeError, self.s.__contains__, [[]]) - self.assert_(self.obj in self.fs) + self.assertTrue(self.obj in self.fs) del self.obj - self.assert_(ustr('F') not in self.fs) + self.assertTrue(ustr('F') not in self.fs) def test_union(self): u = self.s.union(self.items2) @@ -81,8 +81,8 @@ self.assertEqual(self.s.intersection(C(self.items2)), x) def test_isdisjoint(self): - self.assert_(self.s.isdisjoint(WeakSet(self.items2))) - self.assert_(not self.s.isdisjoint(WeakSet(self.letters))) + self.assertTrue(self.s.isdisjoint(WeakSet(self.items2))) + self.assertTrue(not self.s.isdisjoint(WeakSet(self.letters))) def test_and(self): i = self.s.intersection(self.items2) @@ -118,19 +118,19 @@ def test_sub_and_super(self): pl, ql, rl = map(lambda s: [ustr(c) for c in s], ['ab', 'abcde', 'def']) p, q, r = map(WeakSet, (pl, ql, rl)) - self.assert_(p < q) - self.assert_(p <= q) - self.assert_(q <= q) - self.assert_(q > p) - self.assert_(q >= p) - self.failIf(q < r) - self.failIf(q <= r) - self.failIf(q > r) - self.failIf(q >= r) - self.assert_(set('a').issubset('abc')) - self.assert_(set('abc').issuperset('a')) - self.failIf(set('a').issubset('cbs')) - self.failIf(set('cbs').issuperset('a')) + self.assertTrue(p < q) + self.assertTrue(p <= q) + self.assertTrue(q <= q) + self.assertTrue(q > p) + self.assertTrue(q >= p) + self.assertFalse(q < r) + self.assertFalse(q <= r) + self.assertFalse(q > r) + self.assertFalse(q >= r) + self.assertTrue(set('a').issubset('abc')) + self.assertTrue(set('abc').issuperset('a')) + self.assertFalse(set('a').issubset('cbs')) + self.assertFalse(set('cbs').issuperset('a')) def test_gc(self): # Create a nest of cycles to exercise overall ref count check @@ -148,7 +148,7 @@ s=H() f=set() f.add(s) - self.assert_(s in f) + self.assertTrue(s in f) f.remove(s) f.add(s) f.discard(s) @@ -183,79 +183,79 @@ def test_add(self): x = ustr('Q') self.s.add(x) - self.assert_(x in self.s) + self.assertTrue(x in self.s) dup = self.s.copy() self.s.add(x) self.assertEqual(self.s, dup) self.assertRaises(TypeError, self.s.add, []) self.fs.add(Foo()) - self.assert_(len(self.fs) == 1) + self.assertTrue(len(self.fs) == 1) self.fs.add(self.obj) - self.assert_(len(self.fs) == 1) + self.assertTrue(len(self.fs) == 1) def test_remove(self): x = ustr('a') self.s.remove(x) - self.assert_(x not in self.s) + self.assertTrue(x not in self.s) self.assertRaises(KeyError, self.s.remove, x) self.assertRaises(TypeError, self.s.remove, []) def test_discard(self): a, q = ustr('a'), ustr('Q') self.s.discard(a) - self.assert_(a not in self.s) + self.assertTrue(a not in self.s) self.s.discard(q) self.assertRaises(TypeError, self.s.discard, []) def test_pop(self): for i in range(len(self.s)): elem = self.s.pop() - self.assert_(elem not in self.s) + self.assertTrue(elem not in self.s) self.assertRaises(KeyError, self.s.pop) def test_update(self): retval = self.s.update(self.items2) self.assertEqual(retval, None) for c in (self.items + self.items2): - self.assert_(c in self.s) + self.assertTrue(c in self.s) self.assertRaises(TypeError, self.s.update, [[]]) def test_update_set(self): self.s.update(set(self.items2)) for c in (self.items + self.items2): - self.assert_(c in self.s) + self.assertTrue(c in self.s) def test_ior(self): self.s |= set(self.items2) for c in (self.items + self.items2): - self.assert_(c in self.s) + self.assertTrue(c in self.s) def test_intersection_update(self): retval = self.s.intersection_update(self.items2) self.assertEqual(retval, None) for c in (self.items + self.items2): if c in self.items2 and c in self.items: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(TypeError, self.s.intersection_update, [[]]) def test_iand(self): self.s &= set(self.items2) for c in (self.items + self.items2): if c in self.items2 and c in self.items: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_difference_update(self): retval = self.s.difference_update(self.items2) self.assertEqual(retval, None) for c in (self.items + self.items2): if c in self.items and c not in self.items2: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(TypeError, self.s.difference_update, [[]]) self.assertRaises(TypeError, self.s.symmetric_difference_update, [[]]) @@ -263,27 +263,27 @@ self.s -= set(self.items2) for c in (self.items + self.items2): if c in self.items and c not in self.items2: - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_symmetric_difference_update(self): retval = self.s.symmetric_difference_update(self.items2) self.assertEqual(retval, None) for c in (self.items + self.items2): if (c in self.items) ^ (c in self.items2): - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) self.assertRaises(TypeError, self.s.symmetric_difference_update, [[]]) def test_ixor(self): self.s ^= set(self.items2) for c in (self.items + self.items2): if (c in self.items) ^ (c in self.items2): - self.assert_(c in self.s) + self.assertTrue(c in self.s) else: - self.assert_(c not in self.s) + self.assertTrue(c not in self.s) def test_inplace_on_self(self): t = self.s.copy() Modified: python/branches/py3k/Lib/test/test_winreg.py ============================================================================== --- python/branches/py3k/Lib/test/test_winreg.py (original) +++ python/branches/py3k/Lib/test/test_winreg.py Wed Jul 1 01:06:06 2009 @@ -53,7 +53,7 @@ # Set the default value for this key. SetValue(root_key, test_key_name, REG_SZ, "Default value") key = CreateKey(root_key, test_key_name) - self.assert_(key.handle != 0) + self.assertTrue(key.handle != 0) # Create a sub-key sub_key = CreateKey(key, subkeystr) # Give the sub-key some named values Modified: python/branches/py3k/Lib/test/test_wsgiref.py ============================================================================== --- python/branches/py3k/Lib/test/test_wsgiref.py (original) +++ python/branches/py3k/Lib/test/test_wsgiref.py Wed Jul 1 01:06:06 2009 @@ -151,7 +151,7 @@ start_response("200 OK", ('Content-Type','text/plain')) return ["Hello, world!"] out, err = run_amock(validator(bad_app)) - self.failUnless(out.endswith( + self.assertTrue(out.endswith( b"A server error occurred. Please contact the administrator." )) self.assertEqual( @@ -166,7 +166,7 @@ s(b"200 OK", [(b"Content-Type", b"text/plain; charset=utf-8")]) return [b"data"] out, err = run_amock(validator(bad_app)) - self.failUnless(out.endswith( + self.assertTrue(out.endswith( b"A server error occurred. Please contact the administrator." )) self.assertEqual( @@ -181,7 +181,7 @@ ]) return [b"data"] out, err = run_amock(validator(app)) - self.failUnless(err.endswith('"GET / HTTP/1.0" 200 4\n')) + self.assertTrue(err.endswith('"GET / HTTP/1.0" 200 4\n')) ver = sys.version.split()[0].encode('ascii') self.assertEqual( b"HTTP/1.0 200 OK\r\n" @@ -210,16 +210,16 @@ env = {} util.setup_testing_defaults(env) if isinstance(value,StringIO): - self.failUnless(isinstance(env[key],StringIO)) + self.assertTrue(isinstance(env[key],StringIO)) elif isinstance(value,BytesIO): - self.failUnless(isinstance(env[key],BytesIO)) + self.assertTrue(isinstance(env[key],BytesIO)) else: self.assertEqual(env[key],value) # Check existing value env = {key:alt} util.setup_testing_defaults(env) - self.failUnless(env[key] is alt) + self.assertTrue(env[key] is alt) def checkCrossDefault(self,key,value,**kw): util.setup_testing_defaults(kw) @@ -246,15 +246,15 @@ compare_generic_iter(make_it,match) it = make_it() - self.failIf(it.filelike.closed) + self.assertFalse(it.filelike.closed) for item in it: pass - self.failIf(it.filelike.closed) + self.assertFalse(it.filelike.closed) it.close() - self.failUnless(it.filelike.closed) + self.assertTrue(it.filelike.closed) def testSimpleShifts(self): @@ -354,14 +354,14 @@ "TE Trailers Transfer-Encoding Upgrade" ).split(): for alt in hop, hop.title(), hop.upper(), hop.lower(): - self.failUnless(util.is_hop_by_hop(alt)) + self.assertTrue(util.is_hop_by_hop(alt)) # Not comprehensive, just a few random header names for hop in ( "Accept Cache-Control Date Pragma Trailer Via Warning" ).split(): for alt in hop, hop.title(), hop.upper(), hop.lower(): - self.failIf(util.is_hop_by_hop(alt)) + self.assertFalse(util.is_hop_by_hop(alt)) class HeaderTests(TestCase): @@ -372,17 +372,17 @@ self.assertEqual(Headers(test[:]).keys(), ['x']) self.assertEqual(Headers(test[:]).values(), ['y']) self.assertEqual(Headers(test[:]).items(), test) - self.failIf(Headers(test).items() is test) # must be copy! + self.assertFalse(Headers(test).items() is test) # must be copy! h=Headers([]) del h['foo'] # should not raise an error h['Foo'] = 'bar' for m in h.__contains__, h.get, h.get_all, h.__getitem__: - self.failUnless(m('foo')) - self.failUnless(m('Foo')) - self.failUnless(m('FOO')) - self.failIf(m('bar')) + self.assertTrue(m('foo')) + self.assertTrue(m('Foo')) + self.assertTrue(m('FOO')) + self.assertFalse(m('bar')) self.assertEqual(h['foo'],'bar') h['foo'] = 'baz' @@ -438,7 +438,7 @@ h.get("content-disposition")) del h['content-disposition'] - self.assert_(b'content-disposition' not in h) + self.assertTrue(b'content-disposition' not in h) class ErrorHandler(BaseCGIHandler): @@ -486,7 +486,7 @@ if k not in empty: self.assertEqual(env[k],v) for k,v in empty.items(): - self.failUnless(k in env) + self.assertTrue(k in env) def testEnviron(self): h = TestHandler(X="Y") @@ -499,7 +499,7 @@ h = BaseCGIHandler(None,None,None,{}) h.setup_environ() for key in 'wsgi.url_scheme', 'wsgi.input', 'wsgi.errors': - self.assert_(key in h.environ) + self.assertTrue(key in h.environ) def testScheme(self): h=TestHandler(HTTPS="on"); h.setup_environ() @@ -586,7 +586,7 @@ "\r\n%s" % (h.error_status,len(h.error_body),h.error_body) ).encode("iso-8859-1")) - self.failUnless("AssertionError" in h.stderr.getvalue()) + self.assertTrue("AssertionError" in h.stderr.getvalue()) def testErrorAfterOutput(self): MSG = "Some output has been sent" @@ -599,7 +599,7 @@ self.assertEqual(h.stdout.getvalue(), ("Status: 200 OK\r\n" "\r\n"+MSG).encode("iso-8859-1")) - self.failUnless("AssertionError" in h.stderr.getvalue()) + self.assertTrue("AssertionError" in h.stderr.getvalue()) def testHeaderFormats(self): @@ -638,7 +638,7 @@ if proto=="HTTP/0.9": self.assertEqual(h.stdout.getvalue(),b"") else: - self.failUnless( + self.assertTrue( re.match((stdpat%(version,sw)).encode("iso-8859-1"), h.stdout.getvalue()), ((stdpat%(version,sw)).encode("iso-8859-1"), Modified: python/branches/py3k/Lib/test/test_xdrlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_xdrlib.py (original) +++ python/branches/py3k/Lib/test/test_xdrlib.py Wed Jul 1 01:06:06 2009 @@ -30,15 +30,15 @@ self.assertEqual(up.unpack_int(), 42) self.assertEqual(up.unpack_uint(), 9) - self.assert_(up.unpack_bool() is True) + self.assertTrue(up.unpack_bool() is True) # remember position pos = up.get_position() - self.assert_(up.unpack_bool() is False) + self.assertTrue(up.unpack_bool() is False) # rewind and unpack again up.set_position(pos) - self.assert_(up.unpack_bool() is False) + self.assertTrue(up.unpack_bool() is False) self.assertEqual(up.unpack_uhyper(), 45) self.assertAlmostEqual(up.unpack_float(), 1.9) Modified: python/branches/py3k/Lib/test/test_xmlrpc.py ============================================================================== --- python/branches/py3k/Lib/test/test_xmlrpc.py (original) +++ python/branches/py3k/Lib/test/test_xmlrpc.py Wed Jul 1 01:06:06 2009 @@ -63,21 +63,21 @@ def test_cmp_datetime_DateTime(self): now = datetime.datetime.now() dt = xmlrpclib.DateTime(now.timetuple()) - self.assert_(dt == now) - self.assert_(now == dt) + self.assertTrue(dt == now) + self.assertTrue(now == dt) then = now + datetime.timedelta(seconds=4) - self.assert_(then >= dt) - self.assert_(dt < then) + self.assertTrue(then >= dt) + self.assertTrue(dt < then) def test_bug_1164912 (self): d = xmlrpclib.DateTime() ((new_d,), dummy) = xmlrpclib.loads(xmlrpclib.dumps((d,), methodresponse=True)) - self.assert_(isinstance(new_d.value, str)) + self.assertTrue(isinstance(new_d.value, str)) # Check that the output of dumps() is still an 8-bit string s = xmlrpclib.dumps((new_d,), methodresponse=True) - self.assert_(isinstance(s, str)) + self.assertTrue(isinstance(s, str)) def test_newstyle_class(self): class T(object): @@ -171,7 +171,7 @@ # private methods self.assertRaises(AttributeError, xmlrpc.server.resolve_dotted_attribute, str, '__add') - self.assert_(xmlrpc.server.resolve_dotted_attribute(str, 'title')) + self.assertTrue(xmlrpc.server.resolve_dotted_attribute(str, 'title')) class DateTimeTestCase(unittest.TestCase): def test_default(self): @@ -473,7 +473,7 @@ self.assertRaises(AttributeError, xmlrpc.server.resolve_dotted_attribute, str, '__add') - self.assert_(xmlrpc.server.resolve_dotted_attribute(str, 'title')) + self.assertTrue(xmlrpc.server.resolve_dotted_attribute(str, 'title')) # Get the test to run faster by sending a request with test_simple1. # This avoids waiting for the socket timeout. self.test_simple1() Modified: python/branches/py3k/Lib/test/test_xmlrpc_net.py ============================================================================== --- python/branches/py3k/Lib/test/test_xmlrpc_net.py (original) +++ python/branches/py3k/Lib/test/test_xmlrpc_net.py Wed Jul 1 01:06:06 2009 @@ -33,7 +33,7 @@ delta = dt1 - dt0 # The difference between the system time here and the system # time on the server should not be too big. - self.assert_(delta.days <= 1) + self.assertTrue(delta.days <= 1) def test_main(): Modified: python/branches/py3k/Lib/test/test_zipfile.py ============================================================================== --- python/branches/py3k/Lib/test/test_zipfile.py (original) +++ python/branches/py3k/Lib/test/test_zipfile.py Wed Jul 1 01:06:06 2009 @@ -57,9 +57,9 @@ lines = directory.splitlines() self.assertEquals(len(lines), 4) # Number of files + header - self.assert_('File Name' in lines[0]) - self.assert_('Modified' in lines[0]) - self.assert_('Size' in lines[0]) + self.assertTrue('File Name' in lines[0]) + self.assertTrue('Modified' in lines[0]) + self.assertTrue('Size' in lines[0]) fn, date, time, size = lines[1].split() self.assertEquals(fn, 'another.name') @@ -69,17 +69,17 @@ # Check the namelist names = zipfp.namelist() self.assertEquals(len(names), 3) - self.assert_(TESTFN in names) - self.assert_("another.name" in names) - self.assert_("strfile" in names) + self.assertTrue(TESTFN in names) + self.assertTrue("another.name" in names) + self.assertTrue("strfile" in names) # Check infolist infos = zipfp.infolist() names = [ i.filename for i in infos ] self.assertEquals(len(names), 3) - self.assert_(TESTFN in names) - self.assert_("another.name" in names) - self.assert_("strfile" in names) + self.assertTrue(TESTFN in names) + self.assertTrue("another.name" in names) + self.assertTrue("strfile" in names) for i in infos: self.assertEquals(i.file_size, len(self.data)) @@ -138,11 +138,11 @@ data = b"" for info in infos: data += zipfp.open(info).read() - self.assert_(data == b"foobar" or data == b"barfoo") + self.assertTrue(data == b"foobar" or data == b"barfoo") data = b"" for info in infos: data += zipfp.read(info) - self.assert_(data == b"foobar" or data == b"barfoo") + self.assertTrue(data == b"foobar" or data == b"barfoo") zipfp.close() def zipRandomOpenTest(self, f, compression): @@ -439,9 +439,9 @@ lines = directory.splitlines() self.assertEquals(len(lines), 4) # Number of files + header - self.assert_('File Name' in lines[0]) - self.assert_('Modified' in lines[0]) - self.assert_('Size' in lines[0]) + self.assertTrue('File Name' in lines[0]) + self.assertTrue('Modified' in lines[0]) + self.assertTrue('Size' in lines[0]) fn, date, time, size = lines[1].split() self.assertEquals(fn, 'another.name') @@ -451,17 +451,17 @@ # Check the namelist names = zipfp.namelist() self.assertEquals(len(names), 3) - self.assert_(TESTFN in names) - self.assert_("another.name" in names) - self.assert_("strfile" in names) + self.assertTrue(TESTFN in names) + self.assertTrue("another.name" in names) + self.assertTrue("strfile" in names) # Check infolist infos = zipfp.infolist() names = [ i.filename for i in infos ] self.assertEquals(len(names), 3) - self.assert_(TESTFN in names) - self.assert_("another.name" in names) - self.assert_("strfile" in names) + self.assertTrue(TESTFN in names) + self.assertTrue("another.name" in names) + self.assertTrue("strfile" in names) for i in infos: self.assertEquals(i.file_size, len(self.data)) @@ -511,8 +511,8 @@ zipfp.writepy(fn) bn = os.path.basename(fn) - self.assert_(bn not in zipfp.namelist()) - self.assert_(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) + self.assertTrue(bn not in zipfp.namelist()) + self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() @@ -524,8 +524,8 @@ zipfp.writepy(fn, "testpackage") bn = "%s/%s"%("testpackage", os.path.basename(fn)) - self.assert_(bn not in zipfp.namelist()) - self.assert_(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) + self.assertTrue(bn not in zipfp.namelist()) + self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() def testWritePythonPackage(self): @@ -537,8 +537,8 @@ # Check for a couple of modules at different levels of the hieararchy names = zipfp.namelist() - self.assert_('email/__init__.pyo' in names or 'email/__init__.pyc' in names) - self.assert_('email/mime/text.pyo' in names or 'email/mime/text.pyc' in names) + self.assertTrue('email/__init__.pyo' in names or 'email/__init__.pyc' in names) + self.assertTrue('email/mime/text.pyo' in names or 'email/mime/text.pyc' in names) def testWritePythonDirectory(self): os.mkdir(TESTFN2) @@ -559,9 +559,9 @@ zipfp.writepy(TESTFN2) names = zipfp.namelist() - self.assert_('mod1.pyc' in names or 'mod1.pyo' in names) - self.assert_('mod2.pyc' in names or 'mod2.pyo' in names) - self.assert_('mod2.txt' not in names) + self.assertTrue('mod1.pyc' in names or 'mod1.pyo' in names) + self.assertTrue('mod2.pyc' in names or 'mod2.pyo' in names) + self.assertTrue('mod2.txt' not in names) finally: shutil.rmtree(TESTFN2) @@ -598,7 +598,7 @@ except IOError: self.fail('Could not append data to a non-existent zip file.') - self.assert_(os.path.exists(TESTFN)) + self.assertTrue(os.path.exists(TESTFN)) zf = zipfile.ZipFile(TESTFN, 'r') self.assertEqual(zf.read(filename), content) @@ -627,19 +627,19 @@ with open(TESTFN, "w") as fp: fp.write("this is not a legal zip file\n") chk = zipfile.is_zipfile(TESTFN) - self.assert_(not chk) + self.assertTrue(not chk) # - passing a file object with open(TESTFN, "rb") as fp: chk = zipfile.is_zipfile(fp) - self.assert_(not chk) + self.assertTrue(not chk) # - passing a file-like object fp = io.BytesIO() fp.write(b"this is not a legal zip file\n") chk = zipfile.is_zipfile(fp) - self.assert_(not chk) + self.assertTrue(not chk) fp.seek(0,0) chk = zipfile.is_zipfile(fp) - self.assert_(not chk) + self.assertTrue(not chk) def testIsZipValidFile(self): # This test checks that the is_zipfile function correctly identifies @@ -650,21 +650,21 @@ zipf.writestr("foo.txt", b"O, for a Muse of Fire!") zipf.close() chk = zipfile.is_zipfile(TESTFN) - self.assert_(chk) + self.assertTrue(chk) # - passing a file object with open(TESTFN, "rb") as fp: chk = zipfile.is_zipfile(fp) - self.assert_(chk) + self.assertTrue(chk) fp.seek(0,0) zip_contents = fp.read() # - passing a file-like object fp = io.BytesIO() fp.write(zip_contents) chk = zipfile.is_zipfile(fp) - self.assert_(chk) + self.assertTrue(chk) fp.seek(0,0) chk = zipfile.is_zipfile(fp) - self.assert_(chk) + self.assertTrue(chk) def testNonExistentFileRaisesIOError(self): # make sure we don't raise an AttributeError when a partially-constructed Modified: python/branches/py3k/Lib/test/test_zipimport.py ============================================================================== --- python/branches/py3k/Lib/test/test_zipimport.py (original) +++ python/branches/py3k/Lib/test/test_zipimport.py Wed Jul 1 01:06:06 2009 @@ -287,7 +287,7 @@ z.close() zi = zipimport.zipimporter(TEMP_ZIP) self.assertEquals(data, zi.get_data(name)) - self.assert_('zipimporter object' in repr(zi)) + self.assertTrue('zipimporter object' in repr(zi)) finally: z.close() os.remove(TEMP_ZIP) @@ -369,7 +369,7 @@ s = io.StringIO() print_tb(tb, 1, s) - self.failUnless(s.getvalue().endswith(raise_src)) + self.assertTrue(s.getvalue().endswith(raise_src)) else: raise AssertionError("This ought to be impossible") Modified: python/branches/py3k/Lib/test/test_zipimport_support.py ============================================================================== --- python/branches/py3k/Lib/test/test_zipimport_support.py (original) +++ python/branches/py3k/Lib/test/test_zipimport_support.py Wed Jul 1 01:06:06 2009 @@ -187,7 +187,7 @@ print ("Expected line", expected) print ("Got stdout:") print (data) - self.assert_(expected in data) + self.assertTrue(expected in data) zip_name, run_name = _make_test_zip(d, "test_zip", script_name, '__main__.py') exit_code, data = _run_python(zip_name) @@ -196,7 +196,7 @@ print ("Expected line", expected) print ("Got stdout:") print (data) - self.assert_(expected in data) + self.assertTrue(expected in data) def test_pdb_issue4201(self): test_src = textwrap.dedent("""\ @@ -211,13 +211,13 @@ p = _spawn_python(script_name) p.stdin.write(b'l\n') data = _kill_python(p).decode() - self.assert_(script_name in data) + self.assertTrue(script_name in data) zip_name, run_name = _make_test_zip(d, "test_zip", script_name, '__main__.py') p = _spawn_python(zip_name) p.stdin.write(b'l\n') data = _kill_python(p).decode() - self.assert_(run_name in data) + self.assertTrue(run_name in data) def test_main(): Modified: python/branches/py3k/Lib/test/test_zlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_zlib.py (original) +++ python/branches/py3k/Lib/test/test_zlib.py Wed Jul 1 01:06:06 2009 @@ -10,7 +10,7 @@ # checksum test cases def test_crc32start(self): self.assertEqual(zlib.crc32(b""), zlib.crc32(b"", 0)) - self.assert_(zlib.crc32(b"abc", 0xffffffff)) + self.assertTrue(zlib.crc32(b"abc", 0xffffffff)) def test_crc32empty(self): self.assertEqual(zlib.crc32(b"", 0), 0) @@ -19,7 +19,7 @@ def test_adler32start(self): self.assertEqual(zlib.adler32(b""), zlib.adler32(b"", 1)) - self.assert_(zlib.adler32(b"abc", 0xffffffff)) + self.assertTrue(zlib.adler32(b"abc", 0xffffffff)) def test_adler32empty(self): self.assertEqual(zlib.adler32(b"", 0), 0) @@ -111,8 +111,8 @@ y1 = dco.decompress(x1 + x2) y2 = dco.flush() self.assertEqual(data, y1 + y2) - self.assert_(isinstance(dco.unconsumed_tail, bytes)) - self.assert_(isinstance(dco.unused_data, bytes)) + self.assertTrue(isinstance(dco.unconsumed_tail, bytes)) + self.assertTrue(isinstance(dco.unused_data, bytes)) def test_compressoptions(self): # specify lots of options to compressobj() @@ -157,7 +157,7 @@ decombuf = zlib.decompress(combuf) # Test type of return value - self.assert_(isinstance(decombuf, bytes)) + self.assertTrue(isinstance(decombuf, bytes)) self.assertEqual(data, decombuf) @@ -208,7 +208,7 @@ while cb: #max_length = 1 + len(cb)//10 chunk = dco.decompress(cb, dcx) - self.failIf(len(chunk) > dcx, + self.assertFalse(len(chunk) > dcx, 'chunk too big (%d>%d)' % (len(chunk), dcx)) bufs.append(chunk) cb = dco.unconsumed_tail @@ -233,7 +233,7 @@ while cb: max_length = 1 + len(cb)//10 chunk = dco.decompress(cb, max_length) - self.failIf(len(chunk) > max_length, + self.assertFalse(len(chunk) > max_length, 'chunk too big (%d>%d)' % (len(chunk),max_length)) bufs.append(chunk) cb = dco.unconsumed_tail @@ -242,7 +242,7 @@ else: while chunk: chunk = dco.decompress('', max_length) - self.failIf(len(chunk) > max_length, + self.assertFalse(len(chunk) > max_length, 'chunk too big (%d>%d)' % (len(chunk),max_length)) bufs.append(chunk) self.assertEqual(data, b''.join(bufs), 'Wrong data retrieved') @@ -316,7 +316,7 @@ # caused a core dump.) co = zlib.compressobj(zlib.Z_BEST_COMPRESSION) - self.failUnless(co.flush()) # Returns a zlib header + self.assertTrue(co.flush()) # Returns a zlib header dco = zlib.decompressobj() self.assertEqual(dco.flush(), b"") # Returns nothing @@ -356,7 +356,7 @@ data = HAMLET_SCENE comp = zlib.compress(data) # Test type of return value - self.assert_(isinstance(comp, bytes)) + self.assertTrue(isinstance(comp, bytes)) d0 = zlib.decompressobj() bufs0 = [] Modified: python/branches/py3k/Lib/tkinter/test/test_tkinter/test_text.py ============================================================================== --- python/branches/py3k/Lib/tkinter/test/test_tkinter/test_text.py (original) +++ python/branches/py3k/Lib/tkinter/test/test_tkinter/test_text.py Wed Jul 1 01:06:06 2009 @@ -19,18 +19,18 @@ text = self.text # pattern and index are obligatory arguments. - self.failUnlessRaises(tkinter.TclError, text.search, None, '1.0') - self.failUnlessRaises(tkinter.TclError, text.search, 'a', None) - self.failUnlessRaises(tkinter.TclError, text.search, None, None) + self.assertRaises(tkinter.TclError, text.search, None, '1.0') + self.assertRaises(tkinter.TclError, text.search, 'a', None) + self.assertRaises(tkinter.TclError, text.search, None, None) # Invalid text index. - self.failUnlessRaises(tkinter.TclError, text.search, '', 0) + self.assertRaises(tkinter.TclError, text.search, '', 0) # Check if we are getting the indices as strings -- you are likely # to get Tcl_Obj under Tk 8.5 if Tkinter doesn't convert it. text.insert('1.0', 'hi-test') - self.failUnlessEqual(text.search('-test', '1.0', 'end'), '1.2') - self.failUnlessEqual(text.search('test', '1.0', 'end'), '1.3') + self.assertEqual(text.search('-test', '1.0', 'end'), '1.2') + self.assertEqual(text.search('test', '1.0', 'end'), '1.3') tests_gui = (TextTest, ) Modified: python/branches/py3k/Lib/tkinter/test/test_ttk/test_extensions.py ============================================================================== --- python/branches/py3k/Lib/tkinter/test/test_ttk/test_extensions.py (original) +++ python/branches/py3k/Lib/tkinter/test/test_ttk/test_extensions.py Wed Jul 1 01:06:06 2009 @@ -22,16 +22,16 @@ x = ttk.LabeledScale() var = x._variable._name x.destroy() - self.failUnlessRaises(tkinter.TclError, x.tk.globalgetvar, var) + self.assertRaises(tkinter.TclError, x.tk.globalgetvar, var) # manually created variable myvar = tkinter.DoubleVar() name = myvar._name x = ttk.LabeledScale(variable=myvar) x.destroy() - self.failUnlessEqual(x.tk.globalgetvar(name), myvar.get()) + self.assertEqual(x.tk.globalgetvar(name), myvar.get()) del myvar - self.failUnlessRaises(tkinter.TclError, x.tk.globalgetvar, name) + self.assertRaises(tkinter.TclError, x.tk.globalgetvar, name) # checking that the tracing callback is properly removed myvar = tkinter.IntVar() @@ -45,17 +45,17 @@ # it tries calling instance attributes not yet defined. ttk.LabeledScale(variable=myvar) if hasattr(sys, 'last_type'): - self.failIf(sys.last_type == tkinter.TclError) + self.assertFalse(sys.last_type == tkinter.TclError) def test_initialization(self): # master passing x = ttk.LabeledScale() - self.failUnlessEqual(x.master, tkinter._default_root) + self.assertEqual(x.master, tkinter._default_root) x.destroy() master = tkinter.Frame() x = ttk.LabeledScale(master) - self.failUnlessEqual(x.master, master) + self.assertEqual(x.master, master) x.destroy() # variable initialization/passing @@ -63,29 +63,29 @@ (-1, -1), (sys.maxsize + 1, sys.maxsize + 1)) for pair in passed_expected: x = ttk.LabeledScale(from_=pair[0]) - self.failUnlessEqual(x.value, pair[1]) + self.assertEqual(x.value, pair[1]) x.destroy() x = ttk.LabeledScale(from_='2.5') - self.failUnlessRaises(ValueError, x._variable.get) + self.assertRaises(ValueError, x._variable.get) x.destroy() x = ttk.LabeledScale(from_=None) - self.failUnlessRaises(ValueError, x._variable.get) + self.assertRaises(ValueError, x._variable.get) x.destroy() # variable should have its default value set to the from_ value myvar = tkinter.DoubleVar(value=20) x = ttk.LabeledScale(variable=myvar) - self.failUnlessEqual(x.value, 0) + self.assertEqual(x.value, 0) x.destroy() # check that it is really using a DoubleVar x = ttk.LabeledScale(variable=myvar, from_=0.5) - self.failUnlessEqual(x.value, 0.5) - self.failUnlessEqual(x._variable._name, myvar._name) + self.assertEqual(x.value, 0.5) + self.assertEqual(x._variable._name, myvar._name) x.destroy() # widget positionment def check_positions(scale, scale_pos, label, label_pos): - self.failUnlessEqual(scale.pack_info()['side'], scale_pos) - self.failUnlessEqual(label.place_info()['anchor'], label_pos) + self.assertEqual(scale.pack_info()['side'], scale_pos) + self.assertEqual(label.place_info()['anchor'], label_pos) x = ttk.LabeledScale(compound='top') check_positions(x.scale, 'bottom', x.label, 'n') x.destroy() @@ -100,7 +100,7 @@ x.destroy() # extra, and invalid, kwargs - self.failUnlessRaises(tkinter.TclError, ttk.LabeledScale, a='b') + self.assertRaises(tkinter.TclError, ttk.LabeledScale, a='b') def test_horizontal_range(self): @@ -111,7 +111,7 @@ linfo_1 = lscale.label.place_info() prev_xcoord = lscale.scale.coords()[0] - self.failUnlessEqual(prev_xcoord, int(linfo_1['x'])) + self.assertEqual(prev_xcoord, int(linfo_1['x'])) # change range to: from -5 to 5. This should change the x coord of # the scale widget, since 0 is at the middle of the new # range. @@ -120,15 +120,15 @@ # at the same time this shouldn't affect test outcome lscale.update() curr_xcoord = lscale.scale.coords()[0] - self.failUnless(prev_xcoord != curr_xcoord) + self.assertTrue(prev_xcoord != curr_xcoord) # the label widget should have been repositioned too linfo_2 = lscale.label.place_info() - self.failUnlessEqual(lscale.label['text'], 0) - self.failUnlessEqual(curr_xcoord, int(linfo_2['x'])) + self.assertEqual(lscale.label['text'], 0) + self.assertEqual(curr_xcoord, int(linfo_2['x'])) # change the range back lscale.scale.configure(from_=0, to=10) - self.failUnless(prev_xcoord != curr_xcoord) - self.failUnlessEqual(prev_xcoord, int(linfo_1['x'])) + self.assertTrue(prev_xcoord != curr_xcoord) + self.assertEqual(prev_xcoord, int(linfo_1['x'])) lscale.destroy() @@ -145,16 +145,16 @@ # The following update is needed since the test doesn't use mainloop, # at the same time this shouldn't affect test outcome x.update() - self.failUnlessEqual(x.label['text'], newval) - self.failUnless(x.scale.coords()[0] > curr_xcoord) - self.failUnlessEqual(x.scale.coords()[0], + self.assertEqual(x.label['text'], newval) + self.assertTrue(x.scale.coords()[0] > curr_xcoord) + self.assertEqual(x.scale.coords()[0], int(x.label.place_info()['x'])) # value outside range x.value = x.scale['to'] + 1 # no changes shouldn't happen x.update() - self.failUnlessEqual(x.label['text'], newval) - self.failUnlessEqual(x.scale.coords()[0], + self.assertEqual(x.label['text'], newval) + self.assertEqual(x.scale.coords()[0], int(x.label.place_info()['x'])) x.destroy() @@ -172,7 +172,7 @@ x.value = 3 x.update() x.master.wm_geometry("%dx%d" % (width_new, height_new)) - self.failUnlessEqual(int(x.label.place_info()['x']), + self.assertEqual(int(x.label.place_info()['x']), x.scale.coords()[0]) # Reset geometry @@ -197,20 +197,20 @@ name = var._name optmenu.update_idletasks() optmenu.destroy() - self.failUnlessEqual(optmenu.tk.globalgetvar(name), var.get()) + self.assertEqual(optmenu.tk.globalgetvar(name), var.get()) del var - self.failUnlessRaises(tkinter.TclError, optmenu.tk.globalgetvar, name) + self.assertRaises(tkinter.TclError, optmenu.tk.globalgetvar, name) def test_initialization(self): - self.failUnlessRaises(tkinter.TclError, + self.assertRaises(tkinter.TclError, ttk.OptionMenu, None, self.textvar, invalid='thing') optmenu = ttk.OptionMenu(None, self.textvar, 'b', 'a', 'b') - self.failUnlessEqual(optmenu._variable.get(), 'b') + self.assertEqual(optmenu._variable.get(), 'b') - self.failUnless(optmenu['menu']) - self.failUnless(optmenu['textvariable']) + self.assertTrue(optmenu['menu']) + self.assertTrue(optmenu['textvariable']) optmenu.destroy() @@ -222,10 +222,10 @@ found_default = False for i in range(len(items)): value = optmenu['menu'].entrycget(i, 'value') - self.failUnlessEqual(value, items[i]) + self.assertEqual(value, items[i]) if value == default: found_default = True - self.failUnless(found_default) + self.assertTrue(found_default) optmenu.destroy() # default shouldn't be in menu if it is not part of values @@ -238,26 +238,26 @@ if last == curr: # no more menu entries break - self.failIf(curr == default) + self.assertFalse(curr == default) i += 1 - self.failUnlessEqual(i, len(items)) + self.assertEqual(i, len(items)) # check that variable is updated correctly optmenu.pack() optmenu.wait_visibility() optmenu['menu'].invoke(0) - self.failUnlessEqual(optmenu._variable.get(), items[0]) + self.assertEqual(optmenu._variable.get(), items[0]) # changing to an invalid index shouldn't change the variable - self.failUnlessRaises(tkinter.TclError, optmenu['menu'].invoke, -1) - self.failUnlessEqual(optmenu._variable.get(), items[0]) + self.assertRaises(tkinter.TclError, optmenu['menu'].invoke, -1) + self.assertEqual(optmenu._variable.get(), items[0]) optmenu.destroy() # specifying a callback success = [] def cb_test(item): - self.failUnlessEqual(item, items[1]) + self.assertEqual(item, items[1]) success.append(True) optmenu = ttk.OptionMenu(None, self.textvar, 'a', command=cb_test, *items) Modified: python/branches/py3k/Lib/tkinter/test/test_ttk/test_functions.py ============================================================================== --- python/branches/py3k/Lib/tkinter/test/test_ttk/test_functions.py (original) +++ python/branches/py3k/Lib/tkinter/test/test_ttk/test_functions.py Wed Jul 1 01:06:06 2009 @@ -27,12 +27,12 @@ def test_format_optdict(self): def check_against(fmt_opts, result): for i in range(0, len(fmt_opts), 2): - self.failUnlessEqual(result.pop(fmt_opts[i]), fmt_opts[i + 1]) + self.assertEqual(result.pop(fmt_opts[i]), fmt_opts[i + 1]) if result: self.fail("result still got elements: %s" % result) # passing an empty dict should return an empty object (tuple here) - self.failIf(ttk._format_optdict({})) + self.assertFalse(ttk._format_optdict({})) # check list formatting check_against( @@ -62,7 +62,7 @@ # check if giving unicode keys is fine check_against(ttk._format_optdict(opts), {'-???': True, '-?': False}) # opts should remain unchanged - self.failUnlessEqual(opts, orig_opts) + self.assertEqual(opts, orig_opts) # passing values with spaces inside a tuple/list check_against( @@ -72,113 +72,113 @@ # ignore an option amount_opts = len(ttk._format_optdict(opts, ignore=('?'))) / 2 - self.failUnlessEqual(amount_opts, len(opts) - 1) + self.assertEqual(amount_opts, len(opts) - 1) # ignore non-existing options amount_opts = len(ttk._format_optdict(opts, ignore=('?', 'b'))) / 2 - self.failUnlessEqual(amount_opts, len(opts) - 1) + self.assertEqual(amount_opts, len(opts) - 1) # ignore every option - self.failIf(ttk._format_optdict(opts, ignore=list(opts.keys()))) + self.assertFalse(ttk._format_optdict(opts, ignore=list(opts.keys()))) def test_format_mapdict(self): opts = {'a': [('b', 'c', 'val'), ('d', 'otherval'), ('', 'single')]} result = ttk._format_mapdict(opts) - self.failUnlessEqual(len(result), len(list(opts.keys())) * 2) - self.failUnlessEqual(result, ('-a', '{b c} val d otherval {} single')) - self.failUnlessEqual(ttk._format_mapdict(opts, script=True), + self.assertEqual(len(result), len(list(opts.keys())) * 2) + self.assertEqual(result, ('-a', '{b c} val d otherval {} single')) + self.assertEqual(ttk._format_mapdict(opts, script=True), ('-a', '{{b c} val d otherval {} single}')) - self.failUnlessEqual(ttk._format_mapdict({2: []}), ('-2', '')) + self.assertEqual(ttk._format_mapdict({2: []}), ('-2', '')) opts = {'?????d?': [('?', 'v?l')]} result = ttk._format_mapdict(opts) - self.failUnlessEqual(result, ('-?????d?', '? v?l')) + self.assertEqual(result, ('-?????d?', '? v?l')) # empty states valid = {'opt': [('', '', 'hi')]} - self.failUnlessEqual(ttk._format_mapdict(valid), ('-opt', '{ } hi')) + self.assertEqual(ttk._format_mapdict(valid), ('-opt', '{ } hi')) # when passing multiple states, they all must be strings invalid = {'opt': [(1, 2, 'valid val')]} - self.failUnlessRaises(TypeError, ttk._format_mapdict, invalid) + self.assertRaises(TypeError, ttk._format_mapdict, invalid) invalid = {'opt': [([1], '2', 'valid val')]} - self.failUnlessRaises(TypeError, ttk._format_mapdict, invalid) + self.assertRaises(TypeError, ttk._format_mapdict, invalid) # but when passing a single state, it can be anything valid = {'opt': [[1, 'value']]} - self.failUnlessEqual(ttk._format_mapdict(valid), ('-opt', '1 value')) + self.assertEqual(ttk._format_mapdict(valid), ('-opt', '1 value')) # special attention to single states which evalute to False for stateval in (None, 0, False, '', set()): # just some samples valid = {'opt': [(stateval, 'value')]} - self.failUnlessEqual(ttk._format_mapdict(valid), + self.assertEqual(ttk._format_mapdict(valid), ('-opt', '{} value')) # values must be iterable opts = {'a': None} - self.failUnlessRaises(TypeError, ttk._format_mapdict, opts) + self.assertRaises(TypeError, ttk._format_mapdict, opts) # items in the value must have size >= 2 - self.failUnlessRaises(IndexError, ttk._format_mapdict, + self.assertRaises(IndexError, ttk._format_mapdict, {'a': [('invalid', )]}) def test_format_elemcreate(self): - self.failUnless(ttk._format_elemcreate(None), (None, ())) + self.assertTrue(ttk._format_elemcreate(None), (None, ())) ## Testing type = image # image type expects at least an image name, so this should raise # IndexError since it tries to access the index 0 of an empty tuple - self.failUnlessRaises(IndexError, ttk._format_elemcreate, 'image') + self.assertRaises(IndexError, ttk._format_elemcreate, 'image') # don't format returned values as a tcl script # minimum acceptable for image type - self.failUnlessEqual(ttk._format_elemcreate('image', False, 'test'), + self.assertEqual(ttk._format_elemcreate('image', False, 'test'), ("test ", ())) # specifiyng a state spec - self.failUnlessEqual(ttk._format_elemcreate('image', False, 'test', + self.assertEqual(ttk._format_elemcreate('image', False, 'test', ('', 'a')), ("test {} a", ())) # state spec with multiple states - self.failUnlessEqual(ttk._format_elemcreate('image', False, 'test', + self.assertEqual(ttk._format_elemcreate('image', False, 'test', ('a', 'b', 'c')), ("test {a b} c", ())) # state spec and options - self.failUnlessEqual(ttk._format_elemcreate('image', False, 'test', + self.assertEqual(ttk._format_elemcreate('image', False, 'test', ('a', 'b'), a='x', b='y'), ("test a b", ("-a", "x", "-b", "y"))) # format returned values as a tcl script # state spec with multiple states and an option with a multivalue - self.failUnlessEqual(ttk._format_elemcreate('image', True, 'test', + self.assertEqual(ttk._format_elemcreate('image', True, 'test', ('a', 'b', 'c', 'd'), x=[2, 3]), ("{test {a b c} d}", "-x {2 3}")) ## Testing type = vsapi # vsapi type expects at least a class name and a part_id, so this # should raise an ValueError since it tries to get two elements from # an empty tuple - self.failUnlessRaises(ValueError, ttk._format_elemcreate, 'vsapi') + self.assertRaises(ValueError, ttk._format_elemcreate, 'vsapi') # don't format returned values as a tcl script # minimum acceptable for vsapi - self.failUnlessEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b'), + self.assertEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b'), ("a b ", ())) # now with a state spec with multiple states - self.failUnlessEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b', + self.assertEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b', ('a', 'b', 'c')), ("a b {a b} c", ())) # state spec and option - self.failUnlessEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b', + self.assertEqual(ttk._format_elemcreate('vsapi', False, 'a', 'b', ('a', 'b'), opt='x'), ("a b a b", ("-opt", "x"))) # format returned values as a tcl script # state spec with a multivalue and an option - self.failUnlessEqual(ttk._format_elemcreate('vsapi', True, 'a', 'b', + self.assertEqual(ttk._format_elemcreate('vsapi', True, 'a', 'b', ('a', 'b', [1, 2]), opt='x'), ("{a b {a b} {1 2}}", "-opt x")) # Testing type = from # from type expects at least a type name - self.failUnlessRaises(IndexError, ttk._format_elemcreate, 'from') + self.assertRaises(IndexError, ttk._format_elemcreate, 'from') - self.failUnlessEqual(ttk._format_elemcreate('from', False, 'a'), + self.assertEqual(ttk._format_elemcreate('from', False, 'a'), ('a', ())) - self.failUnlessEqual(ttk._format_elemcreate('from', False, 'a', 'b'), + self.assertEqual(ttk._format_elemcreate('from', False, 'a', 'b'), ('a', ('b', ))) - self.failUnlessEqual(ttk._format_elemcreate('from', True, 'a', 'b'), + self.assertEqual(ttk._format_elemcreate('from', True, 'a', 'b'), ('{a}', 'b')) @@ -207,77 +207,77 @@ spaces(2 * indent_size), spaces(indent_size), spaces())) # empty layout - self.failUnlessEqual(ttk._format_layoutlist([])[0], '') + self.assertEqual(ttk._format_layoutlist([])[0], '') # _format_layoutlist always expects the second item (in every item) # to act like a dict (except when the value evalutes to False). - self.failUnlessRaises(AttributeError, + self.assertRaises(AttributeError, ttk._format_layoutlist, [('a', 'b')]) smallest = ttk._format_layoutlist([('a', None)], indent=0) - self.failUnlessEqual(smallest, + self.assertEqual(smallest, ttk._format_layoutlist([('a', '')], indent=0)) - self.failUnlessEqual(smallest[0], 'a') + self.assertEqual(smallest[0], 'a') # testing indentation levels - self.failUnlessEqual(sample(), sample_expected()) + self.assertEqual(sample(), sample_expected()) for i in range(4): - self.failUnlessEqual(sample(i), sample_expected(i)) - self.failUnlessEqual(sample(i, i), sample_expected(i, i)) + self.assertEqual(sample(i), sample_expected(i)) + self.assertEqual(sample(i, i), sample_expected(i, i)) # invalid layout format, different kind of exceptions will be # raised by internal functions # plain wrong format - self.failUnlessRaises(ValueError, ttk._format_layoutlist, + self.assertRaises(ValueError, ttk._format_layoutlist, ['bad', 'format']) # will try to use iteritems in the 'bad' string - self.failUnlessRaises(AttributeError, ttk._format_layoutlist, + self.assertRaises(AttributeError, ttk._format_layoutlist, [('name', 'bad')]) # bad children formatting - self.failUnlessRaises(ValueError, ttk._format_layoutlist, + self.assertRaises(ValueError, ttk._format_layoutlist, [('name', {'children': {'a': None}})]) def test_script_from_settings(self): # empty options - self.failIf(ttk._script_from_settings({'name': + self.assertFalse(ttk._script_from_settings({'name': {'configure': None, 'map': None, 'element create': None}})) # empty layout - self.failUnlessEqual( + self.assertEqual( ttk._script_from_settings({'name': {'layout': None}}), "ttk::style layout name {\nnull\n}") configdict = {'???': True, '?': False} - self.failUnless( + self.assertTrue( ttk._script_from_settings({'name': {'configure': configdict}})) mapdict = {'?????d?': [('?', 'v?l')]} - self.failUnless( + self.assertTrue( ttk._script_from_settings({'name': {'map': mapdict}})) # invalid image element - self.failUnlessRaises(IndexError, + self.assertRaises(IndexError, ttk._script_from_settings, {'name': {'element create': ['image']}}) # minimal valid image - self.failUnless(ttk._script_from_settings({'name': + self.assertTrue(ttk._script_from_settings({'name': {'element create': ['image', 'name']}})) image = {'thing': {'element create': ['image', 'name', ('state1', 'state2', 'val')]}} - self.failUnlessEqual(ttk._script_from_settings(image), + self.assertEqual(ttk._script_from_settings(image), "ttk::style element create thing image {name {state1 state2} val} ") image['thing']['element create'].append({'opt': 30}) - self.failUnlessEqual(ttk._script_from_settings(image), + self.assertEqual(ttk._script_from_settings(image), "ttk::style element create thing image {name {state1 state2} val} " "-opt 30") image['thing']['element create'][-1]['opt'] = [MockTclObj(3), MockTclObj('2m')] - self.failUnlessEqual(ttk._script_from_settings(image), + self.assertEqual(ttk._script_from_settings(image), "ttk::style element create thing image {name {state1 state2} val} " "-opt {3 2m}") @@ -285,28 +285,28 @@ def test_dict_from_tcltuple(self): fakettuple = ('-a', '{1 2 3}', '-something', 'foo') - self.failUnlessEqual(ttk._dict_from_tcltuple(fakettuple, False), + self.assertEqual(ttk._dict_from_tcltuple(fakettuple, False), {'-a': '{1 2 3}', '-something': 'foo'}) - self.failUnlessEqual(ttk._dict_from_tcltuple(fakettuple), + self.assertEqual(ttk._dict_from_tcltuple(fakettuple), {'a': '{1 2 3}', 'something': 'foo'}) # passing a tuple with a single item should return an empty dict, # since it tries to break the tuple by pairs. - self.failIf(ttk._dict_from_tcltuple(('single', ))) + self.assertFalse(ttk._dict_from_tcltuple(('single', ))) sspec = MockStateSpec('a', 'b') - self.failUnlessEqual(ttk._dict_from_tcltuple(('-a', (sspec, 'val'))), + self.assertEqual(ttk._dict_from_tcltuple(('-a', (sspec, 'val'))), {'a': [('a', 'b', 'val')]}) - self.failUnlessEqual(ttk._dict_from_tcltuple((MockTclObj('-padding'), + self.assertEqual(ttk._dict_from_tcltuple((MockTclObj('-padding'), [MockTclObj('1'), 2, MockTclObj('3m')])), {'padding': [1, 2, '3m']}) def test_list_from_statespec(self): def test_it(sspec, value, res_value, states): - self.failUnlessEqual(ttk._list_from_statespec( + self.assertEqual(ttk._list_from_statespec( (sspec, value)), [states + (res_value, )]) states_even = tuple('state%d' % i for i in range(6)) @@ -323,19 +323,19 @@ def test_list_from_layouttuple(self): # empty layout tuple - self.failIf(ttk._list_from_layouttuple(())) + self.assertFalse(ttk._list_from_layouttuple(())) # shortest layout tuple - self.failUnlessEqual(ttk._list_from_layouttuple(('name', )), + self.assertEqual(ttk._list_from_layouttuple(('name', )), [('name', {})]) # not so interesting ltuple sample_ltuple = ('name', '-option', 'value') - self.failUnlessEqual(ttk._list_from_layouttuple(sample_ltuple), + self.assertEqual(ttk._list_from_layouttuple(sample_ltuple), [('name', {'option': 'value'})]) # empty children - self.failUnlessEqual(ttk._list_from_layouttuple( + self.assertEqual(ttk._list_from_layouttuple( ('something', '-children', ())), [('something', {'children': []})] ) @@ -348,7 +348,7 @@ ) ) ) - self.failUnlessEqual(ttk._list_from_layouttuple(ltuple), + self.assertEqual(ttk._list_from_layouttuple(ltuple), [('name', {'option': 'niceone', 'children': [('otherone', {'otheropt': 'othervalue', 'children': [('child', {})] @@ -357,13 +357,13 @@ ) # bad tuples - self.failUnlessRaises(ValueError, ttk._list_from_layouttuple, + self.assertRaises(ValueError, ttk._list_from_layouttuple, ('name', 'no_minus')) - self.failUnlessRaises(ValueError, ttk._list_from_layouttuple, + self.assertRaises(ValueError, ttk._list_from_layouttuple, ('name', 'no_minus', 'value')) - self.failUnlessRaises(ValueError, ttk._list_from_layouttuple, + self.assertRaises(ValueError, ttk._list_from_layouttuple, ('something', '-children')) # no children - self.failUnlessRaises(ValueError, ttk._list_from_layouttuple, + self.assertRaises(ValueError, ttk._list_from_layouttuple, ('something', '-children', 'value')) # invalid children @@ -374,10 +374,10 @@ return (opt, val) options = {'test': None} - self.failUnlessEqual(ttk._val_or_dict(options, func), "test val") + self.assertEqual(ttk._val_or_dict(options, func), "test val") options = {'test': 3} - self.failUnlessEqual(ttk._val_or_dict(options, func), options) + self.assertEqual(ttk._val_or_dict(options, func), options) def test_convert_stringval(self): @@ -386,34 +386,34 @@ (None, 'None') ) for orig, expected in tests: - self.failUnlessEqual(ttk._convert_stringval(orig), expected) + self.assertEqual(ttk._convert_stringval(orig), expected) class TclObjsToPyTest(unittest.TestCase): def test_unicode(self): adict = {'opt': 'v?l??'} - self.failUnlessEqual(ttk.tclobjs_to_py(adict), {'opt': 'v?l??'}) + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': 'v?l??'}) adict['opt'] = MockTclObj(adict['opt']) - self.failUnlessEqual(ttk.tclobjs_to_py(adict), {'opt': 'v?l??'}) + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': 'v?l??'}) def test_multivalues(self): adict = {'opt': [1, 2, 3, 4]} - self.failUnlessEqual(ttk.tclobjs_to_py(adict), {'opt': [1, 2, 3, 4]}) + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': [1, 2, 3, 4]}) adict['opt'] = [1, 'xm', 3] - self.failUnlessEqual(ttk.tclobjs_to_py(adict), {'opt': [1, 'xm', 3]}) + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': [1, 'xm', 3]}) adict['opt'] = (MockStateSpec('a', 'b'), 'v?l??') - self.failUnlessEqual(ttk.tclobjs_to_py(adict), + self.assertEqual(ttk.tclobjs_to_py(adict), {'opt': [('a', 'b', 'v?l??')]}) - self.failUnlessEqual(ttk.tclobjs_to_py({'x': ['y z']}), + self.assertEqual(ttk.tclobjs_to_py({'x': ['y z']}), {'x': ['y z']}) def test_nosplit(self): - self.failUnlessEqual(ttk.tclobjs_to_py({'text': 'some text'}), + self.assertEqual(ttk.tclobjs_to_py({'text': 'some text'}), {'text': 'some text'}) tests_nogui = (InternalFunctionsTest, TclObjsToPyTest) Modified: python/branches/py3k/Lib/tkinter/test/test_ttk/test_style.py ============================================================================== --- python/branches/py3k/Lib/tkinter/test/test_ttk/test_style.py (original) +++ python/branches/py3k/Lib/tkinter/test/test_ttk/test_style.py Wed Jul 1 01:06:06 2009 @@ -16,17 +16,17 @@ def test_configure(self): style = self.style style.configure('TButton', background='yellow') - self.failUnlessEqual(style.configure('TButton', 'background'), + self.assertEqual(style.configure('TButton', 'background'), 'yellow') - self.failUnless(isinstance(style.configure('TButton'), dict)) + self.assertTrue(isinstance(style.configure('TButton'), dict)) def test_map(self): style = self.style style.map('TButton', background=[('active', 'background', 'blue')]) - self.failUnlessEqual(style.map('TButton', 'background'), + self.assertEqual(style.map('TButton', 'background'), [('active', 'background', 'blue')]) - self.failUnless(isinstance(style.map('TButton'), dict)) + self.assertTrue(isinstance(style.map('TButton'), dict)) def test_lookup(self): @@ -34,38 +34,38 @@ style.configure('TButton', background='yellow') style.map('TButton', background=[('active', 'background', 'blue')]) - self.failUnlessEqual(style.lookup('TButton', 'background'), 'yellow') - self.failUnlessEqual(style.lookup('TButton', 'background', + self.assertEqual(style.lookup('TButton', 'background'), 'yellow') + self.assertEqual(style.lookup('TButton', 'background', ['active', 'background']), 'blue') - self.failUnlessEqual(style.lookup('TButton', 'optionnotdefined', + self.assertEqual(style.lookup('TButton', 'optionnotdefined', default='iknewit'), 'iknewit') def test_layout(self): style = self.style - self.failUnlessRaises(tkinter.TclError, style.layout, 'NotALayout') + self.assertRaises(tkinter.TclError, style.layout, 'NotALayout') tv_style = style.layout('Treeview') # "erase" Treeview layout style.layout('Treeview', '') - self.failUnlessEqual(style.layout('Treeview'), + self.assertEqual(style.layout('Treeview'), [('null', {'sticky': 'nswe'})] ) # restore layout style.layout('Treeview', tv_style) - self.failUnlessEqual(style.layout('Treeview'), tv_style) + self.assertEqual(style.layout('Treeview'), tv_style) # should return a list - self.failUnless(isinstance(style.layout('TButton'), list)) + self.assertTrue(isinstance(style.layout('TButton'), list)) # correct layout, but "option" doesn't exist as option - self.failUnlessRaises(tkinter.TclError, style.layout, 'Treeview', + self.assertRaises(tkinter.TclError, style.layout, 'Treeview', [('name', {'option': 'inexistent'})]) def test_theme_use(self): - self.failUnlessRaises(tkinter.TclError, self.style.theme_use, + self.assertRaises(tkinter.TclError, self.style.theme_use, 'nonexistingname') curr_theme = self.style.theme_use() @@ -79,8 +79,8 @@ # just one theme available, can't go on with tests return - self.failIf(curr_theme == new_theme) - self.failIf(new_theme != self.style.theme_use()) + self.assertFalse(curr_theme == new_theme) + self.assertFalse(new_theme != self.style.theme_use()) self.style.theme_use(curr_theme) Modified: python/branches/py3k/Lib/tkinter/test/test_ttk/test_widgets.py ============================================================================== --- python/branches/py3k/Lib/tkinter/test/test_ttk/test_widgets.py (original) +++ python/branches/py3k/Lib/tkinter/test/test_ttk/test_widgets.py Wed Jul 1 01:06:06 2009 @@ -24,48 +24,48 @@ def test_identify(self): self.widget.update_idletasks() - self.failUnlessEqual(self.widget.identify(5, 5), "label") - self.failUnlessEqual(self.widget.identify(-1, -1), "") + self.assertEqual(self.widget.identify(5, 5), "label") + self.assertEqual(self.widget.identify(-1, -1), "") - self.failUnlessRaises(tkinter.TclError, self.widget.identify, None, 5) - self.failUnlessRaises(tkinter.TclError, self.widget.identify, 5, None) - self.failUnlessRaises(tkinter.TclError, self.widget.identify, 5, '') + self.assertRaises(tkinter.TclError, self.widget.identify, None, 5) + self.assertRaises(tkinter.TclError, self.widget.identify, 5, None) + self.assertRaises(tkinter.TclError, self.widget.identify, 5, '') def test_widget_state(self): # XXX not sure about the portability of all these tests - self.failUnlessEqual(self.widget.state(), ()) - self.failUnlessEqual(self.widget.instate(['!disabled']), True) + self.assertEqual(self.widget.state(), ()) + self.assertEqual(self.widget.instate(['!disabled']), True) # changing from !disabled to disabled - self.failUnlessEqual(self.widget.state(['disabled']), ('!disabled', )) + self.assertEqual(self.widget.state(['disabled']), ('!disabled', )) # no state change - self.failUnlessEqual(self.widget.state(['disabled']), ()) + self.assertEqual(self.widget.state(['disabled']), ()) # change back to !disable but also active - self.failUnlessEqual(self.widget.state(['!disabled', 'active']), + self.assertEqual(self.widget.state(['!disabled', 'active']), ('!active', 'disabled')) # no state changes, again - self.failUnlessEqual(self.widget.state(['!disabled', 'active']), ()) - self.failUnlessEqual(self.widget.state(['active', '!disabled']), ()) + self.assertEqual(self.widget.state(['!disabled', 'active']), ()) + self.assertEqual(self.widget.state(['active', '!disabled']), ()) def test_cb(arg1, **kw): return arg1, kw - self.failUnlessEqual(self.widget.instate(['!disabled'], + self.assertEqual(self.widget.instate(['!disabled'], test_cb, "hi", **{"msg": "there"}), ('hi', {'msg': 'there'})) # attempt to set invalid statespec currstate = self.widget.state() - self.failUnlessRaises(tkinter.TclError, self.widget.instate, + self.assertRaises(tkinter.TclError, self.widget.instate, ['badstate']) - self.failUnlessRaises(tkinter.TclError, self.widget.instate, + self.assertRaises(tkinter.TclError, self.widget.instate, ['disabled', 'badstate']) # verify that widget didn't change its state - self.failUnlessEqual(currstate, self.widget.state()) + self.assertEqual(currstate, self.widget.state()) # ensuring that passing None as state doesn't modify current state self.widget.state(['active', '!disabled']) - self.failUnlessEqual(self.widget.state(), ('active', )) + self.assertEqual(self.widget.state(), ('active', )) class ButtonTest(unittest.TestCase): @@ -74,7 +74,7 @@ success = [] btn = ttk.Button(command=lambda: success.append(1)) btn.invoke() - self.failUnless(success) + self.assertTrue(success) class CheckbuttonTest(unittest.TestCase): @@ -88,21 +88,21 @@ cbtn = ttk.Checkbutton(command=cb_test) # the variable automatically created by ttk.Checkbutton is actually # undefined till we invoke the Checkbutton - self.failUnlessEqual(cbtn.state(), ('alternate', )) - self.failUnlessRaises(tkinter.TclError, cbtn.tk.globalgetvar, + self.assertEqual(cbtn.state(), ('alternate', )) + self.assertRaises(tkinter.TclError, cbtn.tk.globalgetvar, cbtn['variable']) res = cbtn.invoke() - self.failUnlessEqual(res, "cb test called") - self.failUnlessEqual(cbtn['onvalue'], + self.assertEqual(res, "cb test called") + self.assertEqual(cbtn['onvalue'], cbtn.tk.globalgetvar(cbtn['variable'])) - self.failUnless(success) + self.assertTrue(success) cbtn['command'] = '' res = cbtn.invoke() - self.failUnlessEqual(res, '') - self.failIf(len(success) > 1) - self.failUnlessEqual(cbtn['offvalue'], + self.assertEqual(res, '') + self.assertFalse(len(success) > 1) + self.assertEqual(cbtn['offvalue'], cbtn.tk.globalgetvar(cbtn['variable'])) @@ -138,7 +138,7 @@ self.combo.event_generate('') self.combo.update() - self.failUnless(success) + self.assertTrue(success) def test_postcommand(self): @@ -149,18 +149,18 @@ self.combo.wait_visibility() self._show_drop_down_listbox() - self.failUnless(success) + self.assertTrue(success) # testing postcommand removal self.combo['postcommand'] = '' self._show_drop_down_listbox() - self.failUnlessEqual(len(success), 1) + self.assertEqual(len(success), 1) def test_values(self): def check_get_current(getval, currval): - self.failUnlessEqual(self.combo.get(), getval) - self.failUnlessEqual(self.combo.current(), currval) + self.assertEqual(self.combo.get(), getval) + self.assertEqual(self.combo.current(), currval) check_get_current('', -1) @@ -182,17 +182,17 @@ # testing values with empty string set through configure self.combo.configure(values=[1, '', 2]) - self.failUnlessEqual(self.combo['values'], ('1', '', '2')) + self.assertEqual(self.combo['values'], ('1', '', '2')) # out of range - self.failUnlessRaises(tkinter.TclError, self.combo.current, + self.assertRaises(tkinter.TclError, self.combo.current, len(self.combo['values'])) # it expects an integer (or something that can be converted to int) - self.failUnlessRaises(tkinter.TclError, self.combo.current, '') + self.assertRaises(tkinter.TclError, self.combo.current, '') # testing creating combobox with empty string in values combo2 = ttk.Combobox(values=[1, 2, '']) - self.failUnlessEqual(combo2['values'], ('1', '2', '')) + self.assertEqual(combo2['values'], ('1', '2', '')) combo2.destroy() @@ -208,12 +208,12 @@ def test_bbox(self): - self.failUnlessEqual(len(self.entry.bbox(0)), 4) + self.assertEqual(len(self.entry.bbox(0)), 4) for item in self.entry.bbox(0): - self.failUnless(isinstance(item, int)) + self.assertTrue(isinstance(item, int)) - self.failUnlessRaises(tkinter.TclError, self.entry.bbox, 'noindex') - self.failUnlessRaises(tkinter.TclError, self.entry.bbox, None) + self.assertRaises(tkinter.TclError, self.entry.bbox, 'noindex') + self.assertRaises(tkinter.TclError, self.entry.bbox, None) def test_identify(self): @@ -221,12 +221,12 @@ self.entry.wait_visibility() self.entry.update_idletasks() - self.failUnlessEqual(self.entry.identify(5, 5), "textarea") - self.failUnlessEqual(self.entry.identify(-1, -1), "") + self.assertEqual(self.entry.identify(5, 5), "textarea") + self.assertEqual(self.entry.identify(-1, -1), "") - self.failUnlessRaises(tkinter.TclError, self.entry.identify, None, 5) - self.failUnlessRaises(tkinter.TclError, self.entry.identify, 5, None) - self.failUnlessRaises(tkinter.TclError, self.entry.identify, 5, '') + self.assertRaises(tkinter.TclError, self.entry.identify, None, 5) + self.assertRaises(tkinter.TclError, self.entry.identify, 5, None) + self.assertRaises(tkinter.TclError, self.entry.identify, 5, '') def test_validation_options(self): @@ -238,23 +238,23 @@ self.entry['invalidcommand'] = test_invalid self.entry.validate() - self.failUnless(success) + self.assertTrue(success) self.entry['invalidcommand'] = '' self.entry.validate() - self.failUnlessEqual(len(success), 1) + self.assertEqual(len(success), 1) self.entry['invalidcommand'] = test_invalid self.entry['validatecommand'] = lambda: True self.entry.validate() - self.failUnlessEqual(len(success), 1) + self.assertEqual(len(success), 1) self.entry['validatecommand'] = '' self.entry.validate() - self.failUnlessEqual(len(success), 1) + self.assertEqual(len(success), 1) self.entry['validatecommand'] = True - self.failUnlessRaises(tkinter.TclError, self.entry.validate) + self.assertRaises(tkinter.TclError, self.entry.validate) def test_validation(self): @@ -271,8 +271,8 @@ self.entry.insert('end', 1) self.entry.insert('end', 'a') - self.failUnlessEqual(validation, [False, True]) - self.failUnlessEqual(self.entry.get(), 'a') + self.assertEqual(validation, [False, True]) + self.assertEqual(self.entry.get(), 'a') def test_revalidation(self): @@ -285,19 +285,19 @@ self.entry['validatecommand'] = self.entry.register(validate), '%P' self.entry.insert('end', 'avocado') - self.failUnlessEqual(self.entry.validate(), True) - self.failUnlessEqual(self.entry.state(), ()) + self.assertEqual(self.entry.validate(), True) + self.assertEqual(self.entry.state(), ()) self.entry.delete(0, 'end') - self.failUnlessEqual(self.entry.get(), '') + self.assertEqual(self.entry.get(), '') self.entry.insert('end', 'a1b') - self.failUnlessEqual(self.entry.validate(), False) - self.failUnlessEqual(self.entry.state(), ('invalid', )) + self.assertEqual(self.entry.validate(), False) + self.assertEqual(self.entry.state(), ('invalid', )) self.entry.delete(1) - self.failUnlessEqual(self.entry.validate(), True) - self.failUnlessEqual(self.entry.state(), ()) + self.assertEqual(self.entry.validate(), True) + self.assertEqual(self.entry.state(), ()) class PanedwindowTest(unittest.TestCase): @@ -315,108 +315,108 @@ # attempt to add a child that is not a direct child of the paned window label = ttk.Label(self.paned) child = ttk.Label(label) - self.failUnlessRaises(tkinter.TclError, self.paned.add, child) + self.assertRaises(tkinter.TclError, self.paned.add, child) label.destroy() child.destroy() # another attempt label = ttk.Label() child = ttk.Label(label) - self.failUnlessRaises(tkinter.TclError, self.paned.add, child) + self.assertRaises(tkinter.TclError, self.paned.add, child) child.destroy() label.destroy() good_child = ttk.Label() self.paned.add(good_child) # re-adding a child is not accepted - self.failUnlessRaises(tkinter.TclError, self.paned.add, good_child) + self.assertRaises(tkinter.TclError, self.paned.add, good_child) other_child = ttk.Label(self.paned) self.paned.add(other_child) - self.failUnlessEqual(self.paned.pane(0), self.paned.pane(1)) - self.failUnlessRaises(tkinter.TclError, self.paned.pane, 2) + self.assertEqual(self.paned.pane(0), self.paned.pane(1)) + self.assertRaises(tkinter.TclError, self.paned.pane, 2) good_child.destroy() other_child.destroy() - self.failUnlessRaises(tkinter.TclError, self.paned.pane, 0) + self.assertRaises(tkinter.TclError, self.paned.pane, 0) def test_forget(self): - self.failUnlessRaises(tkinter.TclError, self.paned.forget, None) - self.failUnlessRaises(tkinter.TclError, self.paned.forget, 0) + self.assertRaises(tkinter.TclError, self.paned.forget, None) + self.assertRaises(tkinter.TclError, self.paned.forget, 0) self.paned.add(ttk.Label()) self.paned.forget(0) - self.failUnlessRaises(tkinter.TclError, self.paned.forget, 0) + self.assertRaises(tkinter.TclError, self.paned.forget, 0) def test_insert(self): - self.failUnlessRaises(tkinter.TclError, self.paned.insert, None, 0) - self.failUnlessRaises(tkinter.TclError, self.paned.insert, 0, None) - self.failUnlessRaises(tkinter.TclError, self.paned.insert, 0, 0) + self.assertRaises(tkinter.TclError, self.paned.insert, None, 0) + self.assertRaises(tkinter.TclError, self.paned.insert, 0, None) + self.assertRaises(tkinter.TclError, self.paned.insert, 0, 0) child = ttk.Label() child2 = ttk.Label() child3 = ttk.Label() - self.failUnlessRaises(tkinter.TclError, self.paned.insert, 0, child) + self.assertRaises(tkinter.TclError, self.paned.insert, 0, child) self.paned.insert('end', child2) self.paned.insert(0, child) - self.failUnlessEqual(self.paned.panes(), (str(child), str(child2))) + self.assertEqual(self.paned.panes(), (str(child), str(child2))) self.paned.insert(0, child2) - self.failUnlessEqual(self.paned.panes(), (str(child2), str(child))) + self.assertEqual(self.paned.panes(), (str(child2), str(child))) self.paned.insert('end', child3) - self.failUnlessEqual(self.paned.panes(), + self.assertEqual(self.paned.panes(), (str(child2), str(child), str(child3))) # reinserting a child should move it to its current position panes = self.paned.panes() self.paned.insert('end', child3) - self.failUnlessEqual(panes, self.paned.panes()) + self.assertEqual(panes, self.paned.panes()) # moving child3 to child2 position should result in child2 ending up # in previous child position and child ending up in previous child3 # position self.paned.insert(child2, child3) - self.failUnlessEqual(self.paned.panes(), + self.assertEqual(self.paned.panes(), (str(child3), str(child2), str(child))) def test_pane(self): - self.failUnlessRaises(tkinter.TclError, self.paned.pane, 0) + self.assertRaises(tkinter.TclError, self.paned.pane, 0) child = ttk.Label() self.paned.add(child) - self.failUnless(isinstance(self.paned.pane(0), dict)) - self.failUnlessEqual(self.paned.pane(0, weight=None), 0) + self.assertTrue(isinstance(self.paned.pane(0), dict)) + self.assertEqual(self.paned.pane(0, weight=None), 0) # newer form for querying a single option - self.failUnlessEqual(self.paned.pane(0, 'weight'), 0) - self.failUnlessEqual(self.paned.pane(0), self.paned.pane(str(child))) + self.assertEqual(self.paned.pane(0, 'weight'), 0) + self.assertEqual(self.paned.pane(0), self.paned.pane(str(child))) - self.failUnlessRaises(tkinter.TclError, self.paned.pane, 0, + self.assertRaises(tkinter.TclError, self.paned.pane, 0, badoption='somevalue') def test_sashpos(self): - self.failUnlessRaises(tkinter.TclError, self.paned.sashpos, None) - self.failUnlessRaises(tkinter.TclError, self.paned.sashpos, '') - self.failUnlessRaises(tkinter.TclError, self.paned.sashpos, 0) + self.assertRaises(tkinter.TclError, self.paned.sashpos, None) + self.assertRaises(tkinter.TclError, self.paned.sashpos, '') + self.assertRaises(tkinter.TclError, self.paned.sashpos, 0) child = ttk.Label(self.paned, text='a') self.paned.add(child, weight=1) - self.failUnlessRaises(tkinter.TclError, self.paned.sashpos, 0) + self.assertRaises(tkinter.TclError, self.paned.sashpos, 0) child2 = ttk.Label(self.paned, text='b') self.paned.add(child2) - self.failUnlessRaises(tkinter.TclError, self.paned.sashpos, 1) + self.assertRaises(tkinter.TclError, self.paned.sashpos, 1) self.paned.pack(expand=True, fill='both') self.paned.wait_visibility() curr_pos = self.paned.sashpos(0) self.paned.sashpos(0, 1000) - self.failUnless(curr_pos != self.paned.sashpos(0)) - self.failUnless(isinstance(self.paned.sashpos(0), int)) + self.assertTrue(curr_pos != self.paned.sashpos(0)) + self.assertTrue(isinstance(self.paned.sashpos(0), int)) class RadiobuttonTest(unittest.TestCase): @@ -432,21 +432,21 @@ cbtn2 = ttk.Radiobutton(command=cb_test, variable=myvar, value=1) res = cbtn.invoke() - self.failUnlessEqual(res, "cb test called") - self.failUnlessEqual(cbtn['value'], myvar.get()) - self.failUnlessEqual(myvar.get(), + self.assertEqual(res, "cb test called") + self.assertEqual(cbtn['value'], myvar.get()) + self.assertEqual(myvar.get(), cbtn.tk.globalgetvar(cbtn['variable'])) - self.failUnless(success) + self.assertTrue(success) cbtn2['command'] = '' res = cbtn2.invoke() - self.failUnlessEqual(res, '') - self.failIf(len(success) > 1) - self.failUnlessEqual(cbtn2['value'], myvar.get()) - self.failUnlessEqual(myvar.get(), + self.assertEqual(res, '') + self.assertFalse(len(success) > 1) + self.assertEqual(cbtn2['value'], myvar.get()) + self.assertEqual(myvar.get(), cbtn.tk.globalgetvar(cbtn['variable'])) - self.failUnlessEqual(str(cbtn['variable']), str(cbtn2['variable'])) + self.assertEqual(str(cbtn['variable']), str(cbtn2['variable'])) @@ -472,27 +472,27 @@ self.scale['from_'] = 10 self.scale['to'] = 3 - self.failIf(failure) + self.assertFalse(failure) failure = [1, 1, 1] self.scale.configure(from_=2, to=5) self.scale.configure(from_=0, to=-2) self.scale.configure(to=10) - self.failIf(failure) + self.assertFalse(failure) def test_get(self): scale_width = self.scale.winfo_width() - self.failUnlessEqual(self.scale.get(scale_width, 0), self.scale['to']) + self.assertEqual(self.scale.get(scale_width, 0), self.scale['to']) - self.failUnlessEqual(self.scale.get(0, 0), self.scale['from']) - self.failUnlessEqual(self.scale.get(), self.scale['value']) + self.assertEqual(self.scale.get(0, 0), self.scale['from']) + self.assertEqual(self.scale.get(), self.scale['value']) self.scale['value'] = 30 - self.failUnlessEqual(self.scale.get(), self.scale['value']) + self.assertEqual(self.scale.get(), self.scale['value']) - self.failUnlessRaises(tkinter.TclError, self.scale.get, '', 0) - self.failUnlessRaises(tkinter.TclError, self.scale.get, 0, '') + self.assertRaises(tkinter.TclError, self.scale.get, '', 0) + self.assertRaises(tkinter.TclError, self.scale.get, 0, '') def test_set(self): @@ -500,30 +500,30 @@ max = self.scale['to'] new_max = max + 10 self.scale.set(new_max) - self.failUnlessEqual(self.scale.get(), max) + self.assertEqual(self.scale.get(), max) min = self.scale['from'] self.scale.set(min - 1) - self.failUnlessEqual(self.scale.get(), min) + self.assertEqual(self.scale.get(), min) # changing directly the variable doesn't impose this limitation tho var = tkinter.DoubleVar() self.scale['variable'] = var var.set(max + 5) - self.failUnlessEqual(self.scale.get(), var.get()) - self.failUnlessEqual(self.scale.get(), max + 5) + self.assertEqual(self.scale.get(), var.get()) + self.assertEqual(self.scale.get(), max + 5) del var # the same happens with the value option self.scale['value'] = max + 10 - self.failUnlessEqual(self.scale.get(), max + 10) - self.failUnlessEqual(self.scale.get(), self.scale['value']) + self.assertEqual(self.scale.get(), max + 10) + self.assertEqual(self.scale.get(), self.scale['value']) # nevertheless, note that the max/min values we can get specifying # x, y coords are the ones according to the current range - self.failUnlessEqual(self.scale.get(0, 0), min) - self.failUnlessEqual(self.scale.get(self.scale.winfo_width(), 0), max) + self.assertEqual(self.scale.get(0, 0), min) + self.assertEqual(self.scale.get(self.scale.winfo_width(), 0), max) - self.failUnlessRaises(tkinter.TclError, self.scale.set, None) + self.assertRaises(tkinter.TclError, self.scale.set, None) class NotebookTest(unittest.TestCase): @@ -546,18 +546,18 @@ def test_tab_identifiers(self): self.nb.forget(0) self.nb.hide(self.child2) - self.failUnlessRaises(tkinter.TclError, self.nb.tab, self.child1) - self.failUnlessEqual(self.nb.index('end'), 1) + self.assertRaises(tkinter.TclError, self.nb.tab, self.child1) + self.assertEqual(self.nb.index('end'), 1) self.nb.add(self.child2) - self.failUnlessEqual(self.nb.index('end'), 1) + self.assertEqual(self.nb.index('end'), 1) self.nb.select(self.child2) - self.failUnless(self.nb.tab('current')) + self.assertTrue(self.nb.tab('current')) self.nb.add(self.child1, text='a') self.nb.pack() self.nb.wait_visibility() - self.failUnlessEqual(self.nb.tab('@5,5'), self.nb.tab('current')) + self.assertEqual(self.nb.tab('@5,5'), self.nb.tab('current')) for i in range(5, 100, 5): if self.nb.tab('@%d, 5' % i, text=None) == 'a': @@ -567,17 +567,17 @@ def test_add_and_hidden(self): - self.failUnlessRaises(tkinter.TclError, self.nb.hide, -1) - self.failUnlessRaises(tkinter.TclError, self.nb.hide, 'hi') - self.failUnlessRaises(tkinter.TclError, self.nb.hide, None) - self.failUnlessRaises(tkinter.TclError, self.nb.add, None) - self.failUnlessRaises(tkinter.TclError, self.nb.add, ttk.Label(), + self.assertRaises(tkinter.TclError, self.nb.hide, -1) + self.assertRaises(tkinter.TclError, self.nb.hide, 'hi') + self.assertRaises(tkinter.TclError, self.nb.hide, None) + self.assertRaises(tkinter.TclError, self.nb.add, None) + self.assertRaises(tkinter.TclError, self.nb.add, ttk.Label(), unknown='option') tabs = self.nb.tabs() self.nb.hide(self.child1) self.nb.add(self.child1) - self.failUnlessEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.tabs(), tabs) child = ttk.Label() self.nb.add(child, text='c') @@ -588,70 +588,70 @@ child2_index = self.nb.index(self.child2) self.nb.hide(self.child2) self.nb.add(self.child2) - self.failUnlessEqual(self.nb.tabs(), tabs) - self.failUnlessEqual(self.nb.index(self.child2), child2_index) - self.failUnless(str(self.child2) == self.nb.tabs()[child2_index]) + self.assertEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.index(self.child2), child2_index) + self.assertTrue(str(self.child2) == self.nb.tabs()[child2_index]) # but the tab next to it (not hidden) is the one selected now - self.failUnlessEqual(self.nb.index('current'), curr + 1) + self.assertEqual(self.nb.index('current'), curr + 1) def test_forget(self): - self.failUnlessRaises(tkinter.TclError, self.nb.forget, -1) - self.failUnlessRaises(tkinter.TclError, self.nb.forget, 'hi') - self.failUnlessRaises(tkinter.TclError, self.nb.forget, None) + self.assertRaises(tkinter.TclError, self.nb.forget, -1) + self.assertRaises(tkinter.TclError, self.nb.forget, 'hi') + self.assertRaises(tkinter.TclError, self.nb.forget, None) tabs = self.nb.tabs() child1_index = self.nb.index(self.child1) self.nb.forget(self.child1) - self.failIf(str(self.child1) in self.nb.tabs()) - self.failUnlessEqual(len(tabs) - 1, len(self.nb.tabs())) + self.assertFalse(str(self.child1) in self.nb.tabs()) + self.assertEqual(len(tabs) - 1, len(self.nb.tabs())) self.nb.add(self.child1) - self.failUnlessEqual(self.nb.index(self.child1), 1) - self.failIf(child1_index == self.nb.index(self.child1)) + self.assertEqual(self.nb.index(self.child1), 1) + self.assertFalse(child1_index == self.nb.index(self.child1)) def test_index(self): - self.failUnlessRaises(tkinter.TclError, self.nb.index, -1) - self.failUnlessRaises(tkinter.TclError, self.nb.index, None) + self.assertRaises(tkinter.TclError, self.nb.index, -1) + self.assertRaises(tkinter.TclError, self.nb.index, None) - self.failUnless(isinstance(self.nb.index('end'), int)) - self.failUnlessEqual(self.nb.index(self.child1), 0) - self.failUnlessEqual(self.nb.index(self.child2), 1) - self.failUnlessEqual(self.nb.index('end'), 2) + self.assertTrue(isinstance(self.nb.index('end'), int)) + self.assertEqual(self.nb.index(self.child1), 0) + self.assertEqual(self.nb.index(self.child2), 1) + self.assertEqual(self.nb.index('end'), 2) def test_insert(self): # moving tabs tabs = self.nb.tabs() self.nb.insert(1, tabs[0]) - self.failUnlessEqual(self.nb.tabs(), (tabs[1], tabs[0])) + self.assertEqual(self.nb.tabs(), (tabs[1], tabs[0])) self.nb.insert(self.child1, self.child2) - self.failUnlessEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.tabs(), tabs) self.nb.insert('end', self.child1) - self.failUnlessEqual(self.nb.tabs(), (tabs[1], tabs[0])) + self.assertEqual(self.nb.tabs(), (tabs[1], tabs[0])) self.nb.insert('end', 0) - self.failUnlessEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.tabs(), tabs) # bad moves - self.failUnlessRaises(tkinter.TclError, self.nb.insert, 2, tabs[0]) - self.failUnlessRaises(tkinter.TclError, self.nb.insert, -1, tabs[0]) + self.assertRaises(tkinter.TclError, self.nb.insert, 2, tabs[0]) + self.assertRaises(tkinter.TclError, self.nb.insert, -1, tabs[0]) # new tab child3 = ttk.Label() self.nb.insert(1, child3) - self.failUnlessEqual(self.nb.tabs(), (tabs[0], str(child3), tabs[1])) + self.assertEqual(self.nb.tabs(), (tabs[0], str(child3), tabs[1])) self.nb.forget(child3) - self.failUnlessEqual(self.nb.tabs(), tabs) + self.assertEqual(self.nb.tabs(), tabs) self.nb.insert(self.child1, child3) - self.failUnlessEqual(self.nb.tabs(), (str(child3), ) + tabs) + self.assertEqual(self.nb.tabs(), (str(child3), ) + tabs) self.nb.forget(child3) - self.failUnlessRaises(tkinter.TclError, self.nb.insert, 2, child3) - self.failUnlessRaises(tkinter.TclError, self.nb.insert, -1, child3) + self.assertRaises(tkinter.TclError, self.nb.insert, 2, child3) + self.assertRaises(tkinter.TclError, self.nb.insert, -1, child3) # bad inserts - self.failUnlessRaises(tkinter.TclError, self.nb.insert, 'end', None) - self.failUnlessRaises(tkinter.TclError, self.nb.insert, None, 0) - self.failUnlessRaises(tkinter.TclError, self.nb.insert, None, None) + self.assertRaises(tkinter.TclError, self.nb.insert, 'end', None) + self.assertRaises(tkinter.TclError, self.nb.insert, None, 0) + self.assertRaises(tkinter.TclError, self.nb.insert, None, None) def test_select(self): @@ -665,36 +665,36 @@ self.nb.bind('<>', lambda evt: tab_changed.append(True)) - self.failUnlessEqual(self.nb.select(), str(self.child1)) + self.assertEqual(self.nb.select(), str(self.child1)) self.nb.select(self.child2) - self.failUnless(success) - self.failUnlessEqual(self.nb.select(), str(self.child2)) + self.assertTrue(success) + self.assertEqual(self.nb.select(), str(self.child2)) self.nb.update() - self.failUnless(tab_changed) + self.assertTrue(tab_changed) def test_tab(self): - self.failUnlessRaises(tkinter.TclError, self.nb.tab, -1) - self.failUnlessRaises(tkinter.TclError, self.nb.tab, 'notab') - self.failUnlessRaises(tkinter.TclError, self.nb.tab, None) + self.assertRaises(tkinter.TclError, self.nb.tab, -1) + self.assertRaises(tkinter.TclError, self.nb.tab, 'notab') + self.assertRaises(tkinter.TclError, self.nb.tab, None) - self.failUnless(isinstance(self.nb.tab(self.child1), dict)) - self.failUnlessEqual(self.nb.tab(self.child1, text=None), 'a') + self.assertTrue(isinstance(self.nb.tab(self.child1), dict)) + self.assertEqual(self.nb.tab(self.child1, text=None), 'a') # newer form for querying a single option - self.failUnlessEqual(self.nb.tab(self.child1, 'text'), 'a') + self.assertEqual(self.nb.tab(self.child1, 'text'), 'a') self.nb.tab(self.child1, text='abc') - self.failUnlessEqual(self.nb.tab(self.child1, text=None), 'abc') - self.failUnlessEqual(self.nb.tab(self.child1, 'text'), 'abc') + self.assertEqual(self.nb.tab(self.child1, text=None), 'abc') + self.assertEqual(self.nb.tab(self.child1, 'text'), 'abc') def test_tabs(self): - self.failUnlessEqual(len(self.nb.tabs()), 2) + self.assertEqual(len(self.nb.tabs()), 2) self.nb.forget(self.child1) self.nb.forget(self.child2) - self.failUnlessEqual(self.nb.tabs(), ()) + self.assertEqual(self.nb.tabs(), ()) def test_traversal(self): @@ -705,16 +705,16 @@ support.simulate_mouse_click(self.nb, 5, 5) self.nb.event_generate('') - self.failUnlessEqual(self.nb.select(), str(self.child2)) + self.assertEqual(self.nb.select(), str(self.child2)) self.nb.event_generate('') - self.failUnlessEqual(self.nb.select(), str(self.child1)) + self.assertEqual(self.nb.select(), str(self.child1)) self.nb.event_generate('') - self.failUnlessEqual(self.nb.select(), str(self.child2)) + self.assertEqual(self.nb.select(), str(self.child2)) self.nb.tab(self.child1, text='a', underline=0) self.nb.enable_traversal() self.nb.event_generate('') - self.failUnlessEqual(self.nb.select(), str(self.child1)) + self.assertEqual(self.nb.select(), str(self.child1)) class TreeviewTest(unittest.TestCase): @@ -730,17 +730,17 @@ def test_bbox(self): self.tv.pack() - self.failUnlessEqual(self.tv.bbox(''), '') + self.assertEqual(self.tv.bbox(''), '') self.tv.wait_visibility() self.tv.update() item_id = self.tv.insert('', 'end') children = self.tv.get_children() - self.failUnless(children) + self.assertTrue(children) bbox = self.tv.bbox(children[0]) - self.failUnlessEqual(len(bbox), 4) - self.failUnless(isinstance(bbox, tuple)) + self.assertEqual(len(bbox), 4) + self.assertTrue(isinstance(bbox, tuple)) for item in bbox: if not isinstance(item, int): self.fail("Invalid bounding box: %s" % bbox) @@ -751,86 +751,86 @@ self.tv.column('test', width=50) bbox_column0 = self.tv.bbox(children[0], 0) root_width = self.tv.column('#0', width=None) - self.failUnlessEqual(bbox_column0[0], bbox[0] + root_width) + self.assertEqual(bbox_column0[0], bbox[0] + root_width) # verify that bbox of a closed item is the empty string child1 = self.tv.insert(item_id, 'end') - self.failUnlessEqual(self.tv.bbox(child1), '') + self.assertEqual(self.tv.bbox(child1), '') def test_children(self): # no children yet, should get an empty tuple - self.failUnlessEqual(self.tv.get_children(), ()) + self.assertEqual(self.tv.get_children(), ()) item_id = self.tv.insert('', 'end') - self.failUnless(isinstance(self.tv.get_children(), tuple)) - self.failUnlessEqual(self.tv.get_children()[0], item_id) + self.assertTrue(isinstance(self.tv.get_children(), tuple)) + self.assertEqual(self.tv.get_children()[0], item_id) # add item_id and child3 as children of child2 child2 = self.tv.insert('', 'end') child3 = self.tv.insert('', 'end') self.tv.set_children(child2, item_id, child3) - self.failUnlessEqual(self.tv.get_children(child2), (item_id, child3)) + self.assertEqual(self.tv.get_children(child2), (item_id, child3)) # child3 has child2 as parent, thus trying to set child2 as a children # of child3 should result in an error - self.failUnlessRaises(tkinter.TclError, + self.assertRaises(tkinter.TclError, self.tv.set_children, child3, child2) # remove child2 children self.tv.set_children(child2) - self.failUnlessEqual(self.tv.get_children(child2), ()) + self.assertEqual(self.tv.get_children(child2), ()) # remove root's children self.tv.set_children('') - self.failUnlessEqual(self.tv.get_children(), ()) + self.assertEqual(self.tv.get_children(), ()) def test_column(self): # return a dict with all options/values - self.failUnless(isinstance(self.tv.column('#0'), dict)) + self.assertTrue(isinstance(self.tv.column('#0'), dict)) # return a single value of the given option - self.failUnless(isinstance(self.tv.column('#0', width=None), int)) + self.assertTrue(isinstance(self.tv.column('#0', width=None), int)) # set a new value for an option self.tv.column('#0', width=10) # testing new way to get option value - self.failUnlessEqual(self.tv.column('#0', 'width'), 10) - self.failUnlessEqual(self.tv.column('#0', width=None), 10) + self.assertEqual(self.tv.column('#0', 'width'), 10) + self.assertEqual(self.tv.column('#0', width=None), 10) # check read-only option - self.failUnlessRaises(tkinter.TclError, self.tv.column, '#0', id='X') + self.assertRaises(tkinter.TclError, self.tv.column, '#0', id='X') - self.failUnlessRaises(tkinter.TclError, self.tv.column, 'invalid') + self.assertRaises(tkinter.TclError, self.tv.column, 'invalid') invalid_kws = [ {'unknown_option': 'some value'}, {'stretch': 'wrong'}, {'anchor': 'wrong'}, {'width': 'wrong'}, {'minwidth': 'wrong'} ] for kw in invalid_kws: - self.failUnlessRaises(tkinter.TclError, self.tv.column, '#0', + self.assertRaises(tkinter.TclError, self.tv.column, '#0', **kw) def test_delete(self): - self.failUnlessRaises(tkinter.TclError, self.tv.delete, '#0') + self.assertRaises(tkinter.TclError, self.tv.delete, '#0') item_id = self.tv.insert('', 'end') item2 = self.tv.insert(item_id, 'end') - self.failUnlessEqual(self.tv.get_children(), (item_id, )) - self.failUnlessEqual(self.tv.get_children(item_id), (item2, )) + self.assertEqual(self.tv.get_children(), (item_id, )) + self.assertEqual(self.tv.get_children(item_id), (item2, )) self.tv.delete(item_id) - self.failIf(self.tv.get_children()) + self.assertFalse(self.tv.get_children()) # reattach should fail - self.failUnlessRaises(tkinter.TclError, + self.assertRaises(tkinter.TclError, self.tv.reattach, item_id, '', 'end') # test multiple item delete item1 = self.tv.insert('', 'end') item2 = self.tv.insert('', 'end') - self.failUnlessEqual(self.tv.get_children(), (item1, item2)) + self.assertEqual(self.tv.get_children(), (item1, item2)) self.tv.delete(item1, item2) - self.failIf(self.tv.get_children()) + self.assertFalse(self.tv.get_children()) def test_detach_reattach(self): @@ -840,81 +840,81 @@ # calling detach without items is valid, although it does nothing prev = self.tv.get_children() self.tv.detach() # this should do nothing - self.failUnlessEqual(prev, self.tv.get_children()) + self.assertEqual(prev, self.tv.get_children()) - self.failUnlessEqual(self.tv.get_children(), (item_id, )) - self.failUnlessEqual(self.tv.get_children(item_id), (item2, )) + self.assertEqual(self.tv.get_children(), (item_id, )) + self.assertEqual(self.tv.get_children(item_id), (item2, )) # detach item with children self.tv.detach(item_id) - self.failIf(self.tv.get_children()) + self.assertFalse(self.tv.get_children()) # reattach item with children self.tv.reattach(item_id, '', 'end') - self.failUnlessEqual(self.tv.get_children(), (item_id, )) - self.failUnlessEqual(self.tv.get_children(item_id), (item2, )) + self.assertEqual(self.tv.get_children(), (item_id, )) + self.assertEqual(self.tv.get_children(item_id), (item2, )) # move a children to the root self.tv.move(item2, '', 'end') - self.failUnlessEqual(self.tv.get_children(), (item_id, item2)) - self.failUnlessEqual(self.tv.get_children(item_id), ()) + self.assertEqual(self.tv.get_children(), (item_id, item2)) + self.assertEqual(self.tv.get_children(item_id), ()) # bad values - self.failUnlessRaises(tkinter.TclError, + self.assertRaises(tkinter.TclError, self.tv.reattach, 'nonexistent', '', 'end') - self.failUnlessRaises(tkinter.TclError, + self.assertRaises(tkinter.TclError, self.tv.detach, 'nonexistent') - self.failUnlessRaises(tkinter.TclError, + self.assertRaises(tkinter.TclError, self.tv.reattach, item2, 'otherparent', 'end') - self.failUnlessRaises(tkinter.TclError, + self.assertRaises(tkinter.TclError, self.tv.reattach, item2, '', 'invalid') # multiple detach self.tv.detach(item_id, item2) - self.failUnlessEqual(self.tv.get_children(), ()) - self.failUnlessEqual(self.tv.get_children(item_id), ()) + self.assertEqual(self.tv.get_children(), ()) + self.assertEqual(self.tv.get_children(item_id), ()) def test_exists(self): - self.failUnlessEqual(self.tv.exists('something'), False) - self.failUnlessEqual(self.tv.exists(''), True) - self.failUnlessEqual(self.tv.exists({}), False) + self.assertEqual(self.tv.exists('something'), False) + self.assertEqual(self.tv.exists(''), True) + self.assertEqual(self.tv.exists({}), False) # the following will make a tk.call equivalent to # tk.call(treeview, "exists") which should result in an error # in the tcl interpreter since tk requires an item. - self.failUnlessRaises(tkinter.TclError, self.tv.exists, None) + self.assertRaises(tkinter.TclError, self.tv.exists, None) def test_focus(self): # nothing is focused right now - self.failUnlessEqual(self.tv.focus(), '') + self.assertEqual(self.tv.focus(), '') item1 = self.tv.insert('', 'end') self.tv.focus(item1) - self.failUnlessEqual(self.tv.focus(), item1) + self.assertEqual(self.tv.focus(), item1) self.tv.delete(item1) - self.failUnlessEqual(self.tv.focus(), '') + self.assertEqual(self.tv.focus(), '') # try focusing inexistent item - self.failUnlessRaises(tkinter.TclError, self.tv.focus, 'hi') + self.assertRaises(tkinter.TclError, self.tv.focus, 'hi') def test_heading(self): # check a dict is returned - self.failUnless(isinstance(self.tv.heading('#0'), dict)) + self.assertTrue(isinstance(self.tv.heading('#0'), dict)) # check a value is returned self.tv.heading('#0', text='hi') - self.failUnlessEqual(self.tv.heading('#0', 'text'), 'hi') - self.failUnlessEqual(self.tv.heading('#0', text=None), 'hi') + self.assertEqual(self.tv.heading('#0', 'text'), 'hi') + self.assertEqual(self.tv.heading('#0', text=None), 'hi') # invalid option - self.failUnlessRaises(tkinter.TclError, self.tv.heading, '#0', + self.assertRaises(tkinter.TclError, self.tv.heading, '#0', background=None) # invalid value - self.failUnlessRaises(tkinter.TclError, self.tv.heading, '#0', + self.assertRaises(tkinter.TclError, self.tv.heading, '#0', anchor=1) @@ -940,7 +940,7 @@ success = [] commands = self.tv.master._tclCommands self.tv.heading('#0', command=str(self.tv.heading('#0', command=None))) - self.failUnlessEqual(commands, self.tv.master._tclCommands) + self.assertEqual(commands, self.tv.master._tclCommands) simulate_heading_click(5, 5) if not success: self.fail("The command associated to the treeview heading wasn't " @@ -954,92 +954,92 @@ def test_index(self): # item 'what' doesn't exist - self.failUnlessRaises(tkinter.TclError, self.tv.index, 'what') + self.assertRaises(tkinter.TclError, self.tv.index, 'what') - self.failUnlessEqual(self.tv.index(''), 0) + self.assertEqual(self.tv.index(''), 0) item1 = self.tv.insert('', 'end') item2 = self.tv.insert('', 'end') c1 = self.tv.insert(item1, 'end') c2 = self.tv.insert(item1, 'end') - self.failUnlessEqual(self.tv.index(item1), 0) - self.failUnlessEqual(self.tv.index(c1), 0) - self.failUnlessEqual(self.tv.index(c2), 1) - self.failUnlessEqual(self.tv.index(item2), 1) + self.assertEqual(self.tv.index(item1), 0) + self.assertEqual(self.tv.index(c1), 0) + self.assertEqual(self.tv.index(c2), 1) + self.assertEqual(self.tv.index(item2), 1) self.tv.move(item2, '', 0) - self.failUnlessEqual(self.tv.index(item2), 0) - self.failUnlessEqual(self.tv.index(item1), 1) + self.assertEqual(self.tv.index(item2), 0) + self.assertEqual(self.tv.index(item1), 1) # check that index still works even after its parent and siblings # have been detached self.tv.detach(item1) - self.failUnlessEqual(self.tv.index(c2), 1) + self.assertEqual(self.tv.index(c2), 1) self.tv.detach(c1) - self.failUnlessEqual(self.tv.index(c2), 0) + self.assertEqual(self.tv.index(c2), 0) # but it fails after item has been deleted self.tv.delete(item1) - self.failUnlessRaises(tkinter.TclError, self.tv.index, c2) + self.assertRaises(tkinter.TclError, self.tv.index, c2) def test_insert_item(self): # parent 'none' doesn't exist - self.failUnlessRaises(tkinter.TclError, self.tv.insert, 'none', 'end') + self.assertRaises(tkinter.TclError, self.tv.insert, 'none', 'end') # open values - self.failUnlessRaises(tkinter.TclError, self.tv.insert, '', 'end', + self.assertRaises(tkinter.TclError, self.tv.insert, '', 'end', open='') - self.failUnlessRaises(tkinter.TclError, self.tv.insert, '', 'end', + self.assertRaises(tkinter.TclError, self.tv.insert, '', 'end', open='please') - self.failIf(self.tv.delete(self.tv.insert('', 'end', open=True))) - self.failIf(self.tv.delete(self.tv.insert('', 'end', open=False))) + self.assertFalse(self.tv.delete(self.tv.insert('', 'end', open=True))) + self.assertFalse(self.tv.delete(self.tv.insert('', 'end', open=False))) # invalid index - self.failUnlessRaises(tkinter.TclError, self.tv.insert, '', 'middle') + self.assertRaises(tkinter.TclError, self.tv.insert, '', 'middle') # trying to duplicate item id is invalid itemid = self.tv.insert('', 'end', 'first-item') - self.failUnlessEqual(itemid, 'first-item') - self.failUnlessRaises(tkinter.TclError, self.tv.insert, '', 'end', + self.assertEqual(itemid, 'first-item') + self.assertRaises(tkinter.TclError, self.tv.insert, '', 'end', 'first-item') - self.failUnlessRaises(tkinter.TclError, self.tv.insert, '', 'end', + self.assertRaises(tkinter.TclError, self.tv.insert, '', 'end', MockTclObj('first-item')) # unicode values value = '\xe1ba' item = self.tv.insert('', 'end', values=(value, )) - self.failUnlessEqual(self.tv.item(item, 'values'), (value, )) - self.failUnlessEqual(self.tv.item(item, values=None), (value, )) + self.assertEqual(self.tv.item(item, 'values'), (value, )) + self.assertEqual(self.tv.item(item, values=None), (value, )) self.tv.item(item, values=list(self.tv.item(item, values=None))) - self.failUnlessEqual(self.tv.item(item, values=None), (value, )) + self.assertEqual(self.tv.item(item, values=None), (value, )) - self.failUnless(isinstance(self.tv.item(item), dict)) + self.assertTrue(isinstance(self.tv.item(item), dict)) # erase item values self.tv.item(item, values='') - self.failIf(self.tv.item(item, values=None)) + self.assertFalse(self.tv.item(item, values=None)) # item tags item = self.tv.insert('', 'end', tags=[1, 2, value]) - self.failUnlessEqual(self.tv.item(item, tags=None), ('1', '2', value)) + self.assertEqual(self.tv.item(item, tags=None), ('1', '2', value)) self.tv.item(item, tags=[]) - self.failIf(self.tv.item(item, tags=None)) + self.assertFalse(self.tv.item(item, tags=None)) self.tv.item(item, tags=(1, 2)) - self.failUnlessEqual(self.tv.item(item, tags=None), ('1', '2')) + self.assertEqual(self.tv.item(item, tags=None), ('1', '2')) # values with spaces item = self.tv.insert('', 'end', values=('a b c', '%s %s' % (value, value))) - self.failUnlessEqual(self.tv.item(item, values=None), + self.assertEqual(self.tv.item(item, values=None), ('a b c', '%s %s' % (value, value))) # text - self.failUnlessEqual(self.tv.item( + self.assertEqual(self.tv.item( self.tv.insert('', 'end', text="Label here"), text=None), "Label here") - self.failUnlessEqual(self.tv.item( + self.assertEqual(self.tv.item( self.tv.insert('', 'end', text=value), text=None), value) @@ -1047,29 +1047,29 @@ def test_set(self): self.tv['columns'] = ['A', 'B'] item = self.tv.insert('', 'end', values=['a', 'b']) - self.failUnlessEqual(self.tv.set(item), {'A': 'a', 'B': 'b'}) + self.assertEqual(self.tv.set(item), {'A': 'a', 'B': 'b'}) self.tv.set(item, 'B', 'a') - self.failUnlessEqual(self.tv.item(item, values=None), ('a', 'a')) + self.assertEqual(self.tv.item(item, values=None), ('a', 'a')) self.tv['columns'] = ['B'] - self.failUnlessEqual(self.tv.set(item), {'B': 'a'}) + self.assertEqual(self.tv.set(item), {'B': 'a'}) self.tv.set(item, 'B', 'b') - self.failUnlessEqual(self.tv.set(item, column='B'), 'b') - self.failUnlessEqual(self.tv.item(item, values=None), ('b', 'a')) + self.assertEqual(self.tv.set(item, column='B'), 'b') + self.assertEqual(self.tv.item(item, values=None), ('b', 'a')) self.tv.set(item, 'B', 123) - self.failUnlessEqual(self.tv.set(item, 'B'), 123) - self.failUnlessEqual(self.tv.item(item, values=None), (123, 'a')) - self.failUnlessEqual(self.tv.set(item), {'B': 123}) + self.assertEqual(self.tv.set(item, 'B'), 123) + self.assertEqual(self.tv.item(item, values=None), (123, 'a')) + self.assertEqual(self.tv.set(item), {'B': 123}) # inexistent column - self.failUnlessRaises(tkinter.TclError, self.tv.set, item, 'A') - self.failUnlessRaises(tkinter.TclError, self.tv.set, item, 'A', 'b') + self.assertRaises(tkinter.TclError, self.tv.set, item, 'A') + self.assertRaises(tkinter.TclError, self.tv.set, item, 'A', 'b') # inexistent item - self.failUnlessRaises(tkinter.TclError, self.tv.set, 'notme') + self.assertRaises(tkinter.TclError, self.tv.set, 'notme') def test_tag_bind(self): @@ -1095,28 +1095,28 @@ pos_y.add(i) found.add(item_id) - self.failUnlessEqual(len(pos_y), 2) # item1 and item2 y pos + self.assertEqual(len(pos_y), 2) # item1 and item2 y pos for y in pos_y: support.simulate_mouse_click(self.tv, 0, y) # by now there should be 4 things in the events list, since each # item had a bind for two events that were simulated above - self.failUnlessEqual(len(events), 4) + self.assertEqual(len(events), 4) for evt in zip(events[::2], events[1::2]): - self.failUnlessEqual(evt, (1, 2)) + self.assertEqual(evt, (1, 2)) def test_tag_configure(self): # Just testing parameter passing for now - self.failUnlessRaises(TypeError, self.tv.tag_configure) - self.failUnlessRaises(tkinter.TclError, self.tv.tag_configure, + self.assertRaises(TypeError, self.tv.tag_configure) + self.assertRaises(tkinter.TclError, self.tv.tag_configure, 'test', sky='blue') self.tv.tag_configure('test', foreground='blue') - self.failUnlessEqual(self.tv.tag_configure('test', 'foreground'), + self.assertEqual(self.tv.tag_configure('test', 'foreground'), 'blue') - self.failUnlessEqual(self.tv.tag_configure('test', foreground=None), + self.assertEqual(self.tv.tag_configure('test', foreground=None), 'blue') - self.failUnless(isinstance(self.tv.tag_configure('test'), dict)) + self.assertTrue(isinstance(self.tv.tag_configure('test'), dict)) tests_gui = ( From python-checkins at python.org Wed Jul 1 01:09:04 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 30 Jun 2009 23:09:04 -0000 Subject: [Python-checkins] r73716 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Wed Jul 1 01:09:03 2009 New Revision: 73716 Log: Blocked revisions 73714 via svnmerge ........ r73714 | benjamin.peterson | 2009-06-30 17:57:08 -0500 (Tue, 30 Jun 2009) | 1 line convert usage of fail* to assert* ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Jul 1 01:30:12 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 30 Jun 2009 23:30:12 -0000 Subject: [Python-checkins] r73717 - python/trunk/Lib/test/test_unittest.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 01:30:12 2009 New Revision: 73717 Log: use assert* methods in test_unittest Modified: python/trunk/Lib/test/test_unittest.py Modified: python/trunk/Lib/test/test_unittest.py ============================================================================== --- python/trunk/Lib/test/test_unittest.py (original) +++ python/trunk/Lib/test/test_unittest.py Wed Jul 1 01:30:12 2009 @@ -78,8 +78,8 @@ # Check for a valid __ne__ implementation def test_ne(self): for obj_1, obj_2 in self.ne_pairs: - self.failIfEqual(obj_1, obj_2) - self.failIfEqual(obj_2, obj_1) + self.assertNotEqual(obj_1, obj_2) + self.assertNotEqual(obj_2, obj_1) class TestHashing(object): """Used as a mixin for TestCase""" @@ -181,10 +181,10 @@ loader = unittest.TestLoader() # This has to be false for the test to succeed - self.failIf('runTest'.startswith(loader.testMethodPrefix)) + self.assertFalse('runTest'.startswith(loader.testMethodPrefix)) suite = loader.loadTestsFromTestCase(Foo) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [Foo('runTest')]) ################################################################ @@ -203,7 +203,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) expected = [loader.suiteClass([MyTestCase('test')])] self.assertEqual(list(suite), expected) @@ -216,7 +216,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), []) # "This method searches `module` for classes derived from TestCase" @@ -230,7 +230,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [loader.suiteClass()]) @@ -466,7 +466,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('testcase_1', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [MyTestCase('test')]) # "The specifier name is a ``dotted name'' that may resolve either to @@ -482,7 +482,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('testsuite', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [MyTestCase('test')]) @@ -497,7 +497,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('testcase_1.test', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [MyTestCase('test')]) @@ -536,7 +536,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('return_TestSuite', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [testcase_1, testcase_2]) # "The specifier name is a ``dotted name'' that may resolve ... to @@ -550,7 +550,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('return_TestCase', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [testcase_1]) # "The specifier name is a ``dotted name'' that may resolve ... to @@ -589,11 +589,11 @@ try: suite = loader.loadTestsFromName(module_name) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), []) # audioop should now be loaded, thanks to loadTestsFromName() - self.failUnless(module_name in sys.modules) + self.assertTrue(module_name in sys.modules) finally: if module_name in sys.modules: del sys.modules[module_name] @@ -612,7 +612,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames([]) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), []) # "Similar to loadTestsFromName(), but takes a sequence of names rather @@ -627,7 +627,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames([], unittest) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), []) # "The specifier name is a ``dotted name'' that may resolve either to @@ -828,7 +828,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['testcase_1'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) expected = loader.suiteClass([MyTestCase('test')]) self.assertEqual(list(suite), [expected]) @@ -844,7 +844,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['testsuite'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [m.testsuite]) @@ -859,7 +859,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['testcase_1.test'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) ref_suite = unittest.TestSuite([MyTestCase('test')]) self.assertEqual(list(suite), [ref_suite]) @@ -896,7 +896,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['return_TestSuite'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) expected = unittest.TestSuite([testcase_1, testcase_2]) self.assertEqual(list(suite), [expected]) @@ -912,7 +912,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['return_TestCase'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) ref_suite = unittest.TestSuite([testcase_1]) self.assertEqual(list(suite), [ref_suite]) @@ -936,7 +936,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['Foo.foo'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) ref_suite = unittest.TestSuite([testcase_1]) self.assertEqual(list(suite), [ref_suite]) @@ -977,11 +977,11 @@ try: suite = loader.loadTestsFromNames([module_name]) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [unittest.TestSuite()]) # audioop should now be loaded, thanks to loadTestsFromName() - self.failUnless(module_name in sys.modules) + self.assertTrue(module_name in sys.modules) finally: if module_name in sys.modules: del sys.modules[module_name] @@ -1156,7 +1156,7 @@ # "The default value is 'test'" def test_testMethodPrefix__default_value(self): loader = unittest.TestLoader() - self.failUnless(loader.testMethodPrefix == 'test') + self.assertTrue(loader.testMethodPrefix == 'test') ################################################################ ### /Tests for TestLoader.testMethodPrefix @@ -1255,7 +1255,7 @@ # "The default value is the built-in cmp() function" def test_sortTestMethodsUsing__default_value(self): loader = unittest.TestLoader() - self.failUnless(loader.sortTestMethodsUsing is cmp) + self.assertTrue(loader.sortTestMethodsUsing is cmp) # "it can be set to None to disable the sort." # @@ -1342,7 +1342,7 @@ # "The default value is the TestSuite class" def test_suiteClass__default_value(self): loader = unittest.TestLoader() - self.failUnless(loader.suiteClass is unittest.TestSuite) + self.assertTrue(loader.suiteClass is unittest.TestSuite) ################################################################ ### /Tests for TestLoader.suiteClass @@ -1755,7 +1755,7 @@ def test_id(self): test = unittest.FunctionTestCase(lambda: None) - self.failUnless(isinstance(test.id(), basestring)) + self.assertTrue(isinstance(test.id(), basestring)) # "Returns a one-line description of the test, or None if no description # has been provided. The default implementation of this method returns @@ -1787,7 +1787,7 @@ def test_init(self): result = unittest.TestResult() - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 0) @@ -1816,7 +1816,7 @@ result.startTest(test) - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) @@ -1837,7 +1837,7 @@ result.startTest(test) - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) @@ -1846,7 +1846,7 @@ result.stopTest(test) # Same tests as above; make sure nothing has changed - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) @@ -1890,7 +1890,7 @@ result.addSuccess(test) result.stopTest(test) - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) @@ -1935,15 +1935,15 @@ result.addFailure(test, exc_info_tuple) result.stopTest(test) - self.failIf(result.wasSuccessful()) + self.assertFalse(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 1) self.assertEqual(result.testsRun, 1) self.assertEqual(result.shouldStop, False) test_case, formatted_exc = result.failures[0] - self.failUnless(test_case is test) - self.failUnless(isinstance(formatted_exc, str)) + self.assertTrue(test_case is test) + self.assertTrue(isinstance(formatted_exc, str)) # "addError(test, err)" # ... @@ -1985,15 +1985,15 @@ result.addError(test, exc_info_tuple) result.stopTest(test) - self.failIf(result.wasSuccessful()) + self.assertFalse(result.wasSuccessful()) self.assertEqual(len(result.errors), 1) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) self.assertEqual(result.shouldStop, False) test_case, formatted_exc = result.errors[0] - self.failUnless(test_case is test) - self.failUnless(isinstance(formatted_exc, str)) + self.assertTrue(test_case is test) + self.assertTrue(isinstance(formatted_exc, str)) ### Support code for Test_TestCase ################################################################ @@ -2307,7 +2307,7 @@ def test(self): pass - self.failUnless(Foo('test').failureException is AssertionError) + self.assertTrue(Foo('test').failureException is AssertionError) # "This class attribute gives the exception raised by the test() method. # If a test framework needs to use a specialized exception, possibly to @@ -2325,7 +2325,7 @@ failureException = RuntimeError - self.failUnless(Foo('test').failureException is RuntimeError) + self.assertTrue(Foo('test').failureException is RuntimeError) Foo('test').run(result) @@ -2348,7 +2348,7 @@ failureException = RuntimeError - self.failUnless(Foo('test').failureException is RuntimeError) + self.assertTrue(Foo('test').failureException is RuntimeError) Foo('test').run(result) @@ -2384,7 +2384,7 @@ def runTest(self): pass - self.failUnless(isinstance(Foo().id(), basestring)) + self.assertTrue(isinstance(Foo().id(), basestring)) # "If result is omitted or None, a temporary result object is created # and used, but is not made available to the caller. As TestCase owns the @@ -2955,23 +2955,23 @@ class Test_Assertions(TestCase): def test_AlmostEqual(self): - self.failUnlessAlmostEqual(1.00000001, 1.0) - self.failIfAlmostEqual(1.0000001, 1.0) + self.assertAlmostEqual(1.00000001, 1.0) + self.assertNotAlmostEqual(1.0000001, 1.0) self.assertRaises(self.failureException, - self.failUnlessAlmostEqual, 1.0000001, 1.0) + self.assertAlmostEqual, 1.0000001, 1.0) self.assertRaises(self.failureException, - self.failIfAlmostEqual, 1.00000001, 1.0) + self.assertNotAlmostEqual, 1.00000001, 1.0) - self.failUnlessAlmostEqual(1.1, 1.0, places=0) + self.assertAlmostEqual(1.1, 1.0, places=0) self.assertRaises(self.failureException, - self.failUnlessAlmostEqual, 1.1, 1.0, places=1) + self.assertAlmostEqual, 1.1, 1.0, places=1) - self.failUnlessAlmostEqual(0, .1+.1j, places=0) - self.failIfAlmostEqual(0, .1+.1j, places=1) + self.assertAlmostEqual(0, .1+.1j, places=0) + self.assertNotAlmostEqual(0, .1+.1j, places=1) self.assertRaises(self.failureException, - self.failUnlessAlmostEqual, 0, .1+.1j, places=1) + self.assertAlmostEqual, 0, .1+.1j, places=1) self.assertRaises(self.failureException, - self.failIfAlmostEqual, 0, .1+.1j, places=0) + self.assertNotAlmostEqual, 0, .1+.1j, places=0) def test_assertRaises(self): def _raise(e): From python-checkins at python.org Wed Jul 1 01:35:20 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 30 Jun 2009 23:35:20 -0000 Subject: [Python-checkins] r73718 - in python/branches/py3k: Lib/test/test_unittest.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 01:35:19 2009 New Revision: 73718 Log: Merged revisions 73717 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73717 | benjamin.peterson | 2009-06-30 18:30:12 -0500 (Tue, 30 Jun 2009) | 1 line use assert* methods in test_unittest ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_unittest.py Modified: python/branches/py3k/Lib/test/test_unittest.py ============================================================================== --- python/branches/py3k/Lib/test/test_unittest.py (original) +++ python/branches/py3k/Lib/test/test_unittest.py Wed Jul 1 01:35:19 2009 @@ -77,8 +77,8 @@ # Check for a valid __ne__ implementation def test_ne(self): for obj_1, obj_2 in self.ne_pairs: - self.failIfEqual(obj_1, obj_2) - self.failIfEqual(obj_2, obj_1) + self.assertNotEqual(obj_1, obj_2) + self.assertNotEqual(obj_2, obj_1) class TestHashing(object): """Used as a mixin for TestCase""" @@ -180,10 +180,10 @@ loader = unittest.TestLoader() # This has to be false for the test to succeed - self.failIf('runTest'.startswith(loader.testMethodPrefix)) + self.assertFalse('runTest'.startswith(loader.testMethodPrefix)) suite = loader.loadTestsFromTestCase(Foo) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [Foo('runTest')]) ################################################################ @@ -202,7 +202,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) expected = [loader.suiteClass([MyTestCase('test')])] self.assertEqual(list(suite), expected) @@ -215,7 +215,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), []) # "This method searches `module` for classes derived from TestCase" @@ -229,7 +229,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [loader.suiteClass()]) @@ -465,7 +465,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('testcase_1', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [MyTestCase('test')]) # "The specifier name is a ``dotted name'' that may resolve either to @@ -481,7 +481,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('testsuite', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [MyTestCase('test')]) @@ -496,7 +496,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('testcase_1.test', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [MyTestCase('test')]) @@ -535,7 +535,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('return_TestSuite', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [testcase_1, testcase_2]) # "The specifier name is a ``dotted name'' that may resolve ... to @@ -549,7 +549,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromName('return_TestCase', m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [testcase_1]) # "The specifier name is a ``dotted name'' that may resolve ... to @@ -588,11 +588,11 @@ try: suite = loader.loadTestsFromName(module_name) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), []) # audioop should now be loaded, thanks to loadTestsFromName() - self.failUnless(module_name in sys.modules) + self.assertTrue(module_name in sys.modules) finally: if module_name in sys.modules: del sys.modules[module_name] @@ -611,7 +611,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames([]) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), []) # "Similar to loadTestsFromName(), but takes a sequence of names rather @@ -626,7 +626,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames([], unittest) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), []) # "The specifier name is a ``dotted name'' that may resolve either to @@ -827,7 +827,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['testcase_1'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) expected = loader.suiteClass([MyTestCase('test')]) self.assertEqual(list(suite), [expected]) @@ -843,7 +843,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['testsuite'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [m.testsuite]) @@ -858,7 +858,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['testcase_1.test'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) ref_suite = unittest.TestSuite([MyTestCase('test')]) self.assertEqual(list(suite), [ref_suite]) @@ -895,7 +895,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['return_TestSuite'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) expected = unittest.TestSuite([testcase_1, testcase_2]) self.assertEqual(list(suite), [expected]) @@ -911,7 +911,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['return_TestCase'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) ref_suite = unittest.TestSuite([testcase_1]) self.assertEqual(list(suite), [ref_suite]) @@ -935,7 +935,7 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromNames(['Foo.foo'], m) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) ref_suite = unittest.TestSuite([testcase_1]) self.assertEqual(list(suite), [ref_suite]) @@ -976,11 +976,11 @@ try: suite = loader.loadTestsFromNames([module_name]) - self.failUnless(isinstance(suite, loader.suiteClass)) + self.assertTrue(isinstance(suite, loader.suiteClass)) self.assertEqual(list(suite), [unittest.TestSuite()]) # audioop should now be loaded, thanks to loadTestsFromName() - self.failUnless(module_name in sys.modules) + self.assertTrue(module_name in sys.modules) finally: if module_name in sys.modules: del sys.modules[module_name] @@ -1351,7 +1351,7 @@ # "The default value is the TestSuite class" def test_suiteClass__default_value(self): loader = unittest.TestLoader() - self.failUnless(loader.suiteClass is unittest.TestSuite) + self.assertTrue(loader.suiteClass is unittest.TestSuite) ################################################################ ### /Tests for TestLoader.suiteClass @@ -1764,7 +1764,7 @@ def test_id(self): test = unittest.FunctionTestCase(lambda: None) - self.failUnless(isinstance(test.id(), str)) + self.assertTrue(isinstance(test.id(), str)) # "Returns a one-line description of the test, or None if no description # has been provided. The default implementation of this method returns @@ -1796,7 +1796,7 @@ def test_init(self): result = unittest.TestResult() - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 0) @@ -1825,7 +1825,7 @@ result.startTest(test) - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) @@ -1846,7 +1846,7 @@ result.startTest(test) - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) @@ -1855,7 +1855,7 @@ result.stopTest(test) # Same tests as above; make sure nothing has changed - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) @@ -1899,7 +1899,7 @@ result.addSuccess(test) result.stopTest(test) - self.failUnless(result.wasSuccessful()) + self.assertTrue(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) @@ -1944,15 +1944,15 @@ result.addFailure(test, exc_info_tuple) result.stopTest(test) - self.failIf(result.wasSuccessful()) + self.assertFalse(result.wasSuccessful()) self.assertEqual(len(result.errors), 0) self.assertEqual(len(result.failures), 1) self.assertEqual(result.testsRun, 1) self.assertEqual(result.shouldStop, False) test_case, formatted_exc = result.failures[0] - self.failUnless(test_case is test) - self.failUnless(isinstance(formatted_exc, str)) + self.assertTrue(test_case is test) + self.assertTrue(isinstance(formatted_exc, str)) # "addError(test, err)" # ... @@ -1994,15 +1994,15 @@ result.addError(test, exc_info_tuple) result.stopTest(test) - self.failIf(result.wasSuccessful()) + self.assertFalse(result.wasSuccessful()) self.assertEqual(len(result.errors), 1) self.assertEqual(len(result.failures), 0) self.assertEqual(result.testsRun, 1) self.assertEqual(result.shouldStop, False) test_case, formatted_exc = result.errors[0] - self.failUnless(test_case is test) - self.failUnless(isinstance(formatted_exc, str)) + self.assertTrue(test_case is test) + self.assertTrue(isinstance(formatted_exc, str)) ### Support code for Test_TestCase ################################################################ @@ -2316,7 +2316,7 @@ def test(self): pass - self.failUnless(Foo('test').failureException is AssertionError) + self.assertTrue(Foo('test').failureException is AssertionError) # "This class attribute gives the exception raised by the test() method. # If a test framework needs to use a specialized exception, possibly to @@ -2334,7 +2334,7 @@ failureException = RuntimeError - self.failUnless(Foo('test').failureException is RuntimeError) + self.assertTrue(Foo('test').failureException is RuntimeError) Foo('test').run(result) @@ -2357,7 +2357,7 @@ failureException = RuntimeError - self.failUnless(Foo('test').failureException is RuntimeError) + self.assertTrue(Foo('test').failureException is RuntimeError) Foo('test').run(result) @@ -2393,7 +2393,7 @@ def runTest(self): pass - self.failUnless(isinstance(Foo().id(), str)) + self.assertTrue(isinstance(Foo().id(), str)) # "If result is omitted or None, a temporary result object is created # and used, but is not made available to the caller. As TestCase owns the @@ -2926,23 +2926,23 @@ class Test_Assertions(TestCase): def test_AlmostEqual(self): - self.failUnlessAlmostEqual(1.00000001, 1.0) - self.failIfAlmostEqual(1.0000001, 1.0) + self.assertAlmostEqual(1.00000001, 1.0) + self.assertNotAlmostEqual(1.0000001, 1.0) self.assertRaises(self.failureException, - self.failUnlessAlmostEqual, 1.0000001, 1.0) + self.assertAlmostEqual, 1.0000001, 1.0) self.assertRaises(self.failureException, - self.failIfAlmostEqual, 1.00000001, 1.0) + self.assertNotAlmostEqual, 1.00000001, 1.0) - self.failUnlessAlmostEqual(1.1, 1.0, places=0) + self.assertAlmostEqual(1.1, 1.0, places=0) self.assertRaises(self.failureException, - self.failUnlessAlmostEqual, 1.1, 1.0, places=1) + self.assertAlmostEqual, 1.1, 1.0, places=1) - self.failUnlessAlmostEqual(0, .1+.1j, places=0) - self.failIfAlmostEqual(0, .1+.1j, places=1) + self.assertAlmostEqual(0, .1+.1j, places=0) + self.assertNotAlmostEqual(0, .1+.1j, places=1) self.assertRaises(self.failureException, - self.failUnlessAlmostEqual, 0, .1+.1j, places=1) + self.assertAlmostEqual, 0, .1+.1j, places=1) self.assertRaises(self.failureException, - self.failIfAlmostEqual, 0, .1+.1j, places=0) + self.assertNotAlmostEqual, 0, .1+.1j, places=0) def test_assertRaises(self): def _raise(e): From python-checkins at python.org Wed Jul 1 01:45:47 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 30 Jun 2009 23:45:47 -0000 Subject: [Python-checkins] r73719 - python/branches/py3k/Lib/test/test_unittest.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 01:45:41 2009 New Revision: 73719 Log: test that depreacted methods give warnings Modified: python/branches/py3k/Lib/test/test_unittest.py Modified: python/branches/py3k/Lib/test/test_unittest.py ============================================================================== --- python/branches/py3k/Lib/test/test_unittest.py (original) +++ python/branches/py3k/Lib/test/test_unittest.py Wed Jul 1 01:45:41 2009 @@ -9,6 +9,7 @@ import os import re import sys +import warnings from test import support import unittest from unittest import TestCase, TestProgram @@ -2810,13 +2811,20 @@ Do not use these methods. They will go away in 3.3. """ - self.failIfEqual(3, 5) - self.failUnlessEqual(3, 3) - self.failUnlessAlmostEqual(2.0, 2.0) - self.failIfAlmostEqual(3.0, 5.0) - self.failUnless(True) - self.failUnlessRaises(TypeError, lambda _: 3.14 + 'spam') - self.failIf(False) + old = ( + (self.failIfEqual, (3, 5)), + (self.failUnlessEqual, (3, 3)), + (self.failUnlessAlmostEqual, (2.0, 2.0)), + (self.failIfAlmostEqual, (3.0, 5.0)), + (self.failUnless, (True,)), + (self.failUnlessRaises, (TypeError, lambda _: 3.14 + 'spam')), + (self.failIf, (False,)) + ) + for meth, args in old: + with warnings.catch_warnings(record=True) as w: + meth(*args) + self.assertEqual(len(w), 1) + self.assertIs(w[0].category, DeprecationWarning) def testDeepcopy(self): # Issue: 5660 From buildbot at python.org Wed Jul 1 02:34:29 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 01 Jul 2009 00:34:29 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/885 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_binhex ====================================================================== ERROR: test_binhex (test.test_binhex.BinHexTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_binhex.py", line 32, in test_binhex binhex.hexbin(self.fname2, self.fname1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 445, in hexbin ifp = HexBin(inp) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 364, in __init__ self._readheader() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 384, in _readheader rest = self._read(1 + 4 + 4 + 2 + 4 + 4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 367, in _read data = self.ifp.read(len) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 300, in read self._fill(wtd - len(self.post_buffer)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 337, in _fill binascii.rledecode_hqx(self.pre_buffer[:mark]) binascii.Error: Orphaned RLE code at start make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Wed Jul 1 02:36:41 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 00:36:41 -0000 Subject: [Python-checkins] r73720 - in python/trunk/Lib: ctypes/test/test_internals.py test/test_logging.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 02:36:41 2009 New Revision: 73720 Log: fix a few cases where automated fail -> assert translation messed up Thanks Joe Amenta Modified: python/trunk/Lib/ctypes/test/test_internals.py python/trunk/Lib/test/test_logging.py Modified: python/trunk/Lib/ctypes/test/test_internals.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_internals.py (original) +++ python/trunk/Lib/ctypes/test/test_internals.py Wed Jul 1 02:36:41 2009 @@ -18,7 +18,7 @@ """ class ObjectsTestCase(unittest.TestCase): - def assertTrueSame(self, a, b): + def assertSame(self, a, b): self.assertEqual(id(a), id(b)) def test_ints(self): @@ -33,7 +33,7 @@ self.assertEqual(3, grc(s)) cs = c_char_p(s) self.assertEqual(4, grc(s)) - self.assertTrueSame(cs._objects, s) + self.assertSame(cs._objects, s) def test_simple_struct(self): class X(Structure): Modified: python/trunk/Lib/test/test_logging.py ============================================================================== --- python/trunk/Lib/test/test_logging.py (original) +++ python/trunk/Lib/test/test_logging.py Wed Jul 1 02:36:41 2009 @@ -99,7 +99,7 @@ finally: logging._releaseLock() - def assertTruelog_lines(self, expected_values, stream=None): + def assert_log_lines(self, expected_values, stream=None): """Match the collected log lines against the regular expression self.expected_log_pat, and compare the extracted group values to the expected_values list of tuples.""" @@ -165,7 +165,7 @@ INF.debug(m()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('ERR', 'CRITICAL', '1'), ('ERR', 'ERROR', '2'), ('INF', 'CRITICAL', '3'), @@ -197,7 +197,7 @@ INF_ERR.info(m()) INF_ERR.debug(m()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('INF.ERR', 'CRITICAL', '1'), ('INF.ERR', 'ERROR', '2'), ]) @@ -228,7 +228,7 @@ INF_ERR_UNDEF.info(m()) INF_ERR_UNDEF.debug(m()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('INF.UNDEF', 'CRITICAL', '1'), ('INF.UNDEF', 'ERROR', '2'), ('INF.UNDEF', 'WARNING', '3'), @@ -256,7 +256,7 @@ GRANDCHILD.debug(m()) CHILD.debug(m()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('INF.BADPARENT.UNDEF', 'CRITICAL', '1'), ('INF.BADPARENT.UNDEF', 'INFO', '2'), ('INF.BADPARENT', 'CRITICAL', '3'), @@ -285,7 +285,7 @@ spam_eggs_fish.info(self.next_message()) # Good. spam_bakedbeans.info(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('spam.eggs', 'INFO', '2'), ('spam.eggs.fish', 'INFO', '3'), ]) @@ -367,7 +367,7 @@ self.root_logger.setLevel(VERBOSE) # Levels >= 'Verbose' are good. self.log_at_all_levels(self.root_logger) - self.assertTruelog_lines([ + self.assert_log_lines([ ('Verbose', '5'), ('Sociable', '6'), ('Effusive', '7'), @@ -382,7 +382,7 @@ try: # Levels >= 'Sociable' are good. self.log_at_all_levels(self.root_logger) - self.assertTruelog_lines([ + self.assert_log_lines([ ('Sociable', '6'), ('Effusive', '7'), ('Terse', '8'), @@ -413,12 +413,12 @@ ('Taciturn', '9'), ('Silent', '10'), ] - self.assertTruelog_lines(first_lines) + self.assert_log_lines(first_lines) specific_filter = VerySpecificFilter() self.root_logger.addFilter(specific_filter) self.log_at_all_levels(self.root_logger) - self.assertTruelog_lines(first_lines + [ + self.assert_log_lines(first_lines + [ # Not only 'Garrulous' is still missing, but also 'Sociable' # and 'Taciturn' ('Boring', '11'), @@ -458,9 +458,9 @@ # The memory handler flushes to its target handler based on specific # criteria (message count and message level). self.mem_logger.debug(self.next_message()) - self.assertTruelog_lines([]) + self.assert_log_lines([]) self.mem_logger.info(self.next_message()) - self.assertTruelog_lines([]) + self.assert_log_lines([]) # This will flush because the level is >= logging.WARNING self.mem_logger.warn(self.next_message()) lines = [ @@ -468,19 +468,19 @@ ('INFO', '2'), ('WARNING', '3'), ] - self.assertTruelog_lines(lines) + self.assert_log_lines(lines) for n in (4, 14): for i in range(9): self.mem_logger.debug(self.next_message()) - self.assertTruelog_lines(lines) + self.assert_log_lines(lines) # This will flush because it's the 10th message since the last # flush. self.mem_logger.debug(self.next_message()) lines = lines + [('DEBUG', str(i)) for i in range(n, n + 10)] - self.assertTruelog_lines(lines) + self.assert_log_lines(lines) self.mem_logger.debug(self.next_message()) - self.assertTruelog_lines(lines) + self.assert_log_lines(lines) class ExceptionFormatter(logging.Formatter): @@ -650,11 +650,11 @@ logger.info(self.next_message()) # Outputs a message logger.error(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('ERROR', '2'), ], stream=output) # Original logger output is empty. - self.assertTruelog_lines([]) + self.assert_log_lines([]) def test_config1_ok(self, config=config1): # A config file defining a sub-parser as well. @@ -664,12 +664,12 @@ # Both will output a message logger.info(self.next_message()) logger.error(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('INFO', '1'), ('ERROR', '2'), ], stream=output) # Original logger output is empty. - self.assertTruelog_lines([]) + self.assert_log_lines([]) def test_config2_failure(self): # A simple config file which overrides the default settings. @@ -692,7 +692,7 @@ self.assertEquals(output.getvalue(), "ERROR:root:just testing\nGot a [RuntimeError]\n") # Original logger output is empty - self.assertTruelog_lines([]) + self.assert_log_lines([]) def test_config5_ok(self): self.test_config1_ok(config=self.config5) @@ -847,7 +847,7 @@ foo.setLevel(logging.DEBUG) self.root_logger.debug(self.next_message()) foo.debug(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('foo', 'DEBUG', '2'), ]) del foo @@ -856,7 +856,7 @@ # foo has retained its settings. bar = logging.getLogger("foo") bar.debug(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('foo', 'DEBUG', '2'), ('foo', 'DEBUG', '3'), ]) From python-checkins at python.org Wed Jul 1 02:43:10 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 00:43:10 -0000 Subject: [Python-checkins] r73721 - in python/branches/py3k: Lib/ctypes/test/test_internals.py Lib/test/test_logging.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 02:43:10 2009 New Revision: 73721 Log: Merged revisions 73720 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73720 | benjamin.peterson | 2009-06-30 19:36:41 -0500 (Tue, 30 Jun 2009) | 4 lines fix a few cases where automated fail -> assert translation messed up Thanks Joe Amenta ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/ctypes/test/test_internals.py python/branches/py3k/Lib/test/test_logging.py Modified: python/branches/py3k/Lib/ctypes/test/test_internals.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_internals.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_internals.py Wed Jul 1 02:43:10 2009 @@ -18,7 +18,7 @@ """ class ObjectsTestCase(unittest.TestCase): - def assertTrueSame(self, a, b): + def assertSame(self, a, b): self.assertEqual(id(a), id(b)) def test_ints(self): @@ -33,7 +33,7 @@ rc = grc(s) cs = c_char_p(s) self.assertEqual(rc + 1, grc(s)) - self.assertTrueSame(cs._objects, s) + self.assertSame(cs._objects, s) def test_simple_struct(self): class X(Structure): Modified: python/branches/py3k/Lib/test/test_logging.py ============================================================================== --- python/branches/py3k/Lib/test/test_logging.py (original) +++ python/branches/py3k/Lib/test/test_logging.py Wed Jul 1 02:43:10 2009 @@ -99,7 +99,7 @@ finally: logging._releaseLock() - def assertTruelog_lines(self, expected_values, stream=None): + def assert_log_lines(self, expected_values, stream=None): """Match the collected log lines against the regular expression self.expected_log_pat, and compare the extracted group values to the expected_values list of tuples.""" @@ -165,7 +165,7 @@ INF.debug(m()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('ERR', 'CRITICAL', '1'), ('ERR', 'ERROR', '2'), ('INF', 'CRITICAL', '3'), @@ -197,7 +197,7 @@ INF_ERR.info(m()) INF_ERR.debug(m()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('INF.ERR', 'CRITICAL', '1'), ('INF.ERR', 'ERROR', '2'), ]) @@ -228,7 +228,7 @@ INF_ERR_UNDEF.info(m()) INF_ERR_UNDEF.debug(m()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('INF.UNDEF', 'CRITICAL', '1'), ('INF.UNDEF', 'ERROR', '2'), ('INF.UNDEF', 'WARNING', '3'), @@ -256,7 +256,7 @@ GRANDCHILD.debug(m()) CHILD.debug(m()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('INF.BADPARENT.UNDEF', 'CRITICAL', '1'), ('INF.BADPARENT.UNDEF', 'INFO', '2'), ('INF.BADPARENT', 'CRITICAL', '3'), @@ -285,7 +285,7 @@ spam_eggs_fish.info(self.next_message()) # Good. spam_bakedbeans.info(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('spam.eggs', 'INFO', '2'), ('spam.eggs.fish', 'INFO', '3'), ]) @@ -367,7 +367,7 @@ self.root_logger.setLevel(VERBOSE) # Levels >= 'Verbose' are good. self.log_at_all_levels(self.root_logger) - self.assertTruelog_lines([ + self.assert_log_lines([ ('Verbose', '5'), ('Sociable', '6'), ('Effusive', '7'), @@ -382,7 +382,7 @@ try: # Levels >= 'Sociable' are good. self.log_at_all_levels(self.root_logger) - self.assertTruelog_lines([ + self.assert_log_lines([ ('Sociable', '6'), ('Effusive', '7'), ('Terse', '8'), @@ -413,12 +413,12 @@ ('Taciturn', '9'), ('Silent', '10'), ] - self.assertTruelog_lines(first_lines) + self.assert_log_lines(first_lines) specific_filter = VerySpecificFilter() self.root_logger.addFilter(specific_filter) self.log_at_all_levels(self.root_logger) - self.assertTruelog_lines(first_lines + [ + self.assert_log_lines(first_lines + [ # Not only 'Garrulous' is still missing, but also 'Sociable' # and 'Taciturn' ('Boring', '11'), @@ -458,9 +458,9 @@ # The memory handler flushes to its target handler based on specific # criteria (message count and message level). self.mem_logger.debug(self.next_message()) - self.assertTruelog_lines([]) + self.assert_log_lines([]) self.mem_logger.info(self.next_message()) - self.assertTruelog_lines([]) + self.assert_log_lines([]) # This will flush because the level is >= logging.WARNING self.mem_logger.warn(self.next_message()) lines = [ @@ -468,19 +468,19 @@ ('INFO', '2'), ('WARNING', '3'), ] - self.assertTruelog_lines(lines) + self.assert_log_lines(lines) for n in (4, 14): for i in range(9): self.mem_logger.debug(self.next_message()) - self.assertTruelog_lines(lines) + self.assert_log_lines(lines) # This will flush because it's the 10th message since the last # flush. self.mem_logger.debug(self.next_message()) lines = lines + [('DEBUG', str(i)) for i in range(n, n + 10)] - self.assertTruelog_lines(lines) + self.assert_log_lines(lines) self.mem_logger.debug(self.next_message()) - self.assertTruelog_lines(lines) + self.assert_log_lines(lines) class ExceptionFormatter(logging.Formatter): @@ -650,11 +650,11 @@ logger.info(self.next_message()) # Outputs a message logger.error(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('ERROR', '2'), ], stream=output) # Original logger output is empty. - self.assertTruelog_lines([]) + self.assert_log_lines([]) def test_config1_ok(self, config=config1): # A config file defining a sub-parser as well. @@ -664,12 +664,12 @@ # Both will output a message logger.info(self.next_message()) logger.error(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('INFO', '1'), ('ERROR', '2'), ], stream=output) # Original logger output is empty. - self.assertTruelog_lines([]) + self.assert_log_lines([]) def test_config2_failure(self): # A simple config file which overrides the default settings. @@ -692,7 +692,7 @@ self.assertEquals(output.getvalue(), "ERROR:root:just testing\nGot a [RuntimeError]\n") # Original logger output is empty - self.assertTruelog_lines([]) + self.assert_log_lines([]) def test_config5_ok(self): self.test_config1_ok(config=self.config5) @@ -847,7 +847,7 @@ foo.setLevel(logging.DEBUG) self.root_logger.debug(self.next_message()) foo.debug(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('foo', 'DEBUG', '2'), ]) del foo @@ -856,7 +856,7 @@ # foo has retained its settings. bar = logging.getLogger("foo") bar.debug(self.next_message()) - self.assertTruelog_lines([ + self.assert_log_lines([ ('foo', 'DEBUG', '2'), ('foo', 'DEBUG', '3'), ]) From python-checkins at python.org Wed Jul 1 02:44:30 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 00:44:30 -0000 Subject: [Python-checkins] r73722 - in sandbox/trunk/2to3/lib2to3/tests: test_fixers.py test_pytree.py test_util.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 02:44:30 2009 New Revision: 73722 Log: replace fail* with assert* Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py sandbox/trunk/2to3/lib2to3/tests/test_pytree.py sandbox/trunk/2to3/lib2to3/tests/test_util.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_fixers.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Wed Jul 1 02:44:30 2009 @@ -32,20 +32,20 @@ before = support.reformat(before) after = support.reformat(after) tree = self.refactor.refactor_string(before, self.filename) - self.failUnlessEqual(after, unicode(tree)) + self.assertEqual(after, unicode(tree)) return tree def check(self, before, after, ignore_warnings=False): tree = self._check(before, after) - self.failUnless(tree.was_changed) + self.assertTrue(tree.was_changed) if not ignore_warnings: - self.failUnlessEqual(self.fixer_log, []) + self.assertEqual(self.fixer_log, []) def warns(self, before, after, message, unchanged=False): tree = self._check(before, after) - self.failUnless(message in "".join(self.fixer_log)) + self.assertTrue(message in "".join(self.fixer_log)) if not unchanged: - self.failUnless(tree.was_changed) + self.assertTrue(tree.was_changed) def warns_unchanged(self, before, message): self.warns(before, before, message, unchanged=True) @@ -53,7 +53,7 @@ def unchanged(self, before, ignore_warnings=False): self._check(before, before) if not ignore_warnings: - self.failUnlessEqual(self.fixer_log, []) + self.assertEqual(self.fixer_log, []) def assert_runs_after(self, *names): fixes = [self.fixer] Modified: sandbox/trunk/2to3/lib2to3/tests/test_pytree.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_pytree.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_pytree.py Wed Jul 1 02:44:30 2009 @@ -81,10 +81,10 @@ def test_leaf_prefix(self): l1 = pytree.Leaf(100, "foo") self.assertEqual(l1.prefix, "") - self.failIf(l1.was_changed) + self.assertFalse(l1.was_changed) l1.prefix = " ##\n\n" self.assertEqual(l1.prefix, " ##\n\n") - self.failUnless(l1.was_changed) + self.assertTrue(l1.was_changed) def test_node(self): l1 = pytree.Leaf(100, "foo") @@ -154,13 +154,13 @@ l3 = pytree.Leaf(100, "bar") n1 = pytree.Node(1000, [l1, l2, l3]) self.assertEqual(n1.children, [l1, l2, l3]) - self.failUnless(isinstance(n1.children, list)) - self.failIf(n1.was_changed) + self.assertTrue(isinstance(n1.children, list)) + self.assertFalse(n1.was_changed) l2new = pytree.Leaf(100, "-") l2.replace(l2new) self.assertEqual(n1.children, [l1, l2new, l3]) - self.failUnless(isinstance(n1.children, list)) - self.failUnless(n1.was_changed) + self.assertTrue(isinstance(n1.children, list)) + self.assertTrue(n1.was_changed) def test_replace_with_list(self): l1 = pytree.Leaf(100, "foo") @@ -170,7 +170,7 @@ l2.replace([pytree.Leaf(100, "*"), pytree.Leaf(100, "*")]) self.assertEqual(str(n1), "foo**bar") - self.failUnless(isinstance(n1.children, list)) + self.assertTrue(isinstance(n1.children, list)) def test_post_order(self): l1 = pytree.Leaf(100, "foo") @@ -186,34 +186,34 @@ def test_changed(self): l1 = pytree.Leaf(100, "f") - self.failIf(l1.was_changed) + self.assertFalse(l1.was_changed) l1.changed() - self.failUnless(l1.was_changed) + self.assertTrue(l1.was_changed) l1 = pytree.Leaf(100, "f") n1 = pytree.Node(1000, [l1]) - self.failIf(n1.was_changed) + self.assertFalse(n1.was_changed) n1.changed() - self.failUnless(n1.was_changed) + self.assertTrue(n1.was_changed) l1 = pytree.Leaf(100, "foo") l2 = pytree.Leaf(100, "+") l3 = pytree.Leaf(100, "bar") n1 = pytree.Node(1000, [l1, l2, l3]) n2 = pytree.Node(1000, [n1]) - self.failIf(l1.was_changed) - self.failIf(n1.was_changed) - self.failIf(n2.was_changed) + self.assertFalse(l1.was_changed) + self.assertFalse(n1.was_changed) + self.assertFalse(n2.was_changed) n1.changed() - self.failUnless(n1.was_changed) - self.failUnless(n2.was_changed) - self.failIf(l1.was_changed) + self.assertTrue(n1.was_changed) + self.assertTrue(n2.was_changed) + self.assertFalse(l1.was_changed) def test_leaf_constructor_prefix(self): for prefix in ("xyz_", ""): l1 = pytree.Leaf(100, "self", prefix=prefix) - self.failUnless(str(l1), prefix + "self") + self.assertTrue(str(l1), prefix + "self") self.assertEqual(l1.prefix, prefix) def test_node_constructor_prefix(self): @@ -221,7 +221,7 @@ l1 = pytree.Leaf(100, "self") l2 = pytree.Leaf(100, "foo", prefix="_") n1 = pytree.Node(1000, [l1, l2], prefix=prefix) - self.failUnless(str(n1), prefix + "self_foo") + self.assertTrue(str(n1), prefix + "self_foo") self.assertEqual(n1.prefix, prefix) self.assertEqual(l1.prefix, prefix) self.assertEqual(l2.prefix, "_") @@ -237,8 +237,8 @@ self.assertEqual(l1.parent, n1) self.assertEqual(n1.parent, None) self.assertEqual(n2.parent, None) - self.failIf(n1.was_changed) - self.failUnless(n2.was_changed) + self.assertFalse(n1.was_changed) + self.assertTrue(n2.was_changed) self.assertEqual(l2.remove(), 1) self.assertEqual(l1.remove(), 0) @@ -246,8 +246,8 @@ self.assertEqual(l1.parent, None) self.assertEqual(n1.parent, None) self.assertEqual(n2.parent, None) - self.failUnless(n1.was_changed) - self.failUnless(n2.was_changed) + self.assertTrue(n1.was_changed) + self.assertTrue(n2.was_changed) def test_remove_parentless(self): n1 = pytree.Node(1000, []) @@ -316,7 +316,7 @@ n2 = pytree.Node(1000, []) p1 = pytree.Node(1000, [n1, n2]) - self.failUnless(n1.next_sibling is n2) + self.assertTrue(n1.next_sibling is n2) self.assertEqual(n2.next_sibling, None) self.assertEqual(p1.next_sibling, None) @@ -325,7 +325,7 @@ l2 = pytree.Leaf(100, "b") p1 = pytree.Node(1000, [l1, l2]) - self.failUnless(l1.next_sibling is l2) + self.assertTrue(l1.next_sibling is l2) self.assertEqual(l2.next_sibling, None) self.assertEqual(p1.next_sibling, None) @@ -334,7 +334,7 @@ n2 = pytree.Node(1000, []) p1 = pytree.Node(1000, [n1, n2]) - self.failUnless(n2.prev_sibling is n1) + self.assertTrue(n2.prev_sibling is n1) self.assertEqual(n1.prev_sibling, None) self.assertEqual(p1.prev_sibling, None) @@ -343,7 +343,7 @@ l2 = pytree.Leaf(100, "b") p1 = pytree.Node(1000, [l1, l2]) - self.failUnless(l2.prev_sibling is l1) + self.assertTrue(l2.prev_sibling is l1) self.assertEqual(l1.prev_sibling, None) self.assertEqual(p1.prev_sibling, None) @@ -416,7 +416,7 @@ r = {} self.assertTrue(pw.match_seq([l1, l3], r)) self.assertEqual(r, {"pl": l3, "pw": [l1, l3]}) - self.assert_(r["pl"] is l3) + self.assertTrue(r["pl"] is l3) r = {} def test_generate_matches(self): @@ -459,5 +459,5 @@ l3 = pytree.Leaf(8, ")") node = pytree.Node(331, [l1, l2, l3]) r = {} - self.assert_(pattern.match(node, r)) + self.assertTrue(pattern.match(node, r)) self.assertEqual(r["args"], [l2]) Modified: sandbox/trunk/2to3/lib2to3/tests/test_util.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_util.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_util.py Wed Jul 1 02:44:30 2009 @@ -33,15 +33,15 @@ return fixer_util.is_tuple(parse(string, strip_levels=2)) def test_valid(self): - self.failUnless(self.is_tuple("(a, b)")) - self.failUnless(self.is_tuple("(a, (b, c))")) - self.failUnless(self.is_tuple("((a, (b, c)),)")) - self.failUnless(self.is_tuple("(a,)")) - self.failUnless(self.is_tuple("()")) + self.assertTrue(self.is_tuple("(a, b)")) + self.assertTrue(self.is_tuple("(a, (b, c))")) + self.assertTrue(self.is_tuple("((a, (b, c)),)")) + self.assertTrue(self.is_tuple("(a,)")) + self.assertTrue(self.is_tuple("()")) def test_invalid(self): - self.failIf(self.is_tuple("(a)")) - self.failIf(self.is_tuple("('foo') % (b, c)")) + self.assertFalse(self.is_tuple("(a)")) + self.assertFalse(self.is_tuple("('foo') % (b, c)")) class Test_is_list(support.TestCase): @@ -49,14 +49,14 @@ return fixer_util.is_list(parse(string, strip_levels=2)) def test_valid(self): - self.failUnless(self.is_list("[]")) - self.failUnless(self.is_list("[a]")) - self.failUnless(self.is_list("[a, b]")) - self.failUnless(self.is_list("[a, [b, c]]")) - self.failUnless(self.is_list("[[a, [b, c]],]")) + self.assertTrue(self.is_list("[]")) + self.assertTrue(self.is_list("[a]")) + self.assertTrue(self.is_list("[a, b]")) + self.assertTrue(self.is_list("[a, [b, c]]")) + self.assertTrue(self.is_list("[[a, [b, c]],]")) def test_invalid(self): - self.failIf(self.is_list("[]+[]")) + self.assertFalse(self.is_list("[]+[]")) class Test_Attr(MacroTestCase): @@ -102,9 +102,9 @@ (None, "a", "import b, c, d")) for package, name, import_ in failing_tests: n = self.does_tree_import(package, name, import_ + "\n" + string) - self.failIf(n) + self.assertFalse(n) n = self.does_tree_import(package, name, string + "\n" + import_) - self.failIf(n) + self.assertFalse(n) passing_tests = (("a", "a", "from a import a"), ("x", "a", "from x import a"), @@ -115,9 +115,9 @@ (None, "a", "import b, c, a, d")) for package, name, import_ in passing_tests: n = self.does_tree_import(package, name, import_ + "\n" + string) - self.failUnless(n) + self.assertTrue(n) n = self.does_tree_import(package, name, string + "\n" + import_) - self.failUnless(n) + self.assertTrue(n) def test_in_function(self): self.try_with("def foo():\n\tbar.baz()\n\tstart=3") @@ -127,226 +127,226 @@ return fixer_util.find_binding(name, parse(string), package) def test_simple_assignment(self): - self.failUnless(self.find_binding("a", "a = b")) - self.failUnless(self.find_binding("a", "a = [b, c, d]")) - self.failUnless(self.find_binding("a", "a = foo()")) - self.failUnless(self.find_binding("a", "a = foo().foo.foo[6][foo]")) - self.failIf(self.find_binding("a", "foo = a")) - self.failIf(self.find_binding("a", "foo = (a, b, c)")) + self.assertTrue(self.find_binding("a", "a = b")) + self.assertTrue(self.find_binding("a", "a = [b, c, d]")) + self.assertTrue(self.find_binding("a", "a = foo()")) + self.assertTrue(self.find_binding("a", "a = foo().foo.foo[6][foo]")) + self.assertFalse(self.find_binding("a", "foo = a")) + self.assertFalse(self.find_binding("a", "foo = (a, b, c)")) def test_tuple_assignment(self): - self.failUnless(self.find_binding("a", "(a,) = b")) - self.failUnless(self.find_binding("a", "(a, b, c) = [b, c, d]")) - self.failUnless(self.find_binding("a", "(c, (d, a), b) = foo()")) - self.failUnless(self.find_binding("a", "(a, b) = foo().foo[6][foo]")) - self.failIf(self.find_binding("a", "(foo, b) = (b, a)")) - self.failIf(self.find_binding("a", "(foo, (b, c)) = (a, b, c)")) + self.assertTrue(self.find_binding("a", "(a,) = b")) + self.assertTrue(self.find_binding("a", "(a, b, c) = [b, c, d]")) + self.assertTrue(self.find_binding("a", "(c, (d, a), b) = foo()")) + self.assertTrue(self.find_binding("a", "(a, b) = foo().foo[6][foo]")) + self.assertFalse(self.find_binding("a", "(foo, b) = (b, a)")) + self.assertFalse(self.find_binding("a", "(foo, (b, c)) = (a, b, c)")) def test_list_assignment(self): - self.failUnless(self.find_binding("a", "[a] = b")) - self.failUnless(self.find_binding("a", "[a, b, c] = [b, c, d]")) - self.failUnless(self.find_binding("a", "[c, [d, a], b] = foo()")) - self.failUnless(self.find_binding("a", "[a, b] = foo().foo[a][foo]")) - self.failIf(self.find_binding("a", "[foo, b] = (b, a)")) - self.failIf(self.find_binding("a", "[foo, [b, c]] = (a, b, c)")) + self.assertTrue(self.find_binding("a", "[a] = b")) + self.assertTrue(self.find_binding("a", "[a, b, c] = [b, c, d]")) + self.assertTrue(self.find_binding("a", "[c, [d, a], b] = foo()")) + self.assertTrue(self.find_binding("a", "[a, b] = foo().foo[a][foo]")) + self.assertFalse(self.find_binding("a", "[foo, b] = (b, a)")) + self.assertFalse(self.find_binding("a", "[foo, [b, c]] = (a, b, c)")) def test_invalid_assignments(self): - self.failIf(self.find_binding("a", "foo.a = 5")) - self.failIf(self.find_binding("a", "foo[a] = 5")) - self.failIf(self.find_binding("a", "foo(a) = 5")) - self.failIf(self.find_binding("a", "foo(a, b) = 5")) + self.assertFalse(self.find_binding("a", "foo.a = 5")) + self.assertFalse(self.find_binding("a", "foo[a] = 5")) + self.assertFalse(self.find_binding("a", "foo(a) = 5")) + self.assertFalse(self.find_binding("a", "foo(a, b) = 5")) def test_simple_import(self): - self.failUnless(self.find_binding("a", "import a")) - self.failUnless(self.find_binding("a", "import b, c, a, d")) - self.failIf(self.find_binding("a", "import b")) - self.failIf(self.find_binding("a", "import b, c, d")) + self.assertTrue(self.find_binding("a", "import a")) + self.assertTrue(self.find_binding("a", "import b, c, a, d")) + self.assertFalse(self.find_binding("a", "import b")) + self.assertFalse(self.find_binding("a", "import b, c, d")) def test_from_import(self): - self.failUnless(self.find_binding("a", "from x import a")) - self.failUnless(self.find_binding("a", "from a import a")) - self.failUnless(self.find_binding("a", "from x import b, c, a, d")) - self.failUnless(self.find_binding("a", "from x.b import a")) - self.failUnless(self.find_binding("a", "from x.b import b, c, a, d")) - self.failIf(self.find_binding("a", "from a import b")) - self.failIf(self.find_binding("a", "from a.d import b")) - self.failIf(self.find_binding("a", "from d.a import b")) + self.assertTrue(self.find_binding("a", "from x import a")) + self.assertTrue(self.find_binding("a", "from a import a")) + self.assertTrue(self.find_binding("a", "from x import b, c, a, d")) + self.assertTrue(self.find_binding("a", "from x.b import a")) + self.assertTrue(self.find_binding("a", "from x.b import b, c, a, d")) + self.assertFalse(self.find_binding("a", "from a import b")) + self.assertFalse(self.find_binding("a", "from a.d import b")) + self.assertFalse(self.find_binding("a", "from d.a import b")) def test_import_as(self): - self.failUnless(self.find_binding("a", "import b as a")) - self.failUnless(self.find_binding("a", "import b as a, c, a as f, d")) - self.failIf(self.find_binding("a", "import a as f")) - self.failIf(self.find_binding("a", "import b, c as f, d as e")) + self.assertTrue(self.find_binding("a", "import b as a")) + self.assertTrue(self.find_binding("a", "import b as a, c, a as f, d")) + self.assertFalse(self.find_binding("a", "import a as f")) + self.assertFalse(self.find_binding("a", "import b, c as f, d as e")) def test_from_import_as(self): - self.failUnless(self.find_binding("a", "from x import b as a")) - self.failUnless(self.find_binding("a", "from x import g as a, d as b")) - self.failUnless(self.find_binding("a", "from x.b import t as a")) - self.failUnless(self.find_binding("a", "from x.b import g as a, d")) - self.failIf(self.find_binding("a", "from a import b as t")) - self.failIf(self.find_binding("a", "from a.d import b as t")) - self.failIf(self.find_binding("a", "from d.a import b as t")) + self.assertTrue(self.find_binding("a", "from x import b as a")) + self.assertTrue(self.find_binding("a", "from x import g as a, d as b")) + self.assertTrue(self.find_binding("a", "from x.b import t as a")) + self.assertTrue(self.find_binding("a", "from x.b import g as a, d")) + self.assertFalse(self.find_binding("a", "from a import b as t")) + self.assertFalse(self.find_binding("a", "from a.d import b as t")) + self.assertFalse(self.find_binding("a", "from d.a import b as t")) def test_simple_import_with_package(self): - self.failUnless(self.find_binding("b", "import b")) - self.failUnless(self.find_binding("b", "import b, c, d")) - self.failIf(self.find_binding("b", "import b", "b")) - self.failIf(self.find_binding("b", "import b, c, d", "c")) + self.assertTrue(self.find_binding("b", "import b")) + self.assertTrue(self.find_binding("b", "import b, c, d")) + self.assertFalse(self.find_binding("b", "import b", "b")) + self.assertFalse(self.find_binding("b", "import b, c, d", "c")) def test_from_import_with_package(self): - self.failUnless(self.find_binding("a", "from x import a", "x")) - self.failUnless(self.find_binding("a", "from a import a", "a")) - self.failUnless(self.find_binding("a", "from x import *", "x")) - self.failUnless(self.find_binding("a", "from x import b, c, a, d", "x")) - self.failUnless(self.find_binding("a", "from x.b import a", "x.b")) - self.failUnless(self.find_binding("a", "from x.b import *", "x.b")) - self.failUnless(self.find_binding("a", "from x.b import b, c, a, d", "x.b")) - self.failIf(self.find_binding("a", "from a import b", "a")) - self.failIf(self.find_binding("a", "from a.d import b", "a.d")) - self.failIf(self.find_binding("a", "from d.a import b", "a.d")) - self.failIf(self.find_binding("a", "from x.y import *", "a.b")) + self.assertTrue(self.find_binding("a", "from x import a", "x")) + self.assertTrue(self.find_binding("a", "from a import a", "a")) + self.assertTrue(self.find_binding("a", "from x import *", "x")) + self.assertTrue(self.find_binding("a", "from x import b, c, a, d", "x")) + self.assertTrue(self.find_binding("a", "from x.b import a", "x.b")) + self.assertTrue(self.find_binding("a", "from x.b import *", "x.b")) + self.assertTrue(self.find_binding("a", "from x.b import b, c, a, d", "x.b")) + self.assertFalse(self.find_binding("a", "from a import b", "a")) + self.assertFalse(self.find_binding("a", "from a.d import b", "a.d")) + self.assertFalse(self.find_binding("a", "from d.a import b", "a.d")) + self.assertFalse(self.find_binding("a", "from x.y import *", "a.b")) def test_import_as_with_package(self): - self.failIf(self.find_binding("a", "import b.c as a", "b.c")) - self.failIf(self.find_binding("a", "import a as f", "f")) - self.failIf(self.find_binding("a", "import a as f", "a")) + self.assertFalse(self.find_binding("a", "import b.c as a", "b.c")) + self.assertFalse(self.find_binding("a", "import a as f", "f")) + self.assertFalse(self.find_binding("a", "import a as f", "a")) def test_from_import_as_with_package(self): # Because it would take a lot of special-case code in the fixers # to deal with from foo import bar as baz, we'll simply always # fail if there is an "from ... import ... as ..." - self.failIf(self.find_binding("a", "from x import b as a", "x")) - self.failIf(self.find_binding("a", "from x import g as a, d as b", "x")) - self.failIf(self.find_binding("a", "from x.b import t as a", "x.b")) - self.failIf(self.find_binding("a", "from x.b import g as a, d", "x.b")) - self.failIf(self.find_binding("a", "from a import b as t", "a")) - self.failIf(self.find_binding("a", "from a import b as t", "b")) - self.failIf(self.find_binding("a", "from a import b as t", "t")) + self.assertFalse(self.find_binding("a", "from x import b as a", "x")) + self.assertFalse(self.find_binding("a", "from x import g as a, d as b", "x")) + self.assertFalse(self.find_binding("a", "from x.b import t as a", "x.b")) + self.assertFalse(self.find_binding("a", "from x.b import g as a, d", "x.b")) + self.assertFalse(self.find_binding("a", "from a import b as t", "a")) + self.assertFalse(self.find_binding("a", "from a import b as t", "b")) + self.assertFalse(self.find_binding("a", "from a import b as t", "t")) def test_function_def(self): - self.failUnless(self.find_binding("a", "def a(): pass")) - self.failUnless(self.find_binding("a", "def a(b, c, d): pass")) - self.failUnless(self.find_binding("a", "def a(): b = 7")) - self.failIf(self.find_binding("a", "def d(b, (c, a), e): pass")) - self.failIf(self.find_binding("a", "def d(a=7): pass")) - self.failIf(self.find_binding("a", "def d(a): pass")) - self.failIf(self.find_binding("a", "def d(): a = 7")) + self.assertTrue(self.find_binding("a", "def a(): pass")) + self.assertTrue(self.find_binding("a", "def a(b, c, d): pass")) + self.assertTrue(self.find_binding("a", "def a(): b = 7")) + self.assertFalse(self.find_binding("a", "def d(b, (c, a), e): pass")) + self.assertFalse(self.find_binding("a", "def d(a=7): pass")) + self.assertFalse(self.find_binding("a", "def d(a): pass")) + self.assertFalse(self.find_binding("a", "def d(): a = 7")) s = """ def d(): def a(): pass""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_class_def(self): - self.failUnless(self.find_binding("a", "class a: pass")) - self.failUnless(self.find_binding("a", "class a(): pass")) - self.failUnless(self.find_binding("a", "class a(b): pass")) - self.failUnless(self.find_binding("a", "class a(b, c=8): pass")) - self.failIf(self.find_binding("a", "class d: pass")) - self.failIf(self.find_binding("a", "class d(a): pass")) - self.failIf(self.find_binding("a", "class d(b, a=7): pass")) - self.failIf(self.find_binding("a", "class d(b, *a): pass")) - self.failIf(self.find_binding("a", "class d(b, **a): pass")) - self.failIf(self.find_binding("a", "class d: a = 7")) + self.assertTrue(self.find_binding("a", "class a: pass")) + self.assertTrue(self.find_binding("a", "class a(): pass")) + self.assertTrue(self.find_binding("a", "class a(b): pass")) + self.assertTrue(self.find_binding("a", "class a(b, c=8): pass")) + self.assertFalse(self.find_binding("a", "class d: pass")) + self.assertFalse(self.find_binding("a", "class d(a): pass")) + self.assertFalse(self.find_binding("a", "class d(b, a=7): pass")) + self.assertFalse(self.find_binding("a", "class d(b, *a): pass")) + self.assertFalse(self.find_binding("a", "class d(b, **a): pass")) + self.assertFalse(self.find_binding("a", "class d: a = 7")) s = """ class d(): class a(): pass""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_for(self): - self.failUnless(self.find_binding("a", "for a in r: pass")) - self.failUnless(self.find_binding("a", "for a, b in r: pass")) - self.failUnless(self.find_binding("a", "for (a, b) in r: pass")) - self.failUnless(self.find_binding("a", "for c, (a,) in r: pass")) - self.failUnless(self.find_binding("a", "for c, (a, b) in r: pass")) - self.failUnless(self.find_binding("a", "for c in r: a = c")) - self.failIf(self.find_binding("a", "for c in a: pass")) + self.assertTrue(self.find_binding("a", "for a in r: pass")) + self.assertTrue(self.find_binding("a", "for a, b in r: pass")) + self.assertTrue(self.find_binding("a", "for (a, b) in r: pass")) + self.assertTrue(self.find_binding("a", "for c, (a,) in r: pass")) + self.assertTrue(self.find_binding("a", "for c, (a, b) in r: pass")) + self.assertTrue(self.find_binding("a", "for c in r: a = c")) + self.assertFalse(self.find_binding("a", "for c in a: pass")) def test_for_nested(self): s = """ for b in r: for a in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for a, c in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for (a, c) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for (a,) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c, (a, d) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c in b: a = 7""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c in b: d = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ for b in r: for c in a: d = 7""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_if(self): - self.failUnless(self.find_binding("a", "if b in r: a = c")) - self.failIf(self.find_binding("a", "if a in r: d = e")) + self.assertTrue(self.find_binding("a", "if b in r: a = c")) + self.assertFalse(self.find_binding("a", "if a in r: d = e")) def test_if_nested(self): s = """ if b in r: if c in d: a = c""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ if b in r: if c in d: c = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_while(self): - self.failUnless(self.find_binding("a", "while b in r: a = c")) - self.failIf(self.find_binding("a", "while a in r: d = e")) + self.assertTrue(self.find_binding("a", "while b in r: a = c")) + self.assertFalse(self.find_binding("a", "while a in r: d = e")) def test_while_nested(self): s = """ while b in r: while c in d: a = c""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ while b in r: while c in d: c = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except(self): s = """ @@ -354,14 +354,14 @@ a = 6 except: b = 8""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -370,14 +370,14 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_nested(self): s = """ @@ -388,7 +388,7 @@ pass except: b = 8""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -398,7 +398,7 @@ a = 6 except: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -408,7 +408,7 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -420,7 +420,7 @@ a = 6 except: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -432,14 +432,14 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ try: @@ -454,7 +454,7 @@ t = 8 except: o = y""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_finally(self): s = """ @@ -464,21 +464,21 @@ b = 8 finally: a = 9""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 finally: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 finally: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ try: @@ -487,7 +487,7 @@ b = 9 finally: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_finally_nested(self): s = """ @@ -502,7 +502,7 @@ b = 9 finally: c = 9""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -512,7 +512,7 @@ pass finally: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -522,7 +522,7 @@ b = 6 finally: b = 7""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) class Test_touch_import(support.TestCase): From python-checkins at python.org Wed Jul 1 02:45:43 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 00:45:43 -0000 Subject: [Python-checkins] r73723 - python/branches/py3k/Lib/test/support.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 02:45:43 2009 New Revision: 73723 Log: remove use of failIf Modified: python/branches/py3k/Lib/test/support.py Modified: python/branches/py3k/Lib/test/support.py ============================================================================== --- python/branches/py3k/Lib/test/support.py (original) +++ python/branches/py3k/Lib/test/support.py Wed Jul 1 02:45:43 2009 @@ -735,7 +735,7 @@ # to make sure they work. We still want to avoid using # too much memory, though, but we do that noisily. maxsize = 5147 - self.failIf(maxsize * memuse + overhead > 20 * _1M) + self.assertFalse(maxsize * memuse + overhead > 20 * _1M) else: maxsize = int((max_memuse - overhead) / memuse) if maxsize < minsize: From python-checkins at python.org Wed Jul 1 02:48:39 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Wed, 01 Jul 2009 00:48:39 -0000 Subject: [Python-checkins] r73724 - python/branches/py3k/Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Wed Jul 1 02:48:39 2009 New Revision: 73724 Log: Fix exception name in NEWS, spotted by Neal Norwitz Modified: python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 1 02:48:39 2009 @@ -16,7 +16,7 @@ This fixes a build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead of stdint.h on that platform. -- Issue #6373: Fixed a RuntimeError when encoding with the latin-1 codec and +- Issue #6373: Fixed a SystemError when encoding with the latin-1 codec and the 'surrogateescape' error handler, a string which contains unpaired surrogates. From python-checkins at python.org Wed Jul 1 02:49:10 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 00:49:10 -0000 Subject: [Python-checkins] r73725 - in python/trunk/Lib/lib2to3: fixes/fix_dict.py refactor.py tests/test_fixers.py tests/test_pytree.py tests/test_util.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 02:49:09 2009 New Revision: 73725 Log: Merged revisions 73379,73388,73507,73722 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r73379 | benjamin.peterson | 2009-06-11 18:06:21 -0500 (Thu, 11 Jun 2009) | 1 line use a real conditional expresion ........ r73388 | benjamin.peterson | 2009-06-12 09:44:29 -0500 (Fri, 12 Jun 2009) | 1 line fix typo in last fix ........ r73507 | benjamin.peterson | 2009-06-22 13:32:04 -0500 (Mon, 22 Jun 2009) | 1 line remove svn:executable property ........ r73722 | benjamin.peterson | 2009-06-30 19:44:30 -0500 (Tue, 30 Jun 2009) | 1 line replace fail* with assert* ........ Modified: python/trunk/Lib/lib2to3/ (props changed) python/trunk/Lib/lib2to3/fixes/fix_dict.py python/trunk/Lib/lib2to3/refactor.py (props changed) python/trunk/Lib/lib2to3/tests/test_fixers.py python/trunk/Lib/lib2to3/tests/test_pytree.py python/trunk/Lib/lib2to3/tests/test_util.py Modified: python/trunk/Lib/lib2to3/fixes/fix_dict.py ============================================================================== --- python/trunk/Lib/lib2to3/fixes/fix_dict.py (original) +++ python/trunk/Lib/lib2to3/fixes/fix_dict.py Wed Jul 1 02:49:09 2009 @@ -66,7 +66,7 @@ new = pytree.Node(syms.power, args) if not special: new.prefix = u"" - new = Call(Name(isiter and u"iter" or u"list"), [new]) + new = Call(Name(u"iter" if isiter else u"list"), [new]) if tail: new = pytree.Node(syms.power, [new] + tail) new.prefix = node.prefix Modified: python/trunk/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_fixers.py (original) +++ python/trunk/Lib/lib2to3/tests/test_fixers.py Wed Jul 1 02:49:09 2009 @@ -32,20 +32,20 @@ before = support.reformat(before) after = support.reformat(after) tree = self.refactor.refactor_string(before, self.filename) - self.failUnlessEqual(after, unicode(tree)) + self.assertEqual(after, unicode(tree)) return tree def check(self, before, after, ignore_warnings=False): tree = self._check(before, after) - self.failUnless(tree.was_changed) + self.assertTrue(tree.was_changed) if not ignore_warnings: - self.failUnlessEqual(self.fixer_log, []) + self.assertEqual(self.fixer_log, []) def warns(self, before, after, message, unchanged=False): tree = self._check(before, after) - self.failUnless(message in "".join(self.fixer_log)) + self.assertTrue(message in "".join(self.fixer_log)) if not unchanged: - self.failUnless(tree.was_changed) + self.assertTrue(tree.was_changed) def warns_unchanged(self, before, message): self.warns(before, before, message, unchanged=True) @@ -53,7 +53,7 @@ def unchanged(self, before, ignore_warnings=False): self._check(before, before) if not ignore_warnings: - self.failUnlessEqual(self.fixer_log, []) + self.assertEqual(self.fixer_log, []) def assert_runs_after(self, *names): fixes = [self.fixer] Modified: python/trunk/Lib/lib2to3/tests/test_pytree.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_pytree.py (original) +++ python/trunk/Lib/lib2to3/tests/test_pytree.py Wed Jul 1 02:49:09 2009 @@ -81,10 +81,10 @@ def test_leaf_prefix(self): l1 = pytree.Leaf(100, "foo") self.assertEqual(l1.prefix, "") - self.failIf(l1.was_changed) + self.assertFalse(l1.was_changed) l1.prefix = " ##\n\n" self.assertEqual(l1.prefix, " ##\n\n") - self.failUnless(l1.was_changed) + self.assertTrue(l1.was_changed) def test_node(self): l1 = pytree.Leaf(100, "foo") @@ -154,13 +154,13 @@ l3 = pytree.Leaf(100, "bar") n1 = pytree.Node(1000, [l1, l2, l3]) self.assertEqual(n1.children, [l1, l2, l3]) - self.failUnless(isinstance(n1.children, list)) - self.failIf(n1.was_changed) + self.assertTrue(isinstance(n1.children, list)) + self.assertFalse(n1.was_changed) l2new = pytree.Leaf(100, "-") l2.replace(l2new) self.assertEqual(n1.children, [l1, l2new, l3]) - self.failUnless(isinstance(n1.children, list)) - self.failUnless(n1.was_changed) + self.assertTrue(isinstance(n1.children, list)) + self.assertTrue(n1.was_changed) def test_replace_with_list(self): l1 = pytree.Leaf(100, "foo") @@ -170,7 +170,7 @@ l2.replace([pytree.Leaf(100, "*"), pytree.Leaf(100, "*")]) self.assertEqual(str(n1), "foo**bar") - self.failUnless(isinstance(n1.children, list)) + self.assertTrue(isinstance(n1.children, list)) def test_post_order(self): l1 = pytree.Leaf(100, "foo") @@ -186,34 +186,34 @@ def test_changed(self): l1 = pytree.Leaf(100, "f") - self.failIf(l1.was_changed) + self.assertFalse(l1.was_changed) l1.changed() - self.failUnless(l1.was_changed) + self.assertTrue(l1.was_changed) l1 = pytree.Leaf(100, "f") n1 = pytree.Node(1000, [l1]) - self.failIf(n1.was_changed) + self.assertFalse(n1.was_changed) n1.changed() - self.failUnless(n1.was_changed) + self.assertTrue(n1.was_changed) l1 = pytree.Leaf(100, "foo") l2 = pytree.Leaf(100, "+") l3 = pytree.Leaf(100, "bar") n1 = pytree.Node(1000, [l1, l2, l3]) n2 = pytree.Node(1000, [n1]) - self.failIf(l1.was_changed) - self.failIf(n1.was_changed) - self.failIf(n2.was_changed) + self.assertFalse(l1.was_changed) + self.assertFalse(n1.was_changed) + self.assertFalse(n2.was_changed) n1.changed() - self.failUnless(n1.was_changed) - self.failUnless(n2.was_changed) - self.failIf(l1.was_changed) + self.assertTrue(n1.was_changed) + self.assertTrue(n2.was_changed) + self.assertFalse(l1.was_changed) def test_leaf_constructor_prefix(self): for prefix in ("xyz_", ""): l1 = pytree.Leaf(100, "self", prefix=prefix) - self.failUnless(str(l1), prefix + "self") + self.assertTrue(str(l1), prefix + "self") self.assertEqual(l1.prefix, prefix) def test_node_constructor_prefix(self): @@ -221,7 +221,7 @@ l1 = pytree.Leaf(100, "self") l2 = pytree.Leaf(100, "foo", prefix="_") n1 = pytree.Node(1000, [l1, l2], prefix=prefix) - self.failUnless(str(n1), prefix + "self_foo") + self.assertTrue(str(n1), prefix + "self_foo") self.assertEqual(n1.prefix, prefix) self.assertEqual(l1.prefix, prefix) self.assertEqual(l2.prefix, "_") @@ -237,8 +237,8 @@ self.assertEqual(l1.parent, n1) self.assertEqual(n1.parent, None) self.assertEqual(n2.parent, None) - self.failIf(n1.was_changed) - self.failUnless(n2.was_changed) + self.assertFalse(n1.was_changed) + self.assertTrue(n2.was_changed) self.assertEqual(l2.remove(), 1) self.assertEqual(l1.remove(), 0) @@ -246,8 +246,8 @@ self.assertEqual(l1.parent, None) self.assertEqual(n1.parent, None) self.assertEqual(n2.parent, None) - self.failUnless(n1.was_changed) - self.failUnless(n2.was_changed) + self.assertTrue(n1.was_changed) + self.assertTrue(n2.was_changed) def test_remove_parentless(self): n1 = pytree.Node(1000, []) @@ -316,7 +316,7 @@ n2 = pytree.Node(1000, []) p1 = pytree.Node(1000, [n1, n2]) - self.failUnless(n1.next_sibling is n2) + self.assertTrue(n1.next_sibling is n2) self.assertEqual(n2.next_sibling, None) self.assertEqual(p1.next_sibling, None) @@ -325,7 +325,7 @@ l2 = pytree.Leaf(100, "b") p1 = pytree.Node(1000, [l1, l2]) - self.failUnless(l1.next_sibling is l2) + self.assertTrue(l1.next_sibling is l2) self.assertEqual(l2.next_sibling, None) self.assertEqual(p1.next_sibling, None) @@ -334,7 +334,7 @@ n2 = pytree.Node(1000, []) p1 = pytree.Node(1000, [n1, n2]) - self.failUnless(n2.prev_sibling is n1) + self.assertTrue(n2.prev_sibling is n1) self.assertEqual(n1.prev_sibling, None) self.assertEqual(p1.prev_sibling, None) @@ -343,7 +343,7 @@ l2 = pytree.Leaf(100, "b") p1 = pytree.Node(1000, [l1, l2]) - self.failUnless(l2.prev_sibling is l1) + self.assertTrue(l2.prev_sibling is l1) self.assertEqual(l1.prev_sibling, None) self.assertEqual(p1.prev_sibling, None) @@ -416,7 +416,7 @@ r = {} self.assertTrue(pw.match_seq([l1, l3], r)) self.assertEqual(r, {"pl": l3, "pw": [l1, l3]}) - self.assert_(r["pl"] is l3) + self.assertTrue(r["pl"] is l3) r = {} def test_generate_matches(self): @@ -459,5 +459,5 @@ l3 = pytree.Leaf(8, ")") node = pytree.Node(331, [l1, l2, l3]) r = {} - self.assert_(pattern.match(node, r)) + self.assertTrue(pattern.match(node, r)) self.assertEqual(r["args"], [l2]) Modified: python/trunk/Lib/lib2to3/tests/test_util.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_util.py (original) +++ python/trunk/Lib/lib2to3/tests/test_util.py Wed Jul 1 02:49:09 2009 @@ -33,15 +33,15 @@ return fixer_util.is_tuple(parse(string, strip_levels=2)) def test_valid(self): - self.failUnless(self.is_tuple("(a, b)")) - self.failUnless(self.is_tuple("(a, (b, c))")) - self.failUnless(self.is_tuple("((a, (b, c)),)")) - self.failUnless(self.is_tuple("(a,)")) - self.failUnless(self.is_tuple("()")) + self.assertTrue(self.is_tuple("(a, b)")) + self.assertTrue(self.is_tuple("(a, (b, c))")) + self.assertTrue(self.is_tuple("((a, (b, c)),)")) + self.assertTrue(self.is_tuple("(a,)")) + self.assertTrue(self.is_tuple("()")) def test_invalid(self): - self.failIf(self.is_tuple("(a)")) - self.failIf(self.is_tuple("('foo') % (b, c)")) + self.assertFalse(self.is_tuple("(a)")) + self.assertFalse(self.is_tuple("('foo') % (b, c)")) class Test_is_list(support.TestCase): @@ -49,14 +49,14 @@ return fixer_util.is_list(parse(string, strip_levels=2)) def test_valid(self): - self.failUnless(self.is_list("[]")) - self.failUnless(self.is_list("[a]")) - self.failUnless(self.is_list("[a, b]")) - self.failUnless(self.is_list("[a, [b, c]]")) - self.failUnless(self.is_list("[[a, [b, c]],]")) + self.assertTrue(self.is_list("[]")) + self.assertTrue(self.is_list("[a]")) + self.assertTrue(self.is_list("[a, b]")) + self.assertTrue(self.is_list("[a, [b, c]]")) + self.assertTrue(self.is_list("[[a, [b, c]],]")) def test_invalid(self): - self.failIf(self.is_list("[]+[]")) + self.assertFalse(self.is_list("[]+[]")) class Test_Attr(MacroTestCase): @@ -102,9 +102,9 @@ (None, "a", "import b, c, d")) for package, name, import_ in failing_tests: n = self.does_tree_import(package, name, import_ + "\n" + string) - self.failIf(n) + self.assertFalse(n) n = self.does_tree_import(package, name, string + "\n" + import_) - self.failIf(n) + self.assertFalse(n) passing_tests = (("a", "a", "from a import a"), ("x", "a", "from x import a"), @@ -115,9 +115,9 @@ (None, "a", "import b, c, a, d")) for package, name, import_ in passing_tests: n = self.does_tree_import(package, name, import_ + "\n" + string) - self.failUnless(n) + self.assertTrue(n) n = self.does_tree_import(package, name, string + "\n" + import_) - self.failUnless(n) + self.assertTrue(n) def test_in_function(self): self.try_with("def foo():\n\tbar.baz()\n\tstart=3") @@ -127,226 +127,226 @@ return fixer_util.find_binding(name, parse(string), package) def test_simple_assignment(self): - self.failUnless(self.find_binding("a", "a = b")) - self.failUnless(self.find_binding("a", "a = [b, c, d]")) - self.failUnless(self.find_binding("a", "a = foo()")) - self.failUnless(self.find_binding("a", "a = foo().foo.foo[6][foo]")) - self.failIf(self.find_binding("a", "foo = a")) - self.failIf(self.find_binding("a", "foo = (a, b, c)")) + self.assertTrue(self.find_binding("a", "a = b")) + self.assertTrue(self.find_binding("a", "a = [b, c, d]")) + self.assertTrue(self.find_binding("a", "a = foo()")) + self.assertTrue(self.find_binding("a", "a = foo().foo.foo[6][foo]")) + self.assertFalse(self.find_binding("a", "foo = a")) + self.assertFalse(self.find_binding("a", "foo = (a, b, c)")) def test_tuple_assignment(self): - self.failUnless(self.find_binding("a", "(a,) = b")) - self.failUnless(self.find_binding("a", "(a, b, c) = [b, c, d]")) - self.failUnless(self.find_binding("a", "(c, (d, a), b) = foo()")) - self.failUnless(self.find_binding("a", "(a, b) = foo().foo[6][foo]")) - self.failIf(self.find_binding("a", "(foo, b) = (b, a)")) - self.failIf(self.find_binding("a", "(foo, (b, c)) = (a, b, c)")) + self.assertTrue(self.find_binding("a", "(a,) = b")) + self.assertTrue(self.find_binding("a", "(a, b, c) = [b, c, d]")) + self.assertTrue(self.find_binding("a", "(c, (d, a), b) = foo()")) + self.assertTrue(self.find_binding("a", "(a, b) = foo().foo[6][foo]")) + self.assertFalse(self.find_binding("a", "(foo, b) = (b, a)")) + self.assertFalse(self.find_binding("a", "(foo, (b, c)) = (a, b, c)")) def test_list_assignment(self): - self.failUnless(self.find_binding("a", "[a] = b")) - self.failUnless(self.find_binding("a", "[a, b, c] = [b, c, d]")) - self.failUnless(self.find_binding("a", "[c, [d, a], b] = foo()")) - self.failUnless(self.find_binding("a", "[a, b] = foo().foo[a][foo]")) - self.failIf(self.find_binding("a", "[foo, b] = (b, a)")) - self.failIf(self.find_binding("a", "[foo, [b, c]] = (a, b, c)")) + self.assertTrue(self.find_binding("a", "[a] = b")) + self.assertTrue(self.find_binding("a", "[a, b, c] = [b, c, d]")) + self.assertTrue(self.find_binding("a", "[c, [d, a], b] = foo()")) + self.assertTrue(self.find_binding("a", "[a, b] = foo().foo[a][foo]")) + self.assertFalse(self.find_binding("a", "[foo, b] = (b, a)")) + self.assertFalse(self.find_binding("a", "[foo, [b, c]] = (a, b, c)")) def test_invalid_assignments(self): - self.failIf(self.find_binding("a", "foo.a = 5")) - self.failIf(self.find_binding("a", "foo[a] = 5")) - self.failIf(self.find_binding("a", "foo(a) = 5")) - self.failIf(self.find_binding("a", "foo(a, b) = 5")) + self.assertFalse(self.find_binding("a", "foo.a = 5")) + self.assertFalse(self.find_binding("a", "foo[a] = 5")) + self.assertFalse(self.find_binding("a", "foo(a) = 5")) + self.assertFalse(self.find_binding("a", "foo(a, b) = 5")) def test_simple_import(self): - self.failUnless(self.find_binding("a", "import a")) - self.failUnless(self.find_binding("a", "import b, c, a, d")) - self.failIf(self.find_binding("a", "import b")) - self.failIf(self.find_binding("a", "import b, c, d")) + self.assertTrue(self.find_binding("a", "import a")) + self.assertTrue(self.find_binding("a", "import b, c, a, d")) + self.assertFalse(self.find_binding("a", "import b")) + self.assertFalse(self.find_binding("a", "import b, c, d")) def test_from_import(self): - self.failUnless(self.find_binding("a", "from x import a")) - self.failUnless(self.find_binding("a", "from a import a")) - self.failUnless(self.find_binding("a", "from x import b, c, a, d")) - self.failUnless(self.find_binding("a", "from x.b import a")) - self.failUnless(self.find_binding("a", "from x.b import b, c, a, d")) - self.failIf(self.find_binding("a", "from a import b")) - self.failIf(self.find_binding("a", "from a.d import b")) - self.failIf(self.find_binding("a", "from d.a import b")) + self.assertTrue(self.find_binding("a", "from x import a")) + self.assertTrue(self.find_binding("a", "from a import a")) + self.assertTrue(self.find_binding("a", "from x import b, c, a, d")) + self.assertTrue(self.find_binding("a", "from x.b import a")) + self.assertTrue(self.find_binding("a", "from x.b import b, c, a, d")) + self.assertFalse(self.find_binding("a", "from a import b")) + self.assertFalse(self.find_binding("a", "from a.d import b")) + self.assertFalse(self.find_binding("a", "from d.a import b")) def test_import_as(self): - self.failUnless(self.find_binding("a", "import b as a")) - self.failUnless(self.find_binding("a", "import b as a, c, a as f, d")) - self.failIf(self.find_binding("a", "import a as f")) - self.failIf(self.find_binding("a", "import b, c as f, d as e")) + self.assertTrue(self.find_binding("a", "import b as a")) + self.assertTrue(self.find_binding("a", "import b as a, c, a as f, d")) + self.assertFalse(self.find_binding("a", "import a as f")) + self.assertFalse(self.find_binding("a", "import b, c as f, d as e")) def test_from_import_as(self): - self.failUnless(self.find_binding("a", "from x import b as a")) - self.failUnless(self.find_binding("a", "from x import g as a, d as b")) - self.failUnless(self.find_binding("a", "from x.b import t as a")) - self.failUnless(self.find_binding("a", "from x.b import g as a, d")) - self.failIf(self.find_binding("a", "from a import b as t")) - self.failIf(self.find_binding("a", "from a.d import b as t")) - self.failIf(self.find_binding("a", "from d.a import b as t")) + self.assertTrue(self.find_binding("a", "from x import b as a")) + self.assertTrue(self.find_binding("a", "from x import g as a, d as b")) + self.assertTrue(self.find_binding("a", "from x.b import t as a")) + self.assertTrue(self.find_binding("a", "from x.b import g as a, d")) + self.assertFalse(self.find_binding("a", "from a import b as t")) + self.assertFalse(self.find_binding("a", "from a.d import b as t")) + self.assertFalse(self.find_binding("a", "from d.a import b as t")) def test_simple_import_with_package(self): - self.failUnless(self.find_binding("b", "import b")) - self.failUnless(self.find_binding("b", "import b, c, d")) - self.failIf(self.find_binding("b", "import b", "b")) - self.failIf(self.find_binding("b", "import b, c, d", "c")) + self.assertTrue(self.find_binding("b", "import b")) + self.assertTrue(self.find_binding("b", "import b, c, d")) + self.assertFalse(self.find_binding("b", "import b", "b")) + self.assertFalse(self.find_binding("b", "import b, c, d", "c")) def test_from_import_with_package(self): - self.failUnless(self.find_binding("a", "from x import a", "x")) - self.failUnless(self.find_binding("a", "from a import a", "a")) - self.failUnless(self.find_binding("a", "from x import *", "x")) - self.failUnless(self.find_binding("a", "from x import b, c, a, d", "x")) - self.failUnless(self.find_binding("a", "from x.b import a", "x.b")) - self.failUnless(self.find_binding("a", "from x.b import *", "x.b")) - self.failUnless(self.find_binding("a", "from x.b import b, c, a, d", "x.b")) - self.failIf(self.find_binding("a", "from a import b", "a")) - self.failIf(self.find_binding("a", "from a.d import b", "a.d")) - self.failIf(self.find_binding("a", "from d.a import b", "a.d")) - self.failIf(self.find_binding("a", "from x.y import *", "a.b")) + self.assertTrue(self.find_binding("a", "from x import a", "x")) + self.assertTrue(self.find_binding("a", "from a import a", "a")) + self.assertTrue(self.find_binding("a", "from x import *", "x")) + self.assertTrue(self.find_binding("a", "from x import b, c, a, d", "x")) + self.assertTrue(self.find_binding("a", "from x.b import a", "x.b")) + self.assertTrue(self.find_binding("a", "from x.b import *", "x.b")) + self.assertTrue(self.find_binding("a", "from x.b import b, c, a, d", "x.b")) + self.assertFalse(self.find_binding("a", "from a import b", "a")) + self.assertFalse(self.find_binding("a", "from a.d import b", "a.d")) + self.assertFalse(self.find_binding("a", "from d.a import b", "a.d")) + self.assertFalse(self.find_binding("a", "from x.y import *", "a.b")) def test_import_as_with_package(self): - self.failIf(self.find_binding("a", "import b.c as a", "b.c")) - self.failIf(self.find_binding("a", "import a as f", "f")) - self.failIf(self.find_binding("a", "import a as f", "a")) + self.assertFalse(self.find_binding("a", "import b.c as a", "b.c")) + self.assertFalse(self.find_binding("a", "import a as f", "f")) + self.assertFalse(self.find_binding("a", "import a as f", "a")) def test_from_import_as_with_package(self): # Because it would take a lot of special-case code in the fixers # to deal with from foo import bar as baz, we'll simply always # fail if there is an "from ... import ... as ..." - self.failIf(self.find_binding("a", "from x import b as a", "x")) - self.failIf(self.find_binding("a", "from x import g as a, d as b", "x")) - self.failIf(self.find_binding("a", "from x.b import t as a", "x.b")) - self.failIf(self.find_binding("a", "from x.b import g as a, d", "x.b")) - self.failIf(self.find_binding("a", "from a import b as t", "a")) - self.failIf(self.find_binding("a", "from a import b as t", "b")) - self.failIf(self.find_binding("a", "from a import b as t", "t")) + self.assertFalse(self.find_binding("a", "from x import b as a", "x")) + self.assertFalse(self.find_binding("a", "from x import g as a, d as b", "x")) + self.assertFalse(self.find_binding("a", "from x.b import t as a", "x.b")) + self.assertFalse(self.find_binding("a", "from x.b import g as a, d", "x.b")) + self.assertFalse(self.find_binding("a", "from a import b as t", "a")) + self.assertFalse(self.find_binding("a", "from a import b as t", "b")) + self.assertFalse(self.find_binding("a", "from a import b as t", "t")) def test_function_def(self): - self.failUnless(self.find_binding("a", "def a(): pass")) - self.failUnless(self.find_binding("a", "def a(b, c, d): pass")) - self.failUnless(self.find_binding("a", "def a(): b = 7")) - self.failIf(self.find_binding("a", "def d(b, (c, a), e): pass")) - self.failIf(self.find_binding("a", "def d(a=7): pass")) - self.failIf(self.find_binding("a", "def d(a): pass")) - self.failIf(self.find_binding("a", "def d(): a = 7")) + self.assertTrue(self.find_binding("a", "def a(): pass")) + self.assertTrue(self.find_binding("a", "def a(b, c, d): pass")) + self.assertTrue(self.find_binding("a", "def a(): b = 7")) + self.assertFalse(self.find_binding("a", "def d(b, (c, a), e): pass")) + self.assertFalse(self.find_binding("a", "def d(a=7): pass")) + self.assertFalse(self.find_binding("a", "def d(a): pass")) + self.assertFalse(self.find_binding("a", "def d(): a = 7")) s = """ def d(): def a(): pass""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_class_def(self): - self.failUnless(self.find_binding("a", "class a: pass")) - self.failUnless(self.find_binding("a", "class a(): pass")) - self.failUnless(self.find_binding("a", "class a(b): pass")) - self.failUnless(self.find_binding("a", "class a(b, c=8): pass")) - self.failIf(self.find_binding("a", "class d: pass")) - self.failIf(self.find_binding("a", "class d(a): pass")) - self.failIf(self.find_binding("a", "class d(b, a=7): pass")) - self.failIf(self.find_binding("a", "class d(b, *a): pass")) - self.failIf(self.find_binding("a", "class d(b, **a): pass")) - self.failIf(self.find_binding("a", "class d: a = 7")) + self.assertTrue(self.find_binding("a", "class a: pass")) + self.assertTrue(self.find_binding("a", "class a(): pass")) + self.assertTrue(self.find_binding("a", "class a(b): pass")) + self.assertTrue(self.find_binding("a", "class a(b, c=8): pass")) + self.assertFalse(self.find_binding("a", "class d: pass")) + self.assertFalse(self.find_binding("a", "class d(a): pass")) + self.assertFalse(self.find_binding("a", "class d(b, a=7): pass")) + self.assertFalse(self.find_binding("a", "class d(b, *a): pass")) + self.assertFalse(self.find_binding("a", "class d(b, **a): pass")) + self.assertFalse(self.find_binding("a", "class d: a = 7")) s = """ class d(): class a(): pass""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_for(self): - self.failUnless(self.find_binding("a", "for a in r: pass")) - self.failUnless(self.find_binding("a", "for a, b in r: pass")) - self.failUnless(self.find_binding("a", "for (a, b) in r: pass")) - self.failUnless(self.find_binding("a", "for c, (a,) in r: pass")) - self.failUnless(self.find_binding("a", "for c, (a, b) in r: pass")) - self.failUnless(self.find_binding("a", "for c in r: a = c")) - self.failIf(self.find_binding("a", "for c in a: pass")) + self.assertTrue(self.find_binding("a", "for a in r: pass")) + self.assertTrue(self.find_binding("a", "for a, b in r: pass")) + self.assertTrue(self.find_binding("a", "for (a, b) in r: pass")) + self.assertTrue(self.find_binding("a", "for c, (a,) in r: pass")) + self.assertTrue(self.find_binding("a", "for c, (a, b) in r: pass")) + self.assertTrue(self.find_binding("a", "for c in r: a = c")) + self.assertFalse(self.find_binding("a", "for c in a: pass")) def test_for_nested(self): s = """ for b in r: for a in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for a, c in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for (a, c) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for (a,) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c, (a, d) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c in b: a = 7""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c in b: d = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ for b in r: for c in a: d = 7""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_if(self): - self.failUnless(self.find_binding("a", "if b in r: a = c")) - self.failIf(self.find_binding("a", "if a in r: d = e")) + self.assertTrue(self.find_binding("a", "if b in r: a = c")) + self.assertFalse(self.find_binding("a", "if a in r: d = e")) def test_if_nested(self): s = """ if b in r: if c in d: a = c""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ if b in r: if c in d: c = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_while(self): - self.failUnless(self.find_binding("a", "while b in r: a = c")) - self.failIf(self.find_binding("a", "while a in r: d = e")) + self.assertTrue(self.find_binding("a", "while b in r: a = c")) + self.assertFalse(self.find_binding("a", "while a in r: d = e")) def test_while_nested(self): s = """ while b in r: while c in d: a = c""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ while b in r: while c in d: c = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except(self): s = """ @@ -354,14 +354,14 @@ a = 6 except: b = 8""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -370,14 +370,14 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_nested(self): s = """ @@ -388,7 +388,7 @@ pass except: b = 8""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -398,7 +398,7 @@ a = 6 except: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -408,7 +408,7 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -420,7 +420,7 @@ a = 6 except: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -432,14 +432,14 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ try: @@ -454,7 +454,7 @@ t = 8 except: o = y""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_finally(self): s = """ @@ -464,21 +464,21 @@ b = 8 finally: a = 9""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 finally: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 finally: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ try: @@ -487,7 +487,7 @@ b = 9 finally: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_finally_nested(self): s = """ @@ -502,7 +502,7 @@ b = 9 finally: c = 9""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -512,7 +512,7 @@ pass finally: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -522,7 +522,7 @@ b = 6 finally: b = 7""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) class Test_touch_import(support.TestCase): From python-checkins at python.org Wed Jul 1 02:50:34 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Wed, 01 Jul 2009 00:50:34 -0000 Subject: [Python-checkins] r73726 - in python/branches/release31-maint: Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Wed Jul 1 02:50:34 2009 New Revision: 73726 Log: Merged revisions 73724 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r73724 | amaury.forgeotdarc | 2009-07-01 02:48:39 +0200 (mer., 01 juil. 2009) | 2 lines Fix exception name in NEWS, spotted by Neal Norwitz ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Wed Jul 1 02:50:34 2009 @@ -16,7 +16,7 @@ This fixes a build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead of stdint.h on that platform. -- Issue #6373: Fixed a RuntimeError when encoding with the latin-1 codec and +- Issue #6373: Fixed a SystemError when encoding with the latin-1 codec and the 'surrogateescape' error handler, a string which contains unpaired surrogates. From python-checkins at python.org Wed Jul 1 03:06:56 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 01:06:56 -0000 Subject: [Python-checkins] r73727 - in python/branches/py3k: Lib/lib2to3/fixes/fix_dict.py Lib/lib2to3/refactor.py Lib/lib2to3/tests/test_fixers.py Lib/lib2to3/tests/test_pytree.py Lib/lib2to3/tests/test_util.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 03:06:56 2009 New Revision: 73727 Log: Merged revisions 73725 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ................ r73725 | benjamin.peterson | 2009-06-30 19:49:09 -0500 (Tue, 30 Jun 2009) | 21 lines Merged revisions 73379,73388,73507,73722 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r73379 | benjamin.peterson | 2009-06-11 18:06:21 -0500 (Thu, 11 Jun 2009) | 1 line use a real conditional expresion ........ r73388 | benjamin.peterson | 2009-06-12 09:44:29 -0500 (Fri, 12 Jun 2009) | 1 line fix typo in last fix ........ r73507 | benjamin.peterson | 2009-06-22 13:32:04 -0500 (Mon, 22 Jun 2009) | 1 line remove svn:executable property ........ r73722 | benjamin.peterson | 2009-06-30 19:44:30 -0500 (Tue, 30 Jun 2009) | 1 line replace fail* with assert* ........ ................ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/lib2to3/fixes/fix_dict.py python/branches/py3k/Lib/lib2to3/refactor.py (props changed) python/branches/py3k/Lib/lib2to3/tests/test_fixers.py python/branches/py3k/Lib/lib2to3/tests/test_pytree.py python/branches/py3k/Lib/lib2to3/tests/test_util.py Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_dict.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixes/fix_dict.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_dict.py Wed Jul 1 03:06:56 2009 @@ -66,7 +66,7 @@ new = pytree.Node(syms.power, args) if not special: new.prefix = "" - new = Call(Name(isiter and "iter" or "list"), [new]) + new = Call(Name("iter" if isiter else "list"), [new]) if tail: new = pytree.Node(syms.power, [new] + tail) new.prefix = node.prefix Modified: python/branches/py3k/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_fixers.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_fixers.py Wed Jul 1 03:06:56 2009 @@ -32,20 +32,20 @@ before = support.reformat(before) after = support.reformat(after) tree = self.refactor.refactor_string(before, self.filename) - self.failUnlessEqual(after, str(tree)) + self.assertEqual(after, str(tree)) return tree def check(self, before, after, ignore_warnings=False): tree = self._check(before, after) - self.failUnless(tree.was_changed) + self.assertTrue(tree.was_changed) if not ignore_warnings: - self.failUnlessEqual(self.fixer_log, []) + self.assertEqual(self.fixer_log, []) def warns(self, before, after, message, unchanged=False): tree = self._check(before, after) - self.failUnless(message in "".join(self.fixer_log)) + self.assertTrue(message in "".join(self.fixer_log)) if not unchanged: - self.failUnless(tree.was_changed) + self.assertTrue(tree.was_changed) def warns_unchanged(self, before, message): self.warns(before, before, message, unchanged=True) @@ -53,7 +53,7 @@ def unchanged(self, before, ignore_warnings=False): self._check(before, before) if not ignore_warnings: - self.failUnlessEqual(self.fixer_log, []) + self.assertEqual(self.fixer_log, []) def assert_runs_after(self, *names): fixes = [self.fixer] Modified: python/branches/py3k/Lib/lib2to3/tests/test_pytree.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_pytree.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_pytree.py Wed Jul 1 03:06:56 2009 @@ -81,10 +81,10 @@ def test_leaf_prefix(self): l1 = pytree.Leaf(100, "foo") self.assertEqual(l1.prefix, "") - self.failIf(l1.was_changed) + self.assertFalse(l1.was_changed) l1.prefix = " ##\n\n" self.assertEqual(l1.prefix, " ##\n\n") - self.failUnless(l1.was_changed) + self.assertTrue(l1.was_changed) def test_node(self): l1 = pytree.Leaf(100, "foo") @@ -154,13 +154,13 @@ l3 = pytree.Leaf(100, "bar") n1 = pytree.Node(1000, [l1, l2, l3]) self.assertEqual(n1.children, [l1, l2, l3]) - self.failUnless(isinstance(n1.children, list)) - self.failIf(n1.was_changed) + self.assertTrue(isinstance(n1.children, list)) + self.assertFalse(n1.was_changed) l2new = pytree.Leaf(100, "-") l2.replace(l2new) self.assertEqual(n1.children, [l1, l2new, l3]) - self.failUnless(isinstance(n1.children, list)) - self.failUnless(n1.was_changed) + self.assertTrue(isinstance(n1.children, list)) + self.assertTrue(n1.was_changed) def test_replace_with_list(self): l1 = pytree.Leaf(100, "foo") @@ -170,7 +170,7 @@ l2.replace([pytree.Leaf(100, "*"), pytree.Leaf(100, "*")]) self.assertEqual(str(n1), "foo**bar") - self.failUnless(isinstance(n1.children, list)) + self.assertTrue(isinstance(n1.children, list)) def test_post_order(self): l1 = pytree.Leaf(100, "foo") @@ -186,34 +186,34 @@ def test_changed(self): l1 = pytree.Leaf(100, "f") - self.failIf(l1.was_changed) + self.assertFalse(l1.was_changed) l1.changed() - self.failUnless(l1.was_changed) + self.assertTrue(l1.was_changed) l1 = pytree.Leaf(100, "f") n1 = pytree.Node(1000, [l1]) - self.failIf(n1.was_changed) + self.assertFalse(n1.was_changed) n1.changed() - self.failUnless(n1.was_changed) + self.assertTrue(n1.was_changed) l1 = pytree.Leaf(100, "foo") l2 = pytree.Leaf(100, "+") l3 = pytree.Leaf(100, "bar") n1 = pytree.Node(1000, [l1, l2, l3]) n2 = pytree.Node(1000, [n1]) - self.failIf(l1.was_changed) - self.failIf(n1.was_changed) - self.failIf(n2.was_changed) + self.assertFalse(l1.was_changed) + self.assertFalse(n1.was_changed) + self.assertFalse(n2.was_changed) n1.changed() - self.failUnless(n1.was_changed) - self.failUnless(n2.was_changed) - self.failIf(l1.was_changed) + self.assertTrue(n1.was_changed) + self.assertTrue(n2.was_changed) + self.assertFalse(l1.was_changed) def test_leaf_constructor_prefix(self): for prefix in ("xyz_", ""): l1 = pytree.Leaf(100, "self", prefix=prefix) - self.failUnless(str(l1), prefix + "self") + self.assertTrue(str(l1), prefix + "self") self.assertEqual(l1.prefix, prefix) def test_node_constructor_prefix(self): @@ -221,7 +221,7 @@ l1 = pytree.Leaf(100, "self") l2 = pytree.Leaf(100, "foo", prefix="_") n1 = pytree.Node(1000, [l1, l2], prefix=prefix) - self.failUnless(str(n1), prefix + "self_foo") + self.assertTrue(str(n1), prefix + "self_foo") self.assertEqual(n1.prefix, prefix) self.assertEqual(l1.prefix, prefix) self.assertEqual(l2.prefix, "_") @@ -237,8 +237,8 @@ self.assertEqual(l1.parent, n1) self.assertEqual(n1.parent, None) self.assertEqual(n2.parent, None) - self.failIf(n1.was_changed) - self.failUnless(n2.was_changed) + self.assertFalse(n1.was_changed) + self.assertTrue(n2.was_changed) self.assertEqual(l2.remove(), 1) self.assertEqual(l1.remove(), 0) @@ -246,8 +246,8 @@ self.assertEqual(l1.parent, None) self.assertEqual(n1.parent, None) self.assertEqual(n2.parent, None) - self.failUnless(n1.was_changed) - self.failUnless(n2.was_changed) + self.assertTrue(n1.was_changed) + self.assertTrue(n2.was_changed) def test_remove_parentless(self): n1 = pytree.Node(1000, []) @@ -316,7 +316,7 @@ n2 = pytree.Node(1000, []) p1 = pytree.Node(1000, [n1, n2]) - self.failUnless(n1.next_sibling is n2) + self.assertTrue(n1.next_sibling is n2) self.assertEqual(n2.next_sibling, None) self.assertEqual(p1.next_sibling, None) @@ -325,7 +325,7 @@ l2 = pytree.Leaf(100, "b") p1 = pytree.Node(1000, [l1, l2]) - self.failUnless(l1.next_sibling is l2) + self.assertTrue(l1.next_sibling is l2) self.assertEqual(l2.next_sibling, None) self.assertEqual(p1.next_sibling, None) @@ -334,7 +334,7 @@ n2 = pytree.Node(1000, []) p1 = pytree.Node(1000, [n1, n2]) - self.failUnless(n2.prev_sibling is n1) + self.assertTrue(n2.prev_sibling is n1) self.assertEqual(n1.prev_sibling, None) self.assertEqual(p1.prev_sibling, None) @@ -343,7 +343,7 @@ l2 = pytree.Leaf(100, "b") p1 = pytree.Node(1000, [l1, l2]) - self.failUnless(l2.prev_sibling is l1) + self.assertTrue(l2.prev_sibling is l1) self.assertEqual(l1.prev_sibling, None) self.assertEqual(p1.prev_sibling, None) @@ -416,7 +416,7 @@ r = {} self.assertTrue(pw.match_seq([l1, l3], r)) self.assertEqual(r, {"pl": l3, "pw": [l1, l3]}) - self.assert_(r["pl"] is l3) + self.assertTrue(r["pl"] is l3) r = {} def test_generate_matches(self): @@ -459,5 +459,5 @@ l3 = pytree.Leaf(8, ")") node = pytree.Node(331, [l1, l2, l3]) r = {} - self.assert_(pattern.match(node, r)) + self.assertTrue(pattern.match(node, r)) self.assertEqual(r["args"], [l2]) Modified: python/branches/py3k/Lib/lib2to3/tests/test_util.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_util.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_util.py Wed Jul 1 03:06:56 2009 @@ -33,15 +33,15 @@ return fixer_util.is_tuple(parse(string, strip_levels=2)) def test_valid(self): - self.failUnless(self.is_tuple("(a, b)")) - self.failUnless(self.is_tuple("(a, (b, c))")) - self.failUnless(self.is_tuple("((a, (b, c)),)")) - self.failUnless(self.is_tuple("(a,)")) - self.failUnless(self.is_tuple("()")) + self.assertTrue(self.is_tuple("(a, b)")) + self.assertTrue(self.is_tuple("(a, (b, c))")) + self.assertTrue(self.is_tuple("((a, (b, c)),)")) + self.assertTrue(self.is_tuple("(a,)")) + self.assertTrue(self.is_tuple("()")) def test_invalid(self): - self.failIf(self.is_tuple("(a)")) - self.failIf(self.is_tuple("('foo') % (b, c)")) + self.assertFalse(self.is_tuple("(a)")) + self.assertFalse(self.is_tuple("('foo') % (b, c)")) class Test_is_list(support.TestCase): @@ -49,14 +49,14 @@ return fixer_util.is_list(parse(string, strip_levels=2)) def test_valid(self): - self.failUnless(self.is_list("[]")) - self.failUnless(self.is_list("[a]")) - self.failUnless(self.is_list("[a, b]")) - self.failUnless(self.is_list("[a, [b, c]]")) - self.failUnless(self.is_list("[[a, [b, c]],]")) + self.assertTrue(self.is_list("[]")) + self.assertTrue(self.is_list("[a]")) + self.assertTrue(self.is_list("[a, b]")) + self.assertTrue(self.is_list("[a, [b, c]]")) + self.assertTrue(self.is_list("[[a, [b, c]],]")) def test_invalid(self): - self.failIf(self.is_list("[]+[]")) + self.assertFalse(self.is_list("[]+[]")) class Test_Attr(MacroTestCase): @@ -102,9 +102,9 @@ (None, "a", "import b, c, d")) for package, name, import_ in failing_tests: n = self.does_tree_import(package, name, import_ + "\n" + string) - self.failIf(n) + self.assertFalse(n) n = self.does_tree_import(package, name, string + "\n" + import_) - self.failIf(n) + self.assertFalse(n) passing_tests = (("a", "a", "from a import a"), ("x", "a", "from x import a"), @@ -115,9 +115,9 @@ (None, "a", "import b, c, a, d")) for package, name, import_ in passing_tests: n = self.does_tree_import(package, name, import_ + "\n" + string) - self.failUnless(n) + self.assertTrue(n) n = self.does_tree_import(package, name, string + "\n" + import_) - self.failUnless(n) + self.assertTrue(n) def test_in_function(self): self.try_with("def foo():\n\tbar.baz()\n\tstart=3") @@ -127,226 +127,226 @@ return fixer_util.find_binding(name, parse(string), package) def test_simple_assignment(self): - self.failUnless(self.find_binding("a", "a = b")) - self.failUnless(self.find_binding("a", "a = [b, c, d]")) - self.failUnless(self.find_binding("a", "a = foo()")) - self.failUnless(self.find_binding("a", "a = foo().foo.foo[6][foo]")) - self.failIf(self.find_binding("a", "foo = a")) - self.failIf(self.find_binding("a", "foo = (a, b, c)")) + self.assertTrue(self.find_binding("a", "a = b")) + self.assertTrue(self.find_binding("a", "a = [b, c, d]")) + self.assertTrue(self.find_binding("a", "a = foo()")) + self.assertTrue(self.find_binding("a", "a = foo().foo.foo[6][foo]")) + self.assertFalse(self.find_binding("a", "foo = a")) + self.assertFalse(self.find_binding("a", "foo = (a, b, c)")) def test_tuple_assignment(self): - self.failUnless(self.find_binding("a", "(a,) = b")) - self.failUnless(self.find_binding("a", "(a, b, c) = [b, c, d]")) - self.failUnless(self.find_binding("a", "(c, (d, a), b) = foo()")) - self.failUnless(self.find_binding("a", "(a, b) = foo().foo[6][foo]")) - self.failIf(self.find_binding("a", "(foo, b) = (b, a)")) - self.failIf(self.find_binding("a", "(foo, (b, c)) = (a, b, c)")) + self.assertTrue(self.find_binding("a", "(a,) = b")) + self.assertTrue(self.find_binding("a", "(a, b, c) = [b, c, d]")) + self.assertTrue(self.find_binding("a", "(c, (d, a), b) = foo()")) + self.assertTrue(self.find_binding("a", "(a, b) = foo().foo[6][foo]")) + self.assertFalse(self.find_binding("a", "(foo, b) = (b, a)")) + self.assertFalse(self.find_binding("a", "(foo, (b, c)) = (a, b, c)")) def test_list_assignment(self): - self.failUnless(self.find_binding("a", "[a] = b")) - self.failUnless(self.find_binding("a", "[a, b, c] = [b, c, d]")) - self.failUnless(self.find_binding("a", "[c, [d, a], b] = foo()")) - self.failUnless(self.find_binding("a", "[a, b] = foo().foo[a][foo]")) - self.failIf(self.find_binding("a", "[foo, b] = (b, a)")) - self.failIf(self.find_binding("a", "[foo, [b, c]] = (a, b, c)")) + self.assertTrue(self.find_binding("a", "[a] = b")) + self.assertTrue(self.find_binding("a", "[a, b, c] = [b, c, d]")) + self.assertTrue(self.find_binding("a", "[c, [d, a], b] = foo()")) + self.assertTrue(self.find_binding("a", "[a, b] = foo().foo[a][foo]")) + self.assertFalse(self.find_binding("a", "[foo, b] = (b, a)")) + self.assertFalse(self.find_binding("a", "[foo, [b, c]] = (a, b, c)")) def test_invalid_assignments(self): - self.failIf(self.find_binding("a", "foo.a = 5")) - self.failIf(self.find_binding("a", "foo[a] = 5")) - self.failIf(self.find_binding("a", "foo(a) = 5")) - self.failIf(self.find_binding("a", "foo(a, b) = 5")) + self.assertFalse(self.find_binding("a", "foo.a = 5")) + self.assertFalse(self.find_binding("a", "foo[a] = 5")) + self.assertFalse(self.find_binding("a", "foo(a) = 5")) + self.assertFalse(self.find_binding("a", "foo(a, b) = 5")) def test_simple_import(self): - self.failUnless(self.find_binding("a", "import a")) - self.failUnless(self.find_binding("a", "import b, c, a, d")) - self.failIf(self.find_binding("a", "import b")) - self.failIf(self.find_binding("a", "import b, c, d")) + self.assertTrue(self.find_binding("a", "import a")) + self.assertTrue(self.find_binding("a", "import b, c, a, d")) + self.assertFalse(self.find_binding("a", "import b")) + self.assertFalse(self.find_binding("a", "import b, c, d")) def test_from_import(self): - self.failUnless(self.find_binding("a", "from x import a")) - self.failUnless(self.find_binding("a", "from a import a")) - self.failUnless(self.find_binding("a", "from x import b, c, a, d")) - self.failUnless(self.find_binding("a", "from x.b import a")) - self.failUnless(self.find_binding("a", "from x.b import b, c, a, d")) - self.failIf(self.find_binding("a", "from a import b")) - self.failIf(self.find_binding("a", "from a.d import b")) - self.failIf(self.find_binding("a", "from d.a import b")) + self.assertTrue(self.find_binding("a", "from x import a")) + self.assertTrue(self.find_binding("a", "from a import a")) + self.assertTrue(self.find_binding("a", "from x import b, c, a, d")) + self.assertTrue(self.find_binding("a", "from x.b import a")) + self.assertTrue(self.find_binding("a", "from x.b import b, c, a, d")) + self.assertFalse(self.find_binding("a", "from a import b")) + self.assertFalse(self.find_binding("a", "from a.d import b")) + self.assertFalse(self.find_binding("a", "from d.a import b")) def test_import_as(self): - self.failUnless(self.find_binding("a", "import b as a")) - self.failUnless(self.find_binding("a", "import b as a, c, a as f, d")) - self.failIf(self.find_binding("a", "import a as f")) - self.failIf(self.find_binding("a", "import b, c as f, d as e")) + self.assertTrue(self.find_binding("a", "import b as a")) + self.assertTrue(self.find_binding("a", "import b as a, c, a as f, d")) + self.assertFalse(self.find_binding("a", "import a as f")) + self.assertFalse(self.find_binding("a", "import b, c as f, d as e")) def test_from_import_as(self): - self.failUnless(self.find_binding("a", "from x import b as a")) - self.failUnless(self.find_binding("a", "from x import g as a, d as b")) - self.failUnless(self.find_binding("a", "from x.b import t as a")) - self.failUnless(self.find_binding("a", "from x.b import g as a, d")) - self.failIf(self.find_binding("a", "from a import b as t")) - self.failIf(self.find_binding("a", "from a.d import b as t")) - self.failIf(self.find_binding("a", "from d.a import b as t")) + self.assertTrue(self.find_binding("a", "from x import b as a")) + self.assertTrue(self.find_binding("a", "from x import g as a, d as b")) + self.assertTrue(self.find_binding("a", "from x.b import t as a")) + self.assertTrue(self.find_binding("a", "from x.b import g as a, d")) + self.assertFalse(self.find_binding("a", "from a import b as t")) + self.assertFalse(self.find_binding("a", "from a.d import b as t")) + self.assertFalse(self.find_binding("a", "from d.a import b as t")) def test_simple_import_with_package(self): - self.failUnless(self.find_binding("b", "import b")) - self.failUnless(self.find_binding("b", "import b, c, d")) - self.failIf(self.find_binding("b", "import b", "b")) - self.failIf(self.find_binding("b", "import b, c, d", "c")) + self.assertTrue(self.find_binding("b", "import b")) + self.assertTrue(self.find_binding("b", "import b, c, d")) + self.assertFalse(self.find_binding("b", "import b", "b")) + self.assertFalse(self.find_binding("b", "import b, c, d", "c")) def test_from_import_with_package(self): - self.failUnless(self.find_binding("a", "from x import a", "x")) - self.failUnless(self.find_binding("a", "from a import a", "a")) - self.failUnless(self.find_binding("a", "from x import *", "x")) - self.failUnless(self.find_binding("a", "from x import b, c, a, d", "x")) - self.failUnless(self.find_binding("a", "from x.b import a", "x.b")) - self.failUnless(self.find_binding("a", "from x.b import *", "x.b")) - self.failUnless(self.find_binding("a", "from x.b import b, c, a, d", "x.b")) - self.failIf(self.find_binding("a", "from a import b", "a")) - self.failIf(self.find_binding("a", "from a.d import b", "a.d")) - self.failIf(self.find_binding("a", "from d.a import b", "a.d")) - self.failIf(self.find_binding("a", "from x.y import *", "a.b")) + self.assertTrue(self.find_binding("a", "from x import a", "x")) + self.assertTrue(self.find_binding("a", "from a import a", "a")) + self.assertTrue(self.find_binding("a", "from x import *", "x")) + self.assertTrue(self.find_binding("a", "from x import b, c, a, d", "x")) + self.assertTrue(self.find_binding("a", "from x.b import a", "x.b")) + self.assertTrue(self.find_binding("a", "from x.b import *", "x.b")) + self.assertTrue(self.find_binding("a", "from x.b import b, c, a, d", "x.b")) + self.assertFalse(self.find_binding("a", "from a import b", "a")) + self.assertFalse(self.find_binding("a", "from a.d import b", "a.d")) + self.assertFalse(self.find_binding("a", "from d.a import b", "a.d")) + self.assertFalse(self.find_binding("a", "from x.y import *", "a.b")) def test_import_as_with_package(self): - self.failIf(self.find_binding("a", "import b.c as a", "b.c")) - self.failIf(self.find_binding("a", "import a as f", "f")) - self.failIf(self.find_binding("a", "import a as f", "a")) + self.assertFalse(self.find_binding("a", "import b.c as a", "b.c")) + self.assertFalse(self.find_binding("a", "import a as f", "f")) + self.assertFalse(self.find_binding("a", "import a as f", "a")) def test_from_import_as_with_package(self): # Because it would take a lot of special-case code in the fixers # to deal with from foo import bar as baz, we'll simply always # fail if there is an "from ... import ... as ..." - self.failIf(self.find_binding("a", "from x import b as a", "x")) - self.failIf(self.find_binding("a", "from x import g as a, d as b", "x")) - self.failIf(self.find_binding("a", "from x.b import t as a", "x.b")) - self.failIf(self.find_binding("a", "from x.b import g as a, d", "x.b")) - self.failIf(self.find_binding("a", "from a import b as t", "a")) - self.failIf(self.find_binding("a", "from a import b as t", "b")) - self.failIf(self.find_binding("a", "from a import b as t", "t")) + self.assertFalse(self.find_binding("a", "from x import b as a", "x")) + self.assertFalse(self.find_binding("a", "from x import g as a, d as b", "x")) + self.assertFalse(self.find_binding("a", "from x.b import t as a", "x.b")) + self.assertFalse(self.find_binding("a", "from x.b import g as a, d", "x.b")) + self.assertFalse(self.find_binding("a", "from a import b as t", "a")) + self.assertFalse(self.find_binding("a", "from a import b as t", "b")) + self.assertFalse(self.find_binding("a", "from a import b as t", "t")) def test_function_def(self): - self.failUnless(self.find_binding("a", "def a(): pass")) - self.failUnless(self.find_binding("a", "def a(b, c, d): pass")) - self.failUnless(self.find_binding("a", "def a(): b = 7")) - self.failIf(self.find_binding("a", "def d(b, (c, a), e): pass")) - self.failIf(self.find_binding("a", "def d(a=7): pass")) - self.failIf(self.find_binding("a", "def d(a): pass")) - self.failIf(self.find_binding("a", "def d(): a = 7")) + self.assertTrue(self.find_binding("a", "def a(): pass")) + self.assertTrue(self.find_binding("a", "def a(b, c, d): pass")) + self.assertTrue(self.find_binding("a", "def a(): b = 7")) + self.assertFalse(self.find_binding("a", "def d(b, (c, a), e): pass")) + self.assertFalse(self.find_binding("a", "def d(a=7): pass")) + self.assertFalse(self.find_binding("a", "def d(a): pass")) + self.assertFalse(self.find_binding("a", "def d(): a = 7")) s = """ def d(): def a(): pass""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_class_def(self): - self.failUnless(self.find_binding("a", "class a: pass")) - self.failUnless(self.find_binding("a", "class a(): pass")) - self.failUnless(self.find_binding("a", "class a(b): pass")) - self.failUnless(self.find_binding("a", "class a(b, c=8): pass")) - self.failIf(self.find_binding("a", "class d: pass")) - self.failIf(self.find_binding("a", "class d(a): pass")) - self.failIf(self.find_binding("a", "class d(b, a=7): pass")) - self.failIf(self.find_binding("a", "class d(b, *a): pass")) - self.failIf(self.find_binding("a", "class d(b, **a): pass")) - self.failIf(self.find_binding("a", "class d: a = 7")) + self.assertTrue(self.find_binding("a", "class a: pass")) + self.assertTrue(self.find_binding("a", "class a(): pass")) + self.assertTrue(self.find_binding("a", "class a(b): pass")) + self.assertTrue(self.find_binding("a", "class a(b, c=8): pass")) + self.assertFalse(self.find_binding("a", "class d: pass")) + self.assertFalse(self.find_binding("a", "class d(a): pass")) + self.assertFalse(self.find_binding("a", "class d(b, a=7): pass")) + self.assertFalse(self.find_binding("a", "class d(b, *a): pass")) + self.assertFalse(self.find_binding("a", "class d(b, **a): pass")) + self.assertFalse(self.find_binding("a", "class d: a = 7")) s = """ class d(): class a(): pass""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_for(self): - self.failUnless(self.find_binding("a", "for a in r: pass")) - self.failUnless(self.find_binding("a", "for a, b in r: pass")) - self.failUnless(self.find_binding("a", "for (a, b) in r: pass")) - self.failUnless(self.find_binding("a", "for c, (a,) in r: pass")) - self.failUnless(self.find_binding("a", "for c, (a, b) in r: pass")) - self.failUnless(self.find_binding("a", "for c in r: a = c")) - self.failIf(self.find_binding("a", "for c in a: pass")) + self.assertTrue(self.find_binding("a", "for a in r: pass")) + self.assertTrue(self.find_binding("a", "for a, b in r: pass")) + self.assertTrue(self.find_binding("a", "for (a, b) in r: pass")) + self.assertTrue(self.find_binding("a", "for c, (a,) in r: pass")) + self.assertTrue(self.find_binding("a", "for c, (a, b) in r: pass")) + self.assertTrue(self.find_binding("a", "for c in r: a = c")) + self.assertFalse(self.find_binding("a", "for c in a: pass")) def test_for_nested(self): s = """ for b in r: for a in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for a, c in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for (a, c) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for (a,) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c, (a, d) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c in b: a = 7""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c in b: d = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ for b in r: for c in a: d = 7""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_if(self): - self.failUnless(self.find_binding("a", "if b in r: a = c")) - self.failIf(self.find_binding("a", "if a in r: d = e")) + self.assertTrue(self.find_binding("a", "if b in r: a = c")) + self.assertFalse(self.find_binding("a", "if a in r: d = e")) def test_if_nested(self): s = """ if b in r: if c in d: a = c""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ if b in r: if c in d: c = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_while(self): - self.failUnless(self.find_binding("a", "while b in r: a = c")) - self.failIf(self.find_binding("a", "while a in r: d = e")) + self.assertTrue(self.find_binding("a", "while b in r: a = c")) + self.assertFalse(self.find_binding("a", "while a in r: d = e")) def test_while_nested(self): s = """ while b in r: while c in d: a = c""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ while b in r: while c in d: c = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except(self): s = """ @@ -354,14 +354,14 @@ a = 6 except: b = 8""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -370,14 +370,14 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_nested(self): s = """ @@ -388,7 +388,7 @@ pass except: b = 8""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -398,7 +398,7 @@ a = 6 except: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -408,7 +408,7 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -420,7 +420,7 @@ a = 6 except: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -432,14 +432,14 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ try: @@ -454,7 +454,7 @@ t = 8 except: o = y""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_finally(self): s = """ @@ -464,21 +464,21 @@ b = 8 finally: a = 9""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 finally: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 finally: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ try: @@ -487,7 +487,7 @@ b = 9 finally: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_finally_nested(self): s = """ @@ -502,7 +502,7 @@ b = 9 finally: c = 9""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -512,7 +512,7 @@ pass finally: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -522,7 +522,7 @@ b = 6 finally: b = 7""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) class Test_touch_import(support.TestCase): From python-checkins at python.org Wed Jul 1 03:15:26 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 01:15:26 -0000 Subject: [Python-checkins] r73728 - in python/branches/release31-maint: Lib/lib2to3/fixes/fix_dict.py Lib/lib2to3/refactor.py Lib/lib2to3/tests/test_fixers.py Lib/lib2to3/tests/test_pytree.py Lib/lib2to3/tests/test_util.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 03:15:26 2009 New Revision: 73728 Log: Merged revisions 73727 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73727 | benjamin.peterson | 2009-06-30 20:06:56 -0500 (Tue, 30 Jun 2009) | 28 lines Merged revisions 73725 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ................ r73725 | benjamin.peterson | 2009-06-30 19:49:09 -0500 (Tue, 30 Jun 2009) | 21 lines Merged revisions 73379,73388,73507,73722 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r73379 | benjamin.peterson | 2009-06-11 18:06:21 -0500 (Thu, 11 Jun 2009) | 1 line use a real conditional expresion ........ r73388 | benjamin.peterson | 2009-06-12 09:44:29 -0500 (Fri, 12 Jun 2009) | 1 line fix typo in last fix ........ r73507 | benjamin.peterson | 2009-06-22 13:32:04 -0500 (Mon, 22 Jun 2009) | 1 line remove svn:executable property ........ r73722 | benjamin.peterson | 2009-06-30 19:44:30 -0500 (Tue, 30 Jun 2009) | 1 line replace fail* with assert* ........ ................ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/lib2to3/fixes/fix_dict.py python/branches/release31-maint/Lib/lib2to3/refactor.py (props changed) python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py python/branches/release31-maint/Lib/lib2to3/tests/test_pytree.py python/branches/release31-maint/Lib/lib2to3/tests/test_util.py Modified: python/branches/release31-maint/Lib/lib2to3/fixes/fix_dict.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixes/fix_dict.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixes/fix_dict.py Wed Jul 1 03:15:26 2009 @@ -66,7 +66,7 @@ new = pytree.Node(syms.power, args) if not special: new.prefix = "" - new = Call(Name(isiter and "iter" or "list"), [new]) + new = Call(Name("iter" if isiter else "list"), [new]) if tail: new = pytree.Node(syms.power, [new] + tail) new.prefix = node.prefix Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py Wed Jul 1 03:15:26 2009 @@ -32,20 +32,20 @@ before = support.reformat(before) after = support.reformat(after) tree = self.refactor.refactor_string(before, self.filename) - self.failUnlessEqual(after, str(tree)) + self.assertEqual(after, str(tree)) return tree def check(self, before, after, ignore_warnings=False): tree = self._check(before, after) - self.failUnless(tree.was_changed) + self.assertTrue(tree.was_changed) if not ignore_warnings: - self.failUnlessEqual(self.fixer_log, []) + self.assertEqual(self.fixer_log, []) def warns(self, before, after, message, unchanged=False): tree = self._check(before, after) - self.failUnless(message in "".join(self.fixer_log)) + self.assertTrue(message in "".join(self.fixer_log)) if not unchanged: - self.failUnless(tree.was_changed) + self.assertTrue(tree.was_changed) def warns_unchanged(self, before, message): self.warns(before, before, message, unchanged=True) @@ -53,7 +53,7 @@ def unchanged(self, before, ignore_warnings=False): self._check(before, before) if not ignore_warnings: - self.failUnlessEqual(self.fixer_log, []) + self.assertEqual(self.fixer_log, []) def assert_runs_after(self, *names): fixes = [self.fixer] Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_pytree.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_pytree.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_pytree.py Wed Jul 1 03:15:26 2009 @@ -81,10 +81,10 @@ def test_leaf_prefix(self): l1 = pytree.Leaf(100, "foo") self.assertEqual(l1.prefix, "") - self.failIf(l1.was_changed) + self.assertFalse(l1.was_changed) l1.prefix = " ##\n\n" self.assertEqual(l1.prefix, " ##\n\n") - self.failUnless(l1.was_changed) + self.assertTrue(l1.was_changed) def test_node(self): l1 = pytree.Leaf(100, "foo") @@ -154,13 +154,13 @@ l3 = pytree.Leaf(100, "bar") n1 = pytree.Node(1000, [l1, l2, l3]) self.assertEqual(n1.children, [l1, l2, l3]) - self.failUnless(isinstance(n1.children, list)) - self.failIf(n1.was_changed) + self.assertTrue(isinstance(n1.children, list)) + self.assertFalse(n1.was_changed) l2new = pytree.Leaf(100, "-") l2.replace(l2new) self.assertEqual(n1.children, [l1, l2new, l3]) - self.failUnless(isinstance(n1.children, list)) - self.failUnless(n1.was_changed) + self.assertTrue(isinstance(n1.children, list)) + self.assertTrue(n1.was_changed) def test_replace_with_list(self): l1 = pytree.Leaf(100, "foo") @@ -170,7 +170,7 @@ l2.replace([pytree.Leaf(100, "*"), pytree.Leaf(100, "*")]) self.assertEqual(str(n1), "foo**bar") - self.failUnless(isinstance(n1.children, list)) + self.assertTrue(isinstance(n1.children, list)) def test_post_order(self): l1 = pytree.Leaf(100, "foo") @@ -186,34 +186,34 @@ def test_changed(self): l1 = pytree.Leaf(100, "f") - self.failIf(l1.was_changed) + self.assertFalse(l1.was_changed) l1.changed() - self.failUnless(l1.was_changed) + self.assertTrue(l1.was_changed) l1 = pytree.Leaf(100, "f") n1 = pytree.Node(1000, [l1]) - self.failIf(n1.was_changed) + self.assertFalse(n1.was_changed) n1.changed() - self.failUnless(n1.was_changed) + self.assertTrue(n1.was_changed) l1 = pytree.Leaf(100, "foo") l2 = pytree.Leaf(100, "+") l3 = pytree.Leaf(100, "bar") n1 = pytree.Node(1000, [l1, l2, l3]) n2 = pytree.Node(1000, [n1]) - self.failIf(l1.was_changed) - self.failIf(n1.was_changed) - self.failIf(n2.was_changed) + self.assertFalse(l1.was_changed) + self.assertFalse(n1.was_changed) + self.assertFalse(n2.was_changed) n1.changed() - self.failUnless(n1.was_changed) - self.failUnless(n2.was_changed) - self.failIf(l1.was_changed) + self.assertTrue(n1.was_changed) + self.assertTrue(n2.was_changed) + self.assertFalse(l1.was_changed) def test_leaf_constructor_prefix(self): for prefix in ("xyz_", ""): l1 = pytree.Leaf(100, "self", prefix=prefix) - self.failUnless(str(l1), prefix + "self") + self.assertTrue(str(l1), prefix + "self") self.assertEqual(l1.prefix, prefix) def test_node_constructor_prefix(self): @@ -221,7 +221,7 @@ l1 = pytree.Leaf(100, "self") l2 = pytree.Leaf(100, "foo", prefix="_") n1 = pytree.Node(1000, [l1, l2], prefix=prefix) - self.failUnless(str(n1), prefix + "self_foo") + self.assertTrue(str(n1), prefix + "self_foo") self.assertEqual(n1.prefix, prefix) self.assertEqual(l1.prefix, prefix) self.assertEqual(l2.prefix, "_") @@ -237,8 +237,8 @@ self.assertEqual(l1.parent, n1) self.assertEqual(n1.parent, None) self.assertEqual(n2.parent, None) - self.failIf(n1.was_changed) - self.failUnless(n2.was_changed) + self.assertFalse(n1.was_changed) + self.assertTrue(n2.was_changed) self.assertEqual(l2.remove(), 1) self.assertEqual(l1.remove(), 0) @@ -246,8 +246,8 @@ self.assertEqual(l1.parent, None) self.assertEqual(n1.parent, None) self.assertEqual(n2.parent, None) - self.failUnless(n1.was_changed) - self.failUnless(n2.was_changed) + self.assertTrue(n1.was_changed) + self.assertTrue(n2.was_changed) def test_remove_parentless(self): n1 = pytree.Node(1000, []) @@ -316,7 +316,7 @@ n2 = pytree.Node(1000, []) p1 = pytree.Node(1000, [n1, n2]) - self.failUnless(n1.next_sibling is n2) + self.assertTrue(n1.next_sibling is n2) self.assertEqual(n2.next_sibling, None) self.assertEqual(p1.next_sibling, None) @@ -325,7 +325,7 @@ l2 = pytree.Leaf(100, "b") p1 = pytree.Node(1000, [l1, l2]) - self.failUnless(l1.next_sibling is l2) + self.assertTrue(l1.next_sibling is l2) self.assertEqual(l2.next_sibling, None) self.assertEqual(p1.next_sibling, None) @@ -334,7 +334,7 @@ n2 = pytree.Node(1000, []) p1 = pytree.Node(1000, [n1, n2]) - self.failUnless(n2.prev_sibling is n1) + self.assertTrue(n2.prev_sibling is n1) self.assertEqual(n1.prev_sibling, None) self.assertEqual(p1.prev_sibling, None) @@ -343,7 +343,7 @@ l2 = pytree.Leaf(100, "b") p1 = pytree.Node(1000, [l1, l2]) - self.failUnless(l2.prev_sibling is l1) + self.assertTrue(l2.prev_sibling is l1) self.assertEqual(l1.prev_sibling, None) self.assertEqual(p1.prev_sibling, None) @@ -416,7 +416,7 @@ r = {} self.assertTrue(pw.match_seq([l1, l3], r)) self.assertEqual(r, {"pl": l3, "pw": [l1, l3]}) - self.assert_(r["pl"] is l3) + self.assertTrue(r["pl"] is l3) r = {} def test_generate_matches(self): @@ -459,5 +459,5 @@ l3 = pytree.Leaf(8, ")") node = pytree.Node(331, [l1, l2, l3]) r = {} - self.assert_(pattern.match(node, r)) + self.assertTrue(pattern.match(node, r)) self.assertEqual(r["args"], [l2]) Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_util.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_util.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_util.py Wed Jul 1 03:15:26 2009 @@ -33,15 +33,15 @@ return fixer_util.is_tuple(parse(string, strip_levels=2)) def test_valid(self): - self.failUnless(self.is_tuple("(a, b)")) - self.failUnless(self.is_tuple("(a, (b, c))")) - self.failUnless(self.is_tuple("((a, (b, c)),)")) - self.failUnless(self.is_tuple("(a,)")) - self.failUnless(self.is_tuple("()")) + self.assertTrue(self.is_tuple("(a, b)")) + self.assertTrue(self.is_tuple("(a, (b, c))")) + self.assertTrue(self.is_tuple("((a, (b, c)),)")) + self.assertTrue(self.is_tuple("(a,)")) + self.assertTrue(self.is_tuple("()")) def test_invalid(self): - self.failIf(self.is_tuple("(a)")) - self.failIf(self.is_tuple("('foo') % (b, c)")) + self.assertFalse(self.is_tuple("(a)")) + self.assertFalse(self.is_tuple("('foo') % (b, c)")) class Test_is_list(support.TestCase): @@ -49,14 +49,14 @@ return fixer_util.is_list(parse(string, strip_levels=2)) def test_valid(self): - self.failUnless(self.is_list("[]")) - self.failUnless(self.is_list("[a]")) - self.failUnless(self.is_list("[a, b]")) - self.failUnless(self.is_list("[a, [b, c]]")) - self.failUnless(self.is_list("[[a, [b, c]],]")) + self.assertTrue(self.is_list("[]")) + self.assertTrue(self.is_list("[a]")) + self.assertTrue(self.is_list("[a, b]")) + self.assertTrue(self.is_list("[a, [b, c]]")) + self.assertTrue(self.is_list("[[a, [b, c]],]")) def test_invalid(self): - self.failIf(self.is_list("[]+[]")) + self.assertFalse(self.is_list("[]+[]")) class Test_Attr(MacroTestCase): @@ -102,9 +102,9 @@ (None, "a", "import b, c, d")) for package, name, import_ in failing_tests: n = self.does_tree_import(package, name, import_ + "\n" + string) - self.failIf(n) + self.assertFalse(n) n = self.does_tree_import(package, name, string + "\n" + import_) - self.failIf(n) + self.assertFalse(n) passing_tests = (("a", "a", "from a import a"), ("x", "a", "from x import a"), @@ -115,9 +115,9 @@ (None, "a", "import b, c, a, d")) for package, name, import_ in passing_tests: n = self.does_tree_import(package, name, import_ + "\n" + string) - self.failUnless(n) + self.assertTrue(n) n = self.does_tree_import(package, name, string + "\n" + import_) - self.failUnless(n) + self.assertTrue(n) def test_in_function(self): self.try_with("def foo():\n\tbar.baz()\n\tstart=3") @@ -127,226 +127,226 @@ return fixer_util.find_binding(name, parse(string), package) def test_simple_assignment(self): - self.failUnless(self.find_binding("a", "a = b")) - self.failUnless(self.find_binding("a", "a = [b, c, d]")) - self.failUnless(self.find_binding("a", "a = foo()")) - self.failUnless(self.find_binding("a", "a = foo().foo.foo[6][foo]")) - self.failIf(self.find_binding("a", "foo = a")) - self.failIf(self.find_binding("a", "foo = (a, b, c)")) + self.assertTrue(self.find_binding("a", "a = b")) + self.assertTrue(self.find_binding("a", "a = [b, c, d]")) + self.assertTrue(self.find_binding("a", "a = foo()")) + self.assertTrue(self.find_binding("a", "a = foo().foo.foo[6][foo]")) + self.assertFalse(self.find_binding("a", "foo = a")) + self.assertFalse(self.find_binding("a", "foo = (a, b, c)")) def test_tuple_assignment(self): - self.failUnless(self.find_binding("a", "(a,) = b")) - self.failUnless(self.find_binding("a", "(a, b, c) = [b, c, d]")) - self.failUnless(self.find_binding("a", "(c, (d, a), b) = foo()")) - self.failUnless(self.find_binding("a", "(a, b) = foo().foo[6][foo]")) - self.failIf(self.find_binding("a", "(foo, b) = (b, a)")) - self.failIf(self.find_binding("a", "(foo, (b, c)) = (a, b, c)")) + self.assertTrue(self.find_binding("a", "(a,) = b")) + self.assertTrue(self.find_binding("a", "(a, b, c) = [b, c, d]")) + self.assertTrue(self.find_binding("a", "(c, (d, a), b) = foo()")) + self.assertTrue(self.find_binding("a", "(a, b) = foo().foo[6][foo]")) + self.assertFalse(self.find_binding("a", "(foo, b) = (b, a)")) + self.assertFalse(self.find_binding("a", "(foo, (b, c)) = (a, b, c)")) def test_list_assignment(self): - self.failUnless(self.find_binding("a", "[a] = b")) - self.failUnless(self.find_binding("a", "[a, b, c] = [b, c, d]")) - self.failUnless(self.find_binding("a", "[c, [d, a], b] = foo()")) - self.failUnless(self.find_binding("a", "[a, b] = foo().foo[a][foo]")) - self.failIf(self.find_binding("a", "[foo, b] = (b, a)")) - self.failIf(self.find_binding("a", "[foo, [b, c]] = (a, b, c)")) + self.assertTrue(self.find_binding("a", "[a] = b")) + self.assertTrue(self.find_binding("a", "[a, b, c] = [b, c, d]")) + self.assertTrue(self.find_binding("a", "[c, [d, a], b] = foo()")) + self.assertTrue(self.find_binding("a", "[a, b] = foo().foo[a][foo]")) + self.assertFalse(self.find_binding("a", "[foo, b] = (b, a)")) + self.assertFalse(self.find_binding("a", "[foo, [b, c]] = (a, b, c)")) def test_invalid_assignments(self): - self.failIf(self.find_binding("a", "foo.a = 5")) - self.failIf(self.find_binding("a", "foo[a] = 5")) - self.failIf(self.find_binding("a", "foo(a) = 5")) - self.failIf(self.find_binding("a", "foo(a, b) = 5")) + self.assertFalse(self.find_binding("a", "foo.a = 5")) + self.assertFalse(self.find_binding("a", "foo[a] = 5")) + self.assertFalse(self.find_binding("a", "foo(a) = 5")) + self.assertFalse(self.find_binding("a", "foo(a, b) = 5")) def test_simple_import(self): - self.failUnless(self.find_binding("a", "import a")) - self.failUnless(self.find_binding("a", "import b, c, a, d")) - self.failIf(self.find_binding("a", "import b")) - self.failIf(self.find_binding("a", "import b, c, d")) + self.assertTrue(self.find_binding("a", "import a")) + self.assertTrue(self.find_binding("a", "import b, c, a, d")) + self.assertFalse(self.find_binding("a", "import b")) + self.assertFalse(self.find_binding("a", "import b, c, d")) def test_from_import(self): - self.failUnless(self.find_binding("a", "from x import a")) - self.failUnless(self.find_binding("a", "from a import a")) - self.failUnless(self.find_binding("a", "from x import b, c, a, d")) - self.failUnless(self.find_binding("a", "from x.b import a")) - self.failUnless(self.find_binding("a", "from x.b import b, c, a, d")) - self.failIf(self.find_binding("a", "from a import b")) - self.failIf(self.find_binding("a", "from a.d import b")) - self.failIf(self.find_binding("a", "from d.a import b")) + self.assertTrue(self.find_binding("a", "from x import a")) + self.assertTrue(self.find_binding("a", "from a import a")) + self.assertTrue(self.find_binding("a", "from x import b, c, a, d")) + self.assertTrue(self.find_binding("a", "from x.b import a")) + self.assertTrue(self.find_binding("a", "from x.b import b, c, a, d")) + self.assertFalse(self.find_binding("a", "from a import b")) + self.assertFalse(self.find_binding("a", "from a.d import b")) + self.assertFalse(self.find_binding("a", "from d.a import b")) def test_import_as(self): - self.failUnless(self.find_binding("a", "import b as a")) - self.failUnless(self.find_binding("a", "import b as a, c, a as f, d")) - self.failIf(self.find_binding("a", "import a as f")) - self.failIf(self.find_binding("a", "import b, c as f, d as e")) + self.assertTrue(self.find_binding("a", "import b as a")) + self.assertTrue(self.find_binding("a", "import b as a, c, a as f, d")) + self.assertFalse(self.find_binding("a", "import a as f")) + self.assertFalse(self.find_binding("a", "import b, c as f, d as e")) def test_from_import_as(self): - self.failUnless(self.find_binding("a", "from x import b as a")) - self.failUnless(self.find_binding("a", "from x import g as a, d as b")) - self.failUnless(self.find_binding("a", "from x.b import t as a")) - self.failUnless(self.find_binding("a", "from x.b import g as a, d")) - self.failIf(self.find_binding("a", "from a import b as t")) - self.failIf(self.find_binding("a", "from a.d import b as t")) - self.failIf(self.find_binding("a", "from d.a import b as t")) + self.assertTrue(self.find_binding("a", "from x import b as a")) + self.assertTrue(self.find_binding("a", "from x import g as a, d as b")) + self.assertTrue(self.find_binding("a", "from x.b import t as a")) + self.assertTrue(self.find_binding("a", "from x.b import g as a, d")) + self.assertFalse(self.find_binding("a", "from a import b as t")) + self.assertFalse(self.find_binding("a", "from a.d import b as t")) + self.assertFalse(self.find_binding("a", "from d.a import b as t")) def test_simple_import_with_package(self): - self.failUnless(self.find_binding("b", "import b")) - self.failUnless(self.find_binding("b", "import b, c, d")) - self.failIf(self.find_binding("b", "import b", "b")) - self.failIf(self.find_binding("b", "import b, c, d", "c")) + self.assertTrue(self.find_binding("b", "import b")) + self.assertTrue(self.find_binding("b", "import b, c, d")) + self.assertFalse(self.find_binding("b", "import b", "b")) + self.assertFalse(self.find_binding("b", "import b, c, d", "c")) def test_from_import_with_package(self): - self.failUnless(self.find_binding("a", "from x import a", "x")) - self.failUnless(self.find_binding("a", "from a import a", "a")) - self.failUnless(self.find_binding("a", "from x import *", "x")) - self.failUnless(self.find_binding("a", "from x import b, c, a, d", "x")) - self.failUnless(self.find_binding("a", "from x.b import a", "x.b")) - self.failUnless(self.find_binding("a", "from x.b import *", "x.b")) - self.failUnless(self.find_binding("a", "from x.b import b, c, a, d", "x.b")) - self.failIf(self.find_binding("a", "from a import b", "a")) - self.failIf(self.find_binding("a", "from a.d import b", "a.d")) - self.failIf(self.find_binding("a", "from d.a import b", "a.d")) - self.failIf(self.find_binding("a", "from x.y import *", "a.b")) + self.assertTrue(self.find_binding("a", "from x import a", "x")) + self.assertTrue(self.find_binding("a", "from a import a", "a")) + self.assertTrue(self.find_binding("a", "from x import *", "x")) + self.assertTrue(self.find_binding("a", "from x import b, c, a, d", "x")) + self.assertTrue(self.find_binding("a", "from x.b import a", "x.b")) + self.assertTrue(self.find_binding("a", "from x.b import *", "x.b")) + self.assertTrue(self.find_binding("a", "from x.b import b, c, a, d", "x.b")) + self.assertFalse(self.find_binding("a", "from a import b", "a")) + self.assertFalse(self.find_binding("a", "from a.d import b", "a.d")) + self.assertFalse(self.find_binding("a", "from d.a import b", "a.d")) + self.assertFalse(self.find_binding("a", "from x.y import *", "a.b")) def test_import_as_with_package(self): - self.failIf(self.find_binding("a", "import b.c as a", "b.c")) - self.failIf(self.find_binding("a", "import a as f", "f")) - self.failIf(self.find_binding("a", "import a as f", "a")) + self.assertFalse(self.find_binding("a", "import b.c as a", "b.c")) + self.assertFalse(self.find_binding("a", "import a as f", "f")) + self.assertFalse(self.find_binding("a", "import a as f", "a")) def test_from_import_as_with_package(self): # Because it would take a lot of special-case code in the fixers # to deal with from foo import bar as baz, we'll simply always # fail if there is an "from ... import ... as ..." - self.failIf(self.find_binding("a", "from x import b as a", "x")) - self.failIf(self.find_binding("a", "from x import g as a, d as b", "x")) - self.failIf(self.find_binding("a", "from x.b import t as a", "x.b")) - self.failIf(self.find_binding("a", "from x.b import g as a, d", "x.b")) - self.failIf(self.find_binding("a", "from a import b as t", "a")) - self.failIf(self.find_binding("a", "from a import b as t", "b")) - self.failIf(self.find_binding("a", "from a import b as t", "t")) + self.assertFalse(self.find_binding("a", "from x import b as a", "x")) + self.assertFalse(self.find_binding("a", "from x import g as a, d as b", "x")) + self.assertFalse(self.find_binding("a", "from x.b import t as a", "x.b")) + self.assertFalse(self.find_binding("a", "from x.b import g as a, d", "x.b")) + self.assertFalse(self.find_binding("a", "from a import b as t", "a")) + self.assertFalse(self.find_binding("a", "from a import b as t", "b")) + self.assertFalse(self.find_binding("a", "from a import b as t", "t")) def test_function_def(self): - self.failUnless(self.find_binding("a", "def a(): pass")) - self.failUnless(self.find_binding("a", "def a(b, c, d): pass")) - self.failUnless(self.find_binding("a", "def a(): b = 7")) - self.failIf(self.find_binding("a", "def d(b, (c, a), e): pass")) - self.failIf(self.find_binding("a", "def d(a=7): pass")) - self.failIf(self.find_binding("a", "def d(a): pass")) - self.failIf(self.find_binding("a", "def d(): a = 7")) + self.assertTrue(self.find_binding("a", "def a(): pass")) + self.assertTrue(self.find_binding("a", "def a(b, c, d): pass")) + self.assertTrue(self.find_binding("a", "def a(): b = 7")) + self.assertFalse(self.find_binding("a", "def d(b, (c, a), e): pass")) + self.assertFalse(self.find_binding("a", "def d(a=7): pass")) + self.assertFalse(self.find_binding("a", "def d(a): pass")) + self.assertFalse(self.find_binding("a", "def d(): a = 7")) s = """ def d(): def a(): pass""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_class_def(self): - self.failUnless(self.find_binding("a", "class a: pass")) - self.failUnless(self.find_binding("a", "class a(): pass")) - self.failUnless(self.find_binding("a", "class a(b): pass")) - self.failUnless(self.find_binding("a", "class a(b, c=8): pass")) - self.failIf(self.find_binding("a", "class d: pass")) - self.failIf(self.find_binding("a", "class d(a): pass")) - self.failIf(self.find_binding("a", "class d(b, a=7): pass")) - self.failIf(self.find_binding("a", "class d(b, *a): pass")) - self.failIf(self.find_binding("a", "class d(b, **a): pass")) - self.failIf(self.find_binding("a", "class d: a = 7")) + self.assertTrue(self.find_binding("a", "class a: pass")) + self.assertTrue(self.find_binding("a", "class a(): pass")) + self.assertTrue(self.find_binding("a", "class a(b): pass")) + self.assertTrue(self.find_binding("a", "class a(b, c=8): pass")) + self.assertFalse(self.find_binding("a", "class d: pass")) + self.assertFalse(self.find_binding("a", "class d(a): pass")) + self.assertFalse(self.find_binding("a", "class d(b, a=7): pass")) + self.assertFalse(self.find_binding("a", "class d(b, *a): pass")) + self.assertFalse(self.find_binding("a", "class d(b, **a): pass")) + self.assertFalse(self.find_binding("a", "class d: a = 7")) s = """ class d(): class a(): pass""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_for(self): - self.failUnless(self.find_binding("a", "for a in r: pass")) - self.failUnless(self.find_binding("a", "for a, b in r: pass")) - self.failUnless(self.find_binding("a", "for (a, b) in r: pass")) - self.failUnless(self.find_binding("a", "for c, (a,) in r: pass")) - self.failUnless(self.find_binding("a", "for c, (a, b) in r: pass")) - self.failUnless(self.find_binding("a", "for c in r: a = c")) - self.failIf(self.find_binding("a", "for c in a: pass")) + self.assertTrue(self.find_binding("a", "for a in r: pass")) + self.assertTrue(self.find_binding("a", "for a, b in r: pass")) + self.assertTrue(self.find_binding("a", "for (a, b) in r: pass")) + self.assertTrue(self.find_binding("a", "for c, (a,) in r: pass")) + self.assertTrue(self.find_binding("a", "for c, (a, b) in r: pass")) + self.assertTrue(self.find_binding("a", "for c in r: a = c")) + self.assertFalse(self.find_binding("a", "for c in a: pass")) def test_for_nested(self): s = """ for b in r: for a in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for a, c in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for (a, c) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for (a,) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c, (a, d) in b: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c in b: a = 7""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ for b in r: for c in b: d = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ for b in r: for c in a: d = 7""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_if(self): - self.failUnless(self.find_binding("a", "if b in r: a = c")) - self.failIf(self.find_binding("a", "if a in r: d = e")) + self.assertTrue(self.find_binding("a", "if b in r: a = c")) + self.assertFalse(self.find_binding("a", "if a in r: d = e")) def test_if_nested(self): s = """ if b in r: if c in d: a = c""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ if b in r: if c in d: c = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_while(self): - self.failUnless(self.find_binding("a", "while b in r: a = c")) - self.failIf(self.find_binding("a", "while a in r: d = e")) + self.assertTrue(self.find_binding("a", "while b in r: a = c")) + self.assertFalse(self.find_binding("a", "while a in r: d = e")) def test_while_nested(self): s = """ while b in r: while c in d: a = c""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ while b in r: while c in d: c = a""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except(self): s = """ @@ -354,14 +354,14 @@ a = 6 except: b = 8""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -370,14 +370,14 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_nested(self): s = """ @@ -388,7 +388,7 @@ pass except: b = 8""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -398,7 +398,7 @@ a = 6 except: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -408,7 +408,7 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -420,7 +420,7 @@ a = 6 except: pass""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -432,14 +432,14 @@ pass except: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 except: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ try: @@ -454,7 +454,7 @@ t = 8 except: o = y""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_finally(self): s = """ @@ -464,21 +464,21 @@ b = 8 finally: a = 9""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 finally: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: b = 8 finally: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) s = """ try: @@ -487,7 +487,7 @@ b = 9 finally: b = 6""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) def test_try_except_finally_nested(self): s = """ @@ -502,7 +502,7 @@ b = 9 finally: c = 9""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -512,7 +512,7 @@ pass finally: a = 6""" - self.failUnless(self.find_binding("a", s)) + self.assertTrue(self.find_binding("a", s)) s = """ try: @@ -522,7 +522,7 @@ b = 6 finally: b = 7""" - self.failIf(self.find_binding("a", s)) + self.assertFalse(self.find_binding("a", s)) class Test_touch_import(support.TestCase): From python-checkins at python.org Wed Jul 1 03:28:55 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 01:28:55 -0000 Subject: [Python-checkins] r73729 - in python/branches/py3k: Doc/c-api/cobject.rst Include/Python.h Include/cobject.h Makefile.pre.in Misc/NEWS Objects/cobject.c Message-ID: Author: benjamin.peterson Date: Wed Jul 1 03:28:55 2009 New Revision: 73729 Log: remove PyCObject Removed: python/branches/py3k/Doc/c-api/cobject.rst python/branches/py3k/Include/cobject.h python/branches/py3k/Objects/cobject.c Modified: python/branches/py3k/Include/Python.h python/branches/py3k/Makefile.pre.in python/branches/py3k/Misc/NEWS Deleted: python/branches/py3k/Doc/c-api/cobject.rst ============================================================================== --- python/branches/py3k/Doc/c-api/cobject.rst Wed Jul 1 03:28:55 2009 +++ (empty file) @@ -1,59 +0,0 @@ -.. highlightlang:: c - -.. _cobjects: - -CObjects --------- - -.. index:: object: CObject - - -.. warning:: - - The CObject API is deprecated as of Python 3.1. Please switch to the new - :ref:`capsules` API. - -.. ctype:: PyCObject - - This subtype of :ctype:`PyObject` represents an opaque value, useful for C - extension modules who need to pass an opaque value (as a :ctype:`void\*` - pointer) through Python code to other C code. It is often used to make a C - function pointer defined in one module available to other modules, so the - regular import mechanism can be used to access C APIs defined in dynamically - loaded modules. - - -.. cfunction:: int PyCObject_Check(PyObject *p) - - Return true if its argument is a :ctype:`PyCObject`. - - -.. cfunction:: PyObject* PyCObject_FromVoidPtr(void* cobj, void (*destr)(void *)) - - Create a :ctype:`PyCObject` from the ``void *`` *cobj*. The *destr* function - will be called when the object is reclaimed, unless it is *NULL*. - - -.. cfunction:: PyObject* PyCObject_FromVoidPtrAndDesc(void* cobj, void* desc, void (*destr)(void *, void *)) - - Create a :ctype:`PyCObject` from the :ctype:`void \*` *cobj*. The *destr* - function will be called when the object is reclaimed. The *desc* argument can - be used to pass extra callback data for the destructor function. - - -.. cfunction:: void* PyCObject_AsVoidPtr(PyObject* self) - - Return the object :ctype:`void \*` that the :ctype:`PyCObject` *self* was - created with. - - -.. cfunction:: void* PyCObject_GetDesc(PyObject* self) - - Return the description :ctype:`void \*` that the :ctype:`PyCObject` *self* was - created with. - - -.. cfunction:: int PyCObject_SetVoidPtr(PyObject* self, void* cobj) - - Set the void pointer inside *self* to *cobj*. The :ctype:`PyCObject` must not - have an associated destructor. Return true on success, false on failure. Modified: python/branches/py3k/Include/Python.h ============================================================================== --- python/branches/py3k/Include/Python.h (original) +++ python/branches/py3k/Include/Python.h Wed Jul 1 03:28:55 2009 @@ -88,7 +88,6 @@ #include "funcobject.h" #include "classobject.h" #include "fileobject.h" -#include "cobject.h" #include "pycapsule.h" #include "traceback.h" #include "sliceobject.h" Deleted: python/branches/py3k/Include/cobject.h ============================================================================== --- python/branches/py3k/Include/cobject.h Wed Jul 1 03:28:55 2009 +++ (empty file) @@ -1,61 +0,0 @@ - -/* - -The CObject module is now *deprecated* as of Python 3.1. -Please use the Capsule API instead; see "pycapsule.h". - -*/ - -#ifndef Py_COBJECT_H -#define Py_COBJECT_H -#ifdef __cplusplus -extern "C" { -#endif - -PyAPI_DATA(PyTypeObject) PyCObject_Type; - -#define PyCObject_Check(op) (Py_TYPE(op) == &PyCObject_Type) - -/* Create a PyCObject from a pointer to a C object and an optional - destructor function. If the second argument is non-null, then it - will be called with the first argument if and when the PyCObject is - destroyed. - -*/ -PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtr( - void *cobj, void (*destruct)(void*)); - - -/* Create a PyCObject from a pointer to a C object, a description object, - and an optional destructor function. If the third argument is non-null, - then it will be called with the first and second arguments if and when - the PyCObject is destroyed. -*/ -PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtrAndDesc( - void *cobj, void *desc, void (*destruct)(void*,void*)); - -/* Retrieve a pointer to a C object from a PyCObject. */ -PyAPI_FUNC(void *) PyCObject_AsVoidPtr(PyObject *); - -/* Retrieve a pointer to a description object from a PyCObject. */ -PyAPI_FUNC(void *) PyCObject_GetDesc(PyObject *); - -/* Import a pointer to a C object from a module using a PyCObject. */ -PyAPI_FUNC(void *) PyCObject_Import(char *module_name, char *cobject_name); - -/* Modify a C object. Fails (==0) if object has a destructor. */ -PyAPI_FUNC(int) PyCObject_SetVoidPtr(PyObject *self, void *cobj); - - -typedef struct { - PyObject_HEAD - void *cobject; - void *desc; - void (*destructor)(void *); -} PyCObject; - - -#ifdef __cplusplus -} -#endif -#endif /* !Py_COBJECT_H */ Modified: python/branches/py3k/Makefile.pre.in ============================================================================== --- python/branches/py3k/Makefile.pre.in (original) +++ python/branches/py3k/Makefile.pre.in Wed Jul 1 03:28:55 2009 @@ -327,7 +327,6 @@ Objects/bytesobject.o \ Objects/cellobject.o \ Objects/classobject.o \ - Objects/cobject.o \ Objects/codeobject.o \ Objects/complexobject.o \ Objects/descrobject.o \ @@ -622,7 +621,6 @@ Include/cellobject.h \ Include/ceval.h \ Include/classobject.h \ - Include/cobject.h \ Include/code.h \ Include/codecs.h \ Include/compile.h \ Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 1 03:28:55 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- The deprecated PyCObject has been removed. + - Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. This fixes a build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead of stdint.h on that platform. Deleted: python/branches/py3k/Objects/cobject.c ============================================================================== --- python/branches/py3k/Objects/cobject.c Wed Jul 1 03:28:55 2009 +++ (empty file) @@ -1,169 +0,0 @@ - -/* Wrap void* pointers to be passed between C modules */ - -#include "Python.h" - - -/* Declarations for objects of type PyCObject */ - -typedef void (*destructor1)(void *); -typedef void (*destructor2)(void *, void*); - - -static int deprecation_exception(void) -{ - return PyErr_WarnEx(PyExc_PendingDeprecationWarning, - "The CObject API is deprecated as of Python 3.1. " - "Please convert to using the Capsule API.", 1); -} - -PyObject * -PyCObject_FromVoidPtr(void *cobj, void (*destr)(void *)) -{ - PyCObject *self; - - if (deprecation_exception()) { - return NULL; - } - - self = PyObject_NEW(PyCObject, &PyCObject_Type); - if (self == NULL) - return NULL; - self->cobject=cobj; - self->destructor=destr; - self->desc=NULL; - - return (PyObject *)self; -} - -PyObject * -PyCObject_FromVoidPtrAndDesc(void *cobj, void *desc, - void (*destr)(void *, void *)) -{ - PyCObject *self; - - if (deprecation_exception()) { - return NULL; - } - - if (!desc) { - PyErr_SetString(PyExc_TypeError, - "PyCObject_FromVoidPtrAndDesc called with null" - " description"); - return NULL; - } - self = PyObject_NEW(PyCObject, &PyCObject_Type); - if (self == NULL) - return NULL; - self->cobject = cobj; - self->destructor = (destructor1)destr; - self->desc = desc; - - return (PyObject *)self; -} - -void * -PyCObject_AsVoidPtr(PyObject *self) -{ - if (self) { - if (self->ob_type == &PyCObject_Type) - return ((PyCObject *)self)->cobject; - PyErr_SetString(PyExc_TypeError, - "PyCObject_AsVoidPtr with non-C-object"); - } - if (!PyErr_Occurred()) - PyErr_SetString(PyExc_TypeError, - "PyCObject_AsVoidPtr called with null pointer"); - return NULL; -} - -void * -PyCObject_GetDesc(PyObject *self) -{ - if (self) { - if (self->ob_type == &PyCObject_Type) - return ((PyCObject *)self)->desc; - PyErr_SetString(PyExc_TypeError, - "PyCObject_GetDesc with non-C-object"); - } - if (!PyErr_Occurred()) - PyErr_SetString(PyExc_TypeError, - "PyCObject_GetDesc called with null pointer"); - return NULL; -} - -void * -PyCObject_Import(char *module_name, char *name) -{ - PyObject *m, *c; - void *r = NULL; - - if ((m = PyImport_ImportModule(module_name))) { - if ((c = PyObject_GetAttrString(m,name))) { - r = PyCObject_AsVoidPtr(c); - Py_DECREF(c); - } - Py_DECREF(m); - } - return r; -} - -int -PyCObject_SetVoidPtr(PyObject *self, void *cobj) -{ - PyCObject* cself = (PyCObject*)self; - if (cself == NULL || !PyCObject_Check(cself) || - cself->destructor != NULL) { - PyErr_SetString(PyExc_TypeError, - "Invalid call to PyCObject_SetVoidPtr"); - return 0; - } - cself->cobject = cobj; - return 1; -} - -static void -PyCObject_dealloc(PyCObject *self) -{ - if (self->destructor) { - if(self->desc) - ((destructor2)(self->destructor))(self->cobject, self->desc); - else - (self->destructor)(self->cobject); - } - PyObject_DEL(self); -} - - -PyDoc_STRVAR(PyCObject_Type__doc__, -"C objects to be exported from one extension module to another\n\ -\n\ -C objects are used for communication between extension modules. They\n\ -provide a way for an extension module to export a C interface to other\n\ -extension modules, so that extension modules can use the Python import\n\ -mechanism to link to one another."); - -PyTypeObject PyCObject_Type = { - PyVarObject_HEAD_INIT(&PyType_Type, 0) - "PyCObject", /*tp_name*/ - sizeof(PyCObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)PyCObject_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_reserved*/ - 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*/ - 0, /*tp_flags*/ - PyCObject_Type__doc__ /*tp_doc*/ -}; From python-checkins at python.org Wed Jul 1 03:31:12 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 01:31:12 -0000 Subject: [Python-checkins] r73730 - python/branches/py3k/Objects/object.c Message-ID: Author: benjamin.peterson Date: Wed Jul 1 03:31:12 2009 New Revision: 73730 Log: remove reference to PyCObject Modified: python/branches/py3k/Objects/object.c Modified: python/branches/py3k/Objects/object.c ============================================================================== --- python/branches/py3k/Objects/object.c (original) +++ python/branches/py3k/Objects/object.c Wed Jul 1 03:31:12 2009 @@ -1720,9 +1720,6 @@ #endif -/* Hack to force loading of cobject.o */ -PyTypeObject *_Py_cobject_hack = &PyCObject_Type; - /* Hack to force loading of pycapsule.o */ PyTypeObject *_PyCapsule_hack = &PyCapsule_Type; From python-checkins at python.org Wed Jul 1 03:32:13 2009 From: python-checkins at python.org (raymond.hettinger) Date: Wed, 01 Jul 2009 01:32:13 -0000 Subject: [Python-checkins] r73731 - in python/branches/py3k: Doc/library/contextlib.rst Lib/contextlib.py Lib/test/test_contextlib.py Message-ID: Author: raymond.hettinger Date: Wed Jul 1 03:32:12 2009 New Revision: 73731 Log: Removed contextlib.nested() Modified: python/branches/py3k/Doc/library/contextlib.rst python/branches/py3k/Lib/contextlib.py python/branches/py3k/Lib/test/test_contextlib.py Modified: python/branches/py3k/Doc/library/contextlib.rst ============================================================================== --- python/branches/py3k/Doc/library/contextlib.rst (original) +++ python/branches/py3k/Doc/library/contextlib.rst Wed Jul 1 03:32:12 2009 @@ -52,55 +52,6 @@ immediately following the :keyword:`with` statement. -.. function:: nested(mgr1[, mgr2[, ...]]) - - Combine multiple context managers into a single nested context manager. - - This function has been deprecated in favour of the multiple manager form - of the :keyword:`with` statement. - - The one advantage of this function over the multiple manager form of the - :keyword:`with` statement is that argument unpacking allows it to be - used with a variable number of context managers as follows:: - - from contextlib import nested - - with nested(*managers): - do_something() - - Note that if the :meth:`__exit__` method of one of the nested context managers - indicates an exception should be suppressed, no exception information will be - passed to any remaining outer context managers. Similarly, if the - :meth:`__exit__` method of one of the nested managers raises an exception, any - previous exception state will be lost; the new exception will be passed to the - :meth:`__exit__` methods of any remaining outer context managers. In general, - :meth:`__exit__` methods should avoid raising exceptions, and in particular they - should not re-raise a passed-in exception. - - This function has two major quirks that have led to it being deprecated. Firstly, - as the context managers are all constructed before the function is invoked, the - :meth:`__new__` and :meth:`__init__` methods of the inner context managers are - not actually covered by the scope of the outer context managers. That means, for - example, that using :func:`nested` to open two files is a programming error as the - first file will not be closed promptly if an exception is thrown when opening - the second file. - - Secondly, if the :meth:`__enter__` method of one of the inner context managers - raises an exception that is caught and suppressed by the :meth:`__exit__` method - of one of the outer context managers, this construct will raise - :exc:`RuntimeError` rather than skipping the body of the :keyword:`with` - statement. - - Developers that need to support nesting of a variable number of context managers - can either use the :mod:`warnings` module to suppress the DeprecationWarning - raised by this function or else use this function as a model for an application - specific implementation. - - .. deprecated:: 3.1 - The with-statement now supports this functionality directly (without the - confusing error prone quirks). - - .. function:: closing(thing) Return a context manager that closes *thing* upon completion of the block. This Modified: python/branches/py3k/Lib/contextlib.py ============================================================================== --- python/branches/py3k/Lib/contextlib.py (original) +++ python/branches/py3k/Lib/contextlib.py Wed Jul 1 03:32:12 2009 @@ -85,51 +85,6 @@ return helper - at contextmanager -def nested(*managers): - """Combine multiple context managers into a single nested context manager. - - This function has been deprecated in favour of the multiple manager form - of the with statement. - - The one advantage of this function over the multiple manager form of the - with statement is that argument unpacking allows it to be - used with a variable number of context managers as follows: - - with nested(*managers): - do_something() - - """ - warn("With-statements now directly support multiple context managers", - DeprecationWarning, 3) - exits = [] - vars = [] - exc = (None, None, None) - try: - for mgr in managers: - exit = mgr.__exit__ - enter = mgr.__enter__ - vars.append(enter()) - exits.append(exit) - yield vars - except: - exc = sys.exc_info() - finally: - while exits: - exit = exits.pop() - try: - if exit(*exc): - exc = (None, None, None) - except: - exc = sys.exc_info() - if exc != (None, None, None): - # Don't rely on sys.exc_info() still containing - # the right information. Another exception may - # have been raised and caught by an exit method - # exc[1] already has the __traceback__ attribute populated - raise exc[1] - - class closing(object): """Context to automatically close something at the end of a block. Modified: python/branches/py3k/Lib/test/test_contextlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_contextlib.py (original) +++ python/branches/py3k/Lib/test/test_contextlib.py Wed Jul 1 03:32:12 2009 @@ -101,128 +101,6 @@ self.assertEqual(baz.foo, 'bar') self.assertEqual(baz.__doc__, "Whee!") -class NestedTestCase(unittest.TestCase): - - # XXX This needs more work - - def test_nested(self): - @contextmanager - def a(): - yield 1 - @contextmanager - def b(): - yield 2 - @contextmanager - def c(): - yield 3 - with nested(a(), b(), c()) as (x, y, z): - self.assertEqual(x, 1) - self.assertEqual(y, 2) - self.assertEqual(z, 3) - - def test_nested_cleanup(self): - state = [] - @contextmanager - def a(): - state.append(1) - try: - yield 2 - finally: - state.append(3) - @contextmanager - def b(): - state.append(4) - try: - yield 5 - finally: - state.append(6) - try: - with nested(a(), b()) as (x, y): - state.append(x) - state.append(y) - 1/0 - except ZeroDivisionError: - self.assertEqual(state, [1, 4, 2, 5, 6, 3]) - else: - self.fail("Didn't raise ZeroDivisionError") - - def test_nested_right_exception(self): - state = [] - @contextmanager - def a(): - yield 1 - class b(object): - def __enter__(self): - return 2 - def __exit__(self, *exc_info): - try: - raise Exception() - except: - pass - try: - with nested(a(), b()) as (x, y): - 1/0 - except ZeroDivisionError: - self.assertEqual((x, y), (1, 2)) - except Exception: - self.fail("Reraised wrong exception") - else: - self.fail("Didn't raise ZeroDivisionError") - - def test_nested_b_swallows(self): - @contextmanager - def a(): - yield - @contextmanager - def b(): - try: - yield - except: - # Swallow the exception - pass - try: - with nested(a(), b()): - 1/0 - except ZeroDivisionError: - self.fail("Didn't swallow ZeroDivisionError") - - def test_nested_break(self): - @contextmanager - def a(): - yield - state = 0 - while True: - state += 1 - with nested(a(), a()): - break - state += 10 - self.assertEqual(state, 1) - - def test_nested_continue(self): - @contextmanager - def a(): - yield - state = 0 - while state < 3: - state += 1 - with nested(a(), a()): - continue - state += 10 - self.assertEqual(state, 3) - - def test_nested_return(self): - @contextmanager - def a(): - try: - yield - except: - pass - def foo(): - with nested(a(), a()): - return 1 - return 10 - self.assertEqual(foo(), 1) - class ClosingTestCase(unittest.TestCase): # XXX This needs more work From python-checkins at python.org Wed Jul 1 03:37:01 2009 From: python-checkins at python.org (raymond.hettinger) Date: Wed, 01 Jul 2009 01:37:01 -0000 Subject: [Python-checkins] r73732 - python/branches/py3k/Doc/library/string.rst Message-ID: Author: raymond.hettinger Date: Wed Jul 1 03:37:01 2009 New Revision: 73732 Log: Remove docs for string.maketrans(). Modified: python/branches/py3k/Doc/library/string.rst Modified: python/branches/py3k/Doc/library/string.rst ============================================================================== --- python/branches/py3k/Doc/library/string.rst (original) +++ python/branches/py3k/Doc/library/string.rst Wed Jul 1 03:37:01 2009 @@ -567,12 +567,3 @@ that this replaces runs of whitespace characters by a single space, and removes leading and trailing whitespace. - -.. function:: maketrans(frm, to) - - Return a translation table suitable for passing to :meth:`bytes.translate`, - that will map each character in *from* into the character at the same - position in *to*; *from* and *to* must have the same length. - - .. deprecated:: 3.1 - Use the :meth:`bytes.maketrans` static method instead. From python-checkins at python.org Wed Jul 1 03:38:24 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 01:38:24 -0000 Subject: [Python-checkins] r73733 - python/branches/py3k/Lib/contextlib.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 03:38:23 2009 New Revision: 73733 Log: remove nested from __all__ Modified: python/branches/py3k/Lib/contextlib.py Modified: python/branches/py3k/Lib/contextlib.py ============================================================================== --- python/branches/py3k/Lib/contextlib.py (original) +++ python/branches/py3k/Lib/contextlib.py Wed Jul 1 03:38:23 2009 @@ -4,7 +4,7 @@ from functools import wraps from warnings import warn -__all__ = ["contextmanager", "nested", "closing"] +__all__ = ["contextmanager", "closing"] class GeneratorContextManager(object): """Helper for @contextmanager decorator.""" From python-checkins at python.org Wed Jul 1 03:39:51 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 01:39:51 -0000 Subject: [Python-checkins] r73734 - python/branches/py3k/Lib/test/test_contextlib.py Message-ID: Author: benjamin.peterson Date: Wed Jul 1 03:39:51 2009 New Revision: 73734 Log: remove warnings supression Modified: python/branches/py3k/Lib/test/test_contextlib.py Modified: python/branches/py3k/Lib/test/test_contextlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_contextlib.py (original) +++ python/branches/py3k/Lib/test/test_contextlib.py Wed Jul 1 03:39:51 2009 @@ -9,7 +9,6 @@ import threading from contextlib import * # Tests __all__ from test import support -import warnings class ContextManagerTestCase(unittest.TestCase): @@ -210,9 +209,7 @@ # This is needed to make the test actually run under regrtest.py! def test_main(): - with warnings.catch_warnings(): - warnings.simplefilter('ignore') - support.run_unittest(__name__) + support.run_unittest(__name__) if __name__ == "__main__": test_main() From python-checkins at python.org Wed Jul 1 03:45:12 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 01:45:12 -0000 Subject: [Python-checkins] r73735 - python/branches/py3k/Include/abstract.h Message-ID: Author: benjamin.peterson Date: Wed Jul 1 03:45:12 2009 New Revision: 73735 Log: remove comment about PyNumber_Int Modified: python/branches/py3k/Include/abstract.h Modified: python/branches/py3k/Include/abstract.h ============================================================================== --- python/branches/py3k/Include/abstract.h (original) +++ python/branches/py3k/Include/abstract.h Wed Jul 1 03:45:12 2009 @@ -777,12 +777,6 @@ is cleared and the value is clipped. */ - /* - PyNumber_Int used to be found here. It's now in Include/intobject.h, - where it is defined to be an alias for PyNumber_Long. New code - should use PyNumber_Long instead. - */ - PyAPI_FUNC(PyObject *) PyNumber_Long(PyObject *o); /* From buildbot at python.org Wed Jul 1 03:57:35 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 01 Jul 2009 01:57:35 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/888 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson,raymond.hettinger BUILD FAILED: failed test Excerpt from the test logfile: 3 tests failed: test_binhex test_contextlib test_importlib ====================================================================== ERROR: test_binhex (test.test_binhex.BinHexTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_binhex.py", line 32, in test_binhex binhex.hexbin(self.fname2, self.fname1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 445, in hexbin ifp = HexBin(inp) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 364, in __init__ self._readheader() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 384, in _readheader rest = self._read(1 + 4 + 4 + 2 + 4 + 4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 367, in _read data = self.ifp.read(len) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 300, in read self._fill(wtd - len(self.post_buffer)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/binhex.py", line 337, in _fill binascii.rledecode_hqx(self.pre_buffer[:mark]) binascii.Error: Orphaned RLE code at start Traceback (most recent call last): File "./Lib/test/regrtest.py", line 692, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_contextlib.py", line 10, in from contextlib import * # Tests __all__ AttributeError: 'module' object has no attribute 'nested' Traceback (most recent call last): File "./Lib/test/regrtest.py", line 699, in runtest_inner indirect_test() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_importlib.py", line 6, in test_main run_unittest(importlib.test.test_suite('importlib.test')) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/importlib/test/__init__.py", line 22, in test_suite package_tests = getattr(sys.modules[package_name], 'test_suite')() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/importlib/test/import_/__init__.py", line 8, in test_suite return importlib.test.test_suite('importlib.test.import_', directory) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/importlib/test/__init__.py", line 16, in test_suite __import__(module_name, level=0) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/importlib/test/import_/test_path.py", line 5, in from contextlib import nested ImportError: cannot import name nested make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Wed Jul 1 04:24:13 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Wed, 01 Jul 2009 02:24:13 -0000 Subject: [Python-checkins] r73736 - in python/branches/py3k/Lib/tkinter: test test/test_ttk Message-ID: Author: hirokazu.yamamoto Date: Wed Jul 1 04:24:13 2009 New Revision: 73736 Log: Added svn:ignore. Modified: python/branches/py3k/Lib/tkinter/ (props changed) python/branches/py3k/Lib/tkinter/test/ (props changed) python/branches/py3k/Lib/tkinter/test/test_ttk/ (props changed) From python-checkins at python.org Wed Jul 1 04:36:01 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Wed, 01 Jul 2009 02:36:01 -0000 Subject: [Python-checkins] r73737 - in python/branches/py3k: PC/VC6/pythoncore.dsp PC/VS7.1/pythoncore.vcproj PC/VS8.0/pythoncore.vcproj PCbuild/pythoncore.vcproj Message-ID: Author: hirokazu.yamamoto Date: Wed Jul 1 04:36:00 2009 New Revision: 73737 Log: Updated MSVC project files to follow PyCObject removal (r73729) Modified: python/branches/py3k/PC/VC6/pythoncore.dsp python/branches/py3k/PC/VS7.1/pythoncore.vcproj python/branches/py3k/PC/VS8.0/pythoncore.vcproj python/branches/py3k/PCbuild/pythoncore.vcproj Modified: python/branches/py3k/PC/VC6/pythoncore.dsp ============================================================================== --- python/branches/py3k/PC/VC6/pythoncore.dsp (original) +++ python/branches/py3k/PC/VC6/pythoncore.dsp Wed Jul 1 04:36:00 2009 @@ -277,10 +277,6 @@ # End Source File # Begin Source File -SOURCE=..\..\Objects\cobject.c -# End Source File -# Begin Source File - SOURCE=..\..\Python\codecs.c # End Source File # Begin Source File Modified: python/branches/py3k/PC/VS7.1/pythoncore.vcproj ============================================================================== --- python/branches/py3k/PC/VS7.1/pythoncore.vcproj (original) +++ python/branches/py3k/PC/VS7.1/pythoncore.vcproj Wed Jul 1 04:36:00 2009 @@ -487,9 +487,6 @@ RelativePath="..\..\Modules\cmathmodule.c"> - - - - @@ -1383,10 +1379,6 @@ > - - Modified: python/branches/py3k/PCbuild/pythoncore.vcproj ============================================================================== --- python/branches/py3k/PCbuild/pythoncore.vcproj (original) +++ python/branches/py3k/PCbuild/pythoncore.vcproj Wed Jul 1 04:36:00 2009 @@ -675,10 +675,6 @@ > - - @@ -1388,10 +1384,6 @@ > - - From python-checkins at python.org Wed Jul 1 04:49:10 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 01 Jul 2009 02:49:10 -0000 Subject: [Python-checkins] r73738 - python/trunk/Doc/library/multiprocessing.rst Message-ID: Author: r.david.murray Date: Wed Jul 1 04:49:10 2009 New Revision: 73738 Log: Make punctuation prettier and break up run-on sentence. Modified: python/trunk/Doc/library/multiprocessing.rst Modified: python/trunk/Doc/library/multiprocessing.rst ============================================================================== --- python/trunk/Doc/library/multiprocessing.rst (original) +++ python/trunk/Doc/library/multiprocessing.rst Wed Jul 1 04:49:10 2009 @@ -2107,7 +2107,7 @@ os.close(sys.stdin.fileno()) - In the :meth:`multiprocessing.Process._bootstrap` method of - this resulted + in the :meth:`multiprocessing.Process._bootstrap` method --- this resulted in issues with processes-in-processes. This has been changed to:: sys.stdin.close() @@ -2116,7 +2116,7 @@ Which solves the fundamental issue of processes colliding with each other resulting in a bad file descriptor error, but introduces a potential danger to applications which replace :func:`sys.stdin` with a "file-like object" - with output buffering, this danger is that if multiple processes call + with output buffering. This danger is that if multiple processes call :func:`close()` on this file-like object, it could result in the same data being flushed to the object multiple times, resulting in corruption. From python-checkins at python.org Wed Jul 1 04:51:01 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 01 Jul 2009 02:51:01 -0000 Subject: [Python-checkins] r73739 - python/branches/py3k/Lib/importlib/test/import_/test_path.py Message-ID: Author: r.david.murray Date: Wed Jul 1 04:51:00 2009 New Revision: 73739 Log: Remove unused import for function that no longer exists. Modified: python/branches/py3k/Lib/importlib/test/import_/test_path.py Modified: python/branches/py3k/Lib/importlib/test/import_/test_path.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/import_/test_path.py (original) +++ python/branches/py3k/Lib/importlib/test/import_/test_path.py Wed Jul 1 04:51:00 2009 @@ -2,7 +2,6 @@ from importlib import machinery from .. import util from . import util as import_util -from contextlib import nested import imp import os import sys From python-checkins at python.org Wed Jul 1 05:34:25 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 03:34:25 -0000 Subject: [Python-checkins] r73740 - python/branches/py3k/Doc/c-api/concrete.rst Message-ID: Author: benjamin.peterson Date: Wed Jul 1 05:34:25 2009 New Revision: 73740 Log: remove cobject reference Modified: python/branches/py3k/Doc/c-api/concrete.rst Modified: python/branches/py3k/Doc/c-api/concrete.rst ============================================================================== --- python/branches/py3k/Doc/c-api/concrete.rst (original) +++ python/branches/py3k/Doc/c-api/concrete.rst Wed Jul 1 05:34:25 2009 @@ -102,7 +102,6 @@ slice.rst weakref.rst capsule.rst - cobject.rst cell.rst gen.rst datetime.rst From python-checkins at python.org Thu Jul 2 01:45:19 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 01 Jul 2009 23:45:19 -0000 Subject: [Python-checkins] r73750 - python/trunk/Python/ceval.c Message-ID: Author: benjamin.peterson Date: Thu Jul 2 01:45:19 2009 New Revision: 73750 Log: small optimization: avoid popping the current block until we have to Modified: python/trunk/Python/ceval.c Modified: python/trunk/Python/ceval.c ============================================================================== --- python/trunk/Python/ceval.c (original) +++ python/trunk/Python/ceval.c Thu Jul 2 01:45:19 2009 @@ -2806,20 +2806,20 @@ fast_block_end: while (why != WHY_NOT && f->f_iblock > 0) { - PyTryBlock *b = PyFrame_BlockPop(f); + /* Peek at the current block. */ + PyTryBlock *b = &f->f_blockstack[f->f_iblock - 1]; assert(why != WHY_YIELD); if (b->b_type == SETUP_LOOP && why == WHY_CONTINUE) { - /* For a continue inside a try block, - don't pop the block for the loop. */ - PyFrame_BlockSetup(f, b->b_type, b->b_handler, - b->b_level); why = WHY_NOT; JUMPTO(PyInt_AS_LONG(retval)); Py_DECREF(retval); break; } + /* Now we have to pop the block. */ + f->f_iblock--; + while (STACK_LEVEL() > b->b_level) { v = POP(); Py_XDECREF(v); From python-checkins at python.org Thu Jul 2 10:45:29 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 08:45:29 -0000 Subject: [Python-checkins] r73751 - peps/trunk/pep-0376.txt Message-ID: Author: tarek.ziade Date: Thu Jul 2 10:45:29 2009 New Revision: 73751 Log: clarified the egg.info part and added references about fedora and debian Modified: peps/trunk/pep-0376.txt Modified: peps/trunk/pep-0376.txt ============================================================================== --- peps/trunk/pep-0376.txt (original) +++ peps/trunk/pep-0376.txt Thu Jul 2 10:45:29 2009 @@ -85,23 +85,35 @@ Some executable scripts, such as `rst2html.py`, will also be added in the `bin` directory of the Python installation. -The problem is that many people use `easy_install` (from the `setuptools` -project [#setuptools]_) or `pip` [#pip]_ to install their packages, and -these third-party tools do not install packages in the same way that Distutils -does: - -- `easy_install` creates an `EGG-INFO` directory inside an `.egg` directory - and adds a `PKG-INFO` file inside this directory. The `.egg` directory - contains all the elements of the distribution that are supposed to be - installed in `site-packages` and is placed in the `site-packages` - directory. - -- `pip` creates an `.egg-info` directory inside the `site-packages` directory - and adds a `PKG-INFO` file inside it. Elements of the distribution are then - installed in various places like Distutils does. +Another project called `setuptools` [#setuptools]_ has introduced two new +formats to install distributions: -They both add other files in the `EGG-INFO` or `.egg-info` directory and -create or modify `.pth` files. +- a self-contained `.egg` directory, that contains all the distribution files + and the distribution metadata in a file called `PKG-INFO` in a subdirectory + called `EGG-INFO`. Other files are created in that directory for + `setuptools` needs. + +- a `.egg-info` directory installed in `site-packages`, that contains the same + files `EGG-INFO` has in the `.egg` format. + +The first format is automatically used when you install a distribution that +uses ``setuptools.setup`` function in its setup.py file, instead of +``distutils.core.setup``. + +The `setuptools` project also provides an executable script called +`easy_install` that will install all istributions, including distutils-based +ones in self-contained `.egg` directories. + +If you want to have a standalone `.egg.info` directory with setuptools-based +distributions, e.g. the second `setuptools` format, you have to force it +using the `-?single-version-externally-managed` option **or** the `--root` +option. + +This option is used by : + +- the `pip` [#pip]_ installer +- the Fedora packagers [#fedora]_. +- the Debian packagers [#debian]_. Uninstall information --------------------- @@ -139,8 +151,8 @@ .egg-info becomes a directory ============================= -The `EggFormats` standard from setuptools proposes two formats to install the -metadata information of a distribution: +As explained earlier, the `EggFormats` standard from `setuptools` proposes two +formats to install the metadata information of a distribution: - A self-contained directory that can be zipped or left unzipped and contains the distribution files *and* an `.egg-info` directory containing the @@ -300,7 +312,7 @@ =================== To use the `.egg-info` directory content, we need to add in the standard -library a set of APIs. The best place to put these APIs seems to be `pkgutil`. +library a set of APIs. The best place to put these APIs is `pkgutil`. The API is organized in five classes that work with directories and Zip files (so it works with files included in Zip files, see PEP 273 for more details @@ -387,7 +399,7 @@ Other public methods and attributes are similar to ``Distribution``. DistributionDir class ---------------------------- +--------------------- A new class called ``DistributionDir`` is created with a path corresponding to a directory. For each `.egg-info` directory founded in @@ -409,7 +421,7 @@ ZippedDistributionDir class ---------------------------------- +--------------------------- A ``ZippedDistributionDir`` is provided. It overrides the ``DistributionDir`` class so its methods work with a Zip file. @@ -422,7 +434,7 @@ DistributionDirMap class ------------------------------ +------------------------ A new class called ``DistributionDirMap`` is created. It's a collection of ``DistributionDir`` and ``ZippedDistributionDir`` instances. @@ -687,6 +699,11 @@ .. [#pep278] http://www.python.org/dev/peps/pep-0278 +.. [#fedora] + http://fedoraproject.org/wiki/Packaging/Python/Eggs#Providing_Eggs_using_Setuptools + +.. [#debian] + http://wiki.debian.org/DebianPython/NewPolicy Aknowledgments ============== From python-checkins at python.org Thu Jul 2 11:46:05 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 09:46:05 -0000 Subject: [Python-checkins] r73752 - peps/trunk/pep-0376.txt Message-ID: Author: tarek.ziade Date: Thu Jul 2 11:46:04 2009 New Revision: 73752 Log: removed implementation details from the PEP. A reference is kept Modified: peps/trunk/pep-0376.txt Modified: peps/trunk/pep-0376.txt ============================================================================== --- peps/trunk/pep-0376.txt (original) +++ peps/trunk/pep-0376.txt Thu Jul 2 11:46:04 2009 @@ -85,29 +85,30 @@ Some executable scripts, such as `rst2html.py`, will also be added in the `bin` directory of the Python installation. -Another project called `setuptools` [#setuptools]_ has introduced two new -formats to install distributions: +Another project called `setuptools` [#setuptools]_ has two other formats +to install distributions, called `EggFormats` [#eggformats]_: - a self-contained `.egg` directory, that contains all the distribution files and the distribution metadata in a file called `PKG-INFO` in a subdirectory - called `EGG-INFO`. Other files are created in that directory for - `setuptools` needs. + called `EGG-INFO`. `setuptools` creates other fils in that directory that can + be considered as complementary metadata. - a `.egg-info` directory installed in `site-packages`, that contains the same files `EGG-INFO` has in the `.egg` format. The first format is automatically used when you install a distribution that -uses ``setuptools.setup`` function in its setup.py file, instead of -``distutils.core.setup``. +uses the ``setuptools.setup`` function in its setup.py file, instead of +the ``distutils.core.setup`` one. The `setuptools` project also provides an executable script called -`easy_install` that will install all istributions, including distutils-based -ones in self-contained `.egg` directories. +`easy_install` [#easyinstall]_ that will install all distributions, including +distutils-based ones in self-contained `.egg` directories. -If you want to have a standalone `.egg.info` directory with setuptools-based -distributions, e.g. the second `setuptools` format, you have to force it -using the `-?single-version-externally-managed` option **or** the `--root` -option. +If you want to have a standalone `.egg.info` directory distributions, e.g. +the second `setuptools` format, you have to force it when you work +with a setuptools-based distribution or with the `easy_install` script. +You can force it by using the `-?single-version-externally-managed` option +**or** the `--root` option. This option is used by : @@ -140,8 +141,8 @@ To address those issues, this PEP proposes a few changes: -- A new `.egg-info` structure using a directory, based on one form of - the `EggFormats` standard from `setuptools` [#eggformats]_. +- A new `.egg-info` structure using a directory, based on one format of + the `EggFormats` standard from `setuptools`. - New APIs in `pkgutil` to be able to query the information of installed distributions. - A de-facto replacement for PEP 262 @@ -314,18 +315,31 @@ To use the `.egg-info` directory content, we need to add in the standard library a set of APIs. The best place to put these APIs is `pkgutil`. -The API is organized in five classes that work with directories and Zip files -(so it works with files included in Zip files, see PEP 273 for more details -[#pep273]_. - -- ``Distribution``: manages an `.egg-info` directory. -- ``ZippedDistribution``: manages an `.egg-info` directory contained in a zip - file. -- ``DistributionDir``: manages a directory that contains some `.egg-info` - directories. -- ``ZippedDistributionDir``: manages a zipped directory that contains - some `.egg.info` directory. -- ``DistributionDirMap``: manages ``DistributionDir`` instances. +Query functions +--------------- + +The new functions added in the ``pkgutil`` are : + +- ``get_distributions()`` -> iterator of ``Distribution`` instances. + + Provides an iterator that looks for ``.egg-info`` directories in + ``sys.path`` and returns ``Distribution`` instances for + each one of them. + +- ``get_distribution(name)`` -> ``Distribution`` or None. + + Scans all elements in ``sys.path`` and looks for all directories ending with + ``.egg-info``. Returns a ``Distribution`` corresponding to the + ``.egg-info`` directory that contains a PKG-INFO that matches `name` + for the `name` metadata. + + Notice that there should be at most one result. The first result founded + will be returned. If the directory is not found, returns None. + +- ``get_file_users(path)`` -> iterator of ``Distribution`` instances. + + Iterates over all distributions to find out which distributions uses ``path``. + ``path`` can be a local absolute path or a relative '/'-separated path. Distribution class ------------------ @@ -385,145 +399,14 @@ If ``local`` is ``True``, each path is transformed into a local absolute path. Otherwise the raw value from `RECORD` is returned. -ZippedDistribution class ------------------------- - -A ``ZippedDistribution`` class is provided. It overrides the ``Distribution`` -class so its methods work with an `.egg.info` directory located in a zip file. - -``ZippedDistribution(zipfile, path)`` -> instance - - Creates a ``ZippedDistribution`` instance for the given relative ``path`` - located in the ``zipfile`` file. - -Other public methods and attributes are similar to ``Distribution``. - -DistributionDir class ---------------------- - -A new class called ``DistributionDir`` is created with a path -corresponding to a directory. For each `.egg-info` directory founded in -`path`, the class creates a corresponding ``Distribution``. - -The class is a ``set`` of ``Distribution`` instances. ``DistributionDir`` -provides a ``path`` attribute corresponding to the path is was created with. - -``DistributionDir(path)`` -> instance - - Creates a ``DistributionDir`` instance for the given ``path``. - -It also provides one extra method besides the ones from ``set``: - -- ``get_file_users(path)`` -> Iterator of ``Distribution``. - - Returns all ``Distribution`` which uses ``path``, by calling - ``Distribution.uses(path)`` on all ``Distribution`` instances. - - -ZippedDistributionDir class ---------------------------- - -A ``ZippedDistributionDir`` is provided. It overrides the -``DistributionDir`` class so its methods work with a Zip file. - -``ZippedDistributionDir(path)`` -> instance - - Creates a ``ZippedDistributionDir`` instance for the given ``path``. - -Other public methods and attributes are similar to ``DistributionDir``. - - -DistributionDirMap class ------------------------- - -A new class called ``DistributionDirMap`` is created. It's a collection of -``DistributionDir`` and ``ZippedDistributionDir`` instances. -``DistributionDirMap(paths=None, use_cache=True)`` -> instance +Notice that the API is organized in five classes that work with directories +and Zip files (so it works with files included in Zip files, see PEP 273 for +more details [#pep273]_). These classes are described in the documentation +of the prototype implementation for interested readers [#prototype]_. - If ``paths`` is not not, it's a sequence of paths the constructor loads - in the instance. - - The constructor also takes an optional ``use_cache`` argument. - When it's ``True``, ``DistributionDirMap`` will use a global - cache to reduce the numbers of I/O accesses and speed up the lookups. - - The cache is a global mapping containing ``DistributionDir`` and - ``ZippedDistributionDir`` instances. When a - ``DistributionDirMap`` object is created, it will use the cache to - add an entry for each path it visits, or reuse existing entries. The - cache usage can be disabled at any time with the ``use_cache`` attribute. - - The cache can also be emptied with the global ``purge_cache`` function. - -The class is a ``dict`` where the values are ``DistributionDir`` -and ``ZippedDistributionDir`` instances and the keys are their path -attributes. - -``DistributionDirMap`` also provides the following methods besides the ones -from ``dict``: - -- ``load(*paths)`` - - Creates and adds ``DistributionDir`` (or - ``ZippedDistributionDir``) instances corresponding to ``paths``. - -- ``reload()`` - - Reloads existing entries. - -- ``get_distributions()`` -> Iterator of ``Distribution`` (or - ``ZippedDistribution``) instances. - - Iterates over all ``Distribution`` and ``ZippedDistribution`` contained - in ``DistributionDir`` and ``ZippedDistributionDir`` instances. - -- ``get_distribution(dist_name)`` -> ``Distribution`` (or - ``ZippedDistribution``) or None. - - Returns a ``Distribution`` (or ``ZippedDistribution``) instance for the - given distribution name. If not found, returns None. - -- ``get_file_users(path)`` -> Iterator of ``Distribution`` (or - ``ZippedDistribution``) instances. - - Iterates over all distributions to find out which distributions use the file. - Returns ``Distribution`` (or ``ZippedDistribution``) instances. - -.egg-info functions -------------------- - -The new functions added in the ``pkgutil`` are : - -- ``get_distributions()`` -> iterator of ``Distribution`` (or - ``ZippedDistribution``) instance. - - Provides an iterator that looks for ``.egg-info`` directories in ``sys.path`` - and returns ``Distribution`` (or ``ZippedDistribution``) instances for - each one of them. - -- ``get_distribution(name)`` -> ``Distribution`` (or ``ZippedDistribution``) - or None. - - Scans all elements in ``sys.path`` and looks for all directories ending with - ``.egg-info``. Returns a ``Distribution`` (or ``ZippedDistribution``) - corresponding to the ``.egg-info`` directory that contains a PKG-INFO that - matches `name` for the `name` metadata. - - Notice that there should be at most one result. The first result founded - will be returned. If the directory is not found, returns None. - -- ``get_file_users(path)`` -> iterator of ``Distribution`` (or - ``ZippedDistribution``) instances. - - Iterates over all distributions to find out which distributions uses ``path``. - ``path`` can be a local absolute path or a relative '/'-separated path. - -All these functions use the same global instance of ``DistributionDirMap`` -to use the cache. Notice that the cache is never emptied explicitely. - -Example -------- +Usage example +------------- Let's use some of the new APIs with our `docutils` example:: @@ -687,6 +570,9 @@ .. [#setuptools] http://peak.telecommunity.com/DevCenter/setuptools +.. [#easyinstall] + http://peak.telecommunity.com/DevCenter/EasyInstall + .. [#pip] http://pypi.python.org/pypi/pip @@ -705,6 +591,9 @@ .. [#debian] http://wiki.debian.org/DebianPython/NewPolicy +.. [#prototype] + http://bitbucket.org/tarek/pep376/ + Aknowledgments ============== From python-checkins at python.org Thu Jul 2 12:13:24 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 10:13:24 -0000 Subject: [Python-checkins] r73753 - peps/trunk/pep-0376.txt Message-ID: Author: tarek.ziade Date: Thu Jul 2 12:13:23 2009 New Revision: 73753 Log: removed the future tense usage when not required Modified: peps/trunk/pep-0376.txt Modified: peps/trunk/pep-0376.txt ============================================================================== --- peps/trunk/pep-0376.txt (original) +++ peps/trunk/pep-0376.txt Thu Jul 2 12:13:23 2009 @@ -73,7 +73,7 @@ create an `.egg-info` file in the `purelib` directory. For example, for the `docutils` distribution, which contains one package an -extra module and executable scripts, three elements will be installed in +extra module and executable scripts, three elements are installed in `site-packages`: - `docutils`: The ``docutils`` package. @@ -82,7 +82,7 @@ as described in PEP 314 [#pep314]_. This file corresponds to the file called `PKG-INFO`, built by the `sdist` command. -Some executable scripts, such as `rst2html.py`, will also be added in the +Some executable scripts, such as `rst2html.py`, are also be added in the `bin` directory of the Python installation. Another project called `setuptools` [#setuptools]_ has two other formats @@ -101,7 +101,7 @@ the ``distutils.core.setup`` one. The `setuptools` project also provides an executable script called -`easy_install` [#easyinstall]_ that will install all distributions, including +`easy_install` [#easyinstall]_ that installs all distributions, including distutils-based ones in self-contained `.egg` directories. If you want to have a standalone `.egg.info` directory distributions, e.g. @@ -166,20 +166,20 @@ install the metadata of a distribution : a distinct `.egg-info` directory located in the site-packages directory, containing the metadata. -This `.egg-info` directory will contain a `PKG-INFO` file built by the +This `.egg-info` directory contains a `PKG-INFO` file built by the `write_pkg_file` method of the `Distribution` class in Distutils. -This change will not impact Python itself because the metadata files are not +This change is not impacting Python itself because the metadata files are not used anywhere yet in the standard library besides Distutils. -However, it will impact the `setuptools` and `pip` projects, but given +However, it is impacting the `setuptools` and `pip` projects, but given the fact that they already work with a directory that contains a `PKG-INFO` file, the change will have no deep consequences. That said, packages installed -other existing pre-standardisation formats will be ignored by the new +other existing pre-standardisation formats are ignored by the new system, as explained in the backward compatibility section of this document. Let's take an example of the new format with the `docutils` distribution. -The elements that will be installed in `site-packages` will become:: +The elements installed in `site-packages` are:: - docutils/ - roman.py @@ -215,13 +215,13 @@ Adding a RECORD file in the .egg-info directory =============================================== -A `RECORD` file will be added inside the `.egg-info` directory at installation -time. The `RECORD` file will hold the list of installed files. These correspond +A `RECORD` file is added inside the `.egg-info` directory at installation +time. The `RECORD` file holds the list of installed files. These correspond to the files listed by the `record` option of the `install` command, and will -be generated by default. This will allow uninstallation, as explained later in -this PEP. The `install` command will also provide an option to prevent the -`RECORD` file from being written and this option should be used when creating -system packages. +be generated by default. This allows the implementation of an uninstallation +feature, as explained later in this PEP. The `install` command also provides +an option to prevent the `RECORD` file from being written and this option +should be used when creating system packages. Third-party installation tools also should not overwrite or delete files that are not in a RECORD file without prompting or warning. @@ -244,7 +244,7 @@ - the file's full **path** - if the installed file is located in the directory where the `.egg-info` - directory of the package is located, it will be a '/'-separated relative + directory of the package is located, it's a '/'-separated relative path, no matter what the target system is. This makes this information cross-compatible and allows simple installations to be relocatable. @@ -252,26 +252,25 @@ '/'-separated absolute path is used. - the **MD5** hash of the file, encoded in hex. Notice that `pyc` and `pyo` - generated files will not have a hash because they are automatically produced + generated files don't have any hash because they are automatically produced from `py` files. So checking the hash of the corresponding `py` file is enough to decide if the file and its associated `pyc` or `pyo` files have changed. - the file's size in bytes -The ``csv`` module will be used to generate this file, so the field -separator will be ",". Any "," characters found within a field -will be escaped automatically by ``csv``. +The ``csv`` module is used to generate this file, so the field separator is +",". Any "," characters found within a field is escaped automatically by ``csv``. -When the file is read, the `U` option will be used so the universal newline -support (see PEP 278 [#pep278]_) will be activated, avoiding any trouble +When the file is read, the `U` option is used so the universal newline +support (see PEP 278 [#pep278]_) is activated, avoiding any trouble reading a file produced on a platform that uses a different new line terminator. Example ------- -Back to our `docutils` example, we will have:: +Back to our `docutils` example, we now have:: - docutils/ - roman.py @@ -279,7 +278,7 @@ PKG-INFO RECORD -And the RECORD file will contain (extract):: +And the RECORD file contains (extract):: docutils/__init__.py,b690274f621402dda63bf11ba5373bf2,9544 docutils/core.py,9c4b84aff68aa55f2e9bf70481b94333,66188 @@ -297,13 +296,13 @@ Adding an INSTALLER file in the .egg-info directory =================================================== -The `install` command will have a new option called `installer`. This option +The `install` command has a new option called `installer`. This option is the name of the tool used to invoke the installation. It's an normalized lower-case string matching `[a-z0-9_\-\.]`. $ python setup.py install --installer=pkg-system -It will default to `distutils` if not provided. +It defaults to `distutils` if not provided. When a distribution is installed, the INSTALLER file is generated in the `.egg-info` directory with this value, to keep track of **who** installed the @@ -334,7 +333,7 @@ for the `name` metadata. Notice that there should be at most one result. The first result founded - will be returned. If the directory is not found, returns None. + is returned. If the directory is not found, returns None. - ``get_file_users(path)`` -> iterator of ``Distribution`` instances. @@ -449,11 +448,11 @@ Since the APIs proposed in the current PEP provide everything needed to meet -this requirement, PEP 376 will replace PEP 262 and will become the official +this requirement, PEP 376 replaces PEP 262 and becomes the official `installation database` standard. -The new version of PEP 345 (XXX work in progress) will extend the Metadata -standard and will fullfill the requirements described in PEP 262, like the +The new version of PEP 345 (XXX work in progress) extends the Metadata +standard and fullfills the requirements described in PEP 262, like the `REQUIRES` section. Adding an Uninstall function @@ -463,13 +462,13 @@ is running the `install` command over the `setup.py` script of the distribution. -Distutils will provide a very basic ``uninstall`` function, that will be added -in ``distutils.util`` and will take the name of the distribution to uninstall -as its argument. ``uninstall`` will use the APIs desribed earlier and remove all -unique files, as long as their hash didn't change. Then it will remove -empty directories left behind. +Distutils will provide a very basic ``uninstall`` function, that is added +in ``distutils.util`` and takes the name of the distribution to uninstall +as its argument. ``uninstall`` uses the APIs desribed earlier and remove all +unique files, as long as their hash didn't change. Then it removes empty +directories left behind. -``uninstall`` will return a list of uninstalled files:: +``uninstall`` returns a list of uninstalled files:: >>> from distutils.util import uninstall >>> uninstall('docutils') @@ -477,15 +476,15 @@ ... '/opt/local/lib/python2.6/site-packages/docutils/__init__.py'] -If the distribution is not found, a ``DistutilsUninstallError`` will be raised. +If the distribution is not found, a ``DistutilsUninstallError`` is be raised. Filtering --------- To make it a reference API for third-party projects that wish to control -how `uninstall` works, a second callable argument can be used. It will be +how `uninstall` works, a second callable argument can be used. It's called for each file that is removed. If the callable returns `True`, the -file will be removed. If it returns False, it will be left alone. +file is removed. If it returns False, it's left alone. Examples:: @@ -514,8 +513,8 @@ the ``uninstall`` function takes an extra argument ``installer`` which default to ``distutils``. -When called, ``uninstall`` will control that the ``INSTALLER`` file matches -this argument. If not, it will raise a ``DistutilsUninstallError``:: +When called, ``uninstall`` controls that the ``INSTALLER`` file matches +this argument. If not, it raises a ``DistutilsUninstallError``:: >>> uninstall('docutils') Traceback (most recent call last): @@ -533,23 +532,22 @@ Adding an Uninstall script ========================== -An `uninstall` script will be added in Distutils. and will be used -like this:: +An `uninstall` script is added in Distutils. and is used like this:: $ python -m distutils.uninstall packagename -Notice that script will not control if the removal of a distribution breaks -another distribution. Although it will make sure that all the files it removes +Notice that script doesn't control if the removal of a distribution breaks +another distribution. Although it makes sure that all the files it removes are not used by any other distribution, by using the uninstall function. Backward compatibility and roadmap ================================== -These changes will not introduce any compatibility problems with the previous +These changes doesn't introduce any compatibility problems with the previous version of Distutils, and will also work with existing third-party tools. -Although, a backport of the new Distutils for 2.5, 2.6, 3.0 and 3.1 will be +Although, a backport of the new Distutils for 2.5, 2.6, 3.0 and 3.1 is provided so people can benefit from these new features. The plan is to integrate them for Python 2.7 and Python 3.2 From python-checkins at python.org Thu Jul 2 13:45:00 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 11:45:00 -0000 Subject: [Python-checkins] r73754 - peps/trunk/pep-0376.txt Message-ID: Author: tarek.ziade Date: Thu Jul 2 13:45:00 2009 New Revision: 73754 Log: fixed typos Modified: peps/trunk/pep-0376.txt Modified: peps/trunk/pep-0376.txt ============================================================================== --- peps/trunk/pep-0376.txt (original) +++ peps/trunk/pep-0376.txt Thu Jul 2 13:45:00 2009 @@ -343,8 +343,8 @@ Distribution class ------------------ -A new class called ``Distribution`` is created with a the path of the -`.egg-info` directory provided to the contructor. It reads the metadata +A new class called ``Distribution`` is created with the path of the +`.egg-info` directory provided to the constructor. It reads the metadata contained in `PKG-INFO` when it is instanciated. ``Distribution(path)`` -> instance From python-checkins at python.org Thu Jul 2 13:46:58 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 11:46:58 -0000 Subject: [Python-checkins] r73755 - peps/trunk/pep-0376.txt Message-ID: Author: tarek.ziade Date: Thu Jul 2 13:46:58 2009 New Revision: 73755 Log: another typo Modified: peps/trunk/pep-0376.txt Modified: peps/trunk/pep-0376.txt ============================================================================== --- peps/trunk/pep-0376.txt (original) +++ peps/trunk/pep-0376.txt Thu Jul 2 13:46:58 2009 @@ -464,7 +464,7 @@ Distutils will provide a very basic ``uninstall`` function, that is added in ``distutils.util`` and takes the name of the distribution to uninstall -as its argument. ``uninstall`` uses the APIs desribed earlier and remove all +as its argument. ``uninstall`` uses the APIs described earlier and remove all unique files, as long as their hash didn't change. Then it removes empty directories left behind. From python-checkins at python.org Thu Jul 2 14:47:54 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 12:47:54 -0000 Subject: [Python-checkins] r73756 - python/trunk/Lib/distutils/tests/test_bdist_dumb.py Message-ID: Author: tarek.ziade Date: Thu Jul 2 14:47:54 2009 New Revision: 73756 Log: raising bdist_dumb test coverage Modified: python/trunk/Lib/distutils/tests/test_bdist_dumb.py Modified: python/trunk/Lib/distutils/tests/test_bdist_dumb.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_bdist_dumb.py (original) +++ python/trunk/Lib/distutils/tests/test_bdist_dumb.py Thu Jul 2 14:47:54 2009 @@ -71,6 +71,21 @@ # now let's check what we have in the zip file # XXX to be done + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + os.chdir(pkg_dir) + cmd = bdist_dumb(dist) + self.assertEquals(cmd.bdist_dir, None) + cmd.finalize_options() + + # bdist_dir is initialized to bdist_base/dumb if not set + base = cmd.get_finalized_command('bdist').bdist_base + self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb')) + + # the format is set to a default value depending on the os.name + default = cmd.default_format[os.name] + self.assertEquals(cmd.format, default) + def test_suite(): return unittest.makeSuite(BuildDumbTestCase) From python-checkins at python.org Thu Jul 2 14:51:56 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 12:51:56 -0000 Subject: [Python-checkins] r73757 - python/trunk/Lib/distutils/command/bdist_dumb.py Message-ID: Author: tarek.ziade Date: Thu Jul 2 14:51:56 2009 New Revision: 73757 Log: cleaned up the bdist_dumb module Modified: python/trunk/Lib/distutils/command/bdist_dumb.py Modified: python/trunk/Lib/distutils/command/bdist_dumb.py ============================================================================== --- python/trunk/Lib/distutils/command/bdist_dumb.py (original) +++ python/trunk/Lib/distutils/command/bdist_dumb.py Thu Jul 2 14:51:56 2009 @@ -7,16 +7,17 @@ __revision__ = "$Id$" import os + from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import remove_tree, ensure_relative -from distutils.errors import * +from distutils.errors import DistutilsPlatformError from distutils.sysconfig import get_python_version from distutils import log class bdist_dumb (Command): - description = "create a \"dumb\" built distribution" + description = 'create a "dumb" built distribution' user_options = [('bdist-dir=', 'd', "temporary directory for creating the distribution"), @@ -53,11 +54,7 @@ self.skip_build = 0 self.relative = 0 - # initialize_options() - - - def finalize_options (self): - + def finalize_options(self): if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'dumb') @@ -74,11 +71,7 @@ ('dist_dir', 'dist_dir'), ('plat_name', 'plat_name')) - # finalize_options() - - def run (self): - if not self.skip_build: self.run_command('build') @@ -127,7 +120,3 @@ if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) - - # run() - -# class bdist_dumb From python-checkins at python.org Thu Jul 2 14:53:06 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 12:53:06 -0000 Subject: [Python-checkins] r73758 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Thu Jul 2 14:53:06 2009 New Revision: 73758 Log: Blocked revisions 73756-73757 via svnmerge ........ r73756 | tarek.ziade | 2009-07-02 14:47:54 +0200 (Thu, 02 Jul 2009) | 1 line raising bdist_dumb test coverage ........ r73757 | tarek.ziade | 2009-07-02 14:51:56 +0200 (Thu, 02 Jul 2009) | 1 line cleaned up the bdist_dumb module ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Thu Jul 2 15:02:21 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 13:02:21 -0000 Subject: [Python-checkins] r73759 - in python/branches/py3k: Lib/distutils/command/bdist_dumb.py Lib/distutils/tests/test_bdist_dumb.py Message-ID: Author: tarek.ziade Date: Thu Jul 2 15:02:21 2009 New Revision: 73759 Log: Merged revisions 73756-73757 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73756 | tarek.ziade | 2009-07-02 14:47:54 +0200 (Thu, 02 Jul 2009) | 1 line raising bdist_dumb test coverage ........ r73757 | tarek.ziade | 2009-07-02 14:51:56 +0200 (Thu, 02 Jul 2009) | 1 line cleaned up the bdist_dumb module ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/command/bdist_dumb.py python/branches/py3k/Lib/distutils/tests/test_bdist_dumb.py Modified: python/branches/py3k/Lib/distutils/command/bdist_dumb.py ============================================================================== --- python/branches/py3k/Lib/distutils/command/bdist_dumb.py (original) +++ python/branches/py3k/Lib/distutils/command/bdist_dumb.py Thu Jul 2 15:02:21 2009 @@ -7,16 +7,17 @@ __revision__ = "$Id$" import os + from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import remove_tree, ensure_relative -from distutils.errors import * +from distutils.errors import DistutilsPlatformError from distutils.sysconfig import get_python_version from distutils import log class bdist_dumb(Command): - description = "create a \"dumb\" built distribution" + description = 'create a "dumb" built distribution' user_options = [('bdist-dir=', 'd', "temporary directory for creating the distribution"), Modified: python/branches/py3k/Lib/distutils/tests/test_bdist_dumb.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_bdist_dumb.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_bdist_dumb.py Thu Jul 2 15:02:21 2009 @@ -71,6 +71,21 @@ # now let's check what we have in the zip file # XXX to be done + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + os.chdir(pkg_dir) + cmd = bdist_dumb(dist) + self.assertEquals(cmd.bdist_dir, None) + cmd.finalize_options() + + # bdist_dir is initialized to bdist_base/dumb if not set + base = cmd.get_finalized_command('bdist').bdist_base + self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb')) + + # the format is set to a default value depending on the os.name + default = cmd.default_format[os.name] + self.assertEquals(cmd.format, default) + def test_suite(): return unittest.makeSuite(BuildDumbTestCase) From python-checkins at python.org Thu Jul 2 15:03:12 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 13:03:12 -0000 Subject: [Python-checkins] r73760 - python/branches/release30-maint Message-ID: Author: tarek.ziade Date: Thu Jul 2 15:03:12 2009 New Revision: 73760 Log: Blocked revisions 73759 via svnmerge ................ r73759 | tarek.ziade | 2009-07-02 15:02:21 +0200 (Thu, 02 Jul 2009) | 13 lines Merged revisions 73756-73757 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73756 | tarek.ziade | 2009-07-02 14:47:54 +0200 (Thu, 02 Jul 2009) | 1 line raising bdist_dumb test coverage ........ r73757 | tarek.ziade | 2009-07-02 14:51:56 +0200 (Thu, 02 Jul 2009) | 1 line cleaned up the bdist_dumb module ........ ................ Modified: python/branches/release30-maint/ (props changed) From python-checkins at python.org Thu Jul 2 15:05:14 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 13:05:14 -0000 Subject: [Python-checkins] r73761 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Thu Jul 2 15:05:14 2009 New Revision: 73761 Log: Blocked revisions 73759 via svnmerge ................ r73759 | tarek.ziade | 2009-07-02 15:02:21 +0200 (Thu, 02 Jul 2009) | 13 lines Merged revisions 73756-73757 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73756 | tarek.ziade | 2009-07-02 14:47:54 +0200 (Thu, 02 Jul 2009) | 1 line raising bdist_dumb test coverage ........ r73757 | tarek.ziade | 2009-07-02 14:51:56 +0200 (Thu, 02 Jul 2009) | 1 line cleaned up the bdist_dumb module ........ ................ Modified: python/branches/release31-maint/ (props changed) From buildbot at python.org Thu Jul 2 16:11:42 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 02 Jul 2009 14:11:42 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 2.6 Message-ID: The Buildbot has detected a new failure of x86 gentoo 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%202.6/builds/386 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From python-checkins at python.org Thu Jul 2 16:20:48 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 14:20:48 -0000 Subject: [Python-checkins] r73762 - python/trunk/Lib/distutils/util.py Message-ID: Author: tarek.ziade Date: Thu Jul 2 16:20:47 2009 New Revision: 73762 Log: pep8-fied and cleaned up distutils.util Modified: python/trunk/Lib/distutils/util.py Modified: python/trunk/Lib/distutils/util.py ============================================================================== --- python/trunk/Lib/distutils/util.py (original) +++ python/trunk/Lib/distutils/util.py Thu Jul 2 16:20:47 2009 @@ -12,9 +12,10 @@ from distutils.spawn import spawn from distutils import log -def get_platform (): - """Return a string that identifies the current platform. This is used - mainly to distinguish platform-specific build directories and +def get_platform(): + """Return a string that identifies the current platform. + + This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. for IRIX @@ -39,14 +40,14 @@ if os.name == 'nt': # sniff sys.version for architecture. prefix = " bit (" - i = string.find(sys.version, prefix) + i = sys.version.find(prefix) if i == -1: return sys.platform - j = string.find(sys.version, ")", i) + j = sys.version.find(")", i) look = sys.version[i+len(prefix):j].lower() - if look=='amd64': + if look == 'amd64': return 'win-amd64' - if look=='itanium': + if look == 'itanium': return 'win-ia64' return sys.platform @@ -61,10 +62,9 @@ # Convert the OS name to lowercase, remove '/' characters # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") - osname = string.lower(osname) - osname = string.replace(osname, '/', '') - machine = string.replace(machine, ' ', '_') - machine = string.replace(machine, '/', '-') + osname = osname.lower().replace('/', '') + machine = machine.replace(' ', '_') + machine = machine.replace('/', '-') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- @@ -154,11 +154,10 @@ return "%s-%s-%s" % (osname, release, machine) -# get_platform () +def convert_path(pathname): + """Return 'pathname' as a name that will work on the native filesystem. -def convert_path (pathname): - """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local @@ -171,23 +170,23 @@ if not pathname: return pathname if pathname[0] == '/': - raise ValueError, "path '%s' cannot be absolute" % pathname + raise ValueError("path '%s' cannot be absolute" % pathname) if pathname[-1] == '/': - raise ValueError, "path '%s' cannot end with '/'" % pathname + raise ValueError("path '%s' cannot end with '/'" % pathname) - paths = string.split(pathname, '/') + paths = pathname.split('/') while '.' in paths: paths.remove('.') if not paths: return os.curdir - return apply(os.path.join, paths) + return os.path.join(*paths) -# convert_path () +def change_root(new_root, pathname): + """Return 'pathname' with 'new_root' prepended. -def change_root (new_root, pathname): - """Return 'pathname' with 'new_root' prepended. If 'pathname' is - relative, this is equivalent to "os.path.join(new_root,pathname)". + If 'pathname' is relative, this is equivalent to + "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. """ @@ -214,19 +213,20 @@ return os.path.join(new_root, pathname) else: # Chop off volume name from start of path - elements = string.split(pathname, ":", 1) + elements = pathname.split(":", 1) pathname = ":" + elements[1] return os.path.join(new_root, pathname) else: - raise DistutilsPlatformError, \ - "nothing known about platform '%s'" % os.name - + raise DistutilsPlatformError("nothing known about " + "platform '%s'" % os.name) _environ_checked = 0 -def check_environ (): - """Ensure that 'os.environ' has all the environment variables we - guarantee that users can use in config files, command-line options, + +def check_environ(): + """Ensure that 'os.environ' has all the environment variables needed. + + We guarantee that users can use in config files, command-line options, etc. Currently this includes: HOME - user's home directory (Unix only) PLAT - description of the current platform, including hardware @@ -245,10 +245,10 @@ _environ_checked = 1 +def subst_vars(s, local_vars): + """Perform shell/Perl-style variable substitution on 'string'. -def subst_vars (s, local_vars): - """Perform shell/Perl-style variable substitution on 'string'. Every - occurrence of '$' followed by a name is considered a variable, and + Every occurrence of '$' followed by a name is considered a variable, and variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/augmented to guarantee that it contains @@ -266,14 +266,13 @@ try: return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s) except KeyError, var: - raise ValueError, "invalid variable '$%s'" % var - -# subst_vars () + raise ValueError("invalid variable '$%s'" % var) +def grok_environment_error(exc, prefix="error: "): + """Generate a useful error message from an EnvironmentError. -def grok_environment_error (exc, prefix="error: "): - """Generate a useful error message from an EnvironmentError (IOError or - OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and + This will generate an IOError or an OSError exception object. + Handles Python 1.5.1 and 1.5.2 styles, and does what it can to deal with exception objects that don't have a filename (which happens when the error is due to a two-file operation, such as 'rename()' or 'link()'. Returns the error message as a string @@ -292,18 +291,20 @@ return error - # Needed by 'split_quoted()' _wordchars_re = _squote_re = _dquote_re = None + def _init_regex(): global _wordchars_re, _squote_re, _dquote_re _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') -def split_quoted (s): +def split_quoted(s): """Split a string up according to Unix shell-like rules for quotes and - backslashes. In short: words are delimited by spaces, as long as those + backslashes. + + In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character @@ -311,13 +312,12 @@ characters are stripped from any quoted string. Returns a list of words. """ - # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... if _wordchars_re is None: _init_regex() - s = string.strip(s) + s = s.strip() words = [] pos = 0 @@ -330,7 +330,7 @@ if s[end] in string.whitespace: # unescaped, unquoted whitespace: now words.append(s[:end]) # we definitely have a word delimiter - s = string.lstrip(s[end:]) + s = s[end:].lstrip() pos = 0 elif s[end] == '\\': # preserve whatever is being escaped; @@ -344,12 +344,11 @@ elif s[end] == '"': # slurp doubly-quoted string m = _dquote_re.match(s, end) else: - raise RuntimeError, \ - "this can't happen (bad char '%c')" % s[end] + raise RuntimeError("this can't happen " + "(bad char '%c')" % s[end]) if m is None: - raise ValueError, \ - "bad string (mismatched %s quotes?)" % s[end] + raise ValueError("bad string (mismatched %s quotes?)" % s[end]) (beg, end) = m.span() s = s[:beg] + s[beg+1:end-1] + s[end:] @@ -361,13 +360,12 @@ return words -# split_quoted () +def execute(func, args, msg=None, verbose=0, dry_run=0): + """Perform some action that affects the outside world. -def execute (func, args, msg=None, verbose=0, dry_run=0): - """Perform some action that affects the outside world (eg. by - writing to the filesystem). Such actions are special because they - are disabled by the 'dry_run' flag. This method takes care of all + eg. by writing to the filesystem). Such actions are special because + they are disabled by the 'dry_run' flag. This method takes care of all that bureaucracy for you; all you have to do is supply the function to call and an argument tuple for it (to embody the "external action" being performed), and an optional message to @@ -380,17 +378,17 @@ log.info(msg) if not dry_run: - apply(func, args) + func(*args) -def strtobool (val): +def strtobool(val): """Convert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if 'val' is anything else. """ - val = string.lower(val) + val = val.lower() if val in ('y', 'yes', 't', 'true', 'on', '1'): return 1 elif val in ('n', 'no', 'f', 'false', 'off', '0'): @@ -399,15 +397,13 @@ raise ValueError, "invalid truth value %r" % (val,) -def byte_compile (py_files, - optimize=0, force=0, - prefix=None, base_dir=None, - verbose=1, dry_run=0, - direct=None): +def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, + verbose=1, dry_run=0, direct=None): """Byte-compile a collection of Python source files to either .pyc - or .pyo files in the same directory. 'py_files' is a list of files - to compile; any files that don't end in ".py" are silently skipped. - 'optimize' must be one of the following: + or .pyo files in the same directory. + + 'py_files' is a list of files to compile; any files that don't end in + ".py" are silently skipped. 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") @@ -432,7 +428,6 @@ generated in indirect mode; unless you know what you're doing, leave it set to None. """ - # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative # approach: choose direct mode *only* if the current interpreter is @@ -481,7 +476,7 @@ #if prefix: # prefix = os.path.abspath(prefix) - script.write(string.join(map(repr, py_files), ",\n") + "]\n") + script.write(",\n".join(map(repr, py_files)) + "]\n") script.write(""" byte_compile(files, optimize=%r, force=%r, prefix=%r, base_dir=%r, @@ -520,9 +515,8 @@ dfile = file if prefix: if file[:len(prefix)] != prefix: - raise ValueError, \ - ("invalid prefix: filename %r doesn't start with %r" - % (file, prefix)) + raise ValueError("invalid prefix: filename %r doesn't " + "start with %r" % (file, prefix)) dfile = dfile[len(prefix):] if base_dir: dfile = os.path.join(base_dir, dfile) @@ -537,13 +531,11 @@ log.debug("skipping byte-compilation of %s to %s", file, cfile_base) -# byte_compile () -def rfc822_escape (header): +def rfc822_escape(header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ - lines = string.split(header, '\n') - lines = map(string.strip, lines) - header = string.join(lines, '\n' + 8*' ') - return header + lines = [x.strip() for x in header.split('\n')] + sep = '\n' + 8*' ' + return sep.join(lines) From python-checkins at python.org Thu Jul 2 16:21:45 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 14:21:45 -0000 Subject: [Python-checkins] r73763 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Thu Jul 2 16:21:44 2009 New Revision: 73763 Log: Blocked revisions 73762 via svnmerge ........ r73762 | tarek.ziade | 2009-07-02 16:20:47 +0200 (Thu, 02 Jul 2009) | 1 line pep8-fied and cleaned up distutils.util ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Thu Jul 2 16:25:23 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 14:25:23 -0000 Subject: [Python-checkins] r73764 - in python/branches/py3k: Lib/distutils/util.py Message-ID: Author: tarek.ziade Date: Thu Jul 2 16:25:23 2009 New Revision: 73764 Log: Merged revisions 73762 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73762 | tarek.ziade | 2009-07-02 16:20:47 +0200 (Thu, 02 Jul 2009) | 1 line pep8-fied and cleaned up distutils.util ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/util.py Modified: python/branches/py3k/Lib/distutils/util.py ============================================================================== --- python/branches/py3k/Lib/distutils/util.py (original) +++ python/branches/py3k/Lib/distutils/util.py Thu Jul 2 16:25:23 2009 @@ -12,9 +12,10 @@ from distutils.spawn import spawn from distutils import log -def get_platform (): - """Return a string that identifies the current platform. This is used - mainly to distinguish platform-specific build directories and +def get_platform(): + """Return a string that identifies the current platform. + + This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. for IRIX @@ -153,11 +154,10 @@ return "%s-%s-%s" % (osname, release, machine) -# get_platform () +def convert_path(pathname): + """Return 'pathname' as a name that will work on the native filesystem. -def convert_path (pathname): - """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local @@ -181,12 +181,12 @@ return os.curdir return os.path.join(*paths) -# convert_path () +def change_root(new_root, pathname): + """Return 'pathname' with 'new_root' prepended. -def change_root (new_root, pathname): - """Return 'pathname' with 'new_root' prepended. If 'pathname' is - relative, this is equivalent to "os.path.join(new_root,pathname)". + If 'pathname' is relative, this is equivalent to + "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. """ @@ -218,13 +218,15 @@ return os.path.join(new_root, pathname) else: - raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) - + raise DistutilsPlatformError("nothing known about " + "platform '%s'" % os.name) _environ_checked = 0 -def check_environ (): - """Ensure that 'os.environ' has all the environment variables we - guarantee that users can use in config files, command-line options, + +def check_environ(): + """Ensure that 'os.environ' has all the environment variables needed. + + We guarantee that users can use in config files, command-line options, etc. Currently this includes: HOME - user's home directory (Unix only) PLAT - description of the current platform, including hardware @@ -243,10 +245,10 @@ _environ_checked = 1 +def subst_vars(s, local_vars): + """Perform shell/Perl-style variable substitution on 'string'. -def subst_vars (s, local_vars): - """Perform shell/Perl-style variable substitution on 'string'. Every - occurrence of '$' followed by a name is considered a variable, and + Every occurrence of '$' followed by a name is considered a variable, and variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/augmented to guarantee that it contains @@ -266,12 +268,11 @@ except KeyError as var: raise ValueError("invalid variable '$%s'" % var) -# subst_vars () - +def grok_environment_error(exc, prefix="error: "): + """Generate a useful error message from an EnvironmentError. -def grok_environment_error (exc, prefix="error: "): - """Generate a useful error message from an EnvironmentError (IOError or - OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and + This will generate an IOError or an OSError exception object. + Handles Python 1.5.1 and 1.5.2 styles, and does what it can to deal with exception objects that don't have a filename (which happens when the error is due to a two-file operation, such as 'rename()' or 'link()'. Returns the error message as a string @@ -290,18 +291,20 @@ return error - # Needed by 'split_quoted()' _wordchars_re = _squote_re = _dquote_re = None + def _init_regex(): global _wordchars_re, _squote_re, _dquote_re _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') -def split_quoted (s): +def split_quoted(s): """Split a string up according to Unix shell-like rules for quotes and - backslashes. In short: words are delimited by spaces, as long as those + backslashes. + + In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character @@ -309,7 +312,6 @@ characters are stripped from any quoted string. Returns a list of words. """ - # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... @@ -357,13 +359,12 @@ return words -# split_quoted () +def execute(func, args, msg=None, verbose=0, dry_run=0): + """Perform some action that affects the outside world. -def execute (func, args, msg=None, verbose=0, dry_run=0): - """Perform some action that affects the outside world (eg. by - writing to the filesystem). Such actions are special because they - are disabled by the 'dry_run' flag. This method takes care of all + eg. by writing to the filesystem). Such actions are special because + they are disabled by the 'dry_run' flag. This method takes care of all that bureaucracy for you; all you have to do is supply the function to call and an argument tuple for it (to embody the "external action" being performed), and an optional message to @@ -379,7 +380,7 @@ func(*args) -def strtobool (val): +def strtobool(val): """Convert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values @@ -395,15 +396,13 @@ raise ValueError("invalid truth value %r" % (val,)) -def byte_compile (py_files, - optimize=0, force=0, - prefix=None, base_dir=None, - verbose=1, dry_run=0, - direct=None): +def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, + verbose=1, dry_run=0, direct=None): """Byte-compile a collection of Python source files to either .pyc - or .pyo files in the same directory. 'py_files' is a list of files - to compile; any files that don't end in ".py" are silently skipped. - 'optimize' must be one of the following: + or .pyo files in the same directory. + + 'py_files' is a list of files to compile; any files that don't end in + ".py" are silently skipped. 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") @@ -428,7 +427,6 @@ generated in indirect mode; unless you know what you're doing, leave it set to None. """ - # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative # approach: choose direct mode *only* if the current interpreter is @@ -516,8 +514,8 @@ dfile = file if prefix: if file[:len(prefix)] != prefix: - raise ValueError("invalid prefix: filename %r doesn't start with %r" - % (file, prefix)) + raise ValueError("invalid prefix: filename %r doesn't " + "start with %r" % (file, prefix)) dfile = dfile[len(prefix):] if base_dir: dfile = os.path.join(base_dir, dfile) @@ -532,9 +530,8 @@ log.debug("skipping byte-compilation of %s to %s", file, cfile_base) -# byte_compile () -def rfc822_escape (header): +def rfc822_escape(header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ From python-checkins at python.org Thu Jul 2 16:26:25 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 14:26:25 -0000 Subject: [Python-checkins] r73765 - python/branches/release30-maint Message-ID: Author: tarek.ziade Date: Thu Jul 2 16:26:25 2009 New Revision: 73765 Log: Blocked revisions 73764 via svnmerge ................ r73764 | tarek.ziade | 2009-07-02 16:25:23 +0200 (Thu, 02 Jul 2009) | 9 lines Merged revisions 73762 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73762 | tarek.ziade | 2009-07-02 16:20:47 +0200 (Thu, 02 Jul 2009) | 1 line pep8-fied and cleaned up distutils.util ........ ................ Modified: python/branches/release30-maint/ (props changed) From python-checkins at python.org Thu Jul 2 16:26:53 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 02 Jul 2009 14:26:53 -0000 Subject: [Python-checkins] r73766 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Thu Jul 2 16:26:53 2009 New Revision: 73766 Log: Blocked revisions 73764 via svnmerge ................ r73764 | tarek.ziade | 2009-07-02 16:25:23 +0200 (Thu, 02 Jul 2009) | 9 lines Merged revisions 73762 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73762 | tarek.ziade | 2009-07-02 16:20:47 +0200 (Thu, 02 Jul 2009) | 1 line pep8-fied and cleaned up distutils.util ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Thu Jul 2 16:30:19 2009 From: python-checkins at python.org (jesus.cea) Date: Thu, 02 Jul 2009 14:30:19 -0000 Subject: [Python-checkins] r73767 - python/trunk/Modules/_multiprocessing/multiprocessing.h Message-ID: Author: jesus.cea Date: Thu Jul 2 16:30:18 2009 New Revision: 73767 Log: multiprocessing doesn't compile in Solaris because a typo Modified: python/trunk/Modules/_multiprocessing/multiprocessing.h Modified: python/trunk/Modules/_multiprocessing/multiprocessing.h ============================================================================== --- python/trunk/Modules/_multiprocessing/multiprocessing.h (original) +++ python/trunk/Modules/_multiprocessing/multiprocessing.h Thu Jul 2 16:30:18 2009 @@ -49,7 +49,7 @@ # define SEM_VALUE_MAX sysconf(_SC_SEM_VALUE_MAX) #elif defined(_SEM_VALUE_MAX) # define SEM_VALUE_MAX _SEM_VALUE_MAX - #elif definef(_POSIX_SEM_VALUE_MAX) + #elif defined(_POSIX_SEM_VALUE_MAX) # define SEM_VALUE_MAX _POSIX_SEM_VALUE_MAX #else # define SEM_VALUE_MAX INT_MAX From python-checkins at python.org Thu Jul 2 16:35:02 2009 From: python-checkins at python.org (jesus.cea) Date: Thu, 02 Jul 2009 14:35:02 -0000 Subject: [Python-checkins] r73768 - in python/branches/py3k: Modules/_multiprocessing/multiprocessing.h Message-ID: Author: jesus.cea Date: Thu Jul 2 16:35:02 2009 New Revision: 73768 Log: Merged revisions 73767 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73767 | jesus.cea | 2009-07-02 16:30:18 +0200 (Thu, 02 Jul 2009) | 1 line multiprocessing doesn't compile in Solaris because a typo ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Modules/_multiprocessing/multiprocessing.h Modified: python/branches/py3k/Modules/_multiprocessing/multiprocessing.h ============================================================================== --- python/branches/py3k/Modules/_multiprocessing/multiprocessing.h (original) +++ python/branches/py3k/Modules/_multiprocessing/multiprocessing.h Thu Jul 2 16:35:02 2009 @@ -49,7 +49,7 @@ # define SEM_VALUE_MAX sysconf(_SC_SEM_VALUE_MAX) #elif defined(_SEM_VALUE_MAX) # define SEM_VALUE_MAX _SEM_VALUE_MAX - #elif definef(_POSIX_SEM_VALUE_MAX) + #elif defined(_POSIX_SEM_VALUE_MAX) # define SEM_VALUE_MAX _POSIX_SEM_VALUE_MAX #else # define SEM_VALUE_MAX INT_MAX From python-checkins at python.org Thu Jul 2 16:37:32 2009 From: python-checkins at python.org (jesus.cea) Date: Thu, 02 Jul 2009 14:37:32 -0000 Subject: [Python-checkins] r73769 - in python/branches/release31-maint: Modules/_multiprocessing/multiprocessing.h Message-ID: Author: jesus.cea Date: Thu Jul 2 16:37:32 2009 New Revision: 73769 Log: Merged revisions 73768 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73768 | jesus.cea | 2009-07-02 16:35:02 +0200 (Thu, 02 Jul 2009) | 9 lines Merged revisions 73767 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73767 | jesus.cea | 2009-07-02 16:30:18 +0200 (Thu, 02 Jul 2009) | 1 line multiprocessing doesn't compile in Solaris because a typo ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Modules/_multiprocessing/multiprocessing.h Modified: python/branches/release31-maint/Modules/_multiprocessing/multiprocessing.h ============================================================================== --- python/branches/release31-maint/Modules/_multiprocessing/multiprocessing.h (original) +++ python/branches/release31-maint/Modules/_multiprocessing/multiprocessing.h Thu Jul 2 16:37:32 2009 @@ -49,7 +49,7 @@ # define SEM_VALUE_MAX sysconf(_SC_SEM_VALUE_MAX) #elif defined(_SEM_VALUE_MAX) # define SEM_VALUE_MAX _SEM_VALUE_MAX - #elif definef(_POSIX_SEM_VALUE_MAX) + #elif defined(_POSIX_SEM_VALUE_MAX) # define SEM_VALUE_MAX _POSIX_SEM_VALUE_MAX #else # define SEM_VALUE_MAX INT_MAX From python-checkins at python.org Thu Jul 2 17:37:23 2009 From: python-checkins at python.org (jesus.cea) Date: Thu, 02 Jul 2009 15:37:23 -0000 Subject: [Python-checkins] r73770 - in python/branches/release26-maint: Demo/tkinter/matt/menu-all-types-of-entries.py Demo/tkinter/matt/menu-simple.py Doc/howto/webservers.rst Doc/library/io.rst Doc/library/pty.rst Doc/tutorial/classes.rst Doc/tutorial/datastructures.rst Doc/tutorial/floatingpoint.rst Doc/tutorial/inputoutput.rst Doc/tutorial/stdlib.rst Lib/bsddb/test/test_basics.py Lib/bsddb/test/test_compat.py Lib/bsddb/test/test_recno.py Lib/difflib.py Lib/distutils/tests/test_core.py Lib/email/message.py Lib/idlelib/AutoComplete.py Lib/idlelib/CallTips.py Lib/idlelib/NEWS.txt Lib/io.py Lib/lib-tk/Tkinter.py Lib/lib-tk/turtle.py Lib/optparse.py Lib/plat-mac/bundlebuilder.py Lib/smtpd.py Lib/tarfile.py Lib/test/test_calendar.py Lib/test/test_cfgparser.py Lib/test/test_codeccallbacks.py Lib/test/test_cookielib.py Lib/test/test_descrtut.py Lib/test/test_funcattrs.py Lib/test/test_urllib2net.py Lib/wsgiref/headers.py Misc/AIX-NOTES Misc/HISTORY Misc/NEWS Misc/cheatsheet Modules/_ctypes/libffi/aclocal.m4 Modules/_ctypes/libffi/configure Modules/_ctypes/libffi/src/x86/ffi64.c Modules/_ctypes/libffi_osx/x86/x86-ffi64.c Modules/_sqlite/connection.c Modules/arraymodule.c Modules/posixmodule.c Objects/abstract.c Objects/listsort.txt Objects/object.c Objects/unicodeobject.c PC/_winreg.c PC/os2vacpp/makefile.omk Tools/scripts/texi2html.py Message-ID: Author: jesus.cea Date: Thu Jul 2 17:37:21 2009 New Revision: 73770 Log: Merged revisions 69846 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r69846 | mark.dickinson | 2009-02-21 21:27:01 +0100 (Sat, 21 Feb 2009) | 2 lines Issue #5341: Fix a variety of spelling errors. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Demo/tkinter/matt/menu-all-types-of-entries.py python/branches/release26-maint/Demo/tkinter/matt/menu-simple.py python/branches/release26-maint/Doc/howto/webservers.rst python/branches/release26-maint/Doc/library/io.rst python/branches/release26-maint/Doc/library/pty.rst python/branches/release26-maint/Doc/tutorial/classes.rst python/branches/release26-maint/Doc/tutorial/datastructures.rst python/branches/release26-maint/Doc/tutorial/floatingpoint.rst python/branches/release26-maint/Doc/tutorial/inputoutput.rst python/branches/release26-maint/Doc/tutorial/stdlib.rst python/branches/release26-maint/Lib/bsddb/test/test_basics.py python/branches/release26-maint/Lib/bsddb/test/test_compat.py python/branches/release26-maint/Lib/bsddb/test/test_recno.py python/branches/release26-maint/Lib/difflib.py python/branches/release26-maint/Lib/distutils/tests/test_core.py python/branches/release26-maint/Lib/email/message.py python/branches/release26-maint/Lib/idlelib/AutoComplete.py python/branches/release26-maint/Lib/idlelib/CallTips.py python/branches/release26-maint/Lib/idlelib/NEWS.txt python/branches/release26-maint/Lib/io.py python/branches/release26-maint/Lib/lib-tk/Tkinter.py python/branches/release26-maint/Lib/lib-tk/turtle.py python/branches/release26-maint/Lib/optparse.py python/branches/release26-maint/Lib/plat-mac/bundlebuilder.py python/branches/release26-maint/Lib/smtpd.py python/branches/release26-maint/Lib/tarfile.py python/branches/release26-maint/Lib/test/test_calendar.py python/branches/release26-maint/Lib/test/test_cfgparser.py python/branches/release26-maint/Lib/test/test_codeccallbacks.py python/branches/release26-maint/Lib/test/test_cookielib.py python/branches/release26-maint/Lib/test/test_descrtut.py python/branches/release26-maint/Lib/test/test_funcattrs.py python/branches/release26-maint/Lib/test/test_urllib2net.py python/branches/release26-maint/Lib/wsgiref/headers.py python/branches/release26-maint/Misc/AIX-NOTES python/branches/release26-maint/Misc/HISTORY python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Misc/cheatsheet python/branches/release26-maint/Modules/_ctypes/libffi/aclocal.m4 python/branches/release26-maint/Modules/_ctypes/libffi/configure python/branches/release26-maint/Modules/_ctypes/libffi/src/x86/ffi64.c python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c python/branches/release26-maint/Modules/_sqlite/connection.c python/branches/release26-maint/Modules/arraymodule.c python/branches/release26-maint/Modules/posixmodule.c python/branches/release26-maint/Objects/abstract.c python/branches/release26-maint/Objects/listsort.txt python/branches/release26-maint/Objects/object.c python/branches/release26-maint/Objects/unicodeobject.c python/branches/release26-maint/PC/_winreg.c python/branches/release26-maint/PC/os2vacpp/makefile.omk python/branches/release26-maint/Tools/scripts/texi2html.py Modified: python/branches/release26-maint/Demo/tkinter/matt/menu-all-types-of-entries.py ============================================================================== --- python/branches/release26-maint/Demo/tkinter/matt/menu-all-types-of-entries.py (original) +++ python/branches/release26-maint/Demo/tkinter/matt/menu-all-types-of-entries.py Thu Jul 2 17:37:21 2009 @@ -110,12 +110,12 @@ Cascade_button.menu.choices = Menu(Cascade_button.menu) # ...and this is a menu that cascades from that. - Cascade_button.menu.choices.wierdones = Menu(Cascade_button.menu.choices) + Cascade_button.menu.choices.weirdones = Menu(Cascade_button.menu.choices) # then you define the menus from the deepest level on up. - Cascade_button.menu.choices.wierdones.add_command(label='avacado') - Cascade_button.menu.choices.wierdones.add_command(label='belgian endive') - Cascade_button.menu.choices.wierdones.add_command(label='beefaroni') + Cascade_button.menu.choices.weirdones.add_command(label='avacado') + Cascade_button.menu.choices.weirdones.add_command(label='belgian endive') + Cascade_button.menu.choices.weirdones.add_command(label='beefaroni') # definition of the menu one level up... Cascade_button.menu.choices.add_command(label='Chocolate') @@ -125,8 +125,8 @@ Cascade_button.menu.choices.add_command(label='Rocky Road') Cascade_button.menu.choices.add_command(label='BubbleGum') Cascade_button.menu.choices.add_cascade( - label='Wierd Flavors', - menu=Cascade_button.menu.choices.wierdones) + label='Weird Flavors', + menu=Cascade_button.menu.choices.weirdones) # and finally, the definition for the top level Cascade_button.menu.add_cascade(label='more choices', Modified: python/branches/release26-maint/Demo/tkinter/matt/menu-simple.py ============================================================================== --- python/branches/release26-maint/Demo/tkinter/matt/menu-simple.py (original) +++ python/branches/release26-maint/Demo/tkinter/matt/menu-simple.py Thu Jul 2 17:37:21 2009 @@ -48,7 +48,7 @@ File_button.menu = Menu(File_button) # add an item. The first param is a menu entry type, - # must be one of: "cascade", "checkbutton", "command", "radiobutton", "seperator" + # must be one of: "cascade", "checkbutton", "command", "radiobutton", "separator" # see menu-demo-2.py for examples of use File_button.menu.add_command(label='New...', underline=0, command=new_file) Modified: python/branches/release26-maint/Doc/howto/webservers.rst ============================================================================== --- python/branches/release26-maint/Doc/howto/webservers.rst (original) +++ python/branches/release26-maint/Doc/howto/webservers.rst Thu Jul 2 17:37:21 2009 @@ -426,7 +426,7 @@ user. Typically this component is represented by the templates. * The *controller*. This is the layer between the user and the model. The controller reacts on user actions (like opening some specific URL) and tells - the model to modify the data if neccessary. + the model to modify the data if necessary. While one might think that MVC is a complex design pattern, in fact it is not. It is used in Python because it has turned out to be useful for creating clean, @@ -435,9 +435,9 @@ .. note:: While not all Python frameworks explicitly support MVC, it is often trivial - to create a web site which uses the MVC pattern by seperating the data logic + to create a web site which uses the MVC pattern by separating the data logic (the model) from the user interaction logic (the controller) and the - templates (the view). That's why it is important not to write unneccessary + templates (the view). That's why it is important not to write unnecessary Python code in the templates -- it is against MVC and creates more chaos. .. seealso:: @@ -607,7 +607,7 @@ ----------------------- There is an incredible number of frameworks, so there is no way to describe them -all. It is not even neccessary, as most of these frameworks are nothing special +all. It is not even necessary, as most of these frameworks are nothing special and everything that can be done with these can also be done with one of the popular ones. @@ -679,7 +679,7 @@ Another framework that's already been mentioned is `Pylons`_. Pylons is much like TurboGears with ab even stronger emphasis on flexibility, which is bought at the cost of being more difficult to use. Nearly every component can be -exchanged, which makes it neccessary to use the documentation of every single +exchanged, which makes it necessary to use the documentation of every single component, because there are so many Pylons combinations possible that can satisfy every requirement. Pylons builds upon `Paste `_, an extensive set of tools which are handy for WSGI. Modified: python/branches/release26-maint/Doc/library/io.rst ============================================================================== --- python/branches/release26-maint/Doc/library/io.rst (original) +++ python/branches/release26-maint/Doc/library/io.rst Thu Jul 2 17:37:21 2009 @@ -14,7 +14,7 @@ At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. It defines the basic interface to a stream. Note, however, that there is no -seperation between reading and writing to streams; implementations are allowed +separation between reading and writing to streams; implementations are allowed to throw an :exc:`IOError` if they do not support a given operation. Extending :class:`IOBase` is :class:`RawIOBase` which deals simply with the @@ -612,7 +612,7 @@ is enabled. With this enabled, on input, the lines endings ``'\n'``, ``'\r'``, or ``'\r\n'`` are translated to ``'\n'`` before being returned to the caller. Conversely, on output, ``'\n'`` is translated to the system - default line seperator, :data:`os.linesep`. If *newline* is any other of its + default line separator, :data:`os.linesep`. If *newline* is any other of its legal values, that newline becomes the newline when the file is read and it is returned untranslated. On output, ``'\n'`` is converted to the *newline*. Modified: python/branches/release26-maint/Doc/library/pty.rst ============================================================================== --- python/branches/release26-maint/Doc/library/pty.rst (original) +++ python/branches/release26-maint/Doc/library/pty.rst Thu Jul 2 17:37:21 2009 @@ -13,7 +13,7 @@ concept: starting another process and being able to write to and read from its controlling terminal programmatically. -Because pseudo-terminal handling is highly platform dependant, there is code to +Because pseudo-terminal handling is highly platform dependent, there is code to do it only for SGI and Linux. (The Linux code is supposed to work on other platforms, but hasn't been tested yet.) Modified: python/branches/release26-maint/Doc/tutorial/classes.rst ============================================================================== --- python/branches/release26-maint/Doc/tutorial/classes.rst (original) +++ python/branches/release26-maint/Doc/tutorial/classes.rst Thu Jul 2 17:37:21 2009 @@ -470,7 +470,7 @@ only works if the base class is defined or imported directly in the global scope.) -Python has two builtin functions that work with inheritance: +Python has two built-in functions that work with inheritance: * Use :func:`isinstance` to check an object's type: ``isinstance(obj, int)`` will be ``True`` only if ``obj.__class__`` is :class:`int` or some class Modified: python/branches/release26-maint/Doc/tutorial/datastructures.rst ============================================================================== --- python/branches/release26-maint/Doc/tutorial/datastructures.rst (original) +++ python/branches/release26-maint/Doc/tutorial/datastructures.rst Thu Jul 2 17:37:21 2009 @@ -308,7 +308,7 @@ print row[i], print -In real world, you should prefer builtin functions to complex flow statements. +In real world, you should prefer built-in functions to complex flow statements. The :func:`zip` function would do a great job for this use case:: >>> zip(*mat) Modified: python/branches/release26-maint/Doc/tutorial/floatingpoint.rst ============================================================================== --- python/branches/release26-maint/Doc/tutorial/floatingpoint.rst (original) +++ python/branches/release26-maint/Doc/tutorial/floatingpoint.rst Thu Jul 2 17:37:21 2009 @@ -65,7 +65,7 @@ >>> 0.1 0.1000000000000000055511151231257827021181583404541015625 -instead! The Python prompt uses the builtin :func:`repr` function to obtain a +instead! The Python prompt uses the built-in :func:`repr` function to obtain a string version of everything it displays. For floats, ``repr(float)`` rounds the true decimal value to 17 significant digits, giving :: @@ -81,7 +81,7 @@ (although some languages may not *display* the difference by default, or in all output modes). -Python's builtin :func:`str` function produces only 12 significant digits, and +Python's built-in :func:`str` function produces only 12 significant digits, and you may wish to use that instead. It's unusual for ``eval(str(x))`` to reproduce *x*, but the output may be more pleasant to look at:: Modified: python/branches/release26-maint/Doc/tutorial/inputoutput.rst ============================================================================== --- python/branches/release26-maint/Doc/tutorial/inputoutput.rst (original) +++ python/branches/release26-maint/Doc/tutorial/inputoutput.rst Thu Jul 2 17:37:21 2009 @@ -187,7 +187,7 @@ This is particularly useful in combination with the new built-in :func:`vars` function, which returns a dictionary containing all local variables. -For a complete overview of string formating with :meth:`str.format`, see +For a complete overview of string formatting with :meth:`str.format`, see :ref:`formatstrings`. Modified: python/branches/release26-maint/Doc/tutorial/stdlib.rst ============================================================================== --- python/branches/release26-maint/Doc/tutorial/stdlib.rst (original) +++ python/branches/release26-maint/Doc/tutorial/stdlib.rst Thu Jul 2 17:37:21 2009 @@ -21,12 +21,12 @@ >>> os.chdir('/server/accesslogs') Be sure to use the ``import os`` style instead of ``from os import *``. This -will keep :func:`os.open` from shadowing the builtin :func:`open` function which +will keep :func:`os.open` from shadowing the built-in :func:`open` function which operates much differently. .. index:: builtin: help -The builtin :func:`dir` and :func:`help` functions are useful as interactive +The built-in :func:`dir` and :func:`help` functions are useful as interactive aids for working with large modules like :mod:`os`:: >>> import os Modified: python/branches/release26-maint/Lib/bsddb/test/test_basics.py ============================================================================== --- python/branches/release26-maint/Lib/bsddb/test/test_basics.py (original) +++ python/branches/release26-maint/Lib/bsddb/test/test_basics.py Thu Jul 2 17:37:21 2009 @@ -131,7 +131,7 @@ self.assertEqual(d.get('0321'), '0321-0321-0321-0321-0321') - # By default non-existant keys return None... + # By default non-existent keys return None... self.assertEqual(d.get('abcd'), None) # ...but they raise exceptions in other situations. Call Modified: python/branches/release26-maint/Lib/bsddb/test/test_compat.py ============================================================================== --- python/branches/release26-maint/Lib/bsddb/test/test_compat.py (original) +++ python/branches/release26-maint/Lib/bsddb/test/test_compat.py Thu Jul 2 17:37:21 2009 @@ -133,7 +133,7 @@ except KeyError: pass else: - self.fail("set_location on non-existant key did not raise KeyError") + self.fail("set_location on non-existent key did not raise KeyError") f.sync() f.close() Modified: python/branches/release26-maint/Lib/bsddb/test/test_recno.py ============================================================================== --- python/branches/release26-maint/Lib/bsddb/test/test_recno.py (original) +++ python/branches/release26-maint/Lib/bsddb/test/test_recno.py Thu Jul 2 17:37:21 2009 @@ -150,7 +150,7 @@ if verbose: print rec - # test that non-existant key lookups work (and that + # test that non-existent key lookups work (and that # DBC_set_range doesn't have a memleak under valgrind) rec = c.set_range(999999) self.assertEqual(rec, None) Modified: python/branches/release26-maint/Lib/difflib.py ============================================================================== --- python/branches/release26-maint/Lib/difflib.py (original) +++ python/branches/release26-maint/Lib/difflib.py Thu Jul 2 17:37:21 2009 @@ -1329,7 +1329,7 @@ (from line tuple, to line tuple, boolean flag) from/to line tuple -- (line num, line text) - line num -- integer or None (to indicate a context seperation) + line num -- integer or None (to indicate a context separation) line text -- original line text with following markers inserted: '\0+' -- marks start of added text '\0-' -- marks start of deleted text Modified: python/branches/release26-maint/Lib/distutils/tests/test_core.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/tests/test_core.py (original) +++ python/branches/release26-maint/Lib/distutils/tests/test_core.py Thu Jul 2 17:37:21 2009 @@ -57,7 +57,7 @@ def test_run_setup_uses_current_dir(self): # This tests that the setup script is run with the current directory - # as it's own current directory; this was temporarily broken by a + # as its own current directory; this was temporarily broken by a # previous patch when TESTFN did not use the current directory. sys.stdout = StringIO.StringIO() cwd = os.getcwd() Modified: python/branches/release26-maint/Lib/email/message.py ============================================================================== --- python/branches/release26-maint/Lib/email/message.py (original) +++ python/branches/release26-maint/Lib/email/message.py Thu Jul 2 17:37:21 2009 @@ -20,7 +20,7 @@ SEMISPACE = '; ' # Regular expression that matches `special' characters in parameters, the -# existance of which force quoting of the parameter value. +# existence of which force quoting of the parameter value. tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]') Modified: python/branches/release26-maint/Lib/idlelib/AutoComplete.py ============================================================================== --- python/branches/release26-maint/Lib/idlelib/AutoComplete.py (original) +++ python/branches/release26-maint/Lib/idlelib/AutoComplete.py Thu Jul 2 17:37:21 2009 @@ -67,7 +67,7 @@ def try_open_completions_event(self, event): """Happens when it would be nice to open a completion list, but not - really neccesary, for example after an dot, so function + really necessary, for example after an dot, so function calls won't be made. """ lastchar = self.text.get("insert-1c") @@ -79,7 +79,7 @@ COMPLETE_FILES) def autocomplete_event(self, event): - """Happens when the user wants to complete his word, and if neccesary, + """Happens when the user wants to complete his word, and if necessary, open a completion list after that (if there is more than one completion) """ Modified: python/branches/release26-maint/Lib/idlelib/CallTips.py ============================================================================== --- python/branches/release26-maint/Lib/idlelib/CallTips.py (original) +++ python/branches/release26-maint/Lib/idlelib/CallTips.py Thu Jul 2 17:37:21 2009 @@ -51,7 +51,7 @@ def try_open_calltip_event(self, event): """Happens when it would be nice to open a CallTip, but not really - neccesary, for example after an opening bracket, so function calls + necessary, for example after an opening bracket, so function calls won't be made. """ self.open_calltip(False) Modified: python/branches/release26-maint/Lib/idlelib/NEWS.txt ============================================================================== --- python/branches/release26-maint/Lib/idlelib/NEWS.txt (original) +++ python/branches/release26-maint/Lib/idlelib/NEWS.txt Thu Jul 2 17:37:21 2009 @@ -310,7 +310,7 @@ window raising, especially in the Windows menu and in the debugger. IDLEfork 763524. -- If user passes a non-existant filename on the commandline, just +- If user passes a non-existent filename on the commandline, just open a new file, don't raise a dialog. IDLEfork 854928. Modified: python/branches/release26-maint/Lib/io.py ============================================================================== --- python/branches/release26-maint/Lib/io.py (original) +++ python/branches/release26-maint/Lib/io.py Thu Jul 2 17:37:21 2009 @@ -4,7 +4,7 @@ At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no -seperation between reading and writing to streams; implementations are +separation between reading and writing to streams; implementations are allowed to throw an IOError if they do not support a given operation. Extending IOBase is RawIOBase which deals simply with the reading and @@ -1374,7 +1374,7 @@ enabled. With this enabled, on input, the lines endings '\n', '\r', or '\r\n' are translated to '\n' before being returned to the caller. Conversely, on output, '\n' is translated to the system - default line seperator, os.linesep. If newline is any other of its + default line separator, os.linesep. If newline is any other of its legal values, that newline becomes the newline when the file is read and it is returned untranslated. On output, '\n' is converted to the newline. Modified: python/branches/release26-maint/Lib/lib-tk/Tkinter.py ============================================================================== --- python/branches/release26-maint/Lib/lib-tk/Tkinter.py (original) +++ python/branches/release26-maint/Lib/lib-tk/Tkinter.py Thu Jul 2 17:37:21 2009 @@ -3316,7 +3316,7 @@ """Return the color (red, green, blue) of the pixel at X,Y.""" return self.tk.call(self.name, 'get', x, y) def put(self, data, to=None): - """Put row formated colors to image starting from + """Put row formatted colors to image starting from position TO, e.g. image.put("{red green} {blue yellow}", to=(4,6))""" args = (self.name, 'put', data) if to: Modified: python/branches/release26-maint/Lib/lib-tk/turtle.py ============================================================================== --- python/branches/release26-maint/Lib/lib-tk/turtle.py (original) +++ python/branches/release26-maint/Lib/lib-tk/turtle.py Thu Jul 2 17:37:21 2009 @@ -2794,7 +2794,7 @@ def _drawturtle(self): """Manages the correct rendering of the turtle with respect to - its shape, resizemode, strech and tilt etc.""" + its shape, resizemode, stretch and tilt etc.""" screen = self.screen shape = screen._shapes[self.turtle.shapeIndex] ttype = shape._type Modified: python/branches/release26-maint/Lib/optparse.py ============================================================================== --- python/branches/release26-maint/Lib/optparse.py (original) +++ python/branches/release26-maint/Lib/optparse.py Thu Jul 2 17:37:21 2009 @@ -1588,7 +1588,7 @@ """print_usage(file : file = stdout) Print the usage message for the current program (self.usage) to - 'file' (default stdout). Any occurence of the string "%prog" in + 'file' (default stdout). Any occurrence of the string "%prog" in self.usage is replaced with the name of the current program (basename of sys.argv[0]). Does nothing if self.usage is empty or not defined. @@ -1606,7 +1606,7 @@ """print_version(file : file = stdout) Print the version message for this program (self.version) to - 'file' (default stdout). As with print_usage(), any occurence + 'file' (default stdout). As with print_usage(), any occurrence of "%prog" in self.version is replaced by the current program's name. Does nothing if self.version is empty or undefined. """ Modified: python/branches/release26-maint/Lib/plat-mac/bundlebuilder.py ============================================================================== --- python/branches/release26-maint/Lib/plat-mac/bundlebuilder.py (original) +++ python/branches/release26-maint/Lib/plat-mac/bundlebuilder.py Thu Jul 2 17:37:21 2009 @@ -661,7 +661,7 @@ if USE_ZIPIMPORT: if name != "zlib": # neatly pack all extension modules in a subdirectory, - # except zlib, since it's neccesary for bootstrapping. + # except zlib, since it's necessary for bootstrapping. dstpath = pathjoin("ExtensionModules", dstpath) # Python modules are stored in a Zip archive, but put # extensions in Contents/Resources/. Add a tiny "loader" Modified: python/branches/release26-maint/Lib/smtpd.py ============================================================================== --- python/branches/release26-maint/Lib/smtpd.py (original) +++ python/branches/release26-maint/Lib/smtpd.py Thu Jul 2 17:37:21 2009 @@ -420,7 +420,7 @@ s = StringIO(data) msg = Message.Message(s) # These headers are required for the proper execution of Mailman. All - # MTAs in existance seem to add these if the original message doesn't + # MTAs in existence seem to add these if the original message doesn't # have them. if not msg.getheader('from'): msg['From'] = mailfrom Modified: python/branches/release26-maint/Lib/tarfile.py ============================================================================== --- python/branches/release26-maint/Lib/tarfile.py (original) +++ python/branches/release26-maint/Lib/tarfile.py Thu Jul 2 17:37:21 2009 @@ -1775,7 +1775,7 @@ def getmember(self, name): """Return a TarInfo object for member `name'. If `name' can not be found in the archive, KeyError is raised. If a member occurs more - than once in the archive, its last occurence is assumed to be the + than once in the archive, its last occurrence is assumed to be the most up-to-date version. """ tarinfo = self._getmember(name) Modified: python/branches/release26-maint/Lib/test/test_calendar.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_calendar.py (original) +++ python/branches/release26-maint/Lib/test/test_calendar.py Thu Jul 2 17:37:21 2009 @@ -170,7 +170,7 @@ class OutputTestCase(unittest.TestCase): def normalize_calendar(self, s): - # Filters out locale dependant strings + # Filters out locale dependent strings def neitherspacenordigit(c): return not c.isspace() and not c.isdigit() Modified: python/branches/release26-maint/Lib/test/test_cfgparser.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_cfgparser.py (original) +++ python/branches/release26-maint/Lib/test/test_cfgparser.py Thu Jul 2 17:37:21 2009 @@ -87,11 +87,11 @@ # Make sure the right things happen for remove_option(); # added to include check for SourceForge bug #123324: self.failUnless(cf.remove_option('Foo Bar', 'foo'), - "remove_option() failed to report existance of option") + "remove_option() failed to report existence of option") self.failIf(cf.has_option('Foo Bar', 'foo'), "remove_option() failed to remove option") self.failIf(cf.remove_option('Foo Bar', 'foo'), - "remove_option() failed to report non-existance of option" + "remove_option() failed to report non-existence of option" " that was removed") self.assertRaises(ConfigParser.NoSectionError, @@ -264,7 +264,7 @@ file1 = test_support.findfile("cfgparser.1") # check when we pass a mix of readable and non-readable files: cf = self.newconfig() - parsed_files = cf.read([file1, "nonexistant-file"]) + parsed_files = cf.read([file1, "nonexistent-file"]) self.assertEqual(parsed_files, [file1]) self.assertEqual(cf.get("Foo Bar", "foo"), "newbar") # check when we pass only a filename: @@ -274,7 +274,7 @@ self.assertEqual(cf.get("Foo Bar", "foo"), "newbar") # check when we pass only missing files: cf = self.newconfig() - parsed_files = cf.read(["nonexistant-file"]) + parsed_files = cf.read(["nonexistent-file"]) self.assertEqual(parsed_files, []) # check when we pass no files: cf = self.newconfig() Modified: python/branches/release26-maint/Lib/test/test_codeccallbacks.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_codeccallbacks.py (original) +++ python/branches/release26-maint/Lib/test/test_codeccallbacks.py Thu Jul 2 17:37:21 2009 @@ -109,7 +109,7 @@ # useful that the error handler is not called for every single # unencodable character, but for a complete sequence of # unencodable characters, otherwise we would output many - # unneccessary escape sequences. + # unnecessary escape sequences. def uninamereplace(exc): if not isinstance(exc, UnicodeEncodeError): Modified: python/branches/release26-maint/Lib/test/test_cookielib.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_cookielib.py (original) +++ python/branches/release26-maint/Lib/test/test_cookielib.py Thu Jul 2 17:37:21 2009 @@ -1714,7 +1714,7 @@ counter[key] = counter[key] + 1 self.assert_(not ( - # a permanent cookie got lost accidently + # a permanent cookie got lost accidentally counter["perm_after"] != counter["perm_before"] or # a session cookie hasn't been cleared counter["session_after"] != 0 or Modified: python/branches/release26-maint/Lib/test/test_descrtut.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_descrtut.py (original) +++ python/branches/release26-maint/Lib/test/test_descrtut.py Thu Jul 2 17:37:21 2009 @@ -54,7 +54,7 @@ {1: 3.25} >>> print a[1] # show the new item 3.25 - >>> print a[0] # a non-existant item + >>> print a[0] # a non-existent item 0.0 >>> a.merge({1:100, 2:200}) # use a dict method >>> print sortdict(a) # show the result Modified: python/branches/release26-maint/Lib/test/test_funcattrs.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_funcattrs.py (original) +++ python/branches/release26-maint/Lib/test/test_funcattrs.py Thu Jul 2 17:37:21 2009 @@ -196,7 +196,7 @@ def test_unset_attr(self): for func in [self.b, self.f.a, self.fi.a]: - try: func.non_existant_attr + try: func.non_existent_attr except AttributeError: pass else: self.fail("using unknown attributes should raise " "AttributeError") Modified: python/branches/release26-maint/Lib/test/test_urllib2net.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_urllib2net.py (original) +++ python/branches/release26-maint/Lib/test/test_urllib2net.py Thu Jul 2 17:37:21 2009 @@ -104,7 +104,7 @@ def test_ftp(self): urls = [ 'ftp://ftp.kernel.org/pub/linux/kernel/README', - 'ftp://ftp.kernel.org/pub/linux/kernel/non-existant-file', + 'ftp://ftp.kernel.org/pub/linux/kernel/non-existent-file', #'ftp://ftp.kernel.org/pub/leenox/kernel/test', 'ftp://gatekeeper.research.compaq.com/pub/DEC/SRC' '/research-reports/00README-Legal-Rules-Regs', Modified: python/branches/release26-maint/Lib/wsgiref/headers.py ============================================================================== --- python/branches/release26-maint/Lib/wsgiref/headers.py (original) +++ python/branches/release26-maint/Lib/wsgiref/headers.py Thu Jul 2 17:37:21 2009 @@ -8,7 +8,7 @@ from types import ListType, TupleType # Regular expression that matches `special' characters in parameters, the -# existance of which force quoting of the parameter value. +# existence of which force quoting of the parameter value. import re tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]') Modified: python/branches/release26-maint/Misc/AIX-NOTES ============================================================================== --- python/branches/release26-maint/Misc/AIX-NOTES (original) +++ python/branches/release26-maint/Misc/AIX-NOTES Thu Jul 2 17:37:21 2009 @@ -22,7 +22,7 @@ (2) Stefan Esser (se at MI.Uni-Koeln.DE), in work done to compile Python 1.0.0 on AIX 3.2.4, reports that AIX compilers don't like the LANG environment varaiable set to European locales. This makes the compiler - generate floating point constants using "," as the decimal seperator, + generate floating point constants using "," as the decimal separator, which the assembler doesn't understand (or perhaps it is the other way around, with the assembler expecting, but not getting "," in float numbers). "LANG=C; export LANG" solves the problem, as does Modified: python/branches/release26-maint/Misc/HISTORY ============================================================================== --- python/branches/release26-maint/Misc/HISTORY (original) +++ python/branches/release26-maint/Misc/HISTORY Thu Jul 2 17:37:21 2009 @@ -9862,7 +9862,7 @@ Also (quite separately, but strangely related to the philosophical issue above) fix abspath() so that if win32api exists, it doesn't fail when the path doesn't actually exist -- if GetFullPathName() fails, - fall back on the old strategy (join with getcwd() if neccessary, and + fall back on the old strategy (join with getcwd() if necessary, and then use normpath()). * configure.in, configure, config.h.in, acconfig.h: Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Thu Jul 2 17:37:21 2009 @@ -1087,7 +1087,7 @@ - Issue #3575: Incremental decoder's decode function now takes bytearray by using 's*' instead of 't#'. -- Issue #2222: Fixed reference leak when occured os.rename() +- Issue #2222: Fixed reference leak when occurred os.rename() fails unicode conversion on 2nd parameter. (windows only) - Issue 2464. urllib2 now supports a malformation in the URL received Modified: python/branches/release26-maint/Misc/cheatsheet ============================================================================== --- python/branches/release26-maint/Misc/cheatsheet (original) +++ python/branches/release26-maint/Misc/cheatsheet Thu Jul 2 17:37:21 2009 @@ -481,7 +481,7 @@ s.isupper() return True if all characters in s are uppercase, False (6) otherwise. s.join(seq) return a concatenation of the strings in the sequence - seq, seperated by 's's. + seq, separated by 's's. s.ljust(width) return s left justified in a string of length width. (1), (8) s.lower() return a copy of s converted to lowercase. @@ -1556,10 +1556,10 @@ asctime( timeTuple), strftime( -format, return a formated string representing time. +format, return a formatted string representing time. timeTuple) mktime(tuple) inverse of localtime(). Return a float. -strptime( parse a formated string representing time, return tuple as in +strptime( parse a formatted string representing time, return tuple as in string[, gmtime(). format]) sleep(secs) Suspend execution for seconds. can be a float. Modified: python/branches/release26-maint/Modules/_ctypes/libffi/aclocal.m4 ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi/aclocal.m4 (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi/aclocal.m4 Thu Jul 2 17:37:21 2009 @@ -1155,7 +1155,7 @@ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - # We can hardcode non-existant directories. + # We can hardcode non-existent directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library Modified: python/branches/release26-maint/Modules/_ctypes/libffi/configure ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi/configure (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi/configure Thu Jul 2 17:37:21 2009 @@ -9546,7 +9546,7 @@ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then - # We can hardcode non-existant directories. + # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library @@ -13514,7 +13514,7 @@ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then - # We can hardcode non-existant directories. + # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library @@ -16117,7 +16117,7 @@ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then - # We can hardcode non-existant directories. + # We can hardcode non-existent directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library @@ -18720,7 +18720,7 @@ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then - # We can hardcode non-existant directories. + # We can hardcode non-existent directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library Modified: python/branches/release26-maint/Modules/_ctypes/libffi/src/x86/ffi64.c ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi/src/x86/ffi64.c (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi/src/x86/ffi64.c Thu Jul 2 17:37:21 2009 @@ -52,7 +52,7 @@ /* Register class used for passing given 64bit part of the argument. These represent classes as documented by the PS ABI, with the exception of SSESF, SSEDF classes, that are basically SSE class, just gcc will - use SF or DFmode move instead of DImode to avoid reformating penalties. + use SF or DFmode move instead of DImode to avoid reformatting penalties. Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves whenever possible (upper half does contain padding). */ Modified: python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c Thu Jul 2 17:37:21 2009 @@ -55,7 +55,7 @@ /* Register class used for passing given 64bit part of the argument. These represent classes as documented by the PS ABI, with the exception of SSESF, SSEDF classes, that are basically SSE class, just gcc will - use SF or DFmode move instead of DImode to avoid reformating penalties. + use SF or DFmode move instead of DImode to avoid reformatting penalties. Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves whenever possible (upper half does contain padding). */ Modified: python/branches/release26-maint/Modules/_sqlite/connection.c ============================================================================== --- python/branches/release26-maint/Modules/_sqlite/connection.c (original) +++ python/branches/release26-maint/Modules/_sqlite/connection.c Thu Jul 2 17:37:21 2009 @@ -864,7 +864,7 @@ PyErr_Clear(); } - /* abort query if error occured */ + /* abort query if error occurred */ rc = 1; } else { rc = (int)PyObject_IsTrue(ret); Modified: python/branches/release26-maint/Modules/arraymodule.c ============================================================================== --- python/branches/release26-maint/Modules/arraymodule.c (original) +++ python/branches/release26-maint/Modules/arraymodule.c Thu Jul 2 17:37:21 2009 @@ -935,7 +935,7 @@ PyDoc_STRVAR(count_doc, "count(x)\n\ \n\ -Return number of occurences of x in the array."); +Return number of occurrences of x in the array."); static PyObject * array_index(arrayobject *self, PyObject *v) @@ -959,7 +959,7 @@ PyDoc_STRVAR(index_doc, "index(x)\n\ \n\ -Return index of first occurence of x in the array."); +Return index of first occurrence of x in the array."); static int array_contains(arrayobject *self, PyObject *v) @@ -1001,7 +1001,7 @@ PyDoc_STRVAR(remove_doc, "remove(x)\n\ \n\ -Remove the first occurence of x in the array."); +Remove the first occurrence of x in the array."); static PyObject * array_pop(arrayobject *self, PyObject *args) @@ -2055,16 +2055,16 @@ append() -- append a new item to the end of the array\n\ buffer_info() -- return information giving the current memory info\n\ byteswap() -- byteswap all the items of the array\n\ -count() -- return number of occurences of an object\n\ +count() -- return number of occurrences of an object\n\ extend() -- extend array by appending multiple elements from an iterable\n\ fromfile() -- read items from a file object\n\ fromlist() -- append items from the list\n\ fromstring() -- append items from the string\n\ -index() -- return index of first occurence of an object\n\ +index() -- return index of first occurrence of an object\n\ insert() -- insert a new item into the array at a provided position\n\ pop() -- remove and return item (default last)\n\ read() -- DEPRECATED, use fromfile()\n\ -remove() -- remove first occurence of an object\n\ +remove() -- remove first occurrence of an object\n\ reverse() -- reverse the order of the items in the array\n\ tofile() -- write all items to a file object\n\ tolist() -- return the array converted to an ordinary list\n\ Modified: python/branches/release26-maint/Modules/posixmodule.c ============================================================================== --- python/branches/release26-maint/Modules/posixmodule.c (original) +++ python/branches/release26-maint/Modules/posixmodule.c Thu Jul 2 17:37:21 2009 @@ -2400,7 +2400,7 @@ static PyObject * posix__getfullpathname(PyObject *self, PyObject *args) { - /* assume encoded strings wont more than double no of chars */ + /* assume encoded strings won't more than double no of chars */ char inbuf[MAX_PATH*2]; char *inbufp = inbuf; Py_ssize_t insize = sizeof(inbuf); @@ -5034,7 +5034,7 @@ "Your program accessed mem currently in use at xxx" and a hopeful warning about the stability of your system. - Cost is Ctrl+C wont kill children, but anyone + Cost is Ctrl+C won't kill children, but anyone who cares can have a go! */ dwProcessFlags |= CREATE_NEW_CONSOLE; Modified: python/branches/release26-maint/Objects/abstract.c ============================================================================== --- python/branches/release26-maint/Objects/abstract.c (original) +++ python/branches/release26-maint/Objects/abstract.c Thu Jul 2 17:37:21 2009 @@ -2244,7 +2244,7 @@ /* Iterate over seq. Result depends on the operation: PY_ITERSEARCH_COUNT: -1 if error, else # of times obj appears in seq. - PY_ITERSEARCH_INDEX: 0-based index of first occurence of obj in seq; + PY_ITERSEARCH_INDEX: 0-based index of first occurrence of obj in seq; set ValueError and return -1 if none found; also return -1 on error. Py_ITERSEARCH_CONTAINS: return 1 if obj in seq, else 0; -1 on error. */ Modified: python/branches/release26-maint/Objects/listsort.txt ============================================================================== --- python/branches/release26-maint/Objects/listsort.txt (original) +++ python/branches/release26-maint/Objects/listsort.txt Thu Jul 2 17:37:21 2009 @@ -309,7 +309,7 @@ A:10000 B:20000 C:10000 we dare not merge A with C first, because if A, B and C happen to contain -a common element, it would get out of order wrt its occurence(s) in B. The +a common element, it would get out of order wrt its occurrence(s) in B. The merging must be done as (A+B)+C or A+(B+C) instead. So merging is always done on two consecutive runs at a time, and in-place, Modified: python/branches/release26-maint/Objects/object.c ============================================================================== --- python/branches/release26-maint/Objects/object.c (original) +++ python/branches/release26-maint/Objects/object.c Thu Jul 2 17:37:21 2009 @@ -1960,7 +1960,7 @@ none_dealloc(PyObject* ignore) { /* This should never get called, but we also don't want to SEGV if - * we accidently decref None out of existance. + * we accidentally decref None out of existence. */ Py_FatalError("deallocating None"); } Modified: python/branches/release26-maint/Objects/unicodeobject.c ============================================================================== --- python/branches/release26-maint/Objects/unicodeobject.c (original) +++ python/branches/release26-maint/Objects/unicodeobject.c Thu Jul 2 17:37:21 2009 @@ -1688,7 +1688,7 @@ charsleft = (charsleft << 16) | ch; /* out, charsleft, bitsleft = */ ENCODE(out, charsleft, bitsleft); - /* If the next character is special then we dont' need to terminate + /* If the next character is special then we don't need to terminate the shift sequence. If the next character is not a BASE64 character or '-' then the shift sequence will be terminated implicitly and we don't have to insert a '-'. */ Modified: python/branches/release26-maint/PC/_winreg.c ============================================================================== --- python/branches/release26-maint/PC/_winreg.c (original) +++ python/branches/release26-maint/PC/_winreg.c Thu Jul 2 17:37:21 2009 @@ -25,7 +25,7 @@ /* The win32api module reports the function name that failed, but this concept is not in the Python core. - Hopefully it will one day, and in the meantime I dont + Hopefully it will one day, and in the meantime I don't want to lose this info... */ #define PyErr_SetFromWindowsErrWithFunction(rc, fnname) \ @@ -694,9 +694,9 @@ ** Note that fixupMultiSZ and countString have both had changes ** made to support "incorrect strings". The registry specification ** calls for strings to be terminated with 2 null bytes. It seems -** some commercial packages install strings which dont conform, +** some commercial packages install strings which don't conform, ** causing this code to fail - however, "regedit" etc still work -** with these strings (ie only we dont!). +** with these strings (ie only we don't!). */ static void fixupMultiSZ(char **str, char *data, int len) Modified: python/branches/release26-maint/PC/os2vacpp/makefile.omk ============================================================================== --- python/branches/release26-maint/PC/os2vacpp/makefile.omk (original) +++ python/branches/release26-maint/PC/os2vacpp/makefile.omk Thu Jul 2 17:37:21 2009 @@ -220,7 +220,7 @@ # zlibmodule.c -- Wrapper of ZLib Compression API (GZip Format) # puremodule.c -- Wrapper of Purify Debugging API (Probably Non-OS/2) - # dlmodule.c -- Some Wierd Form of Data Processing Module + # dlmodule.c -- Some Weird Form of Data Processing Module # xxmodule.c -- Template to Create Your Own Module # Modified: python/branches/release26-maint/Tools/scripts/texi2html.py ============================================================================== --- python/branches/release26-maint/Tools/scripts/texi2html.py (original) +++ python/branches/release26-maint/Tools/scripts/texi2html.py Thu Jul 2 17:37:21 2009 @@ -38,7 +38,7 @@ # rpyron 2002-05-07 # Robert Pyron # 1. BUGFIX: In function makefile(), strip blanks from the nodename. -# This is necesary to match the behavior of parser.makeref() and +# This is necessary to match the behavior of parser.makeref() and # parser.do_node(). # 2. BUGFIX fixed KeyError in end_ifset (well, I may have just made # it go away, rather than fix it) From python-checkins at python.org Thu Jul 2 17:56:56 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 15:56:56 -0000 Subject: [Python-checkins] r73771 - in sandbox/trunk/2to3/lib2to3: fixes/fix_imports.py tests/test_fixers.py Message-ID: Author: benjamin.peterson Date: Thu Jul 2 17:56:55 2009 New Revision: 73771 Log: force the imports fixer to be run after the import one #6400 Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py Thu Jul 2 17:56:55 2009 @@ -84,8 +84,6 @@ class FixImports(fixer_base.BaseFix): - order = "pre" # Pre-order tree traversal - # This is overridden in fix_imports2. mapping = MAPPING Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_fixers.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Thu Jul 2 17:56:55 2009 @@ -1703,6 +1703,11 @@ for key in ('dbhash', 'dumbdbm', 'dbm', 'gdbm'): self.modules[key] = mapping1[key] + def test_after_local_imports_refactoring(self): + for fix in ("imports", "imports2"): + self.fixer = fix + self.assert_runs_after("import") + class Test_urllib(FixerTestCase): fixer = "urllib" @@ -3502,6 +3507,7 @@ s = "from itertools import foo" self.unchanged(s) + class Test_import(FixerTestCase): fixer = "import" From python-checkins at python.org Thu Jul 2 17:58:38 2009 From: python-checkins at python.org (jesus.cea) Date: Thu, 02 Jul 2009 15:58:38 -0000 Subject: [Python-checkins] r73772 - peps/trunk/pep-3129.txt Message-ID: Author: jesus.cea Date: Thu Jul 2 17:58:38 2009 New Revision: 73772 Log: Minor typo Modified: peps/trunk/pep-3129.txt Modified: peps/trunk/pep-3129.txt ============================================================================== --- peps/trunk/pep-3129.txt (original) +++ peps/trunk/pep-3129.txt Thu Jul 2 17:58:38 2009 @@ -65,7 +65,7 @@ Implementation ============== -Adapating Python's grammar to support class decorators requires +Adapting Python's grammar to support class decorators requires modifying two rules and adding a new rule:: funcdef: [decorators] 'def' NAME parameters ['->' test] ':' suite From python-checkins at python.org Thu Jul 2 18:51:56 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 16:51:56 -0000 Subject: [Python-checkins] r73773 - python/trunk/Lib/test/test_py3kwarn.py Message-ID: Author: benjamin.peterson Date: Thu Jul 2 18:51:56 2009 New Revision: 73773 Log: remove this test; a module level warning is enough Modified: python/trunk/Lib/test/test_py3kwarn.py Modified: python/trunk/Lib/test/test_py3kwarn.py ============================================================================== --- python/trunk/Lib/test/test_py3kwarn.py (original) +++ python/trunk/Lib/test/test_py3kwarn.py Thu Jul 2 18:51:56 2009 @@ -354,17 +354,6 @@ mod.walk("crashers", dumbo, None) self.assertEquals(str(w.message), msg) - def test_commands_members(self): - import commands - # commands module tests may have already triggered this warning - reset_module_registry(commands) - members = {"mk2arg" : 2, "mkarg" : 1, "getstatus" : 1} - for name, arg_count in members.items(): - with warnings.catch_warnings(): - warnings.filterwarnings("error") - func = getattr(commands, name) - self.assertRaises(DeprecationWarning, func, *([None]*arg_count)) - def test_reduce_move(self): from operator import add # reduce tests may have already triggered this warning From python-checkins at python.org Thu Jul 2 19:06:17 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 17:06:17 -0000 Subject: [Python-checkins] r73774 - in python/trunk: Lib/test/test_py3kwarn.py Misc/NEWS Objects/methodobject.c Message-ID: Author: benjamin.peterson Date: Thu Jul 2 19:06:17 2009 New Revision: 73774 Log: only order comparisons are removed in py3k #6119 Modified: python/trunk/Lib/test/test_py3kwarn.py python/trunk/Misc/NEWS python/trunk/Objects/methodobject.c Modified: python/trunk/Lib/test/test_py3kwarn.py ============================================================================== --- python/trunk/Lib/test/test_py3kwarn.py (original) +++ python/trunk/Lib/test/test_py3kwarn.py Thu Jul 2 19:06:17 2009 @@ -21,6 +21,9 @@ def assertWarning(self, _, warning, expected_message): self.assertEqual(str(warning.message), expected_message) + def assertNoWarning(self, _, recorder): + self.assertEqual(len(recorder.warnings), 0) + def test_backquote(self): expected = 'backquote not supported in 3.x; use repr()' with check_warnings() as w: @@ -113,7 +116,7 @@ def test_builtin_function_or_method_comparisons(self): expected = ('builtin_function_or_method ' - 'inequality comparisons not supported in 3.x') + 'order comparisons not supported in 3.x') func = eval meth = {}.get with check_warnings() as w: @@ -124,6 +127,12 @@ self.assertWarning(meth <= func, w, expected) w.reset() self.assertWarning(meth >= func, w, expected) + w.reset() + self.assertNoWarning(meth == func, w) + self.assertNoWarning(meth != func, w) + lam = lambda x: x + self.assertNoWarning(lam == func, w) + self.assertNoWarning(lam != func, w) def test_frame_attributes(self): template = "%s has been removed in 3.x" Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Jul 2 19:06:17 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6119: Fixed a incorrect Py3k warning about order comparisons of builtin + functions and methods. + - Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. This fixes a build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead of stdint.h on that platform. Modified: python/trunk/Objects/methodobject.c ============================================================================== --- python/trunk/Objects/methodobject.c (original) +++ python/trunk/Objects/methodobject.c Thu Jul 2 19:06:17 2009 @@ -230,12 +230,9 @@ PyObject *res; int eq; - if ((op != Py_EQ && op != Py_NE) || - !PyCFunction_Check(self) || - !PyCFunction_Check(other)) - { - /* Py3K warning if types are not equal and comparison isn't == or != */ - if (PyErr_WarnPy3k("builtin_function_or_method inequality " + if (op != Py_EQ && op != Py_NE) { + /* Py3K warning if comparison isn't == or !=. */ + if (PyErr_WarnPy3k("builtin_function_or_method order " "comparisons not supported in 3.x", 1) < 0) { return NULL; } @@ -243,6 +240,10 @@ Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } + else if (!PyCFunction_Check(self) || !PyCFunction_Check(other)) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } a = (PyCFunctionObject *)self; b = (PyCFunctionObject *)other; eq = a->m_self == b->m_self; From python-checkins at python.org Thu Jul 2 19:19:23 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 17:19:23 -0000 Subject: [Python-checkins] r73775 - in python/branches/release26-maint: Lib/test/test_py3kwarn.py Misc/NEWS Objects/methodobject.c Message-ID: Author: benjamin.peterson Date: Thu Jul 2 19:19:22 2009 New Revision: 73775 Log: Merged revisions 73774 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73774 | benjamin.peterson | 2009-07-02 12:06:17 -0500 (Thu, 02 Jul 2009) | 1 line only order comparisons are removed in py3k #6119 ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_py3kwarn.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Objects/methodobject.c Modified: python/branches/release26-maint/Lib/test/test_py3kwarn.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_py3kwarn.py (original) +++ python/branches/release26-maint/Lib/test/test_py3kwarn.py Thu Jul 2 19:19:22 2009 @@ -22,6 +22,9 @@ def assertWarning(self, _, warning, expected_message): self.assertEqual(str(warning.message), expected_message) + def assertNoWarning(self, _, recorder): + self.assertEqual(len(recorder.warnings), 0) + def test_backquote(self): expected = 'backquote not supported in 3.x; use repr()' with check_warnings() as w: @@ -132,7 +135,7 @@ def test_builtin_function_or_method_comparisons(self): expected = ('builtin_function_or_method ' - 'inequality comparisons not supported in 3.x') + 'order comparisons not supported in 3.x') func = eval meth = {}.get with check_warnings() as w: @@ -143,6 +146,12 @@ self.assertWarning(meth <= func, w, expected) w.reset() self.assertWarning(meth >= func, w, expected) + w.reset() + self.assertNoWarning(meth == func, w) + self.assertNoWarning(meth != func, w) + lam = lambda x: x + self.assertNoWarning(lam == func, w) + self.assertNoWarning(lam != func, w) def test_sort_cmp_arg(self): expected = "the cmp argument is not supported in 3.x" Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Thu Jul 2 19:19:22 2009 @@ -15,6 +15,9 @@ - Issue #4547: When debugging a very large function, it was not always possible to update the lineno attribute of the current frame. +- Issue #6119: Fixed a incorrect Py3k warning about order comparisons of builtin + functions and methods. + - Issue #5330: C functions called with keyword arguments were not reported by the various profiling modules (profile, cProfile). Patch by Hagen F?rstenau. Modified: python/branches/release26-maint/Objects/methodobject.c ============================================================================== --- python/branches/release26-maint/Objects/methodobject.c (original) +++ python/branches/release26-maint/Objects/methodobject.c Thu Jul 2 19:19:22 2009 @@ -230,12 +230,9 @@ PyObject *res; int eq; - if ((op != Py_EQ && op != Py_NE) || - !PyCFunction_Check(self) || - !PyCFunction_Check(other)) - { - /* Py3K warning if types are not equal and comparison isn't == or != */ - if (PyErr_WarnPy3k("builtin_function_or_method inequality " + if (op != Py_EQ && op != Py_NE) { + /* Py3K warning if comparison isn't == or !=. */ + if (PyErr_WarnPy3k("builtin_function_or_method order " "comparisons not supported in 3.x", 1) < 0) { return NULL; } @@ -243,6 +240,10 @@ Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } + else if (!PyCFunction_Check(self) || !PyCFunction_Check(other)) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } a = (PyCFunctionObject *)self; b = (PyCFunctionObject *)other; eq = a->m_self == b->m_self; From python-checkins at python.org Thu Jul 2 20:16:46 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 18:16:46 -0000 Subject: [Python-checkins] r73776 - in python/trunk: Lib/test/test_print.py Misc/NEWS Python/bltinmodule.c Message-ID: Author: benjamin.peterson Date: Thu Jul 2 20:16:45 2009 New Revision: 73776 Log: when print() gets unicode arguments, sep and end should be unicode by default #4618 Modified: python/trunk/Lib/test/test_print.py python/trunk/Misc/NEWS python/trunk/Python/bltinmodule.c Modified: python/trunk/Lib/test/test_print.py ============================================================================== --- python/trunk/Lib/test/test_print.py (original) +++ python/trunk/Lib/test/test_print.py Thu Jul 2 20:16:45 2009 @@ -9,12 +9,7 @@ from test import test_support import sys -if sys.version_info[0] == 3: - # 3.x - from io import StringIO -else: - # 2.x - from StringIO import StringIO +from StringIO import StringIO NotDefined = object() @@ -112,6 +107,34 @@ self.assertRaises(TypeError, print, '', end=3) self.assertRaises(AttributeError, print, '', file='') + def test_mixed_args(self): + # If an unicode arg is passed, sep and end should be unicode, too. + class Recorder(object): + + def __init__(self, must_be_unicode): + self.buf = [] + self.force_unicode = must_be_unicode + + def write(self, what): + if self.force_unicode and not isinstance(what, unicode): + raise AssertionError("{0!r} is not unicode".format(what)) + self.buf.append(what) + + buf = Recorder(True) + print(u'hi', file=buf) + self.assertEqual(u''.join(buf.buf), 'hi\n') + del buf.buf[:] + print(u'hi', u'nothing', file=buf) + self.assertEqual(u''.join(buf.buf), 'hi nothing\n') + buf = Recorder(False) + print('hi', 'bye', end=u'\n', file=buf) + self.assertTrue(isinstance(buf.buf[1], unicode)) + self.assertTrue(isinstance(buf.buf[3], unicode)) + del buf.buf[:] + print(sep=u'x', file=buf) + self.assertTrue(isinstance(buf.buf[-1], unicode)) + + def test_main(): test_support.run_unittest(TestPrint) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Jul 2 20:16:45 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #4618: When unicode arguments are passed to print(), the default + separator and end should be unicode also. + - Issue #6119: Fixed a incorrect Py3k warning about order comparisons of builtin functions and methods. Modified: python/trunk/Python/bltinmodule.c ============================================================================== --- python/trunk/Python/bltinmodule.c (original) +++ python/trunk/Python/bltinmodule.c Thu Jul 2 20:16:45 2009 @@ -1556,14 +1556,40 @@ builtin_print(PyObject *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = {"sep", "end", "file", 0}; - static PyObject *dummy_args; + static PyObject *dummy_args = NULL; + static PyObject *unicode_newline = NULL, *unicode_space = NULL; + static PyObject *str_newline = NULL, *str_space = NULL; + PyObject *newline, *space; PyObject *sep = NULL, *end = NULL, *file = NULL; - int i, err; + int i, err, use_unicode = 0; if (dummy_args == NULL) { if (!(dummy_args = PyTuple_New(0))) return NULL; } + if (str_newline == NULL) { + str_newline = PyString_FromString("\n"); + if (str_newline == NULL) + return NULL; + str_space = PyString_FromString(" "); + if (str_space == NULL) { + Py_CLEAR(str_newline); + return NULL; + } + unicode_newline = PyUnicode_FromString("\n"); + if (unicode_newline == NULL) { + Py_CLEAR(str_newline); + Py_CLEAR(str_space); + return NULL; + } + unicode_space = PyUnicode_FromString(" "); + if (unicode_space == NULL) { + Py_CLEAR(str_newline); + Py_CLEAR(str_space); + Py_CLEAR(unicode_space); + return NULL; + } + } if (!PyArg_ParseTupleAndKeywords(dummy_args, kwds, "|OOO:print", kwlist, &sep, &end, &file)) return NULL; @@ -1573,26 +1599,56 @@ if (file == Py_None) Py_RETURN_NONE; } + if (sep == Py_None) { + sep = NULL; + } + else if (sep) { + if (PyUnicode_Check(sep)) { + use_unicode = 1; + } + else if (!PyString_Check(sep)) { + PyErr_Format(PyExc_TypeError, + "sep must be None, str or unicode, not %.200s", + sep->ob_type->tp_name); + return NULL; + } + } + if (end == Py_None) + end = NULL; + else if (end) { + if (PyUnicode_Check(end)) { + use_unicode = 1; + } + else if (!PyString_Check(end)) { + PyErr_Format(PyExc_TypeError, + "end must be None, str or unicode, not %.200s", + end->ob_type->tp_name); + return NULL; + } + } - if (sep && sep != Py_None && !PyString_Check(sep) && - !PyUnicode_Check(sep)) { - PyErr_Format(PyExc_TypeError, - "sep must be None, str or unicode, not %.200s", - sep->ob_type->tp_name); - return NULL; + if (!use_unicode) { + for (i = 0; i < PyTuple_Size(args); i++) { + if (PyUnicode_Check(PyTuple_GET_ITEM(args, i))) { + use_unicode = 1; + break; + } + } } - if (end && end != Py_None && !PyString_Check(end) && - !PyUnicode_Check(end)) { - PyErr_Format(PyExc_TypeError, - "end must be None, str or unicode, not %.200s", - end->ob_type->tp_name); - return NULL; + if (use_unicode) { + newline = unicode_newline; + space = unicode_space; + } + else { + newline = str_newline; + space = str_space; } for (i = 0; i < PyTuple_Size(args); i++) { if (i > 0) { - if (sep == NULL || sep == Py_None) - err = PyFile_WriteString(" ", file); + if (sep == NULL) + err = PyFile_WriteObject(space, file, + Py_PRINT_RAW); else err = PyFile_WriteObject(sep, file, Py_PRINT_RAW); @@ -1605,8 +1661,8 @@ return NULL; } - if (end == NULL || end == Py_None) - err = PyFile_WriteString("\n", file); + if (end == NULL) + err = PyFile_WriteObject(newline, file, Py_PRINT_RAW); else err = PyFile_WriteObject(end, file, Py_PRINT_RAW); if (err) From python-checkins at python.org Thu Jul 2 20:18:56 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 18:18:56 -0000 Subject: [Python-checkins] r73777 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Thu Jul 2 20:18:56 2009 New Revision: 73777 Log: Blocked revisions 73776 via svnmerge ........ r73776 | benjamin.peterson | 2009-07-02 13:16:45 -0500 (Thu, 02 Jul 2009) | 1 line when print() gets unicode arguments, sep and end should be unicode by default #4618 ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Thu Jul 2 20:19:21 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 02 Jul 2009 18:19:21 -0000 Subject: [Python-checkins] r73778 - in python/trunk/Doc/library: os.rst stat.rst Message-ID: Author: r.david.murray Date: Thu Jul 2 20:19:20 2009 New Revision: 73778 Log: Issue 6389: add documentation for the 'mode' flags defined in the stat module. Modified: python/trunk/Doc/library/os.rst python/trunk/Doc/library/stat.rst Modified: python/trunk/Doc/library/os.rst ============================================================================== --- python/trunk/Doc/library/os.rst (original) +++ python/trunk/Doc/library/os.rst Thu Jul 2 20:19:20 2009 @@ -857,25 +857,25 @@ combinations of them: - * ``stat.S_ISUID`` - * ``stat.S_ISGID`` - * ``stat.S_ENFMT`` - * ``stat.S_ISVTX`` - * ``stat.S_IREAD`` - * ``stat.S_IWRITE`` - * ``stat.S_IEXEC`` - * ``stat.S_IRWXU`` - * ``stat.S_IRUSR`` - * ``stat.S_IWUSR`` - * ``stat.S_IXUSR`` - * ``stat.S_IRWXG`` - * ``stat.S_IRGRP`` - * ``stat.S_IWGRP`` - * ``stat.S_IXGRP`` - * ``stat.S_IRWXO`` - * ``stat.S_IROTH`` - * ``stat.S_IWOTH`` - * ``stat.S_IXOTH`` + * :data:`stat.S_ISUID` + * :data:`stat.S_ISGID` + * :data:`stat.S_ENFMT` + * :data:`stat.S_ISVTX` + * :data:`stat.S_IREAD` + * :data:`stat.S_IWRITE` + * :data:`stat.S_IEXEC` + * :data:`stat.S_IRWXU` + * :data:`stat.S_IRUSR` + * :data:`stat.S_IWUSR` + * :data:`stat.S_IXUSR` + * :data:`stat.S_IRWXG` + * :data:`stat.S_IRGRP` + * :data:`stat.S_IWGRP` + * :data:`stat.S_IXGRP` + * :data:`stat.S_IRWXO` + * :data:`stat.S_IROTH` + * :data:`stat.S_IWOTH` + * :data:`stat.S_IXOTH` Availability: Unix, Windows. Modified: python/trunk/Doc/library/stat.rst ============================================================================== --- python/trunk/Doc/library/stat.rst (original) +++ python/trunk/Doc/library/stat.rst Thu Jul 2 20:19:20 2009 @@ -137,6 +137,131 @@ of the size field for other character and block devices varies more, depending on the implementation of the underlying system call. +The variables below define the flags used in the :data:`ST_MODE` field. + +Use of the functions above is more portable than use of the first set of flags: + +.. data:: S_IFMT + + Bit mask for the file type bit fields. + +.. data:: S_IFSOCK + + Socket. + +.. data:: S_IFLNK + + Symbolic link. + +.. data:: S_IFREG + + Regular file. + +.. data:: S_IFBLK + + Block device. + +.. data:: S_IFDIR + + Directory. + +.. data:: S_IFCHR + + Character device. + +.. data:: S_IFIFO + + FIFO. + +The following flags can also be used in the *mode* argument of :func:`os.chmod`: + +.. data:: S_ISUID + + Set UID bit. + +.. data:: S_ISGID + + Set-group-ID bit. This bit has several special uses. For a directory + it indicates that BSD semantics is to be used for that directory: + files created there inherit their group ID from the directory, not + from the effective group ID of the creating process, and directories + created there will also get the :data:`S_ISGID` bit set. For a + file that does not have the group execution bit (:data:`S_IXGRP`) + set, the set-group-ID bit indicates mandatory file/record locking + (see also :data:`S_ENFMT`). + +.. data:: S_ISVTX + + Sticky bit. When this bit is set on a directory it means that a file + in that directory can be renamed or deleted only by the owner of the + file, by the owner of the directory, or by a privileged process. + +.. data:: S_IRWXU + + Mask for file owner permissions. + +.. data:: S_IRUSR + + Owner has read permission. + +.. data:: S_IWUSR + + Owner has write permission. + +.. data:: S_IXUSR + + Owner has execute permission. + +.. data:: S_IRWXG + + Mask for group permissions. + +.. data:: S_IRGRP + + Group has read permission. + +.. data:: S_IWGRP + + Group has write permission. + +.. data:: S_IXGRP + + Group has execute permission. + +.. data:: S_IRWXO + + Mask for permissions for others (not in group). + +.. data:: S_IROTH + + Others have read permission. + +.. data:: S_IWOTH + + Others have write permission. + +.. data:: S_IXOTH + + Others have execute permission. + +.. data:: S_ENFMT + + System V file locking enforcement. This flag is shared with :data:`S_ISGID`: + file/record locking is enforced on files that do not have the group + execution bit (:data:`S_IXGRP`) set. + +.. data:: S_IREAD + + Unix V7 synonym for :data:`S_IRUSR`. + +.. data:: S_IWRITE + + Unix V7 synonym for :data:`S_IWUSR`. + +.. data:: S_IEXEC + + Unix V7 synonym for :data:`S_IXUSR`. + Example:: import os, sys From python-checkins at python.org Thu Jul 2 20:19:47 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 18:19:47 -0000 Subject: [Python-checkins] r73779 - in python/branches/release26-maint: Lib/test/test_print.py Misc/NEWS Python/bltinmodule.c Message-ID: Author: benjamin.peterson Date: Thu Jul 2 20:19:47 2009 New Revision: 73779 Log: Merged revisions 73776 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73776 | benjamin.peterson | 2009-07-02 13:16:45 -0500 (Thu, 02 Jul 2009) | 1 line when print() gets unicode arguments, sep and end should be unicode by default #4618 ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_print.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Python/bltinmodule.c Modified: python/branches/release26-maint/Lib/test/test_print.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_print.py (original) +++ python/branches/release26-maint/Lib/test/test_print.py Thu Jul 2 20:19:47 2009 @@ -9,12 +9,7 @@ from test import test_support import sys -if sys.version_info[0] == 3: - # 3.x - from io import StringIO -else: - # 2.x - from StringIO import StringIO +from StringIO import StringIO NotDefined = object() @@ -112,6 +107,34 @@ self.assertRaises(TypeError, print, '', end=3) self.assertRaises(AttributeError, print, '', file='') + def test_mixed_args(self): + # If an unicode arg is passed, sep and end should be unicode, too. + class Recorder(object): + + def __init__(self, must_be_unicode): + self.buf = [] + self.force_unicode = must_be_unicode + + def write(self, what): + if self.force_unicode and not isinstance(what, unicode): + raise AssertionError("{0!r} is not unicode".format(what)) + self.buf.append(what) + + buf = Recorder(True) + print(u'hi', file=buf) + self.assertEqual(u''.join(buf.buf), 'hi\n') + del buf.buf[:] + print(u'hi', u'nothing', file=buf) + self.assertEqual(u''.join(buf.buf), 'hi nothing\n') + buf = Recorder(False) + print('hi', 'bye', end=u'\n', file=buf) + self.assertTrue(isinstance(buf.buf[1], unicode)) + self.assertTrue(isinstance(buf.buf[3], unicode)) + del buf.buf[:] + print(sep=u'x', file=buf) + self.assertTrue(isinstance(buf.buf[-1], unicode)) + + def test_main(): test_support.run_unittest(TestPrint) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Thu Jul 2 20:19:47 2009 @@ -15,6 +15,9 @@ - Issue #4547: When debugging a very large function, it was not always possible to update the lineno attribute of the current frame. +- Issue #4618: When unicode arguments are passed to print(), the default + separator and end should be unicode also. + - Issue #6119: Fixed a incorrect Py3k warning about order comparisons of builtin functions and methods. Modified: python/branches/release26-maint/Python/bltinmodule.c ============================================================================== --- python/branches/release26-maint/Python/bltinmodule.c (original) +++ python/branches/release26-maint/Python/bltinmodule.c Thu Jul 2 20:19:47 2009 @@ -1556,14 +1556,40 @@ builtin_print(PyObject *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = {"sep", "end", "file", 0}; - static PyObject *dummy_args; + static PyObject *dummy_args = NULL; + static PyObject *unicode_newline = NULL, *unicode_space = NULL; + static PyObject *str_newline = NULL, *str_space = NULL; + PyObject *newline, *space; PyObject *sep = NULL, *end = NULL, *file = NULL; - int i, err; + int i, err, use_unicode = 0; if (dummy_args == NULL) { if (!(dummy_args = PyTuple_New(0))) return NULL; } + if (str_newline == NULL) { + str_newline = PyString_FromString("\n"); + if (str_newline == NULL) + return NULL; + str_space = PyString_FromString(" "); + if (str_space == NULL) { + Py_CLEAR(str_newline); + return NULL; + } + unicode_newline = PyUnicode_FromString("\n"); + if (unicode_newline == NULL) { + Py_CLEAR(str_newline); + Py_CLEAR(str_space); + return NULL; + } + unicode_space = PyUnicode_FromString(" "); + if (unicode_space == NULL) { + Py_CLEAR(str_newline); + Py_CLEAR(str_space); + Py_CLEAR(unicode_space); + return NULL; + } + } if (!PyArg_ParseTupleAndKeywords(dummy_args, kwds, "|OOO:print", kwlist, &sep, &end, &file)) return NULL; @@ -1573,26 +1599,56 @@ if (file == Py_None) Py_RETURN_NONE; } + if (sep == Py_None) { + sep = NULL; + } + else if (sep) { + if (PyUnicode_Check(sep)) { + use_unicode = 1; + } + else if (!PyString_Check(sep)) { + PyErr_Format(PyExc_TypeError, + "sep must be None, str or unicode, not %.200s", + sep->ob_type->tp_name); + return NULL; + } + } + if (end == Py_None) + end = NULL; + else if (end) { + if (PyUnicode_Check(end)) { + use_unicode = 1; + } + else if (!PyString_Check(end)) { + PyErr_Format(PyExc_TypeError, + "end must be None, str or unicode, not %.200s", + end->ob_type->tp_name); + return NULL; + } + } - if (sep && sep != Py_None && !PyString_Check(sep) && - !PyUnicode_Check(sep)) { - PyErr_Format(PyExc_TypeError, - "sep must be None, str or unicode, not %.200s", - sep->ob_type->tp_name); - return NULL; + if (!use_unicode) { + for (i = 0; i < PyTuple_Size(args); i++) { + if (PyUnicode_Check(PyTuple_GET_ITEM(args, i))) { + use_unicode = 1; + break; + } + } } - if (end && end != Py_None && !PyString_Check(end) && - !PyUnicode_Check(end)) { - PyErr_Format(PyExc_TypeError, - "end must be None, str or unicode, not %.200s", - end->ob_type->tp_name); - return NULL; + if (use_unicode) { + newline = unicode_newline; + space = unicode_space; + } + else { + newline = str_newline; + space = str_space; } for (i = 0; i < PyTuple_Size(args); i++) { if (i > 0) { - if (sep == NULL || sep == Py_None) - err = PyFile_WriteString(" ", file); + if (sep == NULL) + err = PyFile_WriteObject(space, file, + Py_PRINT_RAW); else err = PyFile_WriteObject(sep, file, Py_PRINT_RAW); @@ -1605,8 +1661,8 @@ return NULL; } - if (end == NULL || end == Py_None) - err = PyFile_WriteString("\n", file); + if (end == NULL) + err = PyFile_WriteObject(newline, file, Py_PRINT_RAW); else err = PyFile_WriteObject(end, file, Py_PRINT_RAW); if (err) From python-checkins at python.org Thu Jul 2 20:25:27 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 18:25:27 -0000 Subject: [Python-checkins] r73780 - python/branches/py3k/Python/bltinmodule.c Message-ID: Author: benjamin.peterson Date: Thu Jul 2 20:25:26 2009 New Revision: 73780 Log: refactor logic a little when no sep or end is passed Modified: python/branches/py3k/Python/bltinmodule.c Modified: python/branches/py3k/Python/bltinmodule.c ============================================================================== --- python/branches/py3k/Python/bltinmodule.c (original) +++ python/branches/py3k/Python/bltinmodule.c Thu Jul 2 20:25:26 2009 @@ -1459,13 +1459,19 @@ Py_RETURN_NONE; } - if (sep && sep != Py_None && !PyUnicode_Check(sep)) { + if (sep == Py_None) { + sep = NULL; + } + else if (sep && !PyUnicode_Check(sep)) { PyErr_Format(PyExc_TypeError, "sep must be None or a string, not %.200s", sep->ob_type->tp_name); return NULL; } - if (end && end != Py_None && !PyUnicode_Check(end)) { + if (end == Py_None) { + end = NULL; + } + else if (end && !PyUnicode_Check(end)) { PyErr_Format(PyExc_TypeError, "end must be None or a string, not %.200s", end->ob_type->tp_name); @@ -1474,7 +1480,7 @@ for (i = 0; i < PyTuple_Size(args); i++) { if (i > 0) { - if (sep == NULL || sep == Py_None) + if (sep == NULL) err = PyFile_WriteString(" ", file); else err = PyFile_WriteObject(sep, file, @@ -1488,7 +1494,7 @@ return NULL; } - if (end == NULL || end == Py_None) + if (end == NULL) err = PyFile_WriteString("\n", file); else err = PyFile_WriteObject(end, file, Py_PRINT_RAW); From buildbot at python.org Thu Jul 2 21:05:19 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 02 Jul 2009 19:05:19 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/901 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From buildbot at python.org Thu Jul 2 21:45:39 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 02 Jul 2009 19:45:39 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.0 Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.0. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.0/builds/421 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release30-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_posix ====================================================================== ERROR: test_getcwd_long_pathnames (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.0.loewis-sun/build/Lib/test/test_posix.py", line 252, in test_getcwd_long_pathnames support.rmtree(base_path) File "/home2/buildbot/slave/3.0.loewis-sun/build/Lib/test/support.py", line 98, in rmtree shutil.rmtree(path) File "/home2/buildbot/slave/3.0.loewis-sun/build/Lib/shutil.py", line 225, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home2/buildbot/slave/3.0.loewis-sun/build/Lib/shutil.py", line 223, in rmtree os.rmdir(path) OSError: [Errno 22] Invalid argument: '/home2/buildbot/slave/3.0.loewis-sun/build/@test.getcwd/@test.getcwd' sincerely, -The Buildbot From python-checkins at python.org Thu Jul 2 23:38:37 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 21:38:37 -0000 Subject: [Python-checkins] r73781 - python/trunk/Lib/test/test___future__.py Message-ID: Author: benjamin.peterson Date: Thu Jul 2 23:38:36 2009 New Revision: 73781 Log: test that compile() accepts the future flag Modified: python/trunk/Lib/test/test___future__.py Modified: python/trunk/Lib/test/test___future__.py ============================================================================== --- python/trunk/Lib/test/test___future__.py (original) +++ python/trunk/Lib/test/test___future__.py Thu Jul 2 23:38:36 2009 @@ -53,9 +53,12 @@ a(hasattr(value, "compiler_flag"), "feature is missing a .compiler_flag attr") + # Make sure the compile accepts the flag. + compile("", "", "exec", value.compiler_flag) a(isinstance(getattr(value, "compiler_flag"), int), ".compiler_flag isn't int") + def test_main(): test_support.run_unittest(FutureTest) From python-checkins at python.org Thu Jul 2 23:44:02 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 21:44:02 -0000 Subject: [Python-checkins] r73782 - in python/branches/py3k: Include/code.h Include/pythonrun.h Misc/NEWS Message-ID: Author: benjamin.peterson Date: Thu Jul 2 23:44:01 2009 New Revision: 73782 Log: the old CO_FUTURE flags can't be commented out Modified: python/branches/py3k/Include/code.h python/branches/py3k/Include/pythonrun.h python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Include/code.h ============================================================================== --- python/branches/py3k/Include/code.h (original) +++ python/branches/py3k/Include/code.h Thu Jul 2 23:44:01 2009 @@ -42,7 +42,6 @@ */ #define CO_NOFREE 0x0040 -#if 0 /* These are no longer used. */ #define CO_GENERATOR_ALLOWED 0x1000 #define CO_FUTURE_DIVISION 0x2000 @@ -50,7 +49,6 @@ #define CO_FUTURE_WITH_STATEMENT 0x8000 #define CO_FUTURE_PRINT_FUNCTION 0x10000 #define CO_FUTURE_UNICODE_LITERALS 0x20000 -#endif #define CO_FUTURE_BARRY_AS_BDFL 0x40000 Modified: python/branches/py3k/Include/pythonrun.h ============================================================================== --- python/branches/py3k/Include/pythonrun.h (original) +++ python/branches/py3k/Include/pythonrun.h Thu Jul 2 23:44:01 2009 @@ -7,7 +7,9 @@ extern "C" { #endif -#define PyCF_MASK CO_FUTURE_BARRY_AS_BDFL +#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \ + CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \ + CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL) #define PyCF_MASK_OBSOLETE 0 #define PyCF_SOURCE_IS_UTF8 0x0100 #define PyCF_DONT_IMPLY_DEDENT 0x0200 Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Thu Jul 2 23:44:01 2009 @@ -24,6 +24,11 @@ - Issue #4856: Remove checks for win NT. +C-API +----- + +- The code flags for old __future__ features are now available again. + Library ------- From python-checkins at python.org Thu Jul 2 23:54:36 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 21:54:36 -0000 Subject: [Python-checkins] r73783 - in python/branches/py3k/Include: code.h pythonrun.h Message-ID: Author: benjamin.peterson Date: Thu Jul 2 23:54:36 2009 New Revision: 73783 Log: a little more fiddling to make flags like 2.x Modified: python/branches/py3k/Include/code.h python/branches/py3k/Include/pythonrun.h Modified: python/branches/py3k/Include/code.h ============================================================================== --- python/branches/py3k/Include/code.h (original) +++ python/branches/py3k/Include/code.h Thu Jul 2 23:54:36 2009 @@ -43,7 +43,9 @@ #define CO_NOFREE 0x0040 /* These are no longer used. */ +#if 0 #define CO_GENERATOR_ALLOWED 0x1000 +#endif #define CO_FUTURE_DIVISION 0x2000 #define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */ #define CO_FUTURE_WITH_STATEMENT 0x8000 Modified: python/branches/py3k/Include/pythonrun.h ============================================================================== --- python/branches/py3k/Include/pythonrun.h (original) +++ python/branches/py3k/Include/pythonrun.h Thu Jul 2 23:54:36 2009 @@ -10,7 +10,7 @@ #define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \ CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \ CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL) -#define PyCF_MASK_OBSOLETE 0 +#define PyCF_MASK_OBSOLETE (CO_NESTED) #define PyCF_SOURCE_IS_UTF8 0x0100 #define PyCF_DONT_IMPLY_DEDENT 0x0200 #define PyCF_ONLY_AST 0x0400 From python-checkins at python.org Thu Jul 2 23:55:39 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 21:55:39 -0000 Subject: [Python-checkins] r73784 - in python/branches/py3k: Lib/test/test___future__.py Message-ID: Author: benjamin.peterson Date: Thu Jul 2 23:55:39 2009 New Revision: 73784 Log: Merged revisions 73781 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73781 | benjamin.peterson | 2009-07-02 16:38:36 -0500 (Thu, 02 Jul 2009) | 1 line test that compile() accepts the future flag ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test___future__.py Modified: python/branches/py3k/Lib/test/test___future__.py ============================================================================== --- python/branches/py3k/Lib/test/test___future__.py (original) +++ python/branches/py3k/Lib/test/test___future__.py Thu Jul 2 23:55:39 2009 @@ -53,9 +53,12 @@ a(hasattr(value, "compiler_flag"), "feature is missing a .compiler_flag attr") + # Make sure the compile accepts the flag. + compile("", "", "exec", value.compiler_flag) a(isinstance(getattr(value, "compiler_flag"), int), ".compiler_flag isn't int") + def test_main(): support.run_unittest(FutureTest) From python-checkins at python.org Fri Jul 3 00:02:15 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 22:02:15 -0000 Subject: [Python-checkins] r73785 - in python/branches/release31-maint: Include/code.h Include/pythonrun.h Lib/test/test___future__.py Misc/NEWS Message-ID: Author: benjamin.peterson Date: Fri Jul 3 00:02:15 2009 New Revision: 73785 Log: Merged revisions 73782-73784 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73782 | benjamin.peterson | 2009-07-02 16:44:01 -0500 (Thu, 02 Jul 2009) | 1 line the old CO_FUTURE flags can't be commented out ................ r73783 | benjamin.peterson | 2009-07-02 16:54:36 -0500 (Thu, 02 Jul 2009) | 1 line a little more fiddling to make flags like 2.x ................ r73784 | benjamin.peterson | 2009-07-02 16:55:39 -0500 (Thu, 02 Jul 2009) | 9 lines Merged revisions 73781 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73781 | benjamin.peterson | 2009-07-02 16:38:36 -0500 (Thu, 02 Jul 2009) | 1 line test that compile() accepts the future flag ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Include/code.h python/branches/release31-maint/Include/pythonrun.h python/branches/release31-maint/Lib/test/test___future__.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Include/code.h ============================================================================== --- python/branches/release31-maint/Include/code.h (original) +++ python/branches/release31-maint/Include/code.h Fri Jul 3 00:02:15 2009 @@ -42,15 +42,15 @@ */ #define CO_NOFREE 0x0040 -#if 0 /* These are no longer used. */ +#if 0 #define CO_GENERATOR_ALLOWED 0x1000 +#endif #define CO_FUTURE_DIVISION 0x2000 #define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */ #define CO_FUTURE_WITH_STATEMENT 0x8000 #define CO_FUTURE_PRINT_FUNCTION 0x10000 #define CO_FUTURE_UNICODE_LITERALS 0x20000 -#endif #define CO_FUTURE_BARRY_AS_BDFL 0x40000 Modified: python/branches/release31-maint/Include/pythonrun.h ============================================================================== --- python/branches/release31-maint/Include/pythonrun.h (original) +++ python/branches/release31-maint/Include/pythonrun.h Fri Jul 3 00:02:15 2009 @@ -7,8 +7,10 @@ extern "C" { #endif -#define PyCF_MASK CO_FUTURE_BARRY_AS_BDFL -#define PyCF_MASK_OBSOLETE 0 +#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \ + CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \ + CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL) +#define PyCF_MASK_OBSOLETE (CO_NESTED) #define PyCF_SOURCE_IS_UTF8 0x0100 #define PyCF_DONT_IMPLY_DEDENT 0x0200 #define PyCF_ONLY_AST 0x0400 Modified: python/branches/release31-maint/Lib/test/test___future__.py ============================================================================== --- python/branches/release31-maint/Lib/test/test___future__.py (original) +++ python/branches/release31-maint/Lib/test/test___future__.py Fri Jul 3 00:02:15 2009 @@ -53,9 +53,12 @@ a(hasattr(value, "compiler_flag"), "feature is missing a .compiler_flag attr") + # Make sure the compile accepts the flag. + compile("", "", "exec", value.compiler_flag) a(isinstance(getattr(value, "compiler_flag"), int), ".compiler_flag isn't int") + def test_main(): support.run_unittest(FutureTest) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Jul 3 00:02:15 2009 @@ -20,6 +20,11 @@ the 'surrogateescape' error handler, a string which contains unpaired surrogates. +C-API +----- + +- The code flags for old __future__ features are now available again. + Library ------- From buildbot at python.org Fri Jul 3 00:39:19 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 02 Jul 2009 22:39:19 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/903 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 00:55:21 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 02 Jul 2009 22:55:21 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.0 Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.0. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.0/builds/351 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release30-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\tests\test_build_ext.py", line 258, in test_get_outputs cmd.run() File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 337, in run self.build_extensions() File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 445, in build_extensions self.build_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 527, in build_extension target_lang=language) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\ccompiler.py", line 792, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\msvc9compiler.py", line 636, in link raise LinkError(msg) distutils.errors.LinkError: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1120 2 tests failed: test_distutils test_memoryio ====================================================================== ERROR: test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\msvc9compiler.py", line 634, in link self.spawn([self.linker] + ld_args) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\ccompiler.py", line 982, in spawn spawn(cmd, dry_run=self.dry_run) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\spawn.py", line 33, in spawn _spawn_nt(cmd, search_path, dry_run=dry_run) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\spawn.py", line 74, in _spawn_nt "command '%s' failed with exit status %d" % (cmd[0], rc)) distutils.errors.DistutilsExecError: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1120 Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\tests\test_build_ext.py", line 258, in test_get_outputs cmd.run() File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 337, in run self.build_extensions() File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 445, in build_extensions self.build_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 527, in build_extension target_lang=language) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\ccompiler.py", line 792, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\msvc9compiler.py", line 636, in link raise LinkError(msg) distutils.errors.LinkError: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1120 Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\tests\test_build_ext.py", line 258, in test_get_outputs cmd.run() File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 337, in run self.build_extensions() File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 445, in build_extensions self.build_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\command\build_ext.py", line 527, in build_extension target_lang=language) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\ccompiler.py", line 792, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\distutils\msvc9compiler.py", line 636, in link raise LinkError(msg) distutils.errors.LinkError: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1120 ====================================================================== FAIL: test_newline_none (test.test_memoryio.PyStringIOTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\test\test_memoryio.py", line 381, in test_newline_none self.assertEqual(memio.readlines(), ["hello\n", "hi\n"]) AssertionError: ['hello\n', '\n', 'hi\n', '\n'] != ['hello\n', 'hi\n'] ====================================================================== FAIL: test_newline_none (test.test_memoryio.CStringIOTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\test\test_memoryio.py", line 381, in test_newline_none self.assertEqual(memio.readlines(), ["hello\n", "hi\n"]) AssertionError: ['hello\n', '\n', '\n', 'hi\n', '\n', '\n'] != ['hello\n', 'hi\n'] sincerely, -The Buildbot From python-checkins at python.org Fri Jul 3 00:56:17 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 22:56:17 -0000 Subject: [Python-checkins] r73786 - python/trunk/Lib/test/test_scope.py Message-ID: Author: benjamin.peterson Date: Fri Jul 3 00:56:16 2009 New Revision: 73786 Log: condense with assertRaises Modified: python/trunk/Lib/test/test_scope.py Modified: python/trunk/Lib/test/test_scope.py ============================================================================== --- python/trunk/Lib/test/test_scope.py (original) +++ python/trunk/Lib/test/test_scope.py Fri Jul 3 00:56:16 2009 @@ -289,19 +289,8 @@ inner() y = 1 - try: - errorInOuter() - except UnboundLocalError: - pass - else: - self.fail() - - try: - errorInInner() - except NameError: - pass - else: - self.fail() + self.assertRaises(UnboundLocalError, errorInOuter) + self.assertRaises(NameError, errorInInner) # test for bug #1501934: incorrect LOAD/STORE_GLOBAL generation exec """ From python-checkins at python.org Fri Jul 3 01:01:29 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 02 Jul 2009 23:01:29 -0000 Subject: [Python-checkins] r73787 - python/branches/benjaminp-testing Message-ID: Author: benjamin.peterson Date: Fri Jul 3 01:01:28 2009 New Revision: 73787 Log: remove old useless branch Removed: python/branches/benjaminp-testing/ From python-checkins at python.org Fri Jul 3 01:08:45 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 02 Jul 2009 23:08:45 -0000 Subject: [Python-checkins] r73788 - in python/branches/py3k: Misc/NEWS setup.py Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 3 01:08:45 2009 New Revision: 73788 Log: #4601: 'make install' did not set the permissions on library directories, only root could start IDLE for example. Beware that os.path.walk does not translate as is to os.walk! the former uses a callback to call on each dir, the latter is a generator... Modified: python/branches/py3k/Misc/NEWS python/branches/py3k/setup.py Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 3 01:08:45 2009 @@ -41,6 +41,9 @@ Build ----- +- Issue 4601: 'make install' did not set the appropriate permissions on + directories. + - Issue 5390: Add uninstall icon independent of whether file extensions are installed. Modified: python/branches/py3k/setup.py ============================================================================== --- python/branches/py3k/setup.py (original) +++ python/branches/py3k/setup.py Fri Jul 3 01:08:45 2009 @@ -1605,12 +1605,11 @@ def set_dir_modes(self, dirname, mode): if not self.is_chmod_supported(): return - os.walk(dirname, self.set_dir_modes_visitor, mode) - - def set_dir_modes_visitor(self, mode, dirname, names): - if os.path.islink(dirname): return - log.info("changing mode of %s to %o", dirname, mode) - if not self.dry_run: os.chmod(dirname, mode) + for dirpath, dirnames, fnames in os.walk(dirname): + if os.path.islink(dirpath): + continue + log.info("changing mode of %s to %o", dirpath, mode) + if not self.dry_run: os.chmod(dirpath, mode) def is_chmod_supported(self): return hasattr(os, 'chmod') From python-checkins at python.org Fri Jul 3 01:57:12 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 02 Jul 2009 23:57:12 -0000 Subject: [Python-checkins] r73789 - in python/branches/release31-maint: Misc/NEWS setup.py Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 3 01:57:11 2009 New Revision: 73789 Log: Merged revisions 73788 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r73788 | amaury.forgeotdarc | 2009-07-03 01:08:45 +0200 (ven., 03 juil. 2009) | 6 lines #4601: 'make install' did not set the permissions on library directories, only root could start IDLE for example. Beware that os.path.walk does not translate as is to os.walk! the former uses a callback to call on each dir, the latter is a generator... ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/setup.py Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Jul 3 01:57:11 2009 @@ -35,6 +35,9 @@ Build ----- +- Issue 4601: 'make install' did not set the appropriate permissions on + directories. + - Issue 5390: Add uninstall icon independent of whether file extensions are installed. Modified: python/branches/release31-maint/setup.py ============================================================================== --- python/branches/release31-maint/setup.py (original) +++ python/branches/release31-maint/setup.py Fri Jul 3 01:57:11 2009 @@ -1605,12 +1605,11 @@ def set_dir_modes(self, dirname, mode): if not self.is_chmod_supported(): return - os.walk(dirname, self.set_dir_modes_visitor, mode) - - def set_dir_modes_visitor(self, mode, dirname, names): - if os.path.islink(dirname): return - log.info("changing mode of %s to %o", dirname, mode) - if not self.dry_run: os.chmod(dirname, mode) + for dirpath, dirnames, fnames in os.walk(dirname): + if os.path.islink(dirpath): + continue + log.info("changing mode of %s to %o", dirpath, mode) + if not self.dry_run: os.chmod(dirpath, mode) def is_chmod_supported(self): return hasattr(os, 'chmod') From python-checkins at python.org Fri Jul 3 10:22:57 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 08:22:57 -0000 Subject: [Python-checkins] r73790 - in python/trunk: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Fri Jul 3 10:22:56 2009 New Revision: 73790 Log: Fixed #6403 : package path usage for build_ext Modified: python/trunk/Lib/distutils/command/build_ext.py python/trunk/Lib/distutils/tests/test_build_ext.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/distutils/command/build_ext.py ============================================================================== --- python/trunk/Lib/distutils/command/build_ext.py (original) +++ python/trunk/Lib/distutils/command/build_ext.py Fri Jul 3 10:22:56 2009 @@ -644,17 +644,23 @@ """ fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - filename = self.get_ext_filename(base) + filename = self.get_ext_filename(modpath[-1]) + if not self.inplace: # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory - # using the build_py command + # using the build_py command for that + package = '.'.join(modpath[0:-1]) build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): Modified: python/trunk/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) +++ python/trunk/Lib/distutils/tests/test_build_ext.py Fri Jul 3 10:22:56 2009 @@ -337,7 +337,8 @@ self.assertEquals(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' - cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] @@ -355,12 +356,14 @@ # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(lastdir, 'bar') - def test_build_ext_inplace(self): - etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') - etree_ext = Extension('lxml.etree', [etree_c]) - dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + def test_ext_fullpath(self): + # building lxml.etree inplace + #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + #etree_ext = Extension('lxml.etree', [etree_c]) + #dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} @@ -370,6 +373,28 @@ path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) + # building lxml.etree not inplace + cmd.inplace = 0 + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', + 'portmap.so') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap inplace + cmd.inplace = 1 + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Jul 3 10:22:56 2009 @@ -347,6 +347,8 @@ Library ------- +- Issue #6403: Fixed package path usage in build_ext. + - Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was unconditionally calling "os.close(sys.stdin.fileno())" resulting in file descriptor errors From python-checkins at python.org Fri Jul 3 10:31:32 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 08:31:32 -0000 Subject: [Python-checkins] r73791 - in python/branches/release26-maint: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Fri Jul 3 10:31:31 2009 New Revision: 73791 Log: Merged revisions 73790 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73790 | tarek.ziade | 2009-07-03 10:22:56 +0200 (Fri, 03 Jul 2009) | 1 line Fixed #6403 : package path usage for build_ext ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/distutils/command/build_ext.py python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/command/build_ext.py (original) +++ python/branches/release26-maint/Lib/distutils/command/build_ext.py Fri Jul 3 10:31:31 2009 @@ -629,18 +629,27 @@ (inplace option). """ fullname = self.get_ext_fullname(ext_name) - filename = self.get_ext_filename(fullname) + modpath = fullname.split('.') + filename = self.get_ext_filename(modpath[-1]) + if not self.inplace: # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory - # using the build_py command + # using the build_py command for that + package = '.'.join(modpath[0:-1]) modpath = fullname.split('.') package = '.'.join(modpath[0:-1]) base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): Modified: python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py Fri Jul 3 10:31:31 2009 @@ -274,12 +274,12 @@ self.assertEquals(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' - cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} path = cmd.get_ext_fullpath('foo') - # checking that the last directory is bar + # checking that the last directory is the build_dir path = os.path.split(path)[0] - lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -293,7 +293,40 @@ # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(lastdir, 'bar') + + def test_ext_fullpath(self): + dist = Distribution() + cmd = build_ext(dist) + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building lxml.etree not inplace + cmd.inplace = 0 + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', + 'portmap.so') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap inplace + cmd.inplace = 1 + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + self.assertEquals(wanted, path) def test_suite(): if not sysconfig.python_build: Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Fri Jul 3 10:31:31 2009 @@ -262,6 +262,8 @@ Library ------- +- Issue #6403: Fixed package path usage in build_ext. + - Issue #6287: Added the license field in Distutils documentation. - Issue #6263: Fixed syntax error in distutils.cygwincompiler. From python-checkins at python.org Fri Jul 3 10:33:29 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 08:33:29 -0000 Subject: [Python-checkins] r73792 - in python/branches/py3k: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Fri Jul 3 10:33:28 2009 New Revision: 73792 Log: Merged revisions 73790 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73790 | tarek.ziade | 2009-07-03 10:22:56 +0200 (Fri, 03 Jul 2009) | 1 line Fixed #6403 : package path usage for build_ext ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/command/build_ext.py python/branches/py3k/Lib/distutils/tests/test_build_ext.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/command/build_ext.py (original) +++ python/branches/py3k/Lib/distutils/command/build_ext.py Fri Jul 3 10:33:28 2009 @@ -631,17 +631,23 @@ """ fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - filename = self.get_ext_filename(base) + filename = self.get_ext_filename(modpath[-1]) + if not self.inplace: # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory - # using the build_py command + # using the build_py command for that + package = '.'.join(modpath[0:-1]) build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): Modified: python/branches/py3k/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_ext.py Fri Jul 3 10:33:28 2009 @@ -337,7 +337,8 @@ self.assertEquals(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' - cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] @@ -355,12 +356,14 @@ # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(lastdir, 'bar') - def test_build_ext_inplace(self): - etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') - etree_ext = Extension('lxml.etree', [etree_c]) - dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + def test_ext_fullpath(self): + # building lxml.etree inplace + #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + #etree_ext = Extension('lxml.etree', [etree_c]) + #dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} @@ -370,6 +373,28 @@ path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) + # building lxml.etree not inplace + cmd.inplace = 0 + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', + 'portmap.so') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap inplace + cmd.inplace = 1 + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 3 10:33:28 2009 @@ -863,6 +863,8 @@ Library ------- +- Issue #6403: Fixed package path usage in build_ext. + - Issue #6365: Distutils build_ext inplace mode was copying the compiled extension in a subdirectory if the extension name had dots. From python-checkins at python.org Fri Jul 3 10:37:28 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 08:37:28 -0000 Subject: [Python-checkins] r73793 - in python/branches/release31-maint: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Fri Jul 3 10:37:27 2009 New Revision: 73793 Log: Merged revisions 73792 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73792 | tarek.ziade | 2009-07-03 10:33:28 +0200 (Fri, 03 Jul 2009) | 9 lines Merged revisions 73790 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73790 | tarek.ziade | 2009-07-03 10:22:56 +0200 (Fri, 03 Jul 2009) | 1 line Fixed #6403 : package path usage for build_ext ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/command/build_ext.py python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/command/build_ext.py (original) +++ python/branches/release31-maint/Lib/distutils/command/build_ext.py Fri Jul 3 10:37:27 2009 @@ -631,17 +631,23 @@ """ fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - filename = self.get_ext_filename(base) + filename = self.get_ext_filename(modpath[-1]) + if not self.inplace: # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory - # using the build_py command + # using the build_py command for that + package = '.'.join(modpath[0:-1]) build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): Modified: python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py Fri Jul 3 10:37:27 2009 @@ -337,7 +337,8 @@ self.assertEquals(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' - cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] @@ -355,12 +356,14 @@ # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(lastdir, 'bar') - def test_build_ext_inplace(self): - etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') - etree_ext = Extension('lxml.etree', [etree_c]) - dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + def test_ext_fullpath(self): + # building lxml.etree inplace + #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + #etree_ext = Extension('lxml.etree', [etree_c]) + #dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} @@ -370,6 +373,28 @@ path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) + # building lxml.etree not inplace + cmd.inplace = 0 + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', + 'portmap.so') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap inplace + cmd.inplace = 1 + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Jul 3 10:37:27 2009 @@ -857,6 +857,8 @@ Library ------- +- Issue #6403: Fixed package path usage in build_ext. + - Issue #6365: Distutils build_ext inplace mode was copying the compiled extension in a subdirectory if the extension name had dots. From python-checkins at python.org Fri Jul 3 11:01:07 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 09:01:07 -0000 Subject: [Python-checkins] r73801 - python/trunk/Lib/distutils/command/build_py.py Message-ID: Author: tarek.ziade Date: Fri Jul 3 11:01:07 2009 New Revision: 73801 Log: cleaned up distutils.command.build_py Modified: python/trunk/Lib/distutils/command/build_py.py 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 Jul 3 11:01:07 2009 @@ -4,16 +4,15 @@ __revision__ = "$Id$" -import string, os -from types import * +import os from glob import glob from distutils.core import Command -from distutils.errors import * +from distutils.errors import DistutilsOptionError, DistutilsFileError from distutils.util import convert_path from distutils import log -class build_py (Command): +class build_py(Command): description = "\"build\" pure Python modules (copy to build directory)" @@ -30,8 +29,7 @@ boolean_options = ['compile', 'force'] negative_opt = {'no-compile' : 'compile'} - - def initialize_options (self): + def initialize_options(self): self.build_lib = None self.py_modules = None self.package = None @@ -41,7 +39,7 @@ self.optimize = 0 self.force = None - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('build', ('build_lib', 'build_lib'), ('force', 'force')) @@ -59,15 +57,14 @@ # Ick, copied straight from install_lib.py (fancy_getopt needs a # type system! Hell, *everything* needs a type system!!!) - if type(self.optimize) is not IntType: + if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) assert 0 <= self.optimize <= 2 except (ValueError, AssertionError): - raise DistutilsOptionError, "optimize must be 0, 1, or 2" - - def run (self): + raise DistutilsOptionError("optimize must be 0, 1, or 2") + def run(self): # XXX copy_file by default preserves atime and mtime. IMHO this is # the right thing to do, but perhaps it should be an option -- in # particular, a site administrator might want installed files to @@ -97,9 +94,7 @@ self.byte_compile(self.get_outputs(include_bytecode=0)) - # run () - - def get_data_files (self): + def get_data_files(self): """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" data = [] if not self.packages: @@ -123,7 +118,7 @@ data.append((package, src_dir, build_dir, filenames)) return data - def find_data_files (self, package, src_dir): + def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" globs = (self.package_data.get('', []) + self.package_data.get(package, [])) @@ -135,7 +130,7 @@ files.extend([fn for fn in filelist if fn not in files]) return files - def build_package_data (self): + def build_package_data(self): """Copy data files into build directory""" lastdir = None for package, src_dir, build_dir, filenames in self.data_files: @@ -145,23 +140,23 @@ self.copy_file(os.path.join(src_dir, filename), target, preserve_mode=False) - def get_package_dir (self, package): + def get_package_dir(self, package): """Return the directory, relative to the top of the source distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).""" - path = string.split(package, '.') + path = package.split('.') if not self.package_dir: if path: - return apply(os.path.join, path) + return os.path.join(*path) else: return '' else: tail = [] while path: try: - pdir = self.package_dir[string.join(path, '.')] + pdir = self.package_dir['.'.join(path)] except KeyError: tail.insert(0, path[-1]) del path[-1] @@ -181,27 +176,23 @@ tail.insert(0, pdir) if tail: - return apply(os.path.join, tail) + return os.path.join(*tail) else: return '' - # get_package_dir () - - - def check_package (self, package, package_dir): - + def check_package(self, package, package_dir): # Empty dir name means current directory, which we can probably # assume exists. Also, os.path.exists and isdir don't know about # my "empty string means current dir" convention, so we have to # circumvent them. if package_dir != "": if not os.path.exists(package_dir): - raise DistutilsFileError, \ - "package directory '%s' does not exist" % package_dir + raise DistutilsFileError( + "package directory '%s' does not exist" % package_dir) if not os.path.isdir(package_dir): - raise DistutilsFileError, \ - ("supposed package directory '%s' exists, " + - "but is not a directory") % package_dir + raise DistutilsFileError( + "supposed package directory '%s' exists, " + "but is not a directory" % package_dir) # Require __init__.py for all but the "root package" if package: @@ -216,20 +207,14 @@ # __init__.py doesn't exist -- so don't return the filename. return None - # check_package () - - - def check_module (self, module, module_file): + def check_module(self, module, module_file): if not os.path.isfile(module_file): log.warn("file %s (for module %s) not found", module_file, module) - return 0 + return False else: - return 1 + return True - # check_module () - - - def find_package_modules (self, package, package_dir): + def find_package_modules(self, package, package_dir): self.check_package(package, package_dir) module_files = glob(os.path.join(package_dir, "*.py")) modules = [] @@ -244,8 +229,7 @@ self.debug_print("excluding %s" % setup_script) return modules - - def find_modules (self): + def find_modules(self): """Finds individually-specified Python modules, ie. those listed by module name in 'self.py_modules'. Returns a list of tuples (package, module_base, filename): 'package' is a tuple of the path through @@ -254,7 +238,6 @@ ".py" file (relative to the distribution root) that implements the module. """ - # Map package names to tuples of useful info about the package: # (package_dir, checked) # package_dir - the directory where we'll find source files for @@ -270,10 +253,9 @@ # just the "package" for a toplevel is empty (either an empty # string or empty list, depending on context). Differences: # - don't check for __init__.py in directory for empty package - for module in self.py_modules: - path = string.split(module, '.') - package = string.join(path[0:-1], '.') + path = module.split('.') + package = '.'.join(path[0:-1]) module_base = path[-1] try: @@ -299,16 +281,12 @@ return modules - # find_modules () - - - def find_all_modules (self): + def find_all_modules(self): """Compute the list of all modules that will be built, whether they are specified one-module-at-a-time ('self.py_modules') or by whole packages ('self.packages'). Return a list of tuples (package, module, module_file), just like 'find_modules()' and 'find_package_modules()' do.""" - modules = [] if self.py_modules: modules.extend(self.find_modules()) @@ -317,32 +295,20 @@ package_dir = self.get_package_dir(package) m = self.find_package_modules(package, package_dir) modules.extend(m) - return modules - # find_all_modules () - - - def get_source_files (self): - - modules = self.find_all_modules() - filenames = [] - for module in modules: - filenames.append(module[-1]) + def get_source_files(self): + return [module[-1] for module in self.find_all_modules()] - return filenames - - - def get_module_outfile (self, build_dir, package, module): + def get_module_outfile(self, build_dir, package, module): outfile_path = [build_dir] + list(package) + [module + ".py"] return os.path.join(*outfile_path) - - def get_outputs (self, include_bytecode=1): + def get_outputs(self, include_bytecode=1): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: - package = string.split(package, '.') + package = package.split('.') filename = self.get_module_outfile(self.build_lib, package, module) outputs.append(filename) if include_bytecode: @@ -359,13 +325,12 @@ return outputs - - def build_module (self, module, module_file, package): - if type(package) is StringType: - package = string.split(package, '.') - elif type(package) not in (ListType, TupleType): - raise TypeError, \ - "'package' must be a string (dot-separated), list, or tuple" + def build_module(self, module, module_file, package): + if isinstance(package, str): + package = package.split('.') + elif not isinstance(package, (list, tuple)): + raise TypeError( + "'package' must be a string (dot-separated), list, or tuple") # Now put the module source file into the "build" area -- this is # easy, we just copy it somewhere under self.build_lib (the build @@ -375,9 +340,7 @@ self.mkpath(dir) return self.copy_file(module_file, outfile, preserve_mode=0) - - def build_modules (self): - + def build_modules(self): modules = self.find_modules() for (package, module, module_file) in modules: @@ -387,11 +350,7 @@ # under self.build_lib.) self.build_module(module, module_file, package) - # build_modules () - - - def build_packages (self): - + def build_packages(self): for package in self.packages: # Get list of (package, module, module_file) tuples based on @@ -412,10 +371,7 @@ assert package == package_ self.build_module(module, module_file, package) - # build_packages () - - - def byte_compile (self, files): + def byte_compile(self, files): from distutils.util import byte_compile prefix = self.build_lib if prefix[-1] != os.sep: @@ -431,5 +387,3 @@ if self.optimize > 0: byte_compile(files, optimize=self.optimize, force=self.force, prefix=prefix, dry_run=self.dry_run) - -# class build_py From python-checkins at python.org Fri Jul 3 11:02:02 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 09:02:02 -0000 Subject: [Python-checkins] r73802 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Fri Jul 3 11:02:01 2009 New Revision: 73802 Log: Blocked revisions 73801 via svnmerge ........ r73801 | tarek.ziade | 2009-07-03 11:01:07 +0200 (Fri, 03 Jul 2009) | 1 line cleaned up distutils.command.build_py ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Fri Jul 3 11:05:30 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 09:05:30 -0000 Subject: [Python-checkins] r73803 - in python/branches/py3k: Lib/distutils/command/build_py.py Message-ID: Author: tarek.ziade Date: Fri Jul 3 11:05:30 2009 New Revision: 73803 Log: Merged revisions 73801 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73801 | tarek.ziade | 2009-07-03 11:01:07 +0200 (Fri, 03 Jul 2009) | 1 line cleaned up distutils.command.build_py ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/command/build_py.py Modified: python/branches/py3k/Lib/distutils/command/build_py.py ============================================================================== --- python/branches/py3k/Lib/distutils/command/build_py.py (original) +++ python/branches/py3k/Lib/distutils/command/build_py.py Fri Jul 3 11:05:30 2009 @@ -4,15 +4,15 @@ __revision__ = "$Id$" -import sys, os +import os from glob import glob from distutils.core import Command -from distutils.errors import * +from distutils.errors import DistutilsOptionError, DistutilsFileError from distutils.util import convert_path, Mixin2to3 from distutils import log -class build_py (Command): +class build_py(Command): description = "\"build\" pure Python modules (copy to build directory)" From python-checkins at python.org Fri Jul 3 11:06:19 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 09:06:19 -0000 Subject: [Python-checkins] r73804 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Fri Jul 3 11:06:18 2009 New Revision: 73804 Log: Blocked revisions 73803 via svnmerge ................ r73803 | tarek.ziade | 2009-07-03 11:05:30 +0200 (Fri, 03 Jul 2009) | 9 lines Merged revisions 73801 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73801 | tarek.ziade | 2009-07-03 11:01:07 +0200 (Fri, 03 Jul 2009) | 1 line cleaned up distutils.command.build_py ........ ................ Modified: python/branches/release31-maint/ (props changed) From buildbot at python.org Fri Jul 3 11:53:35 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 09:53:35 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 3.1 Message-ID: The Buildbot has detected a new failure of x86 gentoo 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%203.1/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Unknown signal 32 sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 11:54:52 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 09:54:52 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.1 Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.1/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Abort trap sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 12:33:48 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 10:33:48 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.1 Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.1/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_posix ====================================================================== ERROR: test_getcwd_long_pathnames (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/test_posix.py", line 251, in test_getcwd_long_pathnames support.rmtree(base_path) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/support.py", line 181, in rmtree shutil.rmtree(path) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/shutil.py", line 239, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/shutil.py", line 237, in rmtree os.rmdir(path) OSError: [Errno 22] Invalid argument: '/home2/buildbot/slave/3.1.loewis-sun/build/@test.getcwd/@test.getcwd' sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 12:56:29 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 10:56:29 +0000 Subject: [Python-checkins] buildbot failure in x86 FreeBSD 3.1 Message-ID: The Buildbot has detected a new failure of x86 FreeBSD 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20FreeBSD%203.1/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-freebsd Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Fri Jul 3 15:18:18 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 03 Jul 2009 13:18:18 -0000 Subject: [Python-checkins] r73805 - python/branches/py3k/Lib/lib2to3/refactor.py Message-ID: Author: benjamin.peterson Date: Fri Jul 3 15:18:18 2009 New Revision: 73805 Log: xrange -> range Modified: python/branches/py3k/Lib/lib2to3/refactor.py Modified: python/branches/py3k/Lib/lib2to3/refactor.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/refactor.py (original) +++ python/branches/py3k/Lib/lib2to3/refactor.py Fri Jul 3 15:18:18 2009 @@ -550,7 +550,7 @@ raise RuntimeError("already doing multiple processes") self.queue = multiprocessing.JoinableQueue() processes = [multiprocessing.Process(target=self._child) - for i in xrange(num_processes)] + for i in range(num_processes)] try: for p in processes: p.start() @@ -558,7 +558,7 @@ doctests_only) finally: self.queue.join() - for i in xrange(num_processes): + for i in range(num_processes): self.queue.put(None) for p in processes: if p.is_alive(): From python-checkins at python.org Fri Jul 3 15:21:11 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 13:21:11 -0000 Subject: [Python-checkins] r73806 - peps/trunk/pep-0376.txt Message-ID: Author: tarek.ziade Date: Fri Jul 3 15:21:10 2009 New Revision: 73806 Log: introduced sys.prefix and sys.exec_prefix in the RECORD file Modified: peps/trunk/pep-0376.txt Modified: peps/trunk/pep-0376.txt ============================================================================== --- peps/trunk/pep-0376.txt (original) +++ peps/trunk/pep-0376.txt Fri Jul 3 15:21:10 2009 @@ -216,7 +216,12 @@ =============================================== A `RECORD` file is added inside the `.egg-info` directory at installation -time. The `RECORD` file holds the list of installed files. These correspond +time when installing a source distribution using the `install` command. +Notice that when installing a binary distribution created with `bdist` command +or a `bdist`-based command, the `RECORD` file will be installed as well since +these commands use the `install` command to create a binary distributions. + +The `RECORD` file holds the list of installed files. These correspond to the files listed by the `record` option of the `install` command, and will be generated by default. This allows the implementation of an uninstallation feature, as explained later in this PEP. The `install` command also provides @@ -248,8 +253,13 @@ path, no matter what the target system is. This makes this information cross-compatible and allows simple installations to be relocatable. - - if the installed file is located elsewhere in the system, a - '/'-separated absolute path is used. + - if the installed file is located under ``sys.prefix`` or + `sys.exec_prefix``, it's a it's a '/'-separated relative path prefixed + by the `$PREFIX` or the `$EXEC_PREFIX` string. The `install` command + decides which prefix to use depending on the files. For instance if + it's an executable script defined in the `scripts` option of the + setup script, `$EXEC_PREFIX` will be used. If `install` doesn't know + which prefix to use, `$PREFIX` is preferred. - the **MD5** hash of the file, encoded in hex. Notice that `pyc` and `pyo` generated files don't have any hash because they are automatically produced @@ -283,7 +293,7 @@ docutils/__init__.py,b690274f621402dda63bf11ba5373bf2,9544 docutils/core.py,9c4b84aff68aa55f2e9bf70481b94333,66188 roman.py,a4b84aff68aa55f2e9bf70481b943D3,234 - /usr/local/bin/rst2html.py,a4b84aff68aa55f2e9bf70481b943D3,234 + $EXEC_PREFIX/bin/rst2html.py,a4b84aff68aa55f2e9bf70481b943D3,234 docutils-0.5-py2.6.egg-info/PKG-INFO,6fe57de576d749536082d8e205b77748,195 docutils-0.5-py2.6.egg-info/RECORD From python-checkins at python.org Fri Jul 3 15:22:00 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 03 Jul 2009 13:22:00 -0000 Subject: [Python-checkins] r73807 - python/branches/py3k/setup.py Message-ID: Author: benjamin.peterson Date: Fri Jul 3 15:22:00 2009 New Revision: 73807 Log: rip out bsddb support code Modified: python/branches/py3k/setup.py Modified: python/branches/py3k/setup.py ============================================================================== --- python/branches/py3k/setup.py (original) +++ python/branches/py3k/setup.py Fri Jul 3 15:22:00 2009 @@ -363,6 +363,7 @@ inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) + # XXX db is not needed anymore, should this be removed? if platform in ['osf1', 'unixware7', 'openunix8']: lib_dirs += ['/usr/ccs/lib'] @@ -625,179 +626,6 @@ exts.append( Extension('_md5', ['md5module.c']) ) exts.append( Extension('_sha1', ['sha1module.c']) ) - # Modules that provide persistent dictionary-like semantics. You will - # probably want to arrange for at least one of them to be available on - # your machine, though none are defined by default because of library - # dependencies. The Python module dbm/__init__.py provides an - # implementation independent wrapper for these; dbm/dumb.py provides - # similar functionality (but slower of course) implemented in Python. - - # Sleepycat^WOracle Berkeley DB interface. - # http://www.oracle.com/database/berkeley-db/db/index.html - # - # This requires the Sleepycat^WOracle DB code. The supported versions - # are set below. Visit the URL above to download - # a release. Most open source OSes come with one or more - # versions of BerkeleyDB already installed. - - max_db_ver = (4, 7) - min_db_ver = (3, 3) - db_setup_debug = False # verbose debug prints from this script? - - def allow_db_ver(db_ver): - """Returns a boolean if the given BerkeleyDB version is acceptable. - - Args: - db_ver: A tuple of the version to verify. - """ - if not (min_db_ver <= db_ver <= max_db_ver): - return False - return True - - def gen_db_minor_ver_nums(major): - if major == 4: - for x in range(max_db_ver[1]+1): - if allow_db_ver((4, x)): - yield x - elif major == 3: - for x in (3,): - if allow_db_ver((3, x)): - yield x - else: - raise ValueError("unknown major BerkeleyDB version", major) - - # construct a list of paths to look for the header file in on - # top of the normal inc_dirs. - db_inc_paths = [ - '/usr/include/db4', - '/usr/local/include/db4', - '/opt/sfw/include/db4', - '/usr/include/db3', - '/usr/local/include/db3', - '/opt/sfw/include/db3', - # Fink defaults (http://fink.sourceforge.net/) - '/sw/include/db4', - '/sw/include/db3', - ] - # 4.x minor number specific paths - for x in gen_db_minor_ver_nums(4): - db_inc_paths.append('/usr/include/db4%d' % x) - db_inc_paths.append('/usr/include/db4.%d' % x) - db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) - db_inc_paths.append('/usr/local/include/db4%d' % x) - db_inc_paths.append('/pkg/db-4.%d/include' % x) - db_inc_paths.append('/opt/db-4.%d/include' % x) - # MacPorts default (http://www.macports.org/) - db_inc_paths.append('/opt/local/include/db4%d' % x) - # 3.x minor number specific paths - for x in gen_db_minor_ver_nums(3): - db_inc_paths.append('/usr/include/db3%d' % x) - db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) - db_inc_paths.append('/usr/local/include/db3%d' % x) - db_inc_paths.append('/pkg/db-3.%d/include' % x) - db_inc_paths.append('/opt/db-3.%d/include' % x) - - # Add some common subdirectories for Sleepycat DB to the list, - # based on the standard include directories. This way DB3/4 gets - # picked up when it is installed in a non-standard prefix and - # the user has added that prefix into inc_dirs. - std_variants = [] - for dn in inc_dirs: - std_variants.append(os.path.join(dn, 'db3')) - std_variants.append(os.path.join(dn, 'db4')) - for x in gen_db_minor_ver_nums(4): - std_variants.append(os.path.join(dn, "db4%d"%x)) - std_variants.append(os.path.join(dn, "db4.%d"%x)) - for x in gen_db_minor_ver_nums(3): - std_variants.append(os.path.join(dn, "db3%d"%x)) - std_variants.append(os.path.join(dn, "db3.%d"%x)) - - db_inc_paths = std_variants + db_inc_paths - db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)] - - db_ver_inc_map = {} - - class db_found(Exception): pass - try: - # See whether there is a Sleepycat header in the standard - # search path. - for d in inc_dirs + db_inc_paths: - f = os.path.join(d, "db.h") - if db_setup_debug: print("db: looking for db.h in", f) - if os.path.exists(f): - f = open(f).read() - m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) - if m: - db_major = int(m.group(1)) - m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) - db_minor = int(m.group(1)) - db_ver = (db_major, db_minor) - - # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug - if db_ver == (4, 6): - m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f) - db_patch = int(m.group(1)) - if db_patch < 21: - print("db.h:", db_ver, "patch", db_patch, - "being ignored (4.6.x must be >= 4.6.21)") - continue - - if ( (db_ver not in db_ver_inc_map) and - allow_db_ver(db_ver) ): - # save the include directory with the db.h version - # (first occurrence only) - db_ver_inc_map[db_ver] = d - if db_setup_debug: - print("db.h: found", db_ver, "in", d) - else: - # we already found a header for this library version - if db_setup_debug: print("db.h: ignoring", d) - else: - # ignore this header, it didn't contain a version number - if db_setup_debug: - print("db.h: no version number version in", d) - - db_found_vers = list(db_ver_inc_map.keys()) - db_found_vers.sort() - - while db_found_vers: - db_ver = db_found_vers.pop() - db_incdir = db_ver_inc_map[db_ver] - - # check lib directories parallel to the location of the header - db_dirs_to_check = [ - db_incdir.replace("include", 'lib64'), - db_incdir.replace("include", 'lib'), - ] - db_dirs_to_check = list(filter(os.path.isdir, db_dirs_to_check)) - - # Look for a version specific db-X.Y before an ambiguoius dbX - # XXX should we -ever- look for a dbX name? Do any - # systems really not name their library by version and - # symlink to more general names? - for dblib in (('db-%d.%d' % db_ver), - ('db%d%d' % db_ver), - ('db%d' % db_ver[0])): - dblib_file = self.compiler.find_library_file( - db_dirs_to_check + lib_dirs, dblib ) - if dblib_file: - dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] - raise db_found - else: - if db_setup_debug: print("db lib: ", dblib, "not found") - - except db_found: - if db_setup_debug: - print("bsddb using BerkeleyDB lib:", db_ver, dblib) - print("bsddb lib dir:", dblib_dir, " inc dir:", db_incdir) - db_incs = [db_incdir] - dblibs = [dblib] - else: - if db_setup_debug: print("db: no appropriate library found") - db_incs = None - dblibs = [] - dblib_dir = None - # The sqlite interface sqlite_setup_debug = False # verbose debug prints from this script? @@ -902,7 +730,7 @@ if dbm_args: dbm_order = dbm_args[-1].split(":") else: - dbm_order = "ndbm:gdbm:bdb".split(":") + dbm_order = "ndbm:gdbm".split(":") dbmext = None for cand in dbm_order: if cand == "ndbm": @@ -943,18 +771,6 @@ ], libraries = gdbm_libs) break - elif cand == "bdb": - if db_incs is not None: - print("building dbm using bdb") - dbmext = Extension('_dbm', ['_dbmmodule.c'], - library_dirs=dblib_dir, - runtime_library_dirs=dblib_dir, - include_dirs=db_incs, - define_macros=[ - ('HAVE_BERKDB_H', None), - ('DB_DBM_HSEARCH', None), - ], - libraries=dblibs) break if dbmext is not None: exts.append(dbmext) From python-checkins at python.org Fri Jul 3 15:25:24 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 03 Jul 2009 13:25:24 -0000 Subject: [Python-checkins] r73808 - in python/branches/release31-maint: Lib/lib2to3/refactor.py Message-ID: Author: benjamin.peterson Date: Fri Jul 3 15:25:24 2009 New Revision: 73808 Log: Merged revisions 73805 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r73805 | benjamin.peterson | 2009-07-03 08:18:18 -0500 (Fri, 03 Jul 2009) | 1 line xrange -> range ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/lib2to3/refactor.py Modified: python/branches/release31-maint/Lib/lib2to3/refactor.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/refactor.py (original) +++ python/branches/release31-maint/Lib/lib2to3/refactor.py Fri Jul 3 15:25:24 2009 @@ -550,7 +550,7 @@ raise RuntimeError("already doing multiple processes") self.queue = multiprocessing.JoinableQueue() processes = [multiprocessing.Process(target=self._child) - for i in xrange(num_processes)] + for i in range(num_processes)] try: for p in processes: p.start() @@ -558,7 +558,7 @@ doctests_only) finally: self.queue.join() - for i in xrange(num_processes): + for i in range(num_processes): self.queue.put(None) for p in processes: if p.is_alive(): From python-checkins at python.org Fri Jul 3 15:30:26 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 03 Jul 2009 13:30:26 -0000 Subject: [Python-checkins] r73809 - in python/branches/py3k: Include/descrobject.h Misc/NEWS Message-ID: Author: benjamin.peterson Date: Fri Jul 3 15:30:25 2009 New Revision: 73809 Log: remove duplicate declartions #6405 Modified: python/branches/py3k/Include/descrobject.h python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Include/descrobject.h ============================================================================== --- python/branches/py3k/Include/descrobject.h (original) +++ python/branches/py3k/Include/descrobject.h Fri Jul 3 15:30:25 2009 @@ -73,8 +73,6 @@ PyAPI_DATA(PyTypeObject) PyMethodDescr_Type; PyAPI_DATA(PyTypeObject) PyWrapperDescr_Type; PyAPI_DATA(PyTypeObject) PyDictProxy_Type; -PyAPI_DATA(PyTypeObject) PyGetSetDescr_Type; -PyAPI_DATA(PyTypeObject) PyMemberDescr_Type; PyAPI_FUNC(PyObject *) PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 3 15:30:25 2009 @@ -27,6 +27,8 @@ C-API ----- +- Issue #6405: Remove duplicatet type declarations in descrobject.h. + - The code flags for old __future__ features are now available again. Library From python-checkins at python.org Fri Jul 3 15:33:18 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 03 Jul 2009 13:33:18 -0000 Subject: [Python-checkins] r73810 - in python/branches/release31-maint: Include/descrobject.h Misc/NEWS Message-ID: Author: benjamin.peterson Date: Fri Jul 3 15:33:17 2009 New Revision: 73810 Log: Merged revisions 73809 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r73809 | benjamin.peterson | 2009-07-03 08:30:25 -0500 (Fri, 03 Jul 2009) | 1 line remove duplicate declartions #6405 ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Include/descrobject.h python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Include/descrobject.h ============================================================================== --- python/branches/release31-maint/Include/descrobject.h (original) +++ python/branches/release31-maint/Include/descrobject.h Fri Jul 3 15:33:17 2009 @@ -73,8 +73,6 @@ PyAPI_DATA(PyTypeObject) PyMethodDescr_Type; PyAPI_DATA(PyTypeObject) PyWrapperDescr_Type; PyAPI_DATA(PyTypeObject) PyDictProxy_Type; -PyAPI_DATA(PyTypeObject) PyGetSetDescr_Type; -PyAPI_DATA(PyTypeObject) PyMemberDescr_Type; PyAPI_FUNC(PyObject *) PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Jul 3 15:33:17 2009 @@ -23,6 +23,8 @@ C-API ----- +- Issue #6405: Remove duplicatet type declarations in descrobject.h. + - The code flags for old __future__ features are now available again. Library From buildbot at python.org Fri Jul 3 15:46:08 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 13:46:08 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1121 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_xmlrpc_net.py", line 18, in test_current_time t0 = server.currentTime.getCurrentTime() File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/xmlrpc/client.py", line 1099, in __call__ return self.__send(self.__name, args) File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/xmlrpc/client.py", line 1422, in __request verbose=self.__verbose File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/xmlrpc/client.py", line 1145, in request if i or e[0] not in retry: TypeError: 'gaierror' object does not support indexing make: *** [buildbottest] Abort trap sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 15:50:54 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 13:50:54 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/907 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From python-checkins at python.org Fri Jul 3 16:03:14 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 03 Jul 2009 14:03:14 -0000 Subject: [Python-checkins] r73811 - in sandbox/trunk/2to3/lib2to3: fixes/fix_import.py tests/test_fixers.py Message-ID: Author: benjamin.peterson Date: Fri Jul 3 16:03:14 2009 New Revision: 73811 Log: check for sep, not pathsep when looking for a subpackage #6408 Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_import.py sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_import.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_import.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_import.py Fri Jul 3 16:03:14 2009 @@ -12,7 +12,7 @@ # Local imports from .. import fixer_base -from os.path import dirname, join, exists, pathsep +from os.path import dirname, join, exists, sep from ..fixer_util import FromImport, syms, token @@ -84,7 +84,7 @@ # so can't be a relative import. if not exists(join(dirname(base_path), '__init__.py')): return False - for ext in ['.py', pathsep, '.pyc', '.so', '.sl', '.pyd']: + for ext in ['.py', sep, '.pyc', '.so', '.sl', '.pyd']: if exists(base_path + ext): return True return False Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_fixers.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Fri Jul 3 16:03:14 2009 @@ -3542,8 +3542,7 @@ self.always_exists = False self.present_files = set(['__init__.py']) - expected_extensions = ('.py', os.path.pathsep, '.pyc', '.so', - '.sl', '.pyd') + expected_extensions = ('.py', os.path.sep, '.pyc', '.so', '.sl', '.pyd') names_to_test = (p("/spam/eggs.py"), "ni.py", p("../../shrubbery.py")) for name in names_to_test: @@ -3573,6 +3572,13 @@ self.present_files = set(["__init__.py", "bar.py"]) self.check(b, a) + def test_import_from_package(self): + b = "import bar" + a = "from . import bar" + self.always_exists = False + self.present_files = set(["__init__.py", "bar/"]) + self.check(b, a) + def test_comments_and_indent(self): b = "import bar # Foo" a = "from . import bar # Foo" From python-checkins at python.org Fri Jul 3 16:08:21 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 03 Jul 2009 14:08:21 -0000 Subject: [Python-checkins] r73812 - python/trunk/Doc/library/stringio.rst Message-ID: Author: benjamin.peterson Date: Fri Jul 3 16:08:20 2009 New Revision: 73812 Log: another cStringIO restriction Modified: python/trunk/Doc/library/stringio.rst Modified: python/trunk/Doc/library/stringio.rst ============================================================================== --- python/trunk/Doc/library/stringio.rst (original) +++ python/trunk/Doc/library/stringio.rst Fri Jul 3 16:08:20 2009 @@ -72,8 +72,9 @@ instead. Since this module provides a factory function which returns objects of built-in -types, there's no way to build your own version using subclassing. Use the -original :mod:`StringIO` module in that case. +types, there's no way to build your own version using subclassing. It's not +possible to set attributes on it. Use the original :mod:`StringIO` module in +those cases. Unlike the memory files implemented by the :mod:`StringIO` module, those provided by this module are not able to accept Unicode strings that cannot be From buildbot at python.org Fri Jul 3 16:10:16 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 14:10:16 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 3.x Message-ID: The Buildbot has detected a new failure of x86 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%203.x/builds/1025 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 509, in _bootstrap_inner self.run() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/test_urllib2_localnet.py", line 65, in run self.httpd.handle_request() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 266, in handle_request self._handle_request_noblock() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 284, in _handle_request_noblock self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 509, in _bootstrap_inner self.run() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/test_urllib2_localnet.py", line 65, in run self.httpd.handle_request() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 266, in handle_request self._handle_request_noblock() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 284, in _handle_request_noblock self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 509, in _bootstrap_inner self.run() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/test_urllib2_localnet.py", line 65, in run self.httpd.handle_request() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 266, in handle_request self._handle_request_noblock() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 284, in _handle_request_noblock self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 509, in _bootstrap_inner self.run() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/test_urllib2_localnet.py", line 65, in run self.httpd.handle_request() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 266, in handle_request self._handle_request_noblock() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 284, in _handle_request_noblock self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 509, in _bootstrap_inner self.run() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/test_urllib2_localnet.py", line 65, in run self.httpd.handle_request() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 266, in handle_request self._handle_request_noblock() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 284, in _handle_request_noblock self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/test_xmlrpc_net.py", line 18, in test_current_time t0 = server.currentTime.getCurrentTime() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/xmlrpc/client.py", line 1099, in __call__ return self.__send(self.__name, args) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/xmlrpc/client.py", line 1422, in __request verbose=self.__verbose File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/xmlrpc/client.py", line 1145, in request if i or e[0] not in retry: TypeError: 'gaierror' object does not support indexing Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 509, in _bootstrap_inner self.run() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/test_httpservers.py", line 44, in run self.server.serve_forever() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 226, in serve_forever self._handle_request_noblock() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 284, in _handle_request_noblock self.close_request(request) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/socketserver.py", line 448, in close_request request.shutdown(socket.SHUT_WR) socket.error: [Errno 107] Transport endpoint is not connected sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 16:11:03 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 14:11:03 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.x Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.x/builds/898 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_xmlrpc_net.py", line 18, in test_current_time t0 = server.currentTime.getCurrentTime() File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1099, in __call__ return self.__send(self.__name, args) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1422, in __request verbose=self.__verbose File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1145, in request if i or e[0] not in retry: TypeError: 'gaierror' object does not support indexing Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/threading.py", line 509, in _bootstrap_inner self.run() File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/threading.py", line 462, in run self._target(*self._args, **self._kwargs) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/socketserver.py", line 224, in serve_forever r, w, e = select.select([self], [], [], poll_interval) select.error: (4, 'Interrupted system call') Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/threading.py", line 509, in _bootstrap_inner self.run() File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/threading.py", line 462, in run self._target(*self._args, **self._kwargs) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/socketserver.py", line 224, in serve_forever r, w, e = select.select([self], [], [], poll_interval) select.error: (4, 'Interrupted system call') 4 tests failed: test_posix test_signal test_socketserver test_xmlrpc_net ====================================================================== ERROR: test_getcwd_long_pathnames (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_posix.py", line 251, in test_getcwd_long_pathnames support.rmtree(base_path) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/support.py", line 181, in rmtree shutil.rmtree(path) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/shutil.py", line 239, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/shutil.py", line 237, in rmtree os.rmdir(path) OSError: [Errno 22] Invalid argument: '/home2/buildbot/slave/3.x.loewis-sun/build/@test_15425_tmp.getcwd/@test_15425_tmp.getcwd' ====================================================================== FAIL: test_ForkingTCPServer (test.test_socketserver.SocketServerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_socketserver.py", line 189, in test_ForkingTCPServer self.stream_examine) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_socketserver.py", line 147, in run_server testfunc(svrcls.address_family, addr) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_socketserver.py", line 161, in stream_examine self.assertEquals(buf, TEST_STR) AssertionError: b'' != b'hello world\n' ====================================================================== FAIL: test_ForkingUnixStreamServer (test.test_socketserver.SocketServerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_socketserver.py", line 207, in test_ForkingUnixStreamServer self.stream_examine) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_socketserver.py", line 147, in run_server testfunc(svrcls.address_family, addr) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_socketserver.py", line 161, in stream_examine self.assertEquals(buf, TEST_STR) AssertionError: b'' != b'hello world\n' ====================================================================== ERROR: test_current_time (test.test_xmlrpc_net.CurrentTimeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1140, in request return self.single_request(host, handler, request_body, verbose) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1151, in single_request http_conn = self.send_request(host, handler, request_body, verbose) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1264, in send_request self.send_content(connection, request_body) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1293, in send_content connection.endheaders(request_body) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/http/client.py", line 889, in endheaders self._send_output(message_body) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/http/client.py", line 743, in _send_output self.send(msg) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/http/client.py", line 691, in send self.connect() File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/http/client.py", line 675, in connect self.timeout) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/socket.py", line 292, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno 8] node name or service name not known Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_xmlrpc_net.py", line 18, in test_current_time t0 = server.currentTime.getCurrentTime() File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1099, in __call__ return self.__send(self.__name, args) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1422, in __request verbose=self.__verbose File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1145, in request if i or e[0] not in retry: TypeError: 'gaierror' object does not support indexing Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_xmlrpc_net.py", line 18, in test_current_time t0 = server.currentTime.getCurrentTime() File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1099, in __call__ return self.__send(self.__name, args) File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1422, in __request verbose=self.__verbose File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/xmlrpc/client.py", line 1145, in request if i or e[0] not in retry: TypeError: 'gaierror' object does not support indexing sincerely, -The Buildbot From python-checkins at python.org Fri Jul 3 16:11:16 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 03 Jul 2009 14:11:16 -0000 Subject: [Python-checkins] r73813 - in python/branches/release26-maint: Doc/library/stringio.rst Message-ID: Author: benjamin.peterson Date: Fri Jul 3 16:11:15 2009 New Revision: 73813 Log: Merged revisions 73812 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73812 | benjamin.peterson | 2009-07-03 09:08:20 -0500 (Fri, 03 Jul 2009) | 1 line another cStringIO restriction ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/stringio.rst Modified: python/branches/release26-maint/Doc/library/stringio.rst ============================================================================== --- python/branches/release26-maint/Doc/library/stringio.rst (original) +++ python/branches/release26-maint/Doc/library/stringio.rst Fri Jul 3 16:11:15 2009 @@ -72,8 +72,9 @@ instead. Since this module provides a factory function which returns objects of built-in -types, there's no way to build your own version using subclassing. Use the -original :mod:`StringIO` module in that case. +types, there's no way to build your own version using subclassing. It's not +possible to set attributes on it. Use the original :mod:`StringIO` module in +those cases. Unlike the memory files implemented by the :mod:`StringIO` module, those provided by this module are not able to accept Unicode strings that cannot be From buildbot at python.org Fri Jul 3 16:56:31 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 14:56:31 +0000 Subject: [Python-checkins] buildbot failure in x86 FreeBSD 3.x Message-ID: The Buildbot has detected a new failure of x86 FreeBSD 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20FreeBSD%203.x/builds/889 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-freebsd Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_xmlrpc_net.py", line 18, in test_current_time t0 = server.currentTime.getCurrentTime() File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/xmlrpc/client.py", line 1099, in __call__ return self.__send(self.__name, args) File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/xmlrpc/client.py", line 1422, in __request verbose=self.__verbose File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/xmlrpc/client.py", line 1145, in request if i or e[0] not in retry: TypeError: 'gaierror' object does not support indexing sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 18:25:36 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 16:25:36 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 2.6 Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%202.6/builds/352 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_hotshot ====================================================================== FAIL: test_logreader_eof_error (test.test_hotshot.HotShotTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/2.6.loewis-sun/build/Lib/test/test_hotshot.py", line 130, in test_logreader_eof_error self.assertRaises((IOError, EOFError), _hotshot.logreader, ".") AssertionError: (, ) not raised sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 19:10:12 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 17:10:12 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.1 Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.1/builds/2 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_posix ====================================================================== ERROR: test_getcwd_long_pathnames (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/test_posix.py", line 251, in test_getcwd_long_pathnames support.rmtree(base_path) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/support.py", line 181, in rmtree shutil.rmtree(path) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/shutil.py", line 239, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/shutil.py", line 237, in rmtree os.rmdir(path) OSError: [Errno 22] Invalid argument: '/home2/buildbot/slave/3.1.loewis-sun/build/@test.getcwd/@test.getcwd' sincerely, -The Buildbot From python-checkins at python.org Fri Jul 3 21:01:12 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 19:01:12 -0000 Subject: [Python-checkins] r73814 - python/trunk/Lib/distutils/tests/test_file_util.py Message-ID: Author: tarek.ziade Date: Fri Jul 3 21:01:12 2009 New Revision: 73814 Log: basic tests to raise distutils.file_util coverage Modified: python/trunk/Lib/distutils/tests/test_file_util.py Modified: python/trunk/Lib/distutils/tests/test_file_util.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_file_util.py (original) +++ python/trunk/Lib/distutils/tests/test_file_util.py Fri Jul 3 21:01:12 2009 @@ -3,7 +3,7 @@ import os import shutil -from distutils.file_util import move_file +from distutils.file_util import move_file, write_file, copy_file from distutils import log from distutils.tests import support @@ -55,6 +55,21 @@ wanted = ['moving %s -> %s' % (self.source, self.target_dir)] self.assertEquals(self._logs, wanted) + def test_write_file(self): + lines = ['a', 'b', 'c'] + dir = self.mkdtemp() + foo = os.path.join(dir, 'foo') + write_file(foo, lines) + content = [line.strip() for line in open(foo).readlines()] + self.assertEquals(content, lines) + + def test_copy_file(self): + src_dir = self.mkdtemp() + foo = os.path.join(src_dir, 'foo') + write_file(foo, 'content') + dst_dir = self.mkdtemp() + copy_file(foo, dst_dir) + self.assertTrue(os.path.exists(os.path.join(dst_dir, 'foo'))) def test_suite(): return unittest.makeSuite(FileUtilTestCase) From python-checkins at python.org Fri Jul 3 21:14:49 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 19:14:49 -0000 Subject: [Python-checkins] r73815 - python/trunk/Lib/distutils/file_util.py Message-ID: Author: tarek.ziade Date: Fri Jul 3 21:14:49 2009 New Revision: 73815 Log: cleaned distutils.file_util Modified: python/trunk/Lib/distutils/file_util.py Modified: python/trunk/Lib/distutils/file_util.py ============================================================================== --- python/trunk/Lib/distutils/file_util.py (original) +++ python/trunk/Lib/distutils/file_util.py Fri Jul 3 21:14:49 2009 @@ -10,49 +10,48 @@ from distutils import log # for generating verbose output in 'copy_file()' -_copy_action = { None: 'copying', - 'hard': 'hard linking', - 'sym': 'symbolically linking' } +_copy_action = {None: 'copying', + 'hard': 'hard linking', + 'sym': 'symbolically linking'} -def _copy_file_contents (src, dst, buffer_size=16*1024): - """Copy the file 'src' to 'dst'; both must be filenames. Any error - opening either file, reading from 'src', or writing to 'dst', raises - DistutilsFileError. Data is read/written in chunks of 'buffer_size' - bytes (default 16k). No attempt is made to handle anything apart from - regular files. +def _copy_file_contents(src, dst, buffer_size=16*1024): + """Copy the file 'src' to 'dst'. + + Both must be filenames. Any error opening either file, reading from + 'src', or writing to 'dst', raises DistutilsFileError. Data is + read/written in chunks of 'buffer_size' bytes (default 16k). No attempt + is made to handle anything apart from regular files. """ # Stolen from shutil module in the standard library, but with # custom error-handling added. - fsrc = None fdst = None try: try: fsrc = open(src, 'rb') except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not open '%s': %s" % (src, errstr) + raise DistutilsFileError("could not open '%s': %s" % (src, errstr)) if os.path.exists(dst): try: os.unlink(dst) except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not delete '%s': %s" % (dst, errstr) + raise DistutilsFileError( + "could not delete '%s': %s" % (dst, errstr)) try: fdst = open(dst, 'wb') except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not create '%s': %s" % (dst, errstr) + raise DistutilsFileError( + "could not create '%s': %s" % (dst, errstr)) while 1: try: buf = fsrc.read(buffer_size) except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not read from '%s': %s" % (src, errstr) + raise DistutilsFileError( + "could not read from '%s': %s" % (src, errstr)) if not buf: break @@ -60,8 +59,8 @@ try: fdst.write(buf) except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not write to '%s': %s" % (dst, errstr) + raise DistutilsFileError( + "could not write to '%s': %s" % (dst, errstr)) finally: if fdst: @@ -69,25 +68,18 @@ if fsrc: fsrc.close() -# _copy_file_contents() - -def copy_file (src, dst, - preserve_mode=1, - preserve_times=1, - update=0, - link=None, - verbose=1, - dry_run=0): - - """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is - copied there with the same name; otherwise, it must be a filename. (If - the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' - is true (the default), the file's mode (type and permission bits, or - whatever is analogous on the current platform) is copied. If - 'preserve_times' is true (the default), the last-modified and - last-access times are copied as well. If 'update' is true, 'src' will - only be copied if 'dst' does not exist, or if 'dst' does exist but is - older than 'src'. +def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, + link=None, verbose=1, dry_run=0): + """Copy a file 'src' to 'dst'. + + If 'dst' is a directory, then 'src' is copied there with the same name; + otherwise, it must be a filename. (If the file exists, it will be + ruthlessly clobbered.) If 'preserve_mode' is true (the default), + the file's mode (type and permission bits, or whatever is analogous on + the current platform) is copied. If 'preserve_times' is true (the + default), the last-modified and last-access times are copied as well. + If 'update' is true, 'src' will only be copied if 'dst' does not exist, + or if 'dst' does exist but is older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is @@ -113,8 +105,8 @@ from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE if not os.path.isfile(src): - raise DistutilsFileError, \ - "can't copy '%s': doesn't exist or not a regular file" % src + raise DistutilsFileError( + "can't copy '%s': doesn't exist or not a regular file" % src) if os.path.isdir(dst): dir = dst @@ -130,8 +122,7 @@ try: action = _copy_action[link] except KeyError: - raise ValueError, \ - "invalid value '%s' for 'link' argument" % link + raise ValueError("invalid value '%s' for 'link' argument" % link) if verbose >= 1: if os.path.basename(dst) == os.path.basename(src): @@ -148,8 +139,8 @@ try: macostools.copy(src, dst, 0, preserve_times) except os.error, exc: - raise DistutilsFileError, \ - "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) + raise DistutilsFileError( + "could not copy '%s' to '%s': %s" % (src, dst, exc[-1])) # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) @@ -176,17 +167,13 @@ return (dst, 1) -# copy_file () - - # XXX I suspect this is Unix-specific -- need porting help! -def move_file (src, dst, - verbose=1, - dry_run=0): - - """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will - be moved into it with the same name; otherwise, 'src' is just renamed - to 'dst'. Return the new full name of the file. +def move_file (src, dst, verbose=1, dry_run=0): + """Move a file 'src' to 'dst'. + + If 'dst' is a directory, the file will be moved into it with the same + name; otherwise, 'src' is just renamed to 'dst'. Return the new + full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What about other systems??? @@ -201,20 +188,19 @@ return dst if not isfile(src): - raise DistutilsFileError, \ - "can't move '%s': not a regular file" % src + raise DistutilsFileError("can't move '%s': not a regular file" % src) if isdir(dst): dst = os.path.join(dst, basename(src)) elif exists(dst): - raise DistutilsFileError, \ - "can't move '%s': destination '%s' already exists" % \ - (src, dst) + raise DistutilsFileError( + "can't move '%s': destination '%s' already exists" % + (src, dst)) if not isdir(dirname(dst)): - raise DistutilsFileError, \ + raise DistutilsFileError( "can't move '%s': destination '%s' not a valid path" % \ - (src, dst) + (src, dst)) copy_it = 0 try: @@ -223,8 +209,8 @@ if num == errno.EXDEV: copy_it = 1 else: - raise DistutilsFileError, \ - "couldn't move '%s' to '%s': %s" % (src, dst, msg) + raise DistutilsFileError( + "couldn't move '%s' to '%s': %s" % (src, dst, msg)) if copy_it: copy_file(src, dst, verbose=verbose) @@ -235,15 +221,12 @@ os.unlink(dst) except os.error: pass - raise DistutilsFileError, \ + raise DistutilsFileError( ("couldn't move '%s' to '%s' by copy/delete: " + - "delete '%s' failed: %s") % \ - (src, dst, src, msg) - + "delete '%s' failed: %s") % + (src, dst, src, msg)) return dst -# move_file () - def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a From python-checkins at python.org Fri Jul 3 21:17:39 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 03 Jul 2009 19:17:39 -0000 Subject: [Python-checkins] r73816 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Fri Jul 3 21:17:39 2009 New Revision: 73816 Log: Blocked revisions 73814-73815 via svnmerge ........ r73814 | tarek.ziade | 2009-07-03 21:01:12 +0200 (Fri, 03 Jul 2009) | 1 line basic tests to raise distutils.file_util coverage ........ r73815 | tarek.ziade | 2009-07-03 21:14:49 +0200 (Fri, 03 Jul 2009) | 1 line cleaned distutils.file_util ........ Modified: python/branches/release26-maint/ (props changed) From buildbot at python.org Fri Jul 3 21:18:28 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 19:18:28 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 2.6 Message-ID: The Buildbot has detected a new failure of x86 XP-4 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%202.6/builds/340 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_bsddb3 test_distutils ====================================================================== ERROR: test01_badpointer (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 21, in test01_badpointer dbs = dbshelve.open(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\dbshelve.py", line 106, in open d.open(filename, dbname, filetype, flags, mode) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\dbshelve.py", line 171, in open self.db.open(*args, **kwargs) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test03_repr_closed_db (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 37, in test03_repr_closed_db db = hashopen(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\__init__.py", line 361, in hashopen d.open(file, db.DB_HASH, flags, mode) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test04_repr_db (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 43, in test04_repr_db db = hashopen(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\__init__.py", line 361, in hashopen d.open(file, db.DB_HASH, flags, mode) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test05_double_free_make_key_dbt (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 65, in test05_double_free_make_key_dbt db.DB_CREATE | db.DB_THREAD) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test06_key_with_null_bytes (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 77, in test06_key_with_null_bytes db1.open(self.filename, None, db.DB_HASH, db.DB_CREATE) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test07_DB_set_flags_persists (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 101, in test07_DB_set_flags_persists db1.open(self.filename, db.DB_HASH, db.DB_CREATE) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test01_basic_replication (bsddb.test.test_replication.DBReplicationManager) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_replication.py", line 170, in test01_basic_replication mode=0666, txn=txn) DBNoSuchFileError: (2, 'No such file or directory -- connection closed: Successful return: 0') ====================================================================== ERROR: test01_basic_replication (bsddb.test.test_replication.DBReplicationManager) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_replication.py", line 58, in tearDown if self.dbClient : DBError: (0, 'DB object has been closed') ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() Author: tarek.ziade Date: Fri Jul 3 21:22:23 2009 New Revision: 73817 Log: Merged revisions 73814-73815 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73814 | tarek.ziade | 2009-07-03 21:01:12 +0200 (Fri, 03 Jul 2009) | 1 line basic tests to raise distutils.file_util coverage ........ r73815 | tarek.ziade | 2009-07-03 21:14:49 +0200 (Fri, 03 Jul 2009) | 1 line cleaned distutils.file_util ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/file_util.py python/branches/py3k/Lib/distutils/tests/test_file_util.py Modified: python/branches/py3k/Lib/distutils/file_util.py ============================================================================== --- python/branches/py3k/Lib/distutils/file_util.py (original) +++ python/branches/py3k/Lib/distutils/file_util.py Fri Jul 3 21:22:23 2009 @@ -10,17 +10,18 @@ from distutils import log # for generating verbose output in 'copy_file()' -_copy_action = { None: 'copying', - 'hard': 'hard linking', - 'sym': 'symbolically linking' } +_copy_action = {None: 'copying', + 'hard': 'hard linking', + 'sym': 'symbolically linking'} def _copy_file_contents(src, dst, buffer_size=16*1024): - """Copy the file 'src' to 'dst'; both must be filenames. Any error - opening either file, reading from 'src', or writing to 'dst', raises - DistutilsFileError. Data is read/written in chunks of 'buffer_size' - bytes (default 16k). No attempt is made to handle anything apart from - regular files. + """Copy the file 'src' to 'dst'. + + Both must be filenames. Any error opening either file, reading from + 'src', or writing to 'dst', raises DistutilsFileError. Data is + read/written in chunks of 'buffer_size' bytes (default 16k). No attempt + is made to handle anything apart from regular files. """ # Stolen from shutil module in the standard library, but with # custom error-handling added. @@ -68,15 +69,16 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, link=None, verbose=1, dry_run=0): - """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is - copied there with the same name; otherwise, it must be a filename. (If - the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' - is true (the default), the file's mode (type and permission bits, or - whatever is analogous on the current platform) is copied. If - 'preserve_times' is true (the default), the last-modified and - last-access times are copied as well. If 'update' is true, 'src' will - only be copied if 'dst' does not exist, or if 'dst' does exist but is - older than 'src'. + """Copy a file 'src' to 'dst'. + + If 'dst' is a directory, then 'src' is copied there with the same name; + otherwise, it must be a filename. (If the file exists, it will be + ruthlessly clobbered.) If 'preserve_mode' is true (the default), + the file's mode (type and permission bits, or whatever is analogous on + the current platform) is copied. If 'preserve_times' is true (the + default), the last-modified and last-access times are copied as well. + If 'update' is true, 'src' will only be copied if 'dst' does not exist, + or if 'dst' does exist but is older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is @@ -166,13 +168,12 @@ # XXX I suspect this is Unix-specific -- need porting help! -def move_file (src, dst, - verbose=1, - dry_run=0): - - """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will - be moved into it with the same name; otherwise, 'src' is just renamed - to 'dst'. Return the new full name of the file. +def move_file(src, dst, verbose=1, dry_run=0): + """Move a file 'src' to 'dst'. + + If 'dst' is a directory, the file will be moved into it with the same + name; otherwise, 'src' is just renamed to 'dst'. Return the new + full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What about other systems??? @@ -229,7 +230,7 @@ return dst -def write_file (filename, contents): +def write_file(filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ Modified: python/branches/py3k/Lib/distutils/tests/test_file_util.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_file_util.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_file_util.py Fri Jul 3 21:22:23 2009 @@ -3,7 +3,7 @@ import os import shutil -from distutils.file_util import move_file +from distutils.file_util import move_file, write_file, copy_file from distutils import log from distutils.tests import support @@ -55,6 +55,21 @@ wanted = ['moving %s -> %s' % (self.source, self.target_dir)] self.assertEquals(self._logs, wanted) + def test_write_file(self): + lines = ['a', 'b', 'c'] + dir = self.mkdtemp() + foo = os.path.join(dir, 'foo') + write_file(foo, lines) + content = [line.strip() for line in open(foo).readlines()] + self.assertEquals(content, lines) + + def test_copy_file(self): + src_dir = self.mkdtemp() + foo = os.path.join(src_dir, 'foo') + write_file(foo, 'content') + dst_dir = self.mkdtemp() + copy_file(foo, dst_dir) + self.assertTrue(os.path.exists(os.path.join(dst_dir, 'foo'))) def test_suite(): return unittest.makeSuite(FileUtilTestCase) From buildbot at python.org Fri Jul 3 21:40:09 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 19:40:09 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5108 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/SocketServer.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/SocketServer.py", line 308, in process_request self.close_request(request) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/SocketServer.py", line 448, in close_request request.shutdown(socket.SHUT_WR) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/socket.py", line 219, in meth return getattr(self._sock,name)(*args) error: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 524, in __bootstrap_inner self.run() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/test/test_httpservers.py", line 43, in run self.server.serve_forever() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/SocketServer.py", line 226, in serve_forever self._handle_request_noblock() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/SocketServer.py", line 284, in _handle_request_noblock self.close_request(request) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/SocketServer.py", line 448, in close_request request.shutdown(socket.SHUT_WR) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/socket.py", line 219, in meth return getattr(self._sock,name)(*args) error: [Errno 107] Transport endpoint is not connected sincerely, -The Buildbot From buildbot at python.org Fri Jul 3 21:49:43 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 19:49:43 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1264 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/SocketServer.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/SocketServer.py", line 308, in process_request self.close_request(request) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/SocketServer.py", line 448, in close_request request.shutdown(socket.SHUT_WR) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/socket.py", line 219, in meth return getattr(self._sock,name)(*args) error: [Errno 57] Socket is not connected Traceback (most recent call last): File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/threading.py", line 524, in __bootstrap_inner self.run() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/test/test_httpservers.py", line 43, in run self.server.serve_forever() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/SocketServer.py", line 226, in serve_forever self._handle_request_noblock() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/SocketServer.py", line 284, in _handle_request_noblock self.close_request(request) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/SocketServer.py", line 448, in close_request request.shutdown(socket.SHUT_WR) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/socket.py", line 219, in meth return getattr(self._sock,name)(*args) error: [Errno 57] Socket is not connected sincerely, -The Buildbot From python-checkins at python.org Fri Jul 3 22:48:32 2009 From: python-checkins at python.org (gregory.p.smith) Date: Fri, 03 Jul 2009 20:48:32 -0000 Subject: [Python-checkins] r73818 - in python/trunk: Doc/library/select.rst Modules/selectmodule.c Message-ID: Author: gregory.p.smith Date: Fri Jul 3 22:48:31 2009 New Revision: 73818 Log: Adds the select.PIPE_BUF attribute to expose the system constant. Modified: python/trunk/Doc/library/select.rst python/trunk/Modules/selectmodule.c Modified: python/trunk/Doc/library/select.rst ============================================================================== --- python/trunk/Doc/library/select.rst (original) +++ python/trunk/Doc/library/select.rst Fri Jul 3 22:48:31 2009 @@ -100,6 +100,15 @@ library, and does not handle file descriptors that don't originate from WinSock. +.. attribute:: select.PIPE_BUF + + Files reported as ready for writing by :func:`select`, :func:`poll` or + similar interfaces in this module are guaranteed to not block on a write + of up to :const:`PIPE_BUF` bytes. + This value is guaranteed by POSIX to be at least 512. + + .. versionadded:: 2.7 + .. _epoll-objects: Modified: python/trunk/Modules/selectmodule.c ============================================================================== --- python/trunk/Modules/selectmodule.c (original) +++ python/trunk/Modules/selectmodule.c Fri Jul 3 22:48:31 2009 @@ -1746,6 +1746,8 @@ Py_INCREF(SelectError); PyModule_AddObject(m, "error", SelectError); + PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF); + #if defined(HAVE_POLL) #ifdef __APPLE__ if (select_have_broken_poll()) { From buildbot at python.org Fri Jul 3 22:51:26 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 20:51:26 +0000 Subject: [Python-checkins] buildbot failure in x86 FreeBSD trunk Message-ID: The Buildbot has detected a new failure of x86 FreeBSD trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20FreeBSD%20trunk/builds/2399 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-freebsd Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/threading.py", line 524, in __bootstrap_inner self.run() File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/threading.py", line 477, in run self.__target(*self.__args, **self.__kwargs) File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/bsddb/test/test_thread.py", line 306, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/bsddb/dbutils.py", line 68, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/threading.py", line 524, in __bootstrap_inner self.run() File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/threading.py", line 477, in run self.__target(*self.__args, **self.__kwargs) File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/SocketServer.py", line 224, in serve_forever r, w, e = select.select([self], [], [], poll_interval) error: (4, 'Interrupted system call') Traceback (most recent call last): File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/threading.py", line 524, in __bootstrap_inner self.run() File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/threading.py", line 477, in run self.__target(*self.__args, **self.__kwargs) File "/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Lib/SocketServer.py", line 224, in serve_forever r, w, e = select.select([self], [], [], poll_interval) error: (4, 'Interrupted system call') sincerely, -The Buildbot From buildbot at python.org Sat Jul 4 00:41:58 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 03 Jul 2009 22:41:58 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.1 Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.1/builds/2 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' 1 test failed: test_import ====================================================================== ERROR: testImport (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 60, in test_with_extension mod = __import__(TESTFN) ImportError: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' sincerely, -The Buildbot From python-checkins at python.org Sat Jul 4 01:07:07 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Fri, 03 Jul 2009 23:07:07 -0000 Subject: [Python-checkins] r73819 - python/trunk/Lib/SocketServer.py Message-ID: Author: kristjan.jonsson Date: Sat Jul 4 01:07:07 2009 New Revision: 73819 Log: http://bugs.python.org/issue6381 some platforms may raise ENOTCONN if the stack has disconnected the socket on behalf of the peer. Modified: python/trunk/Lib/SocketServer.py Modified: python/trunk/Lib/SocketServer.py ============================================================================== --- python/trunk/Lib/SocketServer.py (original) +++ python/trunk/Lib/SocketServer.py Sat Jul 4 01:07:07 2009 @@ -445,7 +445,12 @@ def close_request(self, request): """Called to clean up an individual request.""" - request.shutdown(socket.SHUT_WR) + try: + #explicitly shutdown. socket.close() merely releases + #the socket and waits for GC to perform the actual close. + request.shutdown(socket.SHUT_WR) + except socket.error: + pass #some platforms may raise ENOTCONN here request.close() From python-checkins at python.org Sat Jul 4 01:23:50 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Fri, 03 Jul 2009 23:23:50 -0000 Subject: [Python-checkins] r73820 - python/branches/py3k/Lib/xmlrpc/client.py Message-ID: Author: kristjan.jonsson Date: Sat Jul 4 01:23:50 2009 New Revision: 73820 Log: http://bugs.python.org/issue6267 Incorrect exception handling for xmlrpclient retry Modified: python/branches/py3k/Lib/xmlrpc/client.py Modified: python/branches/py3k/Lib/xmlrpc/client.py ============================================================================== --- python/branches/py3k/Lib/xmlrpc/client.py (original) +++ python/branches/py3k/Lib/xmlrpc/client.py Sat Jul 4 01:23:50 2009 @@ -1138,11 +1138,11 @@ for i in (0, 1): try: return self.single_request(host, handler, request_body, verbose) - except (socket.error, http.client.HTTPException) as e: - retry = (errno.ECONNRESET, - errno.ECONNABORTED, - http.client.BadStatusLine) #close after we sent request - if i or e[0] not in retry: + except socket.error as e: + if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED): + raise + except http.client.BadStatusLine: #close after we sent request + if i: raise def single_request(self, host, handler, request_body, verbose=0): From python-checkins at python.org Sat Jul 4 01:26:02 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Fri, 03 Jul 2009 23:26:02 -0000 Subject: [Python-checkins] r73821 - python/trunk/Lib/xmlrpclib.py Message-ID: Author: kristjan.jonsson Date: Sat Jul 4 01:26:02 2009 New Revision: 73821 Log: http://bugs.python.org/issue6267 Incorrect exception handling for xmlrp client retry Modified: python/trunk/Lib/xmlrpclib.py Modified: python/trunk/Lib/xmlrpclib.py ============================================================================== --- python/trunk/Lib/xmlrpclib.py (original) +++ python/trunk/Lib/xmlrpclib.py Sat Jul 4 01:26:02 2009 @@ -1253,11 +1253,11 @@ for i in (0, 1): try: return self.single_request(host, handler, request_body, verbose) - except (socket.error, httplib.HTTPException), e: - retry = (errno.ECONNRESET, - errno.ECONNABORTED, - httplib.BadStatusLine) #close after we sent request - if i or e[0] not in retry: + except socket.error, e: + if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED): + raise + except http.client.BadStatusLine: #close after we sent request + if i: raise ## From python-checkins at python.org Sat Jul 4 01:29:50 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Fri, 03 Jul 2009 23:29:50 -0000 Subject: [Python-checkins] r73822 - python/trunk/Lib/xmlrpclib.py Message-ID: Author: kristjan.jonsson Date: Sat Jul 4 01:29:50 2009 New Revision: 73822 Log: http://bugs.python.org/issue6267 Incorrect exception handling for xmlrpc client retry Modified: python/trunk/Lib/xmlrpclib.py Modified: python/trunk/Lib/xmlrpclib.py ============================================================================== --- python/trunk/Lib/xmlrpclib.py (original) +++ python/trunk/Lib/xmlrpclib.py Sat Jul 4 01:29:50 2009 @@ -1256,7 +1256,7 @@ except socket.error, e: if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED): raise - except http.client.BadStatusLine: #close after we sent request + except httplib.BadStatusLine: #close after we sent request if i: raise From buildbot at python.org Sat Jul 4 02:04:42 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 04 Jul 2009 00:04:42 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/910 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: kristjan.jonsson BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From buildbot at python.org Sat Jul 4 02:57:41 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 04 Jul 2009 00:57:41 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2293 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_distutils ====================================================================== FAIL: test_ext_fullpath (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\distutils\tests\test_build_ext.py", line 374, in test_ext_fullpath self.assertEquals(wanted, path) AssertionError: 'E:\\cygwin\\home\\db3l\\buildarea\\trunk.bolen-windows\\build\\PCbuild\\src\\lxml\\etree.so' != 'E:\\cygwin\\home\\db3l\\buildarea\\trunk.bolen-windows\\build\\PCbuild\\src\\lxml\\etree.pyd' sincerely, -The Buildbot From python-checkins at python.org Sat Jul 4 03:14:30 2009 From: python-checkins at python.org (ezio.melotti) Date: Sat, 04 Jul 2009 01:14:30 -0000 Subject: [Python-checkins] r73823 - python/branches/py3k/README Message-ID: Author: ezio.melotti Date: Sat Jul 4 03:14:30 2009 New Revision: 73823 Log: #6398 typo: versio. -> version. Modified: python/branches/py3k/README Modified: python/branches/py3k/README ============================================================================== --- python/branches/py3k/README (original) +++ python/branches/py3k/README Sat Jul 4 03:14:30 2009 @@ -127,7 +127,7 @@ On Unix and Mac systems if you intend to install multiple versions of Python using the same installation prefix (--prefix argument to the configure script) you must take care that your primary python executable is not -overwritten by the installation of a different versio. All files and +overwritten by the installation of a different version. All files and directories installed using "make altinstall" contain the major and minor version and can thus live side-by-side. "make install" also creates ${prefix}/bin/python3 which refers to ${prefix}/bin/pythonX.Y. If you intend From python-checkins at python.org Sat Jul 4 03:18:08 2009 From: python-checkins at python.org (ezio.melotti) Date: Sat, 04 Jul 2009 01:18:08 -0000 Subject: [Python-checkins] r73824 - python/trunk/README Message-ID: Author: ezio.melotti Date: Sat Jul 4 03:18:08 2009 New Revision: 73824 Log: #6398 typo: versio. -> version. Modified: python/trunk/README Modified: python/trunk/README ============================================================================== --- python/trunk/README (original) +++ python/trunk/README Sat Jul 4 03:18:08 2009 @@ -924,7 +924,7 @@ On Unix and Mac systems if you intend to install multiple versions of Python using the same installation prefix (--prefix argument to the configure script) you must take care that your primary python executable is not -overwritten by the installation of a different versio. All files and +overwritten by the installation of a different version. All files and directories installed using "make altinstall" contain the major and minor version and can thus live side-by-side. "make install" also creates ${prefix}/bin/python which refers to ${prefix}/bin/pythonX.Y. If you intend From python-checkins at python.org Sat Jul 4 03:49:29 2009 From: python-checkins at python.org (gregory.p.smith) Date: Sat, 04 Jul 2009 01:49:29 -0000 Subject: [Python-checkins] r73825 - in python/trunk/Lib: subprocess.py test/test_subprocess.py Message-ID: Author: gregory.p.smith Date: Sat Jul 4 03:49:29 2009 New Revision: 73825 Log: Use select.poll() in subprocess, when available, rather than select() so that it does not fail when file descriptors are large. Fixes issue3392. Patch largely contributed by Frank Chu (fpmc) with some improvements by me. See http://bugs.python.org/issue3392. Candidate for backporting to release26-maint as it is a bug fix and changes no public API. Modified: python/trunk/Lib/subprocess.py python/trunk/Lib/test/test_subprocess.py Modified: python/trunk/Lib/subprocess.py ============================================================================== --- python/trunk/Lib/subprocess.py (original) +++ python/trunk/Lib/subprocess.py Sat Jul 4 03:49:29 2009 @@ -413,6 +413,7 @@ error = IOError else: import select + _has_poll = hasattr(select, 'poll') import errno import fcntl import pickle @@ -425,12 +426,10 @@ except: MAXFD = 256 -# True/False does not exist on 2.2.0 -#try: -# False -#except NameError: -# False = 0 -# True = 1 +# When select or poll has indicated that the file is writable, +# we can write up to _PIPE_BUF bytes without risk of blocking. +# POSIX defines PIPE_BUF as >= 512. +_PIPE_BUF = getattr(select, 'PIPE_BUF', 512) _active = [] @@ -1191,19 +1190,100 @@ def _communicate(self, input): - read_set = [] - write_set = [] - stdout = None # Return - stderr = None # Return - if self.stdin: # Flush stdio buffer. This might block, if the user has # been writing to .stdin in an uncontrolled fashion. self.stdin.flush() - if input: - write_set.append(self.stdin) - else: + if not input: self.stdin.close() + + if _has_poll: + stdout, stderr = self._communicate_with_poll(input) + else: + stdout, stderr = self._communicate_with_select(input) + + # All data exchanged. Translate lists into strings. + if stdout is not None: + stdout = ''.join(stdout) + if stderr is not None: + stderr = ''.join(stderr) + + # Translate newlines, if requested. We cannot let the file + # object do the translation: It is based on stdio, which is + # impossible to combine with select (unless forcing no + # buffering). + if self.universal_newlines and hasattr(file, 'newlines'): + if stdout: + stdout = self._translate_newlines(stdout) + if stderr: + stderr = self._translate_newlines(stderr) + + self.wait() + return (stdout, stderr) + + + def _communicate_with_poll(self, input): + stdout = None # Return + stderr = None # Return + fd2file = {} + fd2output = {} + + poller = select.poll() + def register_and_append(file_obj, eventmask): + poller.register(file_obj.fileno(), eventmask) + fd2file[file_obj.fileno()] = file_obj + + def close_unregister_and_remove(fd): + poller.unregister(fd) + fd2file[fd].close() + fd2file.pop(fd) + + if self.stdin and input: + register_and_append(self.stdin, select.POLLOUT) + + select_POLLIN_POLLPRI = select.POLLIN | select.POLLPRI + if self.stdout: + register_and_append(self.stdout, select_POLLIN_POLLPRI) + fd2output[self.stdout.fileno()] = stdout = [] + if self.stderr: + register_and_append(self.stderr, select_POLLIN_POLLPRI) + fd2output[self.stderr.fileno()] = stderr = [] + + input_offset = 0 + while fd2file: + try: + ready = poller.poll() + except select.error, e: + if e.args[0] == errno.EINTR: + continue + raise + + for fd, mode in ready: + if mode & select.POLLOUT: + chunk = input[input_offset : input_offset + _PIPE_BUF] + input_offset += os.write(fd, chunk) + if input_offset >= len(input): + close_unregister_and_remove(fd) + elif mode & select_POLLIN_POLLPRI: + data = os.read(fd, 4096) + if not data: + close_unregister_and_remove(fd) + fd2output[fd].append(data) + else: + # Ignore hang up or errors. + close_unregister_and_remove(fd) + + return (stdout, stderr) + + + def _communicate_with_select(self, input): + read_set = [] + write_set = [] + stdout = None # Return + stderr = None # Return + + if self.stdin and input: + write_set.append(self.stdin) if self.stdout: read_set.append(self.stdout) stdout = [] @@ -1221,10 +1301,7 @@ raise if self.stdin in wlist: - # When select has indicated that the file is writable, - # we can write up to PIPE_BUF bytes without risk - # blocking. POSIX defines PIPE_BUF >= 512 - chunk = input[input_offset : input_offset + 512] + chunk = input[input_offset : input_offset + _PIPE_BUF] bytes_written = os.write(self.stdin.fileno(), chunk) input_offset += bytes_written if input_offset >= len(input): @@ -1245,25 +1322,9 @@ read_set.remove(self.stderr) stderr.append(data) - # All data exchanged. Translate lists into strings. - if stdout is not None: - stdout = ''.join(stdout) - if stderr is not None: - stderr = ''.join(stderr) - - # Translate newlines, if requested. We cannot let the file - # object do the translation: It is based on stdio, which is - # impossible to combine with select (unless forcing no - # buffering). - if self.universal_newlines and hasattr(file, 'newlines'): - if stdout: - stdout = self._translate_newlines(stdout) - if stderr: - stderr = self._translate_newlines(stderr) - - self.wait() return (stdout, stderr) + def send_signal(self, sig): """Send a signal to the process """ Modified: python/trunk/Lib/test/test_subprocess.py ============================================================================== --- python/trunk/Lib/test/test_subprocess.py (original) +++ python/trunk/Lib/test/test_subprocess.py Sat Jul 4 03:49:29 2009 @@ -766,8 +766,24 @@ p.terminate() self.assertNotEqual(p.wait(), 0) + +unit_tests = [ProcessTestCase] + +if subprocess._has_poll: + class ProcessTestCaseNoPoll(ProcessTestCase): + def setUp(self): + subprocess._has_poll = False + ProcessTestCase.setUp(self) + + def tearDown(self): + subprocess._has_poll = True + ProcessTestCase.tearDown(self) + + unit_tests.append(ProcessTestCaseNoPoll) + + def test_main(): - test_support.run_unittest(ProcessTestCase) + test_support.run_unittest(*unit_tests) if hasattr(test_support, "reap_children"): test_support.reap_children() From python-checkins at python.org Sat Jul 4 03:55:11 2009 From: python-checkins at python.org (gregory.p.smith) Date: Sat, 04 Jul 2009 01:55:11 -0000 Subject: [Python-checkins] r73826 - python/trunk/Misc/NEWS Message-ID: Author: gregory.p.smith Date: Sat Jul 4 03:55:11 2009 New Revision: 73826 Log: news entry for r73825 Modified: python/trunk/Misc/NEWS Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jul 4 03:55:11 2009 @@ -347,6 +347,9 @@ Library ------- +- Issue #3392: The subprocess communicate() method no longer fails in select() + when file descriptors are large; communicate() now uses poll() when possible. + - Issue #6403: Fixed package path usage in build_ext. - Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was From python-checkins at python.org Sat Jul 4 04:02:42 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 02:02:42 -0000 Subject: [Python-checkins] r73827 - in python/trunk: Lib/distutils/dist.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 4 04:02:41 2009 New Revision: 73827 Log: Fixed #6413: fixed log level in distutils.dist.announce Modified: python/trunk/Lib/distutils/dist.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/distutils/dist.py ============================================================================== --- python/trunk/Lib/distutils/dist.py (original) +++ python/trunk/Lib/distutils/dist.py Sat Jul 4 04:02:41 2009 @@ -914,8 +914,8 @@ # -- Methods that operate on the Distribution ---------------------- - def announce(self, msg, level=1): - log.debug(msg) + def announce(self, msg, level=log.INFO): + log.log(level, msg) def run_commands(self): """Run each command that was seen on the setup script command line. Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jul 4 04:02:41 2009 @@ -347,6 +347,8 @@ Library ------- +- Issue #6413: Fixed the log level in distutils.dist for announce. + - Issue #3392: The subprocess communicate() method no longer fails in select() when file descriptors are large; communicate() now uses poll() when possible. From python-checkins at python.org Sat Jul 4 04:04:22 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 02:04:22 -0000 Subject: [Python-checkins] r73828 - in python/branches/py3k: Lib/distutils/dist.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 4 04:04:21 2009 New Revision: 73828 Log: Merged revisions 73827 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73827 | tarek.ziade | 2009-07-04 04:02:41 +0200 (Sat, 04 Jul 2009) | 1 line Fixed #6413: fixed log level in distutils.dist.announce ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/dist.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/distutils/dist.py ============================================================================== --- python/branches/py3k/Lib/distutils/dist.py (original) +++ python/branches/py3k/Lib/distutils/dist.py Sat Jul 4 04:04:21 2009 @@ -907,8 +907,8 @@ # -- Methods that operate on the Distribution ---------------------- - def announce(self, msg, level=1): - log.debug(msg) + def announce(self, msg, level=log.INFO): + log.log(level, msg) def run_commands(self): """Run each command that was seen on the setup script command line. Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sat Jul 4 04:04:21 2009 @@ -865,6 +865,8 @@ Library ------- +- Issue #6413: Fixed the log level in distutils.dist for announce. + - Issue #6403: Fixed package path usage in build_ext. - Issue #6365: Distutils build_ext inplace mode was copying the compiled From python-checkins at python.org Sat Jul 4 04:05:17 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 02:05:17 -0000 Subject: [Python-checkins] r73829 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Sat Jul 4 04:05:17 2009 New Revision: 73829 Log: Blocked revisions 73817 via svnmerge ................ r73817 | tarek.ziade | 2009-07-03 21:22:23 +0200 (Fri, 03 Jul 2009) | 13 lines Merged revisions 73814-73815 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73814 | tarek.ziade | 2009-07-03 21:01:12 +0200 (Fri, 03 Jul 2009) | 1 line basic tests to raise distutils.file_util coverage ........ r73815 | tarek.ziade | 2009-07-03 21:14:49 +0200 (Fri, 03 Jul 2009) | 1 line cleaned distutils.file_util ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Sat Jul 4 04:05:52 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 02:05:52 -0000 Subject: [Python-checkins] r73830 - in python/branches/release31-maint: Lib/distutils/dist.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 4 04:05:51 2009 New Revision: 73830 Log: Merged revisions 73828 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73828 | tarek.ziade | 2009-07-04 04:04:21 +0200 (Sat, 04 Jul 2009) | 9 lines Merged revisions 73827 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73827 | tarek.ziade | 2009-07-04 04:02:41 +0200 (Sat, 04 Jul 2009) | 1 line Fixed #6413: fixed log level in distutils.dist.announce ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/dist.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/distutils/dist.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/dist.py (original) +++ python/branches/release31-maint/Lib/distutils/dist.py Sat Jul 4 04:05:51 2009 @@ -907,8 +907,8 @@ # -- Methods that operate on the Distribution ---------------------- - def announce(self, msg, level=1): - log.debug(msg) + def announce(self, msg, level=log.INFO): + log.log(level, msg) def run_commands(self): """Run each command that was seen on the setup script command line. Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sat Jul 4 04:05:51 2009 @@ -859,6 +859,8 @@ Library ------- +- Issue #6413: Fixed the log level in distutils.dist for announce. + - Issue #6403: Fixed package path usage in build_ext. - Issue #6365: Distutils build_ext inplace mode was copying the compiled From python-checkins at python.org Sat Jul 4 04:07:26 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 02:07:26 -0000 Subject: [Python-checkins] r73831 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Sat Jul 4 04:07:26 2009 New Revision: 73831 Log: Blocked revisions 73827 via svnmerge ........ r73827 | tarek.ziade | 2009-07-04 04:02:41 +0200 (Sat, 04 Jul 2009) | 1 line Fixed #6413: fixed log level in distutils.dist.announce ........ Modified: python/branches/release26-maint/ (props changed) From buildbot at python.org Sat Jul 4 04:24:19 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 04 Jul 2009 02:24:19 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/253 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: gregory.p.smith BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_xmlrpc ====================================================================== FAIL: test_two (test.test_xmlrpc.KeepaliveServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/test/test_xmlrpc.py", line 548, in test_two self.assertTrue(len(self.RequestHandler.myRequests[-1]) >= 2) AssertionError: False is not True make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jul 4 04:28:47 2009 From: python-checkins at python.org (gregory.p.smith) Date: Sat, 04 Jul 2009 02:28:47 -0000 Subject: [Python-checkins] r73832 - in python/branches/py3k: Doc/library/select.rst Modules/selectmodule.c Message-ID: Author: gregory.p.smith Date: Sat Jul 4 04:28:47 2009 New Revision: 73832 Log: Merged revisions 73818 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73818 | gregory.p.smith | 2009-07-03 13:48:31 -0700 (Fri, 03 Jul 2009) | 2 lines Adds the select.PIPE_BUF attribute to expose the system constant. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/select.rst python/branches/py3k/Modules/selectmodule.c Modified: python/branches/py3k/Doc/library/select.rst ============================================================================== --- python/branches/py3k/Doc/library/select.rst (original) +++ python/branches/py3k/Doc/library/select.rst Sat Jul 4 04:28:47 2009 @@ -94,6 +94,15 @@ library, and does not handle file descriptors that don't originate from WinSock. +.. attribute:: select.PIPE_BUF + + Files reported as ready for writing by :func:`select`, :func:`poll` or + similar interfaces in this module are guaranteed to not block on a write + of up to :const:`PIPE_BUF` bytes. + This value is guaranteed by POSIX to be at least 512. + + .. versionadded:: 2.7 + .. _epoll-objects: Modified: python/branches/py3k/Modules/selectmodule.c ============================================================================== --- python/branches/py3k/Modules/selectmodule.c (original) +++ python/branches/py3k/Modules/selectmodule.c Sat Jul 4 04:28:47 2009 @@ -1764,6 +1764,8 @@ Py_INCREF(SelectError); PyModule_AddObject(m, "error", SelectError); + PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF); + #if defined(HAVE_POLL) #ifdef __APPLE__ if (select_have_broken_poll()) { From python-checkins at python.org Sat Jul 4 04:46:55 2009 From: python-checkins at python.org (gregory.p.smith) Date: Sat, 04 Jul 2009 02:46:55 -0000 Subject: [Python-checkins] r73833 - in python/branches/py3k: Lib/subprocess.py Lib/test/test_subprocess.py Misc/NEWS Message-ID: Author: gregory.p.smith Date: Sat Jul 4 04:46:54 2009 New Revision: 73833 Log: Merged revisions 73825-73826 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73825 | gregory.p.smith | 2009-07-03 18:49:29 -0700 (Fri, 03 Jul 2009) | 9 lines Use select.poll() in subprocess, when available, rather than select() so that it does not fail when file descriptors are large. Fixes issue3392. Patch largely contributed by Frank Chu (fpmc) with some improvements by me. See http://bugs.python.org/issue3392. ........ r73826 | gregory.p.smith | 2009-07-03 18:55:11 -0700 (Fri, 03 Jul 2009) | 2 lines news entry for r73825 ........ Candidate for backporting to release31-maint as it is a bug fix and changes no public API. Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/subprocess.py python/branches/py3k/Lib/test/test_subprocess.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/subprocess.py ============================================================================== --- python/branches/py3k/Lib/subprocess.py (original) +++ python/branches/py3k/Lib/subprocess.py Sat Jul 4 04:46:54 2009 @@ -371,6 +371,7 @@ error = IOError else: import select + _has_poll = hasattr(select, 'poll') import errno import fcntl import pickle @@ -383,6 +384,11 @@ except: MAXFD = 256 +# When select or poll has indicated that the file is writable, +# we can write up to _PIPE_BUF bytes without risk of blocking. +# POSIX defines PIPE_BUF as >= 512. +_PIPE_BUF = getattr(select, 'PIPE_BUF', 512) + _active = [] def _cleanup(): @@ -1173,19 +1179,103 @@ def _communicate(self, input): - read_set = [] - write_set = [] - stdout = None # Return - stderr = None # Return - if self.stdin: # Flush stdio buffer. This might block, if the user has # been writing to .stdin in an uncontrolled fashion. self.stdin.flush() - if input: - write_set.append(self.stdin) - else: + if not input: self.stdin.close() + + if _has_poll: + stdout, stderr = self._communicate_with_poll(input) + else: + stdout, stderr = self._communicate_with_select(input) + + # All data exchanged. Translate lists into strings. + if stdout is not None: + stdout = b''.join(stdout) + if stderr is not None: + stderr = b''.join(stderr) + + # Translate newlines, if requested. + # This also turns bytes into strings. + if self.universal_newlines: + if stdout is not None: + stdout = self._translate_newlines(stdout, + self.stdout.encoding) + if stderr is not None: + stderr = self._translate_newlines(stderr, + self.stderr.encoding) + + self.wait() + return (stdout, stderr) + + + def _communicate_with_poll(self, input): + stdout = None # Return + stderr = None # Return + fd2file = {} + fd2output = {} + + poller = select.poll() + def register_and_append(file_obj, eventmask): + poller.register(file_obj.fileno(), eventmask) + fd2file[file_obj.fileno()] = file_obj + + def close_unregister_and_remove(fd): + poller.unregister(fd) + fd2file[fd].close() + fd2file.pop(fd) + + if self.stdin and input: + register_and_append(self.stdin, select.POLLOUT) + + select_POLLIN_POLLPRI = select.POLLIN | select.POLLPRI + if self.stdout: + register_and_append(self.stdout, select_POLLIN_POLLPRI) + fd2output[self.stdout.fileno()] = stdout = [] + if self.stderr: + register_and_append(self.stderr, select_POLLIN_POLLPRI) + fd2output[self.stderr.fileno()] = stderr = [] + + input_offset = 0 + while fd2file: + try: + ready = poller.poll() + except select.error as e: + if e.args[0] == errno.EINTR: + continue + raise + + # XXX Rewrite these to use non-blocking I/O on the + # file objects; they are no longer using C stdio! + + for fd, mode in ready: + if mode & select.POLLOUT: + chunk = input[input_offset : input_offset + _PIPE_BUF] + input_offset += os.write(fd, chunk) + if input_offset >= len(input): + close_unregister_and_remove(fd) + elif mode & select_POLLIN_POLLPRI: + data = os.read(fd, 4096) + if not data: + close_unregister_and_remove(fd) + fd2output[fd].append(data) + else: + # Ignore hang up or errors. + close_unregister_and_remove(fd) + + return (stdout, stderr) + + + def _communicate_with_select(self, input): + read_set = [] + write_set = [] + stdout = None # Return + stderr = None # Return + + if self.stdin and input: + write_set.append(self.stdin) if self.stdout: read_set.append(self.stdout) stdout = [] @@ -1206,10 +1296,7 @@ # file objects; they are no longer using C stdio! if self.stdin in wlist: - # When select has indicated that the file is writable, - # we can write up to PIPE_BUF bytes without risk - # blocking. POSIX defines PIPE_BUF >= 512 - chunk = input[input_offset : input_offset + 512] + chunk = input[input_offset : input_offset + _PIPE_BUF] bytes_written = os.write(self.stdin.fileno(), chunk) input_offset += bytes_written if input_offset >= len(input): @@ -1230,25 +1317,9 @@ read_set.remove(self.stderr) stderr.append(data) - # All data exchanged. Translate lists into strings. - if stdout is not None: - stdout = b"".join(stdout) - if stderr is not None: - stderr = b"".join(stderr) - - # Translate newlines, if requested. - # This also turns bytes into strings. - if self.universal_newlines: - if stdout is not None: - stdout = self._translate_newlines(stdout, - self.stdout.encoding) - if stderr is not None: - stderr = self._translate_newlines(stderr, - self.stderr.encoding) - - self.wait() return (stdout, stderr) + def send_signal(self, sig): """Send a signal to the process """ Modified: python/branches/py3k/Lib/test/test_subprocess.py ============================================================================== --- python/branches/py3k/Lib/test/test_subprocess.py (original) +++ python/branches/py3k/Lib/test/test_subprocess.py Sat Jul 4 04:46:54 2009 @@ -798,8 +798,24 @@ if dir is not None: os.rmdir(dir) + +unit_tests = [ProcessTestCase, CommandTests] + +if subprocess._has_poll: + class ProcessTestCaseNoPoll(ProcessTestCase): + def setUp(self): + subprocess._has_poll = False + ProcessTestCase.setUp(self) + + def tearDown(self): + subprocess._has_poll = True + ProcessTestCase.tearDown(self) + + unit_tests.append(ProcessTestCaseNoPoll) + + def test_main(): - support.run_unittest(ProcessTestCase, CommandTests) + support.run_unittest(*unit_tests) support.reap_children() if __name__ == "__main__": Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sat Jul 4 04:46:54 2009 @@ -34,6 +34,9 @@ Library ------- +- Issue #3392: The subprocess communicate() method no longer fails in select() + when file descriptors are large; communicate() now uses poll() when possible. + - Issue #6369: Fix an RLE decompression bug in the binhex module. - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. From python-checkins at python.org Sat Jul 4 04:59:20 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 02:59:20 -0000 Subject: [Python-checkins] r73834 - in python/trunk/Lib/distutils: dist.py tests/test_dist.py Message-ID: Author: tarek.ziade Date: Sat Jul 4 04:59:19 2009 New Revision: 73834 Log: using print statements when used for user interaction Modified: python/trunk/Lib/distutils/dist.py python/trunk/Lib/distutils/tests/test_dist.py Modified: python/trunk/Lib/distutils/dist.py ============================================================================== --- python/trunk/Lib/distutils/dist.py (original) +++ python/trunk/Lib/distutils/dist.py Sat Jul 4 04:59:19 2009 @@ -602,14 +602,14 @@ options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - self.announce('') + print('') if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - self.announce('') + print('') for command in self.commands: if isinstance(command, type) and issubclass(command, Command): @@ -623,9 +623,9 @@ else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - self.announce('') + print('') - self.announce(gen_usage(self.script_name)) + print(gen_usage(self.script_name)) def handle_display_options(self, option_order): """If there were any non-global "display-only" options @@ -640,8 +640,8 @@ # we ignore "foo bar"). if self.help_commands: self.print_commands() - self.announce('') - self.announce(gen_usage(self.script_name)) + print('') + print(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -657,12 +657,12 @@ opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - self.announce(','.join(value)) + print(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - self.announce('\n'.join(value)) + print('\n'.join(value)) else: - self.announce(value) + print(value) any_display_options = 1 return any_display_options @@ -671,7 +671,7 @@ """Print a subset of the list of all commands -- used by 'print_commands()'. """ - self.announce(header + ":") + print(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -682,7 +682,7 @@ except AttributeError: description = "(no description available)" - self.announce(" %-*s %s" % (max_length, cmd, description)) + print(" %-*s %s" % (max_length, cmd, description)) def print_commands(self): """Print out a help message listing all available commands with a Modified: python/trunk/Lib/distutils/tests/test_dist.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_dist.py (original) +++ python/trunk/Lib/distutils/tests/test_dist.py Sat Jul 4 04:59:19 2009 @@ -165,24 +165,6 @@ self.assertEquals(dist.metadata.platforms, ['one', 'two']) self.assertEquals(dist.metadata.keywords, ['one', 'two']) - def test_show_help(self): - class FancyGetopt(object): - def __init__(self): - self.count = 0 - - def set_option_table(self, *args): - pass - - def print_help(self, *args): - self.count += 1 - - parser = FancyGetopt() - dist = Distribution() - dist.commands = ['sdist'] - dist.script_name = 'setup.py' - dist._show_help(parser) - self.assertEquals(parser.count, 3) - def test_get_command_packages(self): dist = Distribution() self.assertEquals(dist.command_packages, None) From python-checkins at python.org Sat Jul 4 05:00:50 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 03:00:50 -0000 Subject: [Python-checkins] r73835 - in python/branches/py3k: Lib/distutils/dist.py Lib/distutils/tests/test_dist.py Message-ID: Author: tarek.ziade Date: Sat Jul 4 05:00:50 2009 New Revision: 73835 Log: Merged revisions 73834 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73834 | tarek.ziade | 2009-07-04 04:59:19 +0200 (Sat, 04 Jul 2009) | 1 line using print statements when used for user interaction ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/dist.py python/branches/py3k/Lib/distutils/tests/test_dist.py Modified: python/branches/py3k/Lib/distutils/dist.py ============================================================================== --- python/branches/py3k/Lib/distutils/dist.py (original) +++ python/branches/py3k/Lib/distutils/dist.py Sat Jul 4 05:00:50 2009 @@ -596,14 +596,14 @@ options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - self.announce('') + print('') if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - self.announce('') + print('') for command in self.commands: if isinstance(command, type) and issubclass(command, Command): @@ -617,9 +617,9 @@ else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - self.announce('') + print('') - self.announce(gen_usage(self.script_name)) + print(gen_usage(self.script_name)) def handle_display_options(self, option_order): """If there were any non-global "display-only" options @@ -634,8 +634,8 @@ # we ignore "foo bar"). if self.help_commands: self.print_commands() - self.announce('') - self.announce(gen_usage(self.script_name)) + print('') + print(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -651,12 +651,12 @@ opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - self.announce(','.join(value)) + print(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - self.announce('\n'.join(value)) + print('\n'.join(value)) else: - self.announce(value) + print(value) any_display_options = 1 return any_display_options @@ -665,7 +665,7 @@ """Print a subset of the list of all commands -- used by 'print_commands()'. """ - self.announce(header + ":") + print(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -676,7 +676,7 @@ except AttributeError: description = "(no description available)" - self.announce(" %-*s %s" % (max_length, cmd, description)) + print(" %-*s %s" % (max_length, cmd, description)) def print_commands(self): """Print out a help message listing all available commands with a Modified: python/branches/py3k/Lib/distutils/tests/test_dist.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_dist.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_dist.py Sat Jul 4 05:00:50 2009 @@ -136,24 +136,6 @@ self.assertEquals(dist.metadata.platforms, ['one', 'two']) self.assertEquals(dist.metadata.keywords, ['one', 'two']) - def test_show_help(self): - class FancyGetopt(object): - def __init__(self): - self.count = 0 - - def set_option_table(self, *args): - pass - - def print_help(self, *args): - self.count += 1 - - parser = FancyGetopt() - dist = Distribution() - dist.commands = ['sdist'] - dist.script_name = 'setup.py' - dist._show_help(parser) - self.assertEquals(parser.count, 3) - def test_get_command_packages(self): dist = Distribution() self.assertEquals(dist.command_packages, None) From python-checkins at python.org Sat Jul 4 05:01:34 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 03:01:34 -0000 Subject: [Python-checkins] r73836 - in python/branches/release31-maint: Lib/distutils/dist.py Lib/distutils/tests/test_dist.py Message-ID: Author: tarek.ziade Date: Sat Jul 4 05:01:33 2009 New Revision: 73836 Log: Merged revisions 73835 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73835 | tarek.ziade | 2009-07-04 05:00:50 +0200 (Sat, 04 Jul 2009) | 9 lines Merged revisions 73834 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73834 | tarek.ziade | 2009-07-04 04:59:19 +0200 (Sat, 04 Jul 2009) | 1 line using print statements when used for user interaction ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/dist.py python/branches/release31-maint/Lib/distutils/tests/test_dist.py Modified: python/branches/release31-maint/Lib/distutils/dist.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/dist.py (original) +++ python/branches/release31-maint/Lib/distutils/dist.py Sat Jul 4 05:01:33 2009 @@ -596,14 +596,14 @@ options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - self.announce('') + print('') if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - self.announce('') + print('') for command in self.commands: if isinstance(command, type) and issubclass(command, Command): @@ -617,9 +617,9 @@ else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - self.announce('') + print('') - self.announce(gen_usage(self.script_name)) + print(gen_usage(self.script_name)) def handle_display_options(self, option_order): """If there were any non-global "display-only" options @@ -634,8 +634,8 @@ # we ignore "foo bar"). if self.help_commands: self.print_commands() - self.announce('') - self.announce(gen_usage(self.script_name)) + print('') + print(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -651,12 +651,12 @@ opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - self.announce(','.join(value)) + print(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - self.announce('\n'.join(value)) + print('\n'.join(value)) else: - self.announce(value) + print(value) any_display_options = 1 return any_display_options @@ -665,7 +665,7 @@ """Print a subset of the list of all commands -- used by 'print_commands()'. """ - self.announce(header + ":") + print(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -676,7 +676,7 @@ except AttributeError: description = "(no description available)" - self.announce(" %-*s %s" % (max_length, cmd, description)) + print(" %-*s %s" % (max_length, cmd, description)) def print_commands(self): """Print out a help message listing all available commands with a Modified: python/branches/release31-maint/Lib/distutils/tests/test_dist.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_dist.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_dist.py Sat Jul 4 05:01:33 2009 @@ -136,24 +136,6 @@ self.assertEquals(dist.metadata.platforms, ['one', 'two']) self.assertEquals(dist.metadata.keywords, ['one', 'two']) - def test_show_help(self): - class FancyGetopt(object): - def __init__(self): - self.count = 0 - - def set_option_table(self, *args): - pass - - def print_help(self, *args): - self.count += 1 - - parser = FancyGetopt() - dist = Distribution() - dist.commands = ['sdist'] - dist.script_name = 'setup.py' - dist._show_help(parser) - self.assertEquals(parser.count, 3) - def test_get_command_packages(self): dist = Distribution() self.assertEquals(dist.command_packages, None) From python-checkins at python.org Sat Jul 4 05:02:06 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 04 Jul 2009 03:02:06 -0000 Subject: [Python-checkins] r73837 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Sat Jul 4 05:02:06 2009 New Revision: 73837 Log: Blocked revisions 73834 via svnmerge ........ r73834 | tarek.ziade | 2009-07-04 04:59:19 +0200 (Sat, 04 Jul 2009) | 1 line using print statements when used for user interaction ........ Modified: python/branches/release26-maint/ (props changed) From buildbot at python.org Sat Jul 4 06:29:02 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 04 Jul 2009 04:29:02 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.1 Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.1/builds/4 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed svn sincerely, -The Buildbot From buildbot at python.org Sat Jul 4 07:04:35 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 04 Jul 2009 05:04:35 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 2.6 Message-ID: The Buildbot has detected a new failure of x86 gentoo 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%202.6/builds/395 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Killed sincerely, -The Buildbot From python-checkins at python.org Sat Jul 4 10:32:16 2009 From: python-checkins at python.org (gregory.p.smith) Date: Sat, 04 Jul 2009 08:32:16 -0000 Subject: [Python-checkins] r73838 - in python/branches/py3k/Lib/sqlite3/test: dbapi.py factory.py hooks.py regression.py transactions.py types.py userfunctions.py Message-ID: Author: gregory.p.smith Date: Sat Jul 4 10:32:15 2009 New Revision: 73838 Log: change deprecated unittest method calls into their proper names. Modified: python/branches/py3k/Lib/sqlite3/test/dbapi.py python/branches/py3k/Lib/sqlite3/test/factory.py python/branches/py3k/Lib/sqlite3/test/hooks.py python/branches/py3k/Lib/sqlite3/test/regression.py python/branches/py3k/Lib/sqlite3/test/transactions.py python/branches/py3k/Lib/sqlite3/test/types.py python/branches/py3k/Lib/sqlite3/test/userfunctions.py Modified: python/branches/py3k/Lib/sqlite3/test/dbapi.py ============================================================================== --- python/branches/py3k/Lib/sqlite3/test/dbapi.py (original) +++ python/branches/py3k/Lib/sqlite3/test/dbapi.py Sat Jul 4 10:32:15 2009 @@ -44,39 +44,39 @@ "Warning is not a subclass of Exception") def CheckError(self): - self.failUnless(issubclass(sqlite.Error, Exception), + self.assertTrue(issubclass(sqlite.Error, Exception), "Error is not a subclass of Exception") def CheckInterfaceError(self): - self.failUnless(issubclass(sqlite.InterfaceError, sqlite.Error), + self.assertTrue(issubclass(sqlite.InterfaceError, sqlite.Error), "InterfaceError is not a subclass of Error") def CheckDatabaseError(self): - self.failUnless(issubclass(sqlite.DatabaseError, sqlite.Error), + self.assertTrue(issubclass(sqlite.DatabaseError, sqlite.Error), "DatabaseError is not a subclass of Error") def CheckDataError(self): - self.failUnless(issubclass(sqlite.DataError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.DataError, sqlite.DatabaseError), "DataError is not a subclass of DatabaseError") def CheckOperationalError(self): - self.failUnless(issubclass(sqlite.OperationalError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.OperationalError, sqlite.DatabaseError), "OperationalError is not a subclass of DatabaseError") def CheckIntegrityError(self): - self.failUnless(issubclass(sqlite.IntegrityError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.IntegrityError, sqlite.DatabaseError), "IntegrityError is not a subclass of DatabaseError") def CheckInternalError(self): - self.failUnless(issubclass(sqlite.InternalError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.InternalError, sqlite.DatabaseError), "InternalError is not a subclass of DatabaseError") def CheckProgrammingError(self): - self.failUnless(issubclass(sqlite.ProgrammingError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.ProgrammingError, sqlite.DatabaseError), "ProgrammingError is not a subclass of DatabaseError") def CheckNotSupportedError(self): - self.failUnless(issubclass(sqlite.NotSupportedError, + self.assertTrue(issubclass(sqlite.NotSupportedError, sqlite.DatabaseError), "NotSupportedError is not a subclass of DatabaseError") @@ -126,16 +126,16 @@ def CheckExceptions(self): # Optional DB-API extension. - self.failUnlessEqual(self.cx.Warning, sqlite.Warning) - self.failUnlessEqual(self.cx.Error, sqlite.Error) - self.failUnlessEqual(self.cx.InterfaceError, sqlite.InterfaceError) - self.failUnlessEqual(self.cx.DatabaseError, sqlite.DatabaseError) - self.failUnlessEqual(self.cx.DataError, sqlite.DataError) - self.failUnlessEqual(self.cx.OperationalError, sqlite.OperationalError) - self.failUnlessEqual(self.cx.IntegrityError, sqlite.IntegrityError) - self.failUnlessEqual(self.cx.InternalError, sqlite.InternalError) - self.failUnlessEqual(self.cx.ProgrammingError, sqlite.ProgrammingError) - self.failUnlessEqual(self.cx.NotSupportedError, sqlite.NotSupportedError) + self.assertEqual(self.cx.Warning, sqlite.Warning) + self.assertEqual(self.cx.Error, sqlite.Error) + self.assertEqual(self.cx.InterfaceError, sqlite.InterfaceError) + self.assertEqual(self.cx.DatabaseError, sqlite.DatabaseError) + self.assertEqual(self.cx.DataError, sqlite.DataError) + self.assertEqual(self.cx.OperationalError, sqlite.OperationalError) + self.assertEqual(self.cx.IntegrityError, sqlite.IntegrityError) + self.assertEqual(self.cx.InternalError, sqlite.InternalError) + self.assertEqual(self.cx.ProgrammingError, sqlite.ProgrammingError) + self.assertEqual(self.cx.NotSupportedError, sqlite.NotSupportedError) class CursorTests(unittest.TestCase): def setUp(self): @@ -227,7 +227,7 @@ self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=?", ["foo"]) row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckExecuteParamSequence(self): class L(object): @@ -240,13 +240,13 @@ self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=?", L()) row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckExecuteDictMapping(self): self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=:name", {"name": "foo"}) row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckExecuteDictMapping_Mapping(self): class D(dict): @@ -256,7 +256,7 @@ self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=:name", D()) row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckExecuteDictMappingTooLittleArgs(self): self.cu.execute("insert into test(name) values ('foo')") @@ -290,7 +290,7 @@ self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("update test set name='bar'") - self.failUnlessEqual(self.cu.rowcount, 2) + self.assertEqual(self.cu.rowcount, 2) def CheckRowcountSelect(self): """ @@ -299,12 +299,12 @@ has thus to be -1. """ self.cu.execute("select 5 union select 6") - self.failUnlessEqual(self.cu.rowcount, -1) + self.assertEqual(self.cu.rowcount, -1) def CheckRowcountExecutemany(self): self.cu.execute("delete from test") self.cu.executemany("insert into test(name) values (?)", [(1,), (2,), (3,)]) - self.failUnlessEqual(self.cu.rowcount, 3) + self.assertEqual(self.cu.rowcount, 3) def CheckTotalChanges(self): self.cu.execute("insert into test(name) values ('foo')") @@ -377,24 +377,24 @@ lst = [] for row in self.cu: lst.append(row[0]) - self.failUnlessEqual(lst[0], 5) - self.failUnlessEqual(lst[1], 6) + self.assertEqual(lst[0], 5) + self.assertEqual(lst[1], 6) def CheckFetchone(self): self.cu.execute("select name from test") row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") row = self.cu.fetchone() - self.failUnlessEqual(row, None) + self.assertEqual(row, None) def CheckFetchoneNoStatement(self): cur = self.cx.cursor() row = cur.fetchone() - self.failUnlessEqual(row, None) + self.assertEqual(row, None) def CheckArraySize(self): # must default ot 1 - self.failUnlessEqual(self.cu.arraysize, 1) + self.assertEqual(self.cu.arraysize, 1) # now set to 2 self.cu.arraysize = 2 @@ -407,27 +407,27 @@ self.cu.execute("select name from test") res = self.cu.fetchmany() - self.failUnlessEqual(len(res), 2) + self.assertEqual(len(res), 2) def CheckFetchmany(self): self.cu.execute("select name from test") res = self.cu.fetchmany(100) - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) res = self.cu.fetchmany(100) - self.failUnlessEqual(res, []) + self.assertEqual(res, []) def CheckFetchmanyKwArg(self): """Checks if fetchmany works with keyword arguments""" self.cu.execute("select name from test") res = self.cu.fetchmany(size=100) - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) def CheckFetchall(self): self.cu.execute("select name from test") res = self.cu.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) res = self.cu.fetchall() - self.failUnlessEqual(res, []) + self.assertEqual(res, []) def CheckSetinputsizes(self): self.cu.setinputsizes([3, 4, 5]) @@ -440,7 +440,7 @@ def CheckCursorConnection(self): # Optional DB-API extension. - self.failUnlessEqual(self.cu.connection, self.cx) + self.assertEqual(self.cu.connection, self.cx) def CheckWrongCursorCallable(self): try: @@ -651,7 +651,7 @@ """) cur.execute("select i from a") res = cur.fetchone()[0] - self.failUnlessEqual(res, 5) + self.assertEqual(res, 5) def CheckScriptErrorIncomplete(self): con = sqlite.connect(":memory:") @@ -661,7 +661,7 @@ cur.executescript("create table test(sadfsadfdsa") except sqlite.ProgrammingError: raised = True - self.failUnlessEqual(raised, True, "should have raised an exception") + self.assertEqual(raised, True, "should have raised an exception") def CheckScriptErrorNormal(self): con = sqlite.connect(":memory:") @@ -671,26 +671,26 @@ cur.executescript("create table test(sadfsadfdsa); select foo from hurz;") except sqlite.OperationalError: raised = True - self.failUnlessEqual(raised, True, "should have raised an exception") + self.assertEqual(raised, True, "should have raised an exception") def CheckConnectionExecute(self): con = sqlite.connect(":memory:") result = con.execute("select 5").fetchone()[0] - self.failUnlessEqual(result, 5, "Basic test of Connection.execute") + self.assertEqual(result, 5, "Basic test of Connection.execute") def CheckConnectionExecutemany(self): con = sqlite.connect(":memory:") con.execute("create table test(foo)") con.executemany("insert into test(foo) values (?)", [(3,), (4,)]) result = con.execute("select foo from test order by foo").fetchall() - self.failUnlessEqual(result[0][0], 3, "Basic test of Connection.executemany") - self.failUnlessEqual(result[1][0], 4, "Basic test of Connection.executemany") + self.assertEqual(result[0][0], 3, "Basic test of Connection.executemany") + self.assertEqual(result[1][0], 4, "Basic test of Connection.executemany") def CheckConnectionExecutescript(self): con = sqlite.connect(":memory:") con.executescript("create table test(foo); insert into test(foo) values (5);") result = con.execute("select foo from test").fetchone()[0] - self.failUnlessEqual(result, 5, "Basic test of Connection.executescript") + self.assertEqual(result, 5, "Basic test of Connection.executescript") class ClosedTests(unittest.TestCase): def setUp(self): Modified: python/branches/py3k/Lib/sqlite3/test/factory.py ============================================================================== --- python/branches/py3k/Lib/sqlite3/test/factory.py (original) +++ python/branches/py3k/Lib/sqlite3/test/factory.py Sat Jul 4 10:32:15 2009 @@ -47,7 +47,7 @@ self.con.close() def CheckIsInstance(self): - self.failUnless(isinstance(self.con, + self.assertTrue(isinstance(self.con, MyConnection), "connection is not instance of MyConnection") @@ -60,7 +60,7 @@ def CheckIsInstance(self): cur = self.con.cursor(factory=MyCursor) - self.failUnless(isinstance(cur, + self.assertTrue(isinstance(cur, MyCursor), "cursor is not instance of MyCursor") @@ -72,7 +72,7 @@ cur = self.con.cursor(factory=MyCursor) cur.execute("select 4+5 as foo") row = cur.fetchone() - self.failUnless(isinstance(row, + self.assertTrue(isinstance(row, dict), "row is not instance of dict") cur.close() @@ -87,28 +87,28 @@ def CheckCustomFactory(self): self.con.row_factory = lambda cur, row: list(row) row = self.con.execute("select 1, 2").fetchone() - self.failUnless(isinstance(row, + self.assertTrue(isinstance(row, list), "row is not instance of list") def CheckSqliteRowIndex(self): self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() - self.failUnless(isinstance(row, + self.assertTrue(isinstance(row, sqlite.Row), "row is not instance of sqlite.Row") col1, col2 = row["a"], row["b"] - self.failUnless(col1 == 1, "by name: wrong result for column 'a'") - self.failUnless(col2 == 2, "by name: wrong result for column 'a'") + self.assertTrue(col1 == 1, "by name: wrong result for column 'a'") + self.assertTrue(col2 == 2, "by name: wrong result for column 'a'") col1, col2 = row["A"], row["B"] - self.failUnless(col1 == 1, "by name: wrong result for column 'A'") - self.failUnless(col2 == 2, "by name: wrong result for column 'B'") + self.assertTrue(col1 == 1, "by name: wrong result for column 'A'") + self.assertTrue(col2 == 2, "by name: wrong result for column 'B'") col1, col2 = row[0], row[1] - self.failUnless(col1 == 1, "by index: wrong result for column 0") - self.failUnless(col2 == 2, "by index: wrong result for column 1") + self.assertTrue(col1 == 1, "by index: wrong result for column 0") + self.assertTrue(col2 == 2, "by index: wrong result for column 1") def CheckSqliteRowIter(self): """Checks if the row object is iterable""" @@ -128,8 +128,8 @@ self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() d = dict(row) - self.failUnlessEqual(d["a"], row["a"]) - self.failUnlessEqual(d["b"], row["b"]) + self.assertEqual(d["a"], row["a"]) + self.assertEqual(d["b"], row["b"]) def CheckSqliteRowHashCmp(self): """Checks if the row object compares and hashes correctly""" @@ -138,18 +138,18 @@ row_2 = self.con.execute("select 1 as a, 2 as b").fetchone() row_3 = self.con.execute("select 1 as a, 3 as b").fetchone() - self.failUnless(row_1 == row_1) - self.failUnless(row_1 == row_2) - self.failUnless(row_2 != row_3) - - self.failIf(row_1 != row_1) - self.failIf(row_1 != row_2) - self.failIf(row_2 == row_3) - - self.failUnlessEqual(row_1, row_2) - self.failUnlessEqual(hash(row_1), hash(row_2)) - self.failIfEqual(row_1, row_3) - self.failIfEqual(hash(row_1), hash(row_3)) + self.assertTrue(row_1 == row_1) + self.assertTrue(row_1 == row_2) + self.assertTrue(row_2 != row_3) + + self.assertFalse(row_1 != row_1) + self.assertFalse(row_1 != row_2) + self.assertFalse(row_2 == row_3) + + self.assertEqual(row_1, row_2) + self.assertEqual(hash(row_1), hash(row_2)) + self.assertNotEqual(row_1, row_3) + self.assertNotEqual(hash(row_1), hash(row_3)) def tearDown(self): self.con.close() @@ -161,21 +161,21 @@ def CheckUnicode(self): austria = "?sterreich" row = self.con.execute("select ?", (austria,)).fetchone() - self.failUnless(type(row[0]) == str, "type of row[0] must be unicode") + self.assertTrue(type(row[0]) == str, "type of row[0] must be unicode") def CheckString(self): self.con.text_factory = bytes austria = "?sterreich" row = self.con.execute("select ?", (austria,)).fetchone() - self.failUnless(type(row[0]) == bytes, "type of row[0] must be bytes") - self.failUnless(row[0] == austria.encode("utf-8"), "column must equal original data in UTF-8") + self.assertTrue(type(row[0]) == bytes, "type of row[0] must be bytes") + self.assertTrue(row[0] == austria.encode("utf-8"), "column must equal original data in UTF-8") def CheckCustom(self): self.con.text_factory = lambda x: str(x, "utf-8", "ignore") austria = "?sterreich" row = self.con.execute("select ?", (austria,)).fetchone() - self.failUnless(type(row[0]) == str, "type of row[0] must be unicode") - self.failUnless(row[0].endswith("reich"), "column must contain original data") + self.assertTrue(type(row[0]) == str, "type of row[0] must be unicode") + self.assertTrue(row[0].endswith("reich"), "column must contain original data") def CheckOptimizedUnicode(self): self.con.text_factory = sqlite.OptimizedUnicode @@ -183,8 +183,8 @@ germany = "Deutchland" a_row = self.con.execute("select ?", (austria,)).fetchone() d_row = self.con.execute("select ?", (germany,)).fetchone() - self.failUnless(type(a_row[0]) == str, "type of non-ASCII row must be str") - self.failUnless(type(d_row[0]) == str, "type of ASCII-only row must be str") + self.assertTrue(type(a_row[0]) == str, "type of non-ASCII row must be str") + self.assertTrue(type(d_row[0]) == str, "type of ASCII-only row must be str") def tearDown(self): self.con.close() Modified: python/branches/py3k/Lib/sqlite3/test/hooks.py ============================================================================== --- python/branches/py3k/Lib/sqlite3/test/hooks.py (original) +++ python/branches/py3k/Lib/sqlite3/test/hooks.py Sat Jul 4 10:32:15 2009 @@ -37,7 +37,7 @@ con.create_collation("X", 42) self.fail("should have raised a TypeError") except TypeError as e: - self.failUnlessEqual(e.args[0], "parameter must be callable") + self.assertEqual(e.args[0], "parameter must be callable") def CheckCreateCollationNotAscii(self): con = sqlite.connect(":memory:") @@ -74,7 +74,7 @@ result = con.execute(sql).fetchall() self.fail("should have raised an OperationalError") except sqlite.OperationalError as e: - self.failUnlessEqual(e.args[0].lower(), "no such collation sequence: mycoll") + self.assertEqual(e.args[0].lower(), "no such collation sequence: mycoll") def CheckCollationRegisterTwice(self): """ @@ -119,7 +119,7 @@ con.execute(""" create table foo(a, b) """) - self.failUnless(progress_calls) + self.assertTrue(progress_calls) def CheckOpcodeCount(self): @@ -143,7 +143,7 @@ create table bar (a, b) """) second_count = len(progress_calls) - self.failUnless(first_count > second_count) + self.assertTrue(first_count > second_count) def CheckCancelOperation(self): """ @@ -173,7 +173,7 @@ con.set_progress_handler(progress, 1) con.set_progress_handler(None, 1) con.execute("select 1 union select 2 union select 3").fetchall() - self.failUnlessEqual(action, 0, "progress handler was not cleared") + self.assertEqual(action, 0, "progress handler was not cleared") def suite(): collation_suite = unittest.makeSuite(CollationTests, "Check") Modified: python/branches/py3k/Lib/sqlite3/test/regression.py ============================================================================== --- python/branches/py3k/Lib/sqlite3/test/regression.py (original) +++ python/branches/py3k/Lib/sqlite3/test/regression.py Sat Jul 4 10:32:15 2009 @@ -65,10 +65,10 @@ def CheckColumnNameWithSpaces(self): cur = self.con.cursor() cur.execute('select 1 as "foo bar [datetime]"') - self.failUnlessEqual(cur.description[0][0], "foo bar") + self.assertEqual(cur.description[0][0], "foo bar") cur.execute('select 1 as "foo baz"') - self.failUnlessEqual(cur.description[0][0], "foo baz") + self.assertEqual(cur.description[0][0], "foo baz") def CheckStatementAvailable(self): # pysqlite up to 2.3.2 crashed on this, because the active statement handle was not checked Modified: python/branches/py3k/Lib/sqlite3/test/transactions.py ============================================================================== --- python/branches/py3k/Lib/sqlite3/test/transactions.py (original) +++ python/branches/py3k/Lib/sqlite3/test/transactions.py Sat Jul 4 10:32:15 2009 @@ -58,14 +58,14 @@ self.cur1.execute("create table test2(j)") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) def CheckInsertStartsTransaction(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 0) + self.assertEqual(len(res), 0) def CheckUpdateStartsTransaction(self): self.cur1.execute("create table test(i)") @@ -74,7 +74,7 @@ self.cur1.execute("update test set i=6") self.cur2.execute("select i from test") res = self.cur2.fetchone()[0] - self.failUnlessEqual(res, 5) + self.assertEqual(res, 5) def CheckDeleteStartsTransaction(self): self.cur1.execute("create table test(i)") @@ -83,7 +83,7 @@ self.cur1.execute("delete from test") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) def CheckReplaceStartsTransaction(self): self.cur1.execute("create table test(i)") @@ -92,24 +92,24 @@ self.cur1.execute("replace into test(i) values (6)") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) - self.failUnlessEqual(res[0][0], 5) + self.assertEqual(len(res), 1) + self.assertEqual(res[0][0], 5) def CheckToggleAutoCommit(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.con1.isolation_level = None - self.failUnlessEqual(self.con1.isolation_level, None) + self.assertEqual(self.con1.isolation_level, None) self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) self.con1.isolation_level = "DEFERRED" - self.failUnlessEqual(self.con1.isolation_level , "DEFERRED") + self.assertEqual(self.con1.isolation_level , "DEFERRED") self.cur1.execute("insert into test(i) values (5)") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) def CheckRaiseTimeout(self): if sqlite.sqlite_version_info < (3, 2, 2): Modified: python/branches/py3k/Lib/sqlite3/test/types.py ============================================================================== --- python/branches/py3k/Lib/sqlite3/test/types.py (original) +++ python/branches/py3k/Lib/sqlite3/test/types.py Sat Jul 4 10:32:15 2009 @@ -39,27 +39,27 @@ self.cur.execute("insert into test(s) values (?)", ("?sterreich",)) self.cur.execute("select s from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], "?sterreich") + self.assertEqual(row[0], "?sterreich") def CheckSmallInt(self): self.cur.execute("insert into test(i) values (?)", (42,)) self.cur.execute("select i from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], 42) + self.assertEqual(row[0], 42) def CheckLargeInt(self): num = 2**40 self.cur.execute("insert into test(i) values (?)", (num,)) self.cur.execute("select i from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], num) + self.assertEqual(row[0], num) def CheckFloat(self): val = 3.14 self.cur.execute("insert into test(f) values (?)", (val,)) self.cur.execute("select f from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], val) + self.assertEqual(row[0], val) def CheckBlob(self): sample = b"Guglhupf" @@ -67,12 +67,12 @@ self.cur.execute("insert into test(b) values (?)", (val,)) self.cur.execute("select b from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], sample) + self.assertEqual(row[0], sample) def CheckUnicodeExecute(self): self.cur.execute("select '?sterreich'") row = self.cur.fetchone() - self.failUnlessEqual(row[0], "?sterreich") + self.assertEqual(row[0], "?sterreich") class DeclTypesTests(unittest.TestCase): class Foo: @@ -133,14 +133,14 @@ self.cur.execute("insert into test(s) values (?)", ("foo",)) self.cur.execute('select s as "s [WRONG]" from test') row = self.cur.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckSmallInt(self): # default self.cur.execute("insert into test(i) values (?)", (42,)) self.cur.execute("select i from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], 42) + self.assertEqual(row[0], 42) def CheckLargeInt(self): # default @@ -148,7 +148,7 @@ self.cur.execute("insert into test(i) values (?)", (num,)) self.cur.execute("select i from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], num) + self.assertEqual(row[0], num) def CheckFloat(self): # custom @@ -156,20 +156,20 @@ self.cur.execute("insert into test(f) values (?)", (val,)) self.cur.execute("select f from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], 47.2) + self.assertEqual(row[0], 47.2) def CheckBool(self): # custom self.cur.execute("insert into test(b) values (?)", (False,)) self.cur.execute("select b from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], False) + self.assertEqual(row[0], False) self.cur.execute("delete from test") self.cur.execute("insert into test(b) values (?)", (True,)) self.cur.execute("select b from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], True) + self.assertEqual(row[0], True) def CheckUnicode(self): # default @@ -177,14 +177,14 @@ self.cur.execute("insert into test(u) values (?)", (val,)) self.cur.execute("select u from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], val) + self.assertEqual(row[0], val) def CheckFoo(self): val = DeclTypesTests.Foo("bla") self.cur.execute("insert into test(foo) values (?)", (val,)) self.cur.execute("select foo from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], val) + self.assertEqual(row[0], val) def CheckUnsupportedSeq(self): class Bar: pass @@ -215,20 +215,20 @@ self.cur.execute("insert into test(bin) values (?)", (val,)) self.cur.execute("select bin from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], sample) + self.assertEqual(row[0], sample) def CheckNumber1(self): self.cur.execute("insert into test(n1) values (5)") value = self.cur.execute("select n1 from test").fetchone()[0] # if the converter is not used, it's an int instead of a float - self.failUnlessEqual(type(value), float) + self.assertEqual(type(value), float) def CheckNumber2(self): """Checks wether converter names are cut off at '(' characters""" self.cur.execute("insert into test(n2) values (5)") value = self.cur.execute("select n2 from test").fetchone()[0] # if the converter is not used, it's an int instead of a float - self.failUnlessEqual(type(value), float) + self.assertEqual(type(value), float) class ColNamesTests(unittest.TestCase): def setUp(self): @@ -257,28 +257,28 @@ self.cur.execute("insert into test(x) values (?)", ("xxx",)) self.cur.execute("select x from test") val = self.cur.fetchone()[0] - self.failUnlessEqual(val, "xxx") + self.assertEqual(val, "xxx") def CheckNone(self): self.cur.execute("insert into test(x) values (?)", (None,)) self.cur.execute("select x from test") val = self.cur.fetchone()[0] - self.failUnlessEqual(val, None) + self.assertEqual(val, None) def CheckColName(self): self.cur.execute("insert into test(x) values (?)", ("xxx",)) self.cur.execute('select x as "x [bar]" from test') val = self.cur.fetchone()[0] - self.failUnlessEqual(val, "") + self.assertEqual(val, "") # Check if the stripping of colnames works. Everything after the first # whitespace should be stripped. - self.failUnlessEqual(self.cur.description[0][0], "x") + self.assertEqual(self.cur.description[0][0], "x") def CheckCaseInConverterName(self): self.cur.execute("select 'other' as \"x [b1b1]\"") val = self.cur.fetchone()[0] - self.failUnlessEqual(val, "MARKER") + self.assertEqual(val, "MARKER") def CheckCursorDescriptionNoRow(self): """ @@ -310,7 +310,7 @@ def CheckCasterIsUsed(self): self.cur.execute("select ?", (4,)) val = self.cur.fetchone()[0] - self.failUnlessEqual(type(val), float) + self.assertEqual(type(val), float) class BinaryConverterTests(unittest.TestCase): def convert(s): @@ -327,7 +327,7 @@ def CheckBinaryInputForConverter(self): testdata = b"abcdefg" * 10 result = self.con.execute('select ? as "x [bin]"', (memoryview(zlib.compress(testdata)),)).fetchone()[0] - self.failUnlessEqual(testdata, result) + self.assertEqual(testdata, result) class DateTimeTests(unittest.TestCase): def setUp(self): @@ -344,14 +344,14 @@ self.cur.execute("insert into test(d) values (?)", (d,)) self.cur.execute("select d from test") d2 = self.cur.fetchone()[0] - self.failUnlessEqual(d, d2) + self.assertEqual(d, d2) def CheckSqliteTimestamp(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") ts2 = self.cur.fetchone()[0] - self.failUnlessEqual(ts, ts2) + self.assertEqual(ts, ts2) def CheckSqlTimestamp(self): # The date functions are only available in SQLite version 3.1 or later @@ -363,22 +363,22 @@ self.cur.execute("insert into test(ts) values (current_timestamp)") self.cur.execute("select ts from test") ts = self.cur.fetchone()[0] - self.failUnlessEqual(type(ts), datetime.datetime) - self.failUnlessEqual(ts.year, now.year) + self.assertEqual(type(ts), datetime.datetime) + self.assertEqual(ts.year, now.year) def CheckDateTimeSubSeconds(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 500000) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") ts2 = self.cur.fetchone()[0] - self.failUnlessEqual(ts, ts2) + self.assertEqual(ts, ts2) def CheckDateTimeSubSecondsFloatingPoint(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 510241) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") ts2 = self.cur.fetchone()[0] - self.failUnlessEqual(ts, ts2) + self.assertEqual(ts, ts2) def suite(): sqlite_type_suite = unittest.makeSuite(SqliteTypeTests, "Check") Modified: python/branches/py3k/Lib/sqlite3/test/userfunctions.py ============================================================================== --- python/branches/py3k/Lib/sqlite3/test/userfunctions.py (original) +++ python/branches/py3k/Lib/sqlite3/test/userfunctions.py Sat Jul 4 10:32:15 2009 @@ -161,28 +161,28 @@ cur = self.con.cursor() cur.execute("select returntext()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), str) - self.failUnlessEqual(val, "foo") + self.assertEqual(type(val), str) + self.assertEqual(val, "foo") def CheckFuncReturnUnicode(self): cur = self.con.cursor() cur.execute("select returnunicode()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), str) - self.failUnlessEqual(val, "bar") + self.assertEqual(type(val), str) + self.assertEqual(val, "bar") def CheckFuncReturnInt(self): cur = self.con.cursor() cur.execute("select returnint()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), int) - self.failUnlessEqual(val, 42) + self.assertEqual(type(val), int) + self.assertEqual(val, 42) def CheckFuncReturnFloat(self): cur = self.con.cursor() cur.execute("select returnfloat()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), float) + self.assertEqual(type(val), float) if val < 3.139 or val > 3.141: self.fail("wrong value") @@ -190,15 +190,15 @@ cur = self.con.cursor() cur.execute("select returnnull()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), type(None)) - self.failUnlessEqual(val, None) + self.assertEqual(type(val), type(None)) + self.assertEqual(val, None) def CheckFuncReturnBlob(self): cur = self.con.cursor() cur.execute("select returnblob()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), bytes) - self.failUnlessEqual(val, b"blob") + self.assertEqual(type(val), bytes) + self.assertEqual(val, b"blob") def CheckFuncException(self): cur = self.con.cursor() @@ -207,37 +207,37 @@ cur.fetchone() self.fail("should have raised OperationalError") except sqlite.OperationalError as e: - self.failUnlessEqual(e.args[0], 'user-defined function raised exception') + self.assertEqual(e.args[0], 'user-defined function raised exception') def CheckParamString(self): cur = self.con.cursor() cur.execute("select isstring(?)", ("foo",)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckParamInt(self): cur = self.con.cursor() cur.execute("select isint(?)", (42,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckParamFloat(self): cur = self.con.cursor() cur.execute("select isfloat(?)", (3.14,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckParamNone(self): cur = self.con.cursor() cur.execute("select isnone(?)", (None,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckParamBlob(self): cur = self.con.cursor() cur.execute("select isblob(?)", (memoryview(b"blob"),)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) class AggregateTests(unittest.TestCase): def setUp(self): @@ -281,7 +281,7 @@ cur.execute("select nostep(t) from test") self.fail("should have raised an AttributeError") except AttributeError as e: - self.failUnlessEqual(e.args[0], "'AggrNoStep' object has no attribute 'step'") + self.assertEqual(e.args[0], "'AggrNoStep' object has no attribute 'step'") def CheckAggrNoFinalize(self): cur = self.con.cursor() @@ -290,7 +290,7 @@ val = cur.fetchone()[0] self.fail("should have raised an OperationalError") except sqlite.OperationalError as e: - self.failUnlessEqual(e.args[0], "user-defined aggregate's 'finalize' method raised error") + self.assertEqual(e.args[0], "user-defined aggregate's 'finalize' method raised error") def CheckAggrExceptionInInit(self): cur = self.con.cursor() @@ -299,7 +299,7 @@ val = cur.fetchone()[0] self.fail("should have raised an OperationalError") except sqlite.OperationalError as e: - self.failUnlessEqual(e.args[0], "user-defined aggregate's '__init__' method raised error") + self.assertEqual(e.args[0], "user-defined aggregate's '__init__' method raised error") def CheckAggrExceptionInStep(self): cur = self.con.cursor() @@ -308,7 +308,7 @@ val = cur.fetchone()[0] self.fail("should have raised an OperationalError") except sqlite.OperationalError as e: - self.failUnlessEqual(e.args[0], "user-defined aggregate's 'step' method raised error") + self.assertEqual(e.args[0], "user-defined aggregate's 'step' method raised error") def CheckAggrExceptionInFinalize(self): cur = self.con.cursor() @@ -317,37 +317,37 @@ val = cur.fetchone()[0] self.fail("should have raised an OperationalError") except sqlite.OperationalError as e: - self.failUnlessEqual(e.args[0], "user-defined aggregate's 'finalize' method raised error") + self.assertEqual(e.args[0], "user-defined aggregate's 'finalize' method raised error") def CheckAggrCheckParamStr(self): cur = self.con.cursor() cur.execute("select checkType('str', ?)", ("foo",)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckParamInt(self): cur = self.con.cursor() cur.execute("select checkType('int', ?)", (42,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckParamFloat(self): cur = self.con.cursor() cur.execute("select checkType('float', ?)", (3.14,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckParamNone(self): cur = self.con.cursor() cur.execute("select checkType('None', ?)", (None,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckParamBlob(self): cur = self.con.cursor() cur.execute("select checkType('blob', ?)", (memoryview(b"blob"),)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckAggrSum(self): cur = self.con.cursor() @@ -355,7 +355,7 @@ cur.executemany("insert into test(i) values (?)", [(10,), (20,), (30,)]) cur.execute("select mysum(i) from test") val = cur.fetchone()[0] - self.failUnlessEqual(val, 60) + self.assertEqual(val, 60) def authorizer_cb(action, arg1, arg2, dbname, source): if action != sqlite.SQLITE_SELECT: From python-checkins at python.org Sat Jul 4 10:42:10 2009 From: python-checkins at python.org (gregory.p.smith) Date: Sat, 04 Jul 2009 08:42:10 -0000 Subject: [Python-checkins] r73839 - in python/trunk/Lib/sqlite3/test: dbapi.py factory.py hooks.py py25tests.py regression.py transactions.py types.py userfunctions.py Message-ID: Author: gregory.p.smith Date: Sat Jul 4 10:42:10 2009 New Revision: 73839 Log: Merge r73838 from py3k branch. Use the nondeprecated unittest method names. Modified: python/trunk/Lib/sqlite3/test/dbapi.py python/trunk/Lib/sqlite3/test/factory.py python/trunk/Lib/sqlite3/test/hooks.py python/trunk/Lib/sqlite3/test/py25tests.py python/trunk/Lib/sqlite3/test/regression.py python/trunk/Lib/sqlite3/test/transactions.py python/trunk/Lib/sqlite3/test/types.py python/trunk/Lib/sqlite3/test/userfunctions.py Modified: python/trunk/Lib/sqlite3/test/dbapi.py ============================================================================== --- python/trunk/Lib/sqlite3/test/dbapi.py (original) +++ python/trunk/Lib/sqlite3/test/dbapi.py Sat Jul 4 10:42:10 2009 @@ -45,39 +45,39 @@ "Warning is not a subclass of StandardError") def CheckError(self): - self.failUnless(issubclass(sqlite.Error, StandardError), + self.assertTrue(issubclass(sqlite.Error, StandardError), "Error is not a subclass of StandardError") def CheckInterfaceError(self): - self.failUnless(issubclass(sqlite.InterfaceError, sqlite.Error), + self.assertTrue(issubclass(sqlite.InterfaceError, sqlite.Error), "InterfaceError is not a subclass of Error") def CheckDatabaseError(self): - self.failUnless(issubclass(sqlite.DatabaseError, sqlite.Error), + self.assertTrue(issubclass(sqlite.DatabaseError, sqlite.Error), "DatabaseError is not a subclass of Error") def CheckDataError(self): - self.failUnless(issubclass(sqlite.DataError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.DataError, sqlite.DatabaseError), "DataError is not a subclass of DatabaseError") def CheckOperationalError(self): - self.failUnless(issubclass(sqlite.OperationalError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.OperationalError, sqlite.DatabaseError), "OperationalError is not a subclass of DatabaseError") def CheckIntegrityError(self): - self.failUnless(issubclass(sqlite.IntegrityError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.IntegrityError, sqlite.DatabaseError), "IntegrityError is not a subclass of DatabaseError") def CheckInternalError(self): - self.failUnless(issubclass(sqlite.InternalError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.InternalError, sqlite.DatabaseError), "InternalError is not a subclass of DatabaseError") def CheckProgrammingError(self): - self.failUnless(issubclass(sqlite.ProgrammingError, sqlite.DatabaseError), + self.assertTrue(issubclass(sqlite.ProgrammingError, sqlite.DatabaseError), "ProgrammingError is not a subclass of DatabaseError") def CheckNotSupportedError(self): - self.failUnless(issubclass(sqlite.NotSupportedError, + self.assertTrue(issubclass(sqlite.NotSupportedError, sqlite.DatabaseError), "NotSupportedError is not a subclass of DatabaseError") @@ -127,16 +127,16 @@ def CheckExceptions(self): # Optional DB-API extension. - self.failUnlessEqual(self.cx.Warning, sqlite.Warning) - self.failUnlessEqual(self.cx.Error, sqlite.Error) - self.failUnlessEqual(self.cx.InterfaceError, sqlite.InterfaceError) - self.failUnlessEqual(self.cx.DatabaseError, sqlite.DatabaseError) - self.failUnlessEqual(self.cx.DataError, sqlite.DataError) - self.failUnlessEqual(self.cx.OperationalError, sqlite.OperationalError) - self.failUnlessEqual(self.cx.IntegrityError, sqlite.IntegrityError) - self.failUnlessEqual(self.cx.InternalError, sqlite.InternalError) - self.failUnlessEqual(self.cx.ProgrammingError, sqlite.ProgrammingError) - self.failUnlessEqual(self.cx.NotSupportedError, sqlite.NotSupportedError) + self.assertEqual(self.cx.Warning, sqlite.Warning) + self.assertEqual(self.cx.Error, sqlite.Error) + self.assertEqual(self.cx.InterfaceError, sqlite.InterfaceError) + self.assertEqual(self.cx.DatabaseError, sqlite.DatabaseError) + self.assertEqual(self.cx.DataError, sqlite.DataError) + self.assertEqual(self.cx.OperationalError, sqlite.OperationalError) + self.assertEqual(self.cx.IntegrityError, sqlite.IntegrityError) + self.assertEqual(self.cx.InternalError, sqlite.InternalError) + self.assertEqual(self.cx.ProgrammingError, sqlite.ProgrammingError) + self.assertEqual(self.cx.NotSupportedError, sqlite.NotSupportedError) class CursorTests(unittest.TestCase): def setUp(self): @@ -228,7 +228,7 @@ self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=?", ["foo"]) row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckExecuteParamSequence(self): class L(object): @@ -241,13 +241,13 @@ self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=?", L()) row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckExecuteDictMapping(self): self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=:name", {"name": "foo"}) row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckExecuteDictMapping_Mapping(self): # Test only works with Python 2.5 or later @@ -261,7 +261,7 @@ self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=:name", D()) row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckExecuteDictMappingTooLittleArgs(self): self.cu.execute("insert into test(name) values ('foo')") @@ -295,7 +295,7 @@ self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("update test set name='bar'") - self.failUnlessEqual(self.cu.rowcount, 2) + self.assertEqual(self.cu.rowcount, 2) def CheckRowcountSelect(self): """ @@ -304,12 +304,12 @@ has thus to be -1. """ self.cu.execute("select 5 union select 6") - self.failUnlessEqual(self.cu.rowcount, -1) + self.assertEqual(self.cu.rowcount, -1) def CheckRowcountExecutemany(self): self.cu.execute("delete from test") self.cu.executemany("insert into test(name) values (?)", [(1,), (2,), (3,)]) - self.failUnlessEqual(self.cu.rowcount, 3) + self.assertEqual(self.cu.rowcount, 3) def CheckTotalChanges(self): self.cu.execute("insert into test(name) values ('foo')") @@ -382,24 +382,24 @@ lst = [] for row in self.cu: lst.append(row[0]) - self.failUnlessEqual(lst[0], 5) - self.failUnlessEqual(lst[1], 6) + self.assertEqual(lst[0], 5) + self.assertEqual(lst[1], 6) def CheckFetchone(self): self.cu.execute("select name from test") row = self.cu.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") row = self.cu.fetchone() - self.failUnlessEqual(row, None) + self.assertEqual(row, None) def CheckFetchoneNoStatement(self): cur = self.cx.cursor() row = cur.fetchone() - self.failUnlessEqual(row, None) + self.assertEqual(row, None) def CheckArraySize(self): # must default ot 1 - self.failUnlessEqual(self.cu.arraysize, 1) + self.assertEqual(self.cu.arraysize, 1) # now set to 2 self.cu.arraysize = 2 @@ -412,27 +412,27 @@ self.cu.execute("select name from test") res = self.cu.fetchmany() - self.failUnlessEqual(len(res), 2) + self.assertEqual(len(res), 2) def CheckFetchmany(self): self.cu.execute("select name from test") res = self.cu.fetchmany(100) - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) res = self.cu.fetchmany(100) - self.failUnlessEqual(res, []) + self.assertEqual(res, []) def CheckFetchmanyKwArg(self): """Checks if fetchmany works with keyword arguments""" self.cu.execute("select name from test") res = self.cu.fetchmany(size=100) - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) def CheckFetchall(self): self.cu.execute("select name from test") res = self.cu.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) res = self.cu.fetchall() - self.failUnlessEqual(res, []) + self.assertEqual(res, []) def CheckSetinputsizes(self): self.cu.setinputsizes([3, 4, 5]) @@ -445,7 +445,7 @@ def CheckCursorConnection(self): # Optional DB-API extension. - self.failUnlessEqual(self.cu.connection, self.cx) + self.assertEqual(self.cu.connection, self.cx) def CheckWrongCursorCallable(self): try: @@ -656,7 +656,7 @@ """) cur.execute("select i from a") res = cur.fetchone()[0] - self.failUnlessEqual(res, 5) + self.assertEqual(res, 5) def CheckScriptStringUnicode(self): con = sqlite.connect(":memory:") @@ -670,7 +670,7 @@ """) cur.execute("select i from a") res = cur.fetchone()[0] - self.failUnlessEqual(res, 6) + self.assertEqual(res, 6) def CheckScriptErrorIncomplete(self): con = sqlite.connect(":memory:") @@ -680,7 +680,7 @@ cur.executescript("create table test(sadfsadfdsa") except sqlite.ProgrammingError: raised = True - self.failUnlessEqual(raised, True, "should have raised an exception") + self.assertEqual(raised, True, "should have raised an exception") def CheckScriptErrorNormal(self): con = sqlite.connect(":memory:") @@ -690,26 +690,26 @@ cur.executescript("create table test(sadfsadfdsa); select foo from hurz;") except sqlite.OperationalError: raised = True - self.failUnlessEqual(raised, True, "should have raised an exception") + self.assertEqual(raised, True, "should have raised an exception") def CheckConnectionExecute(self): con = sqlite.connect(":memory:") result = con.execute("select 5").fetchone()[0] - self.failUnlessEqual(result, 5, "Basic test of Connection.execute") + self.assertEqual(result, 5, "Basic test of Connection.execute") def CheckConnectionExecutemany(self): con = sqlite.connect(":memory:") con.execute("create table test(foo)") con.executemany("insert into test(foo) values (?)", [(3,), (4,)]) result = con.execute("select foo from test order by foo").fetchall() - self.failUnlessEqual(result[0][0], 3, "Basic test of Connection.executemany") - self.failUnlessEqual(result[1][0], 4, "Basic test of Connection.executemany") + self.assertEqual(result[0][0], 3, "Basic test of Connection.executemany") + self.assertEqual(result[1][0], 4, "Basic test of Connection.executemany") def CheckConnectionExecutescript(self): con = sqlite.connect(":memory:") con.executescript("create table test(foo); insert into test(foo) values (5);") result = con.execute("select foo from test").fetchone()[0] - self.failUnlessEqual(result, 5, "Basic test of Connection.executescript") + self.assertEqual(result, 5, "Basic test of Connection.executescript") class ClosedTests(unittest.TestCase): def setUp(self): Modified: python/trunk/Lib/sqlite3/test/factory.py ============================================================================== --- python/trunk/Lib/sqlite3/test/factory.py (original) +++ python/trunk/Lib/sqlite3/test/factory.py Sat Jul 4 10:42:10 2009 @@ -47,7 +47,7 @@ self.con.close() def CheckIsInstance(self): - self.failUnless(isinstance(self.con, + self.assertTrue(isinstance(self.con, MyConnection), "connection is not instance of MyConnection") @@ -60,7 +60,7 @@ def CheckIsInstance(self): cur = self.con.cursor(factory=MyCursor) - self.failUnless(isinstance(cur, + self.assertTrue(isinstance(cur, MyCursor), "cursor is not instance of MyCursor") @@ -72,7 +72,7 @@ cur = self.con.cursor(factory=MyCursor) cur.execute("select 4+5 as foo") row = cur.fetchone() - self.failUnless(isinstance(row, + self.assertTrue(isinstance(row, dict), "row is not instance of dict") cur.close() @@ -87,28 +87,28 @@ def CheckCustomFactory(self): self.con.row_factory = lambda cur, row: list(row) row = self.con.execute("select 1, 2").fetchone() - self.failUnless(isinstance(row, + self.assertTrue(isinstance(row, list), "row is not instance of list") def CheckSqliteRowIndex(self): self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() - self.failUnless(isinstance(row, + self.assertTrue(isinstance(row, sqlite.Row), "row is not instance of sqlite.Row") col1, col2 = row["a"], row["b"] - self.failUnless(col1 == 1, "by name: wrong result for column 'a'") - self.failUnless(col2 == 2, "by name: wrong result for column 'a'") + self.assertTrue(col1 == 1, "by name: wrong result for column 'a'") + self.assertTrue(col2 == 2, "by name: wrong result for column 'a'") col1, col2 = row["A"], row["B"] - self.failUnless(col1 == 1, "by name: wrong result for column 'A'") - self.failUnless(col2 == 2, "by name: wrong result for column 'B'") + self.assertTrue(col1 == 1, "by name: wrong result for column 'A'") + self.assertTrue(col2 == 2, "by name: wrong result for column 'B'") col1, col2 = row[0], row[1] - self.failUnless(col1 == 1, "by index: wrong result for column 0") - self.failUnless(col2 == 2, "by index: wrong result for column 1") + self.assertTrue(col1 == 1, "by index: wrong result for column 0") + self.assertTrue(col2 == 2, "by index: wrong result for column 1") def CheckSqliteRowIter(self): """Checks if the row object is iterable""" @@ -128,8 +128,8 @@ self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() d = dict(row) - self.failUnlessEqual(d["a"], row["a"]) - self.failUnlessEqual(d["b"], row["b"]) + self.assertEqual(d["a"], row["a"]) + self.assertEqual(d["b"], row["b"]) def CheckSqliteRowHashCmp(self): """Checks if the row object compares and hashes correctly""" @@ -138,18 +138,18 @@ row_2 = self.con.execute("select 1 as a, 2 as b").fetchone() row_3 = self.con.execute("select 1 as a, 3 as b").fetchone() - self.failUnless(row_1 == row_1) - self.failUnless(row_1 == row_2) - self.failUnless(row_2 != row_3) - - self.failIf(row_1 != row_1) - self.failIf(row_1 != row_2) - self.failIf(row_2 == row_3) - - self.failUnlessEqual(row_1, row_2) - self.failUnlessEqual(hash(row_1), hash(row_2)) - self.failIfEqual(row_1, row_3) - self.failIfEqual(hash(row_1), hash(row_3)) + self.assertTrue(row_1 == row_1) + self.assertTrue(row_1 == row_2) + self.assertTrue(row_2 != row_3) + + self.assertFalse(row_1 != row_1) + self.assertFalse(row_1 != row_2) + self.assertFalse(row_2 == row_3) + + self.assertEqual(row_1, row_2) + self.assertEqual(hash(row_1), hash(row_2)) + self.assertNotEqual(row_1, row_3) + self.assertNotEqual(hash(row_1), hash(row_3)) def tearDown(self): self.con.close() @@ -161,21 +161,21 @@ def CheckUnicode(self): austria = unicode("?sterreich", "latin1") row = self.con.execute("select ?", (austria,)).fetchone() - self.failUnless(type(row[0]) == unicode, "type of row[0] must be unicode") + self.assertTrue(type(row[0]) == unicode, "type of row[0] must be unicode") def CheckString(self): self.con.text_factory = str austria = unicode("?sterreich", "latin1") row = self.con.execute("select ?", (austria,)).fetchone() - self.failUnless(type(row[0]) == str, "type of row[0] must be str") - self.failUnless(row[0] == austria.encode("utf-8"), "column must equal original data in UTF-8") + self.assertTrue(type(row[0]) == str, "type of row[0] must be str") + self.assertTrue(row[0] == austria.encode("utf-8"), "column must equal original data in UTF-8") def CheckCustom(self): self.con.text_factory = lambda x: unicode(x, "utf-8", "ignore") austria = unicode("?sterreich", "latin1") row = self.con.execute("select ?", (austria.encode("latin1"),)).fetchone() - self.failUnless(type(row[0]) == unicode, "type of row[0] must be unicode") - self.failUnless(row[0].endswith(u"reich"), "column must contain original data") + self.assertTrue(type(row[0]) == unicode, "type of row[0] must be unicode") + self.assertTrue(row[0].endswith(u"reich"), "column must contain original data") def CheckOptimizedUnicode(self): self.con.text_factory = sqlite.OptimizedUnicode @@ -183,8 +183,8 @@ germany = unicode("Deutchland") a_row = self.con.execute("select ?", (austria,)).fetchone() d_row = self.con.execute("select ?", (germany,)).fetchone() - self.failUnless(type(a_row[0]) == unicode, "type of non-ASCII row must be unicode") - self.failUnless(type(d_row[0]) == str, "type of ASCII-only row must be str") + self.assertTrue(type(a_row[0]) == unicode, "type of non-ASCII row must be unicode") + self.assertTrue(type(d_row[0]) == str, "type of ASCII-only row must be str") def tearDown(self): self.con.close() Modified: python/trunk/Lib/sqlite3/test/hooks.py ============================================================================== --- python/trunk/Lib/sqlite3/test/hooks.py (original) +++ python/trunk/Lib/sqlite3/test/hooks.py Sat Jul 4 10:42:10 2009 @@ -37,7 +37,7 @@ con.create_collation("X", 42) self.fail("should have raised a TypeError") except TypeError, e: - self.failUnlessEqual(e.args[0], "parameter must be callable") + self.assertEqual(e.args[0], "parameter must be callable") def CheckCreateCollationNotAscii(self): con = sqlite.connect(":memory:") @@ -74,7 +74,7 @@ result = con.execute(sql).fetchall() self.fail("should have raised an OperationalError") except sqlite.OperationalError, e: - self.failUnlessEqual(e.args[0].lower(), "no such collation sequence: mycoll") + self.assertEqual(e.args[0].lower(), "no such collation sequence: mycoll") def CheckCollationRegisterTwice(self): """ @@ -119,7 +119,7 @@ con.execute(""" create table foo(a, b) """) - self.failUnless(progress_calls) + self.assertTrue(progress_calls) def CheckOpcodeCount(self): @@ -143,7 +143,7 @@ create table bar (a, b) """) second_count = len(progress_calls) - self.failUnless(first_count > second_count) + self.assertTrue(first_count > second_count) def CheckCancelOperation(self): """ @@ -173,7 +173,7 @@ con.set_progress_handler(progress, 1) con.set_progress_handler(None, 1) con.execute("select 1 union select 2 union select 3").fetchall() - self.failUnlessEqual(action, 0, "progress handler was not cleared") + self.assertEqual(action, 0, "progress handler was not cleared") def suite(): collation_suite = unittest.makeSuite(CollationTests, "Check") Modified: python/trunk/Lib/sqlite3/test/py25tests.py ============================================================================== --- python/trunk/Lib/sqlite3/test/py25tests.py (original) +++ python/trunk/Lib/sqlite3/test/py25tests.py Sat Jul 4 10:42:10 2009 @@ -54,19 +54,19 @@ self.con.execute("insert into test(c) values ('foo')") self.con.rollback() count = self.con.execute("select count(*) from test").fetchone()[0] - self.failUnlessEqual(count, 1) + self.assertEqual(count, 1) def CheckContextManagerRollback(self): """Is a rollback called in the context manager?""" global did_rollback - self.failUnlessEqual(did_rollback, False) + self.assertEqual(did_rollback, False) try: with self.con: self.con.execute("insert into test(c) values (4)") self.con.execute("insert into test(c) values (4)") except sqlite.IntegrityError: pass - self.failUnlessEqual(did_rollback, True) + self.assertEqual(did_rollback, True) def suite(): ctx_suite = unittest.makeSuite(ContextTests, "Check") Modified: python/trunk/Lib/sqlite3/test/regression.py ============================================================================== --- python/trunk/Lib/sqlite3/test/regression.py (original) +++ python/trunk/Lib/sqlite3/test/regression.py Sat Jul 4 10:42:10 2009 @@ -65,10 +65,10 @@ def CheckColumnNameWithSpaces(self): cur = self.con.cursor() cur.execute('select 1 as "foo bar [datetime]"') - self.failUnlessEqual(cur.description[0][0], "foo bar") + self.assertEqual(cur.description[0][0], "foo bar") cur.execute('select 1 as "foo baz"') - self.failUnlessEqual(cur.description[0][0], "foo baz") + self.assertEqual(cur.description[0][0], "foo baz") def CheckStatementAvailable(self): # pysqlite up to 2.3.2 crashed on this, because the active statement handle was not checked Modified: python/trunk/Lib/sqlite3/test/transactions.py ============================================================================== --- python/trunk/Lib/sqlite3/test/transactions.py (original) +++ python/trunk/Lib/sqlite3/test/transactions.py Sat Jul 4 10:42:10 2009 @@ -59,14 +59,14 @@ self.cur1.execute("create table test2(j)") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) def CheckInsertStartsTransaction(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 0) + self.assertEqual(len(res), 0) def CheckUpdateStartsTransaction(self): self.cur1.execute("create table test(i)") @@ -75,7 +75,7 @@ self.cur1.execute("update test set i=6") self.cur2.execute("select i from test") res = self.cur2.fetchone()[0] - self.failUnlessEqual(res, 5) + self.assertEqual(res, 5) def CheckDeleteStartsTransaction(self): self.cur1.execute("create table test(i)") @@ -84,7 +84,7 @@ self.cur1.execute("delete from test") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) def CheckReplaceStartsTransaction(self): self.cur1.execute("create table test(i)") @@ -93,24 +93,24 @@ self.cur1.execute("replace into test(i) values (6)") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) - self.failUnlessEqual(res[0][0], 5) + self.assertEqual(len(res), 1) + self.assertEqual(res[0][0], 5) def CheckToggleAutoCommit(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.con1.isolation_level = None - self.failUnlessEqual(self.con1.isolation_level, None) + self.assertEqual(self.con1.isolation_level, None) self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) self.con1.isolation_level = "DEFERRED" - self.failUnlessEqual(self.con1.isolation_level , "DEFERRED") + self.assertEqual(self.con1.isolation_level , "DEFERRED") self.cur1.execute("insert into test(i) values (5)") self.cur2.execute("select i from test") res = self.cur2.fetchall() - self.failUnlessEqual(len(res), 1) + self.assertEqual(len(res), 1) def CheckRaiseTimeout(self): if sqlite.sqlite_version_info < (3, 2, 2): Modified: python/trunk/Lib/sqlite3/test/types.py ============================================================================== --- python/trunk/Lib/sqlite3/test/types.py (original) +++ python/trunk/Lib/sqlite3/test/types.py Sat Jul 4 10:42:10 2009 @@ -39,39 +39,39 @@ self.cur.execute("insert into test(s) values (?)", (u"?sterreich",)) self.cur.execute("select s from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], u"?sterreich") + self.assertEqual(row[0], u"?sterreich") def CheckSmallInt(self): self.cur.execute("insert into test(i) values (?)", (42,)) self.cur.execute("select i from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], 42) + self.assertEqual(row[0], 42) def CheckLargeInt(self): num = 2**40 self.cur.execute("insert into test(i) values (?)", (num,)) self.cur.execute("select i from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], num) + self.assertEqual(row[0], num) def CheckFloat(self): val = 3.14 self.cur.execute("insert into test(f) values (?)", (val,)) self.cur.execute("select f from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], val) + self.assertEqual(row[0], val) def CheckBlob(self): val = buffer("Guglhupf") self.cur.execute("insert into test(b) values (?)", (val,)) self.cur.execute("select b from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], val) + self.assertEqual(row[0], val) def CheckUnicodeExecute(self): self.cur.execute(u"select '?sterreich'") row = self.cur.fetchone() - self.failUnlessEqual(row[0], u"?sterreich") + self.assertEqual(row[0], u"?sterreich") class DeclTypesTests(unittest.TestCase): class Foo: @@ -122,14 +122,14 @@ self.cur.execute("insert into test(s) values (?)", ("foo",)) self.cur.execute('select s as "s [WRONG]" from test') row = self.cur.fetchone() - self.failUnlessEqual(row[0], "foo") + self.assertEqual(row[0], "foo") def CheckSmallInt(self): # default self.cur.execute("insert into test(i) values (?)", (42,)) self.cur.execute("select i from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], 42) + self.assertEqual(row[0], 42) def CheckLargeInt(self): # default @@ -137,7 +137,7 @@ self.cur.execute("insert into test(i) values (?)", (num,)) self.cur.execute("select i from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], num) + self.assertEqual(row[0], num) def CheckFloat(self): # custom @@ -145,20 +145,20 @@ self.cur.execute("insert into test(f) values (?)", (val,)) self.cur.execute("select f from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], 47.2) + self.assertEqual(row[0], 47.2) def CheckBool(self): # custom self.cur.execute("insert into test(b) values (?)", (False,)) self.cur.execute("select b from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], False) + self.assertEqual(row[0], False) self.cur.execute("delete from test") self.cur.execute("insert into test(b) values (?)", (True,)) self.cur.execute("select b from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], True) + self.assertEqual(row[0], True) def CheckUnicode(self): # default @@ -166,14 +166,14 @@ self.cur.execute("insert into test(u) values (?)", (val,)) self.cur.execute("select u from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], val) + self.assertEqual(row[0], val) def CheckFoo(self): val = DeclTypesTests.Foo("bla") self.cur.execute("insert into test(foo) values (?)", (val,)) self.cur.execute("select foo from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], val) + self.assertEqual(row[0], val) def CheckUnsupportedSeq(self): class Bar: pass @@ -203,20 +203,20 @@ self.cur.execute("insert into test(bin) values (?)", (val,)) self.cur.execute("select bin from test") row = self.cur.fetchone() - self.failUnlessEqual(row[0], val) + self.assertEqual(row[0], val) def CheckNumber1(self): self.cur.execute("insert into test(n1) values (5)") value = self.cur.execute("select n1 from test").fetchone()[0] # if the converter is not used, it's an int instead of a float - self.failUnlessEqual(type(value), float) + self.assertEqual(type(value), float) def CheckNumber2(self): """Checks wether converter names are cut off at '(' characters""" self.cur.execute("insert into test(n2) values (5)") value = self.cur.execute("select n2 from test").fetchone()[0] # if the converter is not used, it's an int instead of a float - self.failUnlessEqual(type(value), float) + self.assertEqual(type(value), float) class ColNamesTests(unittest.TestCase): def setUp(self): @@ -245,28 +245,28 @@ self.cur.execute("insert into test(x) values (?)", ("xxx",)) self.cur.execute("select x from test") val = self.cur.fetchone()[0] - self.failUnlessEqual(val, "xxx") + self.assertEqual(val, "xxx") def CheckNone(self): self.cur.execute("insert into test(x) values (?)", (None,)) self.cur.execute("select x from test") val = self.cur.fetchone()[0] - self.failUnlessEqual(val, None) + self.assertEqual(val, None) def CheckColName(self): self.cur.execute("insert into test(x) values (?)", ("xxx",)) self.cur.execute('select x as "x [bar]" from test') val = self.cur.fetchone()[0] - self.failUnlessEqual(val, "") + self.assertEqual(val, "") # Check if the stripping of colnames works. Everything after the first # whitespace should be stripped. - self.failUnlessEqual(self.cur.description[0][0], "x") + self.assertEqual(self.cur.description[0][0], "x") def CheckCaseInConverterName(self): self.cur.execute("""select 'other' as "x [b1b1]\"""") val = self.cur.fetchone()[0] - self.failUnlessEqual(val, "MARKER") + self.assertEqual(val, "MARKER") def CheckCursorDescriptionNoRow(self): """ @@ -298,7 +298,7 @@ def CheckCasterIsUsed(self): self.cur.execute("select ?", (4,)) val = self.cur.fetchone()[0] - self.failUnlessEqual(type(val), float) + self.assertEqual(type(val), float) class BinaryConverterTests(unittest.TestCase): def convert(s): @@ -315,7 +315,7 @@ def CheckBinaryInputForConverter(self): testdata = "abcdefg" * 10 result = self.con.execute('select ? as "x [bin]"', (buffer(zlib.compress(testdata)),)).fetchone()[0] - self.failUnlessEqual(testdata, result) + self.assertEqual(testdata, result) class DateTimeTests(unittest.TestCase): def setUp(self): @@ -332,14 +332,14 @@ self.cur.execute("insert into test(d) values (?)", (d,)) self.cur.execute("select d from test") d2 = self.cur.fetchone()[0] - self.failUnlessEqual(d, d2) + self.assertEqual(d, d2) def CheckSqliteTimestamp(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") ts2 = self.cur.fetchone()[0] - self.failUnlessEqual(ts, ts2) + self.assertEqual(ts, ts2) def CheckSqlTimestamp(self): # The date functions are only available in SQLite version 3.1 or later @@ -351,22 +351,22 @@ self.cur.execute("insert into test(ts) values (current_timestamp)") self.cur.execute("select ts from test") ts = self.cur.fetchone()[0] - self.failUnlessEqual(type(ts), datetime.datetime) - self.failUnlessEqual(ts.year, now.year) + self.assertEqual(type(ts), datetime.datetime) + self.assertEqual(ts.year, now.year) def CheckDateTimeSubSeconds(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 500000) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") ts2 = self.cur.fetchone()[0] - self.failUnlessEqual(ts, ts2) + self.assertEqual(ts, ts2) def CheckDateTimeSubSecondsFloatingPoint(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 510241) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") ts2 = self.cur.fetchone()[0] - self.failUnlessEqual(ts, ts2) + self.assertEqual(ts, ts2) def suite(): sqlite_type_suite = unittest.makeSuite(SqliteTypeTests, "Check") Modified: python/trunk/Lib/sqlite3/test/userfunctions.py ============================================================================== --- python/trunk/Lib/sqlite3/test/userfunctions.py (original) +++ python/trunk/Lib/sqlite3/test/userfunctions.py Sat Jul 4 10:42:10 2009 @@ -160,28 +160,28 @@ cur = self.con.cursor() cur.execute("select returntext()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), unicode) - self.failUnlessEqual(val, "foo") + self.assertEqual(type(val), unicode) + self.assertEqual(val, "foo") def CheckFuncReturnUnicode(self): cur = self.con.cursor() cur.execute("select returnunicode()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), unicode) - self.failUnlessEqual(val, u"bar") + self.assertEqual(type(val), unicode) + self.assertEqual(val, u"bar") def CheckFuncReturnInt(self): cur = self.con.cursor() cur.execute("select returnint()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), int) - self.failUnlessEqual(val, 42) + self.assertEqual(type(val), int) + self.assertEqual(val, 42) def CheckFuncReturnFloat(self): cur = self.con.cursor() cur.execute("select returnfloat()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), float) + self.assertEqual(type(val), float) if val < 3.139 or val > 3.141: self.fail("wrong value") @@ -189,15 +189,15 @@ cur = self.con.cursor() cur.execute("select returnnull()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), type(None)) - self.failUnlessEqual(val, None) + self.assertEqual(type(val), type(None)) + self.assertEqual(val, None) def CheckFuncReturnBlob(self): cur = self.con.cursor() cur.execute("select returnblob()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), buffer) - self.failUnlessEqual(val, buffer("blob")) + self.assertEqual(type(val), buffer) + self.assertEqual(val, buffer("blob")) def CheckFuncException(self): cur = self.con.cursor() @@ -206,37 +206,37 @@ cur.fetchone() self.fail("should have raised OperationalError") except sqlite.OperationalError, e: - self.failUnlessEqual(e.args[0], 'user-defined function raised exception') + self.assertEqual(e.args[0], 'user-defined function raised exception') def CheckParamString(self): cur = self.con.cursor() cur.execute("select isstring(?)", ("foo",)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckParamInt(self): cur = self.con.cursor() cur.execute("select isint(?)", (42,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckParamFloat(self): cur = self.con.cursor() cur.execute("select isfloat(?)", (3.14,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckParamNone(self): cur = self.con.cursor() cur.execute("select isnone(?)", (None,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckParamBlob(self): cur = self.con.cursor() cur.execute("select isblob(?)", (buffer("blob"),)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) class AggregateTests(unittest.TestCase): def setUp(self): @@ -280,7 +280,7 @@ cur.execute("select nostep(t) from test") self.fail("should have raised an AttributeError") except AttributeError, e: - self.failUnlessEqual(e.args[0], "AggrNoStep instance has no attribute 'step'") + self.assertEqual(e.args[0], "AggrNoStep instance has no attribute 'step'") def CheckAggrNoFinalize(self): cur = self.con.cursor() @@ -289,7 +289,7 @@ val = cur.fetchone()[0] self.fail("should have raised an OperationalError") except sqlite.OperationalError, e: - self.failUnlessEqual(e.args[0], "user-defined aggregate's 'finalize' method raised error") + self.assertEqual(e.args[0], "user-defined aggregate's 'finalize' method raised error") def CheckAggrExceptionInInit(self): cur = self.con.cursor() @@ -298,7 +298,7 @@ val = cur.fetchone()[0] self.fail("should have raised an OperationalError") except sqlite.OperationalError, e: - self.failUnlessEqual(e.args[0], "user-defined aggregate's '__init__' method raised error") + self.assertEqual(e.args[0], "user-defined aggregate's '__init__' method raised error") def CheckAggrExceptionInStep(self): cur = self.con.cursor() @@ -307,7 +307,7 @@ val = cur.fetchone()[0] self.fail("should have raised an OperationalError") except sqlite.OperationalError, e: - self.failUnlessEqual(e.args[0], "user-defined aggregate's 'step' method raised error") + self.assertEqual(e.args[0], "user-defined aggregate's 'step' method raised error") def CheckAggrExceptionInFinalize(self): cur = self.con.cursor() @@ -316,37 +316,37 @@ val = cur.fetchone()[0] self.fail("should have raised an OperationalError") except sqlite.OperationalError, e: - self.failUnlessEqual(e.args[0], "user-defined aggregate's 'finalize' method raised error") + self.assertEqual(e.args[0], "user-defined aggregate's 'finalize' method raised error") def CheckAggrCheckParamStr(self): cur = self.con.cursor() cur.execute("select checkType('str', ?)", ("foo",)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckParamInt(self): cur = self.con.cursor() cur.execute("select checkType('int', ?)", (42,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckParamFloat(self): cur = self.con.cursor() cur.execute("select checkType('float', ?)", (3.14,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckParamNone(self): cur = self.con.cursor() cur.execute("select checkType('None', ?)", (None,)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckParamBlob(self): cur = self.con.cursor() cur.execute("select checkType('blob', ?)", (buffer("blob"),)) val = cur.fetchone()[0] - self.failUnlessEqual(val, 1) + self.assertEqual(val, 1) def CheckAggrCheckAggrSum(self): cur = self.con.cursor() @@ -354,7 +354,7 @@ cur.executemany("insert into test(i) values (?)", [(10,), (20,), (30,)]) cur.execute("select mysum(i) from test") val = cur.fetchone()[0] - self.failUnlessEqual(val, 60) + self.assertEqual(val, 60) def authorizer_cb(action, arg1, arg2, dbname, source): if action != sqlite.SQLITE_SELECT: From buildbot at python.org Sat Jul 4 14:38:09 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 04 Jul 2009 12:38:09 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.1 Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.1/builds/4 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' 1 test failed: test_import ====================================================================== ERROR: testImport (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 60, in test_with_extension mod = __import__(TESTFN) ImportError: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' sincerely, -The Buildbot From python-checkins at python.org Sat Jul 4 16:52:28 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 04 Jul 2009 14:52:28 -0000 Subject: [Python-checkins] r73840 - in sandbox/trunk/2to3/lib2to3: main.py refactor.py Message-ID: Author: benjamin.peterson Date: Sat Jul 4 16:52:28 2009 New Revision: 73840 Log: don't print diffs by default; it's annoying Modified: sandbox/trunk/2to3/lib2to3/main.py sandbox/trunk/2to3/lib2to3/refactor.py Modified: sandbox/trunk/2to3/lib2to3/main.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/main.py (original) +++ sandbox/trunk/2to3/lib2to3/main.py Sat Jul 4 16:52:28 2009 @@ -4,19 +4,31 @@ import sys import os +import difflib import logging import shutil import optparse from . import refactor + +def diff_texts(a, b, filename): + """Return a unified diff of two strings.""" + a = a.splitlines() + b = b.splitlines() + return difflib.unified_diff(a, b, filename, filename, + "(original)", "(refactored)", + lineterm="") + + class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool): """ Prints output to stdout. """ - def __init__(self, fixers, options, explicit, nobackups): + def __init__(self, fixers, options, explicit, nobackups, show_diffs): self.nobackups = nobackups + self.show_diffs = show_diffs super(StdoutRefactoringTool, self).__init__(fixers, options, explicit) def log_error(self, msg, *args, **kwargs): @@ -42,9 +54,14 @@ if not self.nobackups: shutil.copymode(backup, filename) - def print_output(self, lines): - for line in lines: - print line + def print_output(self, old, new, filename, equal): + if equal: + self.log_message("No changes to %s", filename) + else: + self.log_message("Refactored %s", filename) + if self.show_diffs: + for line in diff_texts(old, new, filename): + print line def main(fixer_pkg, args=None): @@ -73,6 +90,8 @@ help="Modify the grammar so that print() is a function") parser.add_option("-v", "--verbose", action="store_true", help="More verbose logging") + parser.add_option("-s", "--show-diffs", action="store_true", + help="Show diffs of the refactored file") parser.add_option("-w", "--write", action="store_true", help="Write back modified files") parser.add_option("-n", "--nobackups", action="store_true", default=False, @@ -120,7 +139,7 @@ requested = avail_fixes.union(explicit) fixer_names = requested.difference(unwanted_fixes) rt = StdoutRefactoringTool(sorted(fixer_names), rt_opts, sorted(explicit), - options.nobackups) + options.nobackups, options.show_diffs) # Refactor all files and directories passed as arguments if not rt.errors: Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sat Jul 4 16:52:28 2009 @@ -14,7 +14,6 @@ # Python imports import os import sys -import difflib import logging import operator from collections import defaultdict @@ -196,8 +195,9 @@ msg = msg % args self.logger.debug(msg) - def print_output(self, lines): - """Called with lines of output to give to the user.""" + def print_output(self, old_text, new_text, filename, equal): + """Called with the old version, new version, and filename of a + refactored file.""" pass def refactor(self, items, write=False, doctests_only=False): @@ -357,10 +357,11 @@ old_text = self._read_python_source(filename)[0] if old_text is None: return - if old_text == new_text: + equal = old_text == new_text + self.print_output(old_text, new_text, filename, equal) + if equal: self.log_debug("No changes to %s", filename) return - self.print_output(diff_texts(old_text, new_text, filename)) if write: self.write_file(new_text, filename, old_text, encoding) else: @@ -582,12 +583,3 @@ else: return super(MultiprocessRefactoringTool, self).refactor_file( *args, **kwargs) - - -def diff_texts(a, b, filename): - """Return a unified diff of two strings.""" - a = a.splitlines() - b = b.splitlines() - return difflib.unified_diff(a, b, filename, filename, - "(original)", "(refactored)", - lineterm="") From python-checkins at python.org Sat Jul 4 16:58:28 2009 From: python-checkins at python.org (ezio.melotti) Date: Sat, 04 Jul 2009 14:58:28 -0000 Subject: [Python-checkins] r73841 - python/trunk/Lib/test/test_zipfile.py Message-ID: Author: ezio.melotti Date: Sat Jul 4 16:58:27 2009 New Revision: 73841 Log: if zlib -> skipUnless(zlib) and minor cleanups Modified: python/trunk/Lib/test/test_zipfile.py Modified: python/trunk/Lib/test/test_zipfile.py ============================================================================== --- python/trunk/Lib/test/test_zipfile.py (original) +++ python/trunk/Lib/test/test_zipfile.py Sat Jul 4 16:58:27 2009 @@ -4,11 +4,17 @@ except ImportError: zlib = None -import zipfile, os, unittest, sys, shutil, struct +import os +import sys +import shutil +import struct +import zipfile +import unittest from StringIO import StringIO from tempfile import TemporaryFile from random import randint, random +from unittest import skipUnless import test.test_support as support from test.test_support import TESTFN, run_unittest, findfile @@ -217,43 +223,49 @@ for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipIterlinesTest(f, zipfile.ZIP_STORED) - if zlib: - def testDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.zipTest(f, zipfile.ZIP_DEFLATED) - def testOpenDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipOpenTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testOpenDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.zipOpenTest(f, zipfile.ZIP_DEFLATED) - def testRandomOpenDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipRandomOpenTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testRandomOpenDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.zipRandomOpenTest(f, zipfile.ZIP_DEFLATED) - def testReadlineDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipReadlineTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testReadlineDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.zipReadlineTest(f, zipfile.ZIP_DEFLATED) - def testReadlinesDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipReadlinesTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testReadlinesDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.zipReadlinesTest(f, zipfile.ZIP_DEFLATED) - def testIterlinesDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipIterlinesTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testIterlinesDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.zipIterlinesTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def testLowCompression(self): + # Checks for cases where compressed data is larger than original + # Create the ZIP archive + zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) + zipfp.writestr("strfile", '12') + zipfp.close() - def testLowCompression(self): - # Checks for cases where compressed data is larger than original - # Create the ZIP archive - zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) - zipfp.writestr("strfile", '12') - zipfp.close() - - # Get an open object for strfile - zipfp = zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_DEFLATED) - openobj = zipfp.open("strfile") - self.assertEqual(openobj.read(1), '1') - self.assertEqual(openobj.read(1), '2') + # Get an open object for strfile + zipfp = zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_DEFLATED) + openobj = zipfp.open("strfile") + self.assertEqual(openobj.read(1), '1') + self.assertEqual(openobj.read(1), '2') def testAbsoluteArcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) @@ -387,8 +399,8 @@ self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED) def tearDown(self): - os.remove(TESTFN) - os.remove(TESTFN2) + support.unlink(TESTFN) + support.unlink(TESTFN2) class TestZip64InSmallFiles(unittest.TestCase): # These tests test the ZIP64 functionality without using large files, @@ -510,8 +522,8 @@ def tearDown(self): zipfile.ZIP64_LIMIT = self._limit - os.remove(TESTFN) - os.remove(TESTFN2) + support.unlink(TESTFN) + support.unlink(TESTFN2) class PyZipFileTests(unittest.TestCase): def testWritePyfile(self): @@ -1010,7 +1022,7 @@ zipf.close() def tearDown(self): - os.remove(TESTFN2) + support.unlink(TESTFN2) class TestWithDirectory(unittest.TestCase): def setUp(self): @@ -1037,7 +1049,7 @@ def tearDown(self): shutil.rmtree(TESTFN2) if os.path.exists(TESTFN): - os.remove(TESTFN) + support.unlink(TESTFN) class UniversalNewlineTests(unittest.TestCase): From python-checkins at python.org Sat Jul 4 16:58:46 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 04 Jul 2009 14:58:46 -0000 Subject: [Python-checkins] r73842 - sandbox/trunk/2to3/lib2to3/main.py Message-ID: Author: benjamin.peterson Date: Sat Jul 4 16:58:46 2009 New Revision: 73842 Log: complain when not showing diffs or writing Modified: sandbox/trunk/2to3/lib2to3/main.py Modified: sandbox/trunk/2to3/lib2to3/main.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/main.py (original) +++ sandbox/trunk/2to3/lib2to3/main.py Sat Jul 4 16:58:46 2009 @@ -64,6 +64,10 @@ print line +def warn(msg): + print >> sys.stderr, "WARNING: %s" % (msg,) + + def main(fixer_pkg, args=None): """Main program. @@ -100,6 +104,8 @@ # Parse command line arguments refactor_stdin = False options, args = parser.parse_args(args) + if not options.write and not options.show_diffs: + warn("not writing files and not printing diffs; that's not very useful") if not options.write and options.nobackups: parser.error("Can't use -n without -w") if options.list_fixes: From python-checkins at python.org Sat Jul 4 17:09:25 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sat, 04 Jul 2009 15:09:25 -0000 Subject: [Python-checkins] r73843 - in python/branches/py3k: Lib/socketserver.py Lib/test/test_sys.py Modules/_multiprocessing/win32_functions.c Message-ID: Author: kristjan.jonsson Date: Sat Jul 4 17:09:25 2009 New Revision: 73843 Log: http://bugs.python.org/issue6381 merging revision 73819 from trunk Modified: python/branches/py3k/Lib/socketserver.py python/branches/py3k/Lib/test/test_sys.py python/branches/py3k/Modules/_multiprocessing/win32_functions.c Modified: python/branches/py3k/Lib/socketserver.py ============================================================================== --- python/branches/py3k/Lib/socketserver.py (original) +++ python/branches/py3k/Lib/socketserver.py Sat Jul 4 17:09:25 2009 @@ -445,7 +445,12 @@ def close_request(self, request): """Called to clean up an individual request.""" - request.shutdown(socket.SHUT_WR) + try: + #explicitly shutdown. socket.close() merely releases + #the socket and waits for GC to perform the actual close. + request.shutdown(socket.SHUT_WR) + except socket.error: + pass #some platforms may raise ENOTCONN here request.close() Modified: python/branches/py3k/Lib/test/test_sys.py ============================================================================== --- python/branches/py3k/Lib/test/test_sys.py (original) +++ python/branches/py3k/Lib/test/test_sys.py Sat Jul 4 17:09:25 2009 @@ -182,6 +182,8 @@ "under Windows, test would generate a spurious crash dialog") code = textwrap.dedent(""" import sys + import msvcrt + msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS) def f(): try: Modified: python/branches/py3k/Modules/_multiprocessing/win32_functions.c ============================================================================== --- python/branches/py3k/Modules/_multiprocessing/win32_functions.c (original) +++ python/branches/py3k/Modules/_multiprocessing/win32_functions.c Sat Jul 4 17:09:25 2009 @@ -130,12 +130,6 @@ if (!PyArg_ParseTuple(args, "I", &uExitCode)) return NULL; - #if defined(Py_DEBUG) - SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX); - _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); - #endif - - ExitProcess(uExitCode); return NULL; From python-checkins at python.org Sat Jul 4 17:16:38 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sat, 04 Jul 2009 15:16:38 -0000 Subject: [Python-checkins] r73844 - in python/branches/py3k: Lib/socketserver.py Lib/test/test_sys.py Modules/_multiprocessing/win32_functions.c Message-ID: Author: kristjan.jonsson Date: Sat Jul 4 17:16:38 2009 New Revision: 73844 Log: Revert last change, which was incorrect. Modified: python/branches/py3k/Lib/socketserver.py python/branches/py3k/Lib/test/test_sys.py python/branches/py3k/Modules/_multiprocessing/win32_functions.c Modified: python/branches/py3k/Lib/socketserver.py ============================================================================== --- python/branches/py3k/Lib/socketserver.py (original) +++ python/branches/py3k/Lib/socketserver.py Sat Jul 4 17:16:38 2009 @@ -445,12 +445,7 @@ def close_request(self, request): """Called to clean up an individual request.""" - try: - #explicitly shutdown. socket.close() merely releases - #the socket and waits for GC to perform the actual close. - request.shutdown(socket.SHUT_WR) - except socket.error: - pass #some platforms may raise ENOTCONN here + request.shutdown(socket.SHUT_WR) request.close() Modified: python/branches/py3k/Lib/test/test_sys.py ============================================================================== --- python/branches/py3k/Lib/test/test_sys.py (original) +++ python/branches/py3k/Lib/test/test_sys.py Sat Jul 4 17:16:38 2009 @@ -182,8 +182,6 @@ "under Windows, test would generate a spurious crash dialog") code = textwrap.dedent(""" import sys - import msvcrt - msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS) def f(): try: Modified: python/branches/py3k/Modules/_multiprocessing/win32_functions.c ============================================================================== --- python/branches/py3k/Modules/_multiprocessing/win32_functions.c (original) +++ python/branches/py3k/Modules/_multiprocessing/win32_functions.c Sat Jul 4 17:16:38 2009 @@ -130,6 +130,12 @@ if (!PyArg_ParseTuple(args, "I", &uExitCode)) return NULL; + #if defined(Py_DEBUG) + SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX); + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); + #endif + + ExitProcess(uExitCode); return NULL; From python-checkins at python.org Sat Jul 4 17:18:01 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sat, 04 Jul 2009 15:18:01 -0000 Subject: [Python-checkins] r73845 - python/branches/py3k/Lib/socketserver.py Message-ID: Author: kristjan.jonsson Date: Sat Jul 4 17:18:00 2009 New Revision: 73845 Log: http://bugs.python.org/issue6381 merging revision 73819 from trunk Modified: python/branches/py3k/Lib/socketserver.py Modified: python/branches/py3k/Lib/socketserver.py ============================================================================== --- python/branches/py3k/Lib/socketserver.py (original) +++ python/branches/py3k/Lib/socketserver.py Sat Jul 4 17:18:00 2009 @@ -445,7 +445,12 @@ def close_request(self, request): """Called to clean up an individual request.""" - request.shutdown(socket.SHUT_WR) + try: + #explicitly shutdown. socket.close() merely releases + #the socket and waits for GC to perform the actual close. + request.shutdown(socket.SHUT_WR) + except socket.error: + pass #some platforms may raise ENOTCONN here request.close() From buildbot at python.org Sat Jul 4 17:33:27 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 04 Jul 2009 15:33:27 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/257 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: ezio.melotti BUILD FAILED: failed test Excerpt from the test logfile: 3 tests failed: test_pipes test_socketserver test_xmlrpc Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 497, in __bootstrap self.__bootstrap_inner() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 537, in __bootstrap_inner (self.name, _format_exc())) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/traceback.py", line 234, in format_exc etype, value, tb = sys.exc_info() AttributeError: 'NoneType' object has no attribute 'exc_info' Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 497, in __bootstrap self.__bootstrap_inner() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 537, in __bootstrap_inner (self.name, _format_exc())) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/traceback.py", line 234, in format_exc etype, value, tb = sys.exc_info() AttributeError: 'NoneType' object has no attribute 'exc_info' make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 5 06:22:45 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 04:22:45 -0000 Subject: [Python-checkins] r73846 - in python/trunk: Lib/test/test_py3kwarn.py Modules/operator.c Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 06:22:40 2009 New Revision: 73846 Log: Issue 2370: Add Python 3 warnings for the removal of operator.isCallable and operator.sequenceIncludes. Patch contributed by Jeff Balogh (and updated slightly by me). Modified: python/trunk/Lib/test/test_py3kwarn.py python/trunk/Modules/operator.c Modified: python/trunk/Lib/test/test_py3kwarn.py ============================================================================== --- python/trunk/Lib/test/test_py3kwarn.py (original) +++ python/trunk/Lib/test/test_py3kwarn.py Sun Jul 5 06:22:40 2009 @@ -279,6 +279,18 @@ def __hash__(self): pass self.assertEqual(len(w.warnings), 0) + def test_operator(self): + from operator import isCallable, sequenceIncludes + + expected_ = ("operator.isCallable() is not supported in 3.x. " + "Use hasattr(obj, '__call__').") + seq_warn = ("operator.sequenceIncludes() is not supported " + "in 3.x. Use operator.contains().") + with check_warnings() as w: + self.assertWarning(isCallable(self), w, callable_warn) + w.reset() + self.assertWarning(sequenceIncludes(range(3), 2), w, seq_warn) + class TestStdlibRemovals(unittest.TestCase): Modified: python/trunk/Modules/operator.c ============================================================================== --- python/trunk/Modules/operator.c (original) +++ python/trunk/Modules/operator.c Sun Jul 5 06:22:40 2009 @@ -65,7 +65,26 @@ if(! PyArg_UnpackTuple(a,#OP,2,2,&a1,&a2)) return NULL; \ return PyObject_RichCompare(a1,a2,A); } -spami(isCallable , PyCallable_Check) +/* Deprecated operators that need warnings. */ +static int +op_isCallable(PyObject *x) +{ + if (PyErr_WarnPy3k("operator.isCallable() is not supported in 3.x. " + "Use hasattr(obj, '__call__').", 1) < 0) + return -1; + return PyCallable_Check(x); +} + +static int +op_sequenceIncludes(PyObject *seq, PyObject* ob) +{ + if (PyErr_WarnPy3k("operator.sequenceIncludes() is not supported " + "in 3.x. Use operator.contains().", 1) < 0) + return -1; + return PySequence_Contains(seq, ob); +} + +spami(isCallable , op_isCallable) spami(isNumberType , PyNumber_Check) spami(truth , PyObject_IsTrue) spam2(op_add , PyNumber_Add) @@ -104,7 +123,7 @@ spam2(op_iconcat , PySequence_InPlaceConcat) spamoi(op_irepeat , PySequence_InPlaceRepeat) spami2b(op_contains , PySequence_Contains) -spami2b(sequenceIncludes, PySequence_Contains) +spami2b(sequenceIncludes, op_sequenceIncludes) spamn2(indexOf , PySequence_Index) spamn2(countOf , PySequence_Count) spami(isMappingType , PyMapping_Check) From python-checkins at python.org Sun Jul 5 06:25:46 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 04:25:46 -0000 Subject: [Python-checkins] r73847 - python/trunk/Lib/test/test_py3kwarn.py Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 06:25:46 2009 New Revision: 73847 Log: Fix bad variable name in r73846. Modified: python/trunk/Lib/test/test_py3kwarn.py Modified: python/trunk/Lib/test/test_py3kwarn.py ============================================================================== --- python/trunk/Lib/test/test_py3kwarn.py (original) +++ python/trunk/Lib/test/test_py3kwarn.py Sun Jul 5 06:25:46 2009 @@ -282,8 +282,8 @@ def test_operator(self): from operator import isCallable, sequenceIncludes - expected_ = ("operator.isCallable() is not supported in 3.x. " - "Use hasattr(obj, '__call__').") + callable_warn = ("operator.isCallable() is not supported in 3.x. " + "Use hasattr(obj, '__call__').") seq_warn = ("operator.sequenceIncludes() is not supported " "in 3.x. Use operator.contains().") with check_warnings() as w: From python-checkins at python.org Sun Jul 5 06:38:19 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 04:38:19 -0000 Subject: [Python-checkins] r73848 - sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 06:38:19 2009 New Revision: 73848 Log: Fix test_refactor_stdin to handle print_output() method with 4 arguments. Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Sun Jul 5 06:38:19 2009 @@ -106,10 +106,10 @@ class MyRT(refactor.RefactoringTool): - def print_output(self, lines): - diff_lines.extend(lines) + def print_output(self, old_text, new_text, filename, equal): + results.extend([old_text, new_text, filename, equal]) - diff_lines = [] + results = [] rt = MyRT(_DEFAULT_FIXERS) save = sys.stdin sys.stdin = StringIO.StringIO("def parrot(): pass\n\n") @@ -117,12 +117,10 @@ rt.refactor_stdin() finally: sys.stdin = save - expected = """--- (original) -+++ (refactored) -@@ -1,2 +1,2 @@ --def parrot(): pass -+def cheese(): pass""".splitlines() - self.assertEqual(diff_lines[:-1], expected) + expected = ["def parrot(): pass\n\n", + "def cheese(): pass\n\n", + "", False] + self.assertEqual(results, expected) def check_file_refactoring(self, test_file, fixers=_2TO3_FIXERS): def read_file(): From python-checkins at python.org Sun Jul 5 06:43:19 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 04:43:19 -0000 Subject: [Python-checkins] r73849 - in sandbox/trunk/2to3: README example.py lib2to3/fixes/fix_operator.py lib2to3/tests/test_fixers.py Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 06:43:18 2009 New Revision: 73849 Log: Issue 2370: Add fixer for the removal of operator.isCallable() and operator.sequenceIncludes(). Patch contributed by Jeff Balogh (and updated by me). Added: sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py Modified: sandbox/trunk/2to3/README sandbox/trunk/2to3/example.py sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Modified: sandbox/trunk/2to3/README ============================================================================== --- sandbox/trunk/2to3/README (original) +++ sandbox/trunk/2to3/README Sun Jul 5 06:43:18 2009 @@ -93,6 +93,9 @@ * **fix_paren** - Add parentheses to places where they are needed in list comprehensions and generator expressions. +* **fix_operator** - "operator.isCallable(x)" -> "hasattr(x, '__call__')", + "operator.sequenceIncludes(x, y)" -> "operator.contains(a, b)" + * **fix_print** - convert "print" statements to print() function calls. * **fix_raise** - convert "raise" statements to Python 3 syntax (PEP 3109). Modified: sandbox/trunk/2to3/example.py ============================================================================== --- sandbox/trunk/2to3/example.py (original) +++ sandbox/trunk/2to3/example.py Sun Jul 5 06:43:18 2009 @@ -377,6 +377,16 @@ def sys_exc_examples(): print sys.exc_type, sys.exc_value, sys.exc_traceback +def operator_examples(): + import operator + operator.isCallable(foo) + operator.sequenceIncludes(foo, bar) + + from operator import isCallable, sequenceIncludes + # These should produce warnings. + isCallable(foo) + sequenceIncludes(foo, bar) + class X: def maximum(self): return max(self.data.values()) Added: sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py ============================================================================== --- (empty file) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py Sun Jul 5 06:43:18 2009 @@ -0,0 +1,41 @@ +"""Fixer for operator.{isCallable,sequenceIncludes} + +operator.isCallable(obj) -> hasattr(obj, '__call__') +operator.sequenceIncludes(obj) -> operator.contains(obj) +""" + +# Local imports +from .. import fixer_base +from ..fixer_util import Call, Name, String + +class FixOperator(fixer_base.BaseFix): + + methods = "method=('isCallable'|'sequenceIncludes')" + func = "'(' func=any ')'" + PATTERN = """ + power< module='operator' + trailer< '.' %(methods)s > trailer< %(func)s > > + | + power< %(methods)s trailer< %(func)s > > + """ % locals() + + def transform(self, node, results): + method = results["method"][0] + + if method.value == "sequenceIncludes": + if "module" not in results: + # operator may not be in scope, so we can't make a change. + self.warning(node, "You should use operator.contains here.") + else: + method.value = "contains" + method.changed() + return node + elif method.value == "isCallable": + if "module" not in results: + self.warning(node, + "You should use hasattr(%s, '__call__') here." % + results["func"].value) + else: + func = results["func"] + args = [func.clone(), String(", "), String("'__call__'")] + return Call(Name("hasattr"), args, prefix=node.get_prefix()) Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_fixers.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Sun Jul 5 06:43:18 2009 @@ -4105,3 +4105,26 @@ b = """os.getcwdu ( )""" a = """os.getcwd ( )""" self.check(b, a) + + +class Test_operator(FixerTestCase): + + fixer = "operator" + + def test_operator_isCallable(self): + b = "operator.isCallable(x)" + a = "hasattr(x, '__call__')" + self.check(b, a) + + def test_operator_sequenceIncludes(self): + b = "operator.sequenceIncludes(x, y)" + a = "operator.contains(x, y)" + self.check(b, a) + + def test_bare_isCallable(self): + s = "isCallable(x)" + self.warns_unchanged(s, "You should use hasattr(x, '__call__') here.") + + def test_bare_sequenceIncludes(self): + s = "sequenceIncludes(x, y)" + self.warns_unchanged(s, "You should use operator.contains here.") From python-checkins at python.org Sun Jul 5 07:38:19 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 05:38:19 -0000 Subject: [Python-checkins] r73850 - in python/branches/py3k: Lib/test/test_array.py Modules/arraymodule.c Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 07:38:18 2009 New Revision: 73850 Log: Issue 4509: Do not modify an array if we know the change would result in a failure due to exported buffers. Modified: python/branches/py3k/Lib/test/test_array.py python/branches/py3k/Modules/arraymodule.c Modified: python/branches/py3k/Lib/test/test_array.py ============================================================================== --- python/branches/py3k/Lib/test/test_array.py (original) +++ python/branches/py3k/Lib/test/test_array.py Sun Jul 5 07:38:18 2009 @@ -749,9 +749,25 @@ ArraySubclassWithKwargs('b', newarg=1) def test_create_from_bytes(self): + # XXX This test probably needs to be moved in a subclass or + # generalized to use self.typecode. a = array.array('H', b"1234") self.assertEqual(len(a) * a.itemsize, 4) + def test_memoryview_no_resize(self): + # Test for issue 4509. + a = array.array(self.typecode, self.example) + m = memoryview(a) + expected = m.tobytes() + self.assertRaises(BufferError, a.pop, 0) + self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, a.remove, a[0]) + self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, a.__setitem__, slice(0, 0), a) + self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, a.__delitem__, slice(0, len(a))) + self.assertEqual(m.tobytes(), expected) + class StringTest(BaseTest): Modified: python/branches/py3k/Modules/arraymodule.c ============================================================================== --- python/branches/py3k/Modules/arraymodule.c (original) +++ python/branches/py3k/Modules/arraymodule.c Sun Jul 5 07:38:18 2009 @@ -735,6 +735,14 @@ ihigh = Py_SIZE(a); item = a->ob_item; d = n - (ihigh-ilow); + /* Issue #4509: If the array has exported buffers and the slice + assignment would change the size of the array, fail early to make + sure we don't modify it. */ + if (d != 0 && a->ob_exports > 0) { + PyErr_SetString(PyExc_BufferError, + "cannot resize an array that is exporting buffers"); + return -1; + } if (d < 0) { /* Delete -d items */ memmove(item + (ihigh+d)*a->ob_descr->itemsize, item + ihigh*a->ob_descr->itemsize, From python-checkins at python.org Sun Jul 5 07:47:28 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 05:47:28 -0000 Subject: [Python-checkins] r73851 - python/branches/py3k/Lib/test/test_array.py Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 07:47:28 2009 New Revision: 73851 Log: Add more test cases to BaseTest.test_memoryview_no_resize. Modified: python/branches/py3k/Lib/test/test_array.py Modified: python/branches/py3k/Lib/test/test_array.py ============================================================================== --- python/branches/py3k/Lib/test/test_array.py (original) +++ python/branches/py3k/Lib/test/test_array.py Sun Jul 5 07:47:28 2009 @@ -767,6 +767,12 @@ self.assertEqual(m.tobytes(), expected) self.assertRaises(BufferError, a.__delitem__, slice(0, len(a))) self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, a.__imul__, 2) + self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, a.__iadd__, a) + self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, a.extend, a) + self.assertEqual(m.tobytes(), expected) class StringTest(BaseTest): From python-checkins at python.org Sun Jul 5 08:25:14 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 06:25:14 -0000 Subject: [Python-checkins] r73852 - in python/branches/py3k: Lib/test/test_array.py Modules/arraymodule.c Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 08:25:14 2009 New Revision: 73852 Log: Fix array.extend and array.__iadd__ to handle the case where an array is extended with itself. This bug is specific the py3k version of arraymodule.c Modified: python/branches/py3k/Lib/test/test_array.py python/branches/py3k/Modules/arraymodule.c Modified: python/branches/py3k/Lib/test/test_array.py ============================================================================== --- python/branches/py3k/Lib/test/test_array.py (original) +++ python/branches/py3k/Lib/test/test_array.py Sun Jul 5 08:25:14 2009 @@ -272,6 +272,12 @@ a, array.array(self.typecode, self.example[::-1]+2*self.example) ) + a = array.array(self.typecode, self.example) + a += a + self.assertEqual( + a, + array.array(self.typecode, self.example + self.example) + ) b = array.array(self.badtypecode()) self.assertRaises(TypeError, a.__add__, b) @@ -667,6 +673,13 @@ array.array(self.typecode, self.example+self.example[::-1]) ) + a = array.array(self.typecode, self.example) + a.extend(a) + self.assertEqual( + a, + array.array(self.typecode, self.example+self.example) + ) + b = array.array(self.badtypecode()) self.assertRaises(TypeError, a.extend, b) Modified: python/branches/py3k/Modules/arraymodule.c ============================================================================== --- python/branches/py3k/Modules/arraymodule.c (original) +++ python/branches/py3k/Modules/arraymodule.c Sun Jul 5 08:25:14 2009 @@ -810,8 +810,8 @@ static int array_do_extend(arrayobject *self, PyObject *bb) { - Py_ssize_t size, oldsize; - + Py_ssize_t size, oldsize, bbsize; + if (!array_Check(bb)) return array_iter_extend(self, bb); #define b ((arrayobject *)bb) @@ -826,11 +826,13 @@ return -1; } oldsize = Py_SIZE(self); + /* Get the size of bb before resizing the array since bb could be self. */ + bbsize = Py_SIZE(bb); size = oldsize + Py_SIZE(b); if (array_resize(self, size) == -1) return -1; memcpy(self->ob_item + oldsize * self->ob_descr->itemsize, - b->ob_item, Py_SIZE(b) * b->ob_descr->itemsize); + b->ob_item, bbsize * b->ob_descr->itemsize); return 0; #undef b From ncoghlan at gmail.com Sun Jul 5 08:26:54 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Sun, 05 Jul 2009 16:26:54 +1000 Subject: [Python-checkins] r73852 - in python/branches/py3k: Lib/test/test_array.py Modules/arraymodule.c In-Reply-To: <4a504751.1167f10a.21db.10f7SMTPIN_ADDED@mx.google.com> References: <4a504751.1167f10a.21db.10f7SMTPIN_ADDED@mx.google.com> Message-ID: <4A5047AE.7010109@gmail.com> alexandre.vassalotti wrote: > Author: alexandre.vassalotti > Date: Sun Jul 5 08:25:14 2009 > New Revision: 73852 > > Log: > Fix array.extend and array.__iadd__ to handle the case where an array > is extended with itself. > > This bug is specific the py3k version of arraymodule.c Perhaps the test updates should still be backported to 2.x to make sure an equivalent bug is never introduced there? Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From python-checkins at python.org Sun Jul 5 08:31:55 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 06:31:55 -0000 Subject: [Python-checkins] r73853 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 08:31:55 2009 New Revision: 73853 Log: Blocked revisions 73846-73847 via svnmerge ........ r73846 | alexandre.vassalotti | 2009-07-05 00:22:40 -0400 (Sun, 05 Jul 2009) | 6 lines Issue 2370: Add Python 3 warnings for the removal of operator.isCallable and operator.sequenceIncludes. Patch contributed by Jeff Balogh (and updated slightly by me). ........ r73847 | alexandre.vassalotti | 2009-07-05 00:25:46 -0400 (Sun, 05 Jul 2009) | 2 lines Fix bad variable name in r73846. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Sun Jul 5 08:33:41 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 06:33:41 -0000 Subject: [Python-checkins] r73854 - python/trunk/Lib/test/test_array.py Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 08:33:41 2009 New Revision: 73854 Log: Backport test cases added in r73852. Modified: python/trunk/Lib/test/test_array.py Modified: python/trunk/Lib/test/test_array.py ============================================================================== --- python/trunk/Lib/test/test_array.py (original) +++ python/trunk/Lib/test/test_array.py Sun Jul 5 08:33:41 2009 @@ -278,6 +278,12 @@ a, array.array(self.typecode, self.example[::-1]+2*self.example) ) + a = array.array(self.typecode, self.example) + a += a + self.assertEqual( + a, + array.array(self.typecode, self.example + self.example) + ) b = array.array(self.badtypecode()) self.assertRaises(TypeError, a.__add__, b) @@ -675,6 +681,13 @@ array.array(self.typecode, self.example+self.example[::-1]) ) + a = array.array(self.typecode, self.example) + a.extend(a) + self.assertEqual( + a, + array.array(self.typecode, self.example+self.example) + ) + b = array.array(self.badtypecode()) self.assertRaises(TypeError, a.extend, b) From python-checkins at python.org Sun Jul 5 08:34:48 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 06:34:48 -0000 Subject: [Python-checkins] r73855 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 08:34:48 2009 New Revision: 73855 Log: Blocked revisions 73854 via svnmerge ........ r73854 | alexandre.vassalotti | 2009-07-05 02:33:41 -0400 (Sun, 05 Jul 2009) | 2 lines Backport test cases added in r73852. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Sun Jul 5 08:42:44 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 06:42:44 -0000 Subject: [Python-checkins] r73856 - in python/branches/py3k/Lib: pkgutil.py test/test_pkgutil.py Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 08:42:44 2009 New Revision: 73856 Log: Issue 4005: Remove .sort() call on dict_keys object. This caused pydoc to fail when there was a zip file in sys.path. Patch contributed by Amaury Forgeot d'Arc. Modified: python/branches/py3k/Lib/pkgutil.py python/branches/py3k/Lib/test/test_pkgutil.py Modified: python/branches/py3k/Lib/pkgutil.py ============================================================================== --- python/branches/py3k/Lib/pkgutil.py (original) +++ python/branches/py3k/Lib/pkgutil.py Sun Jul 5 08:42:44 2009 @@ -318,8 +318,7 @@ from zipimport import zipimporter def iter_zipimport_modules(importer, prefix=''): - dirlist = zipimport._zip_directory_cache[importer.archive].keys() - dirlist.sort() + dirlist = sorted(zipimport._zip_directory_cache[importer.archive]) _prefix = importer.prefix plen = len(_prefix) yielded = {} Modified: python/branches/py3k/Lib/test/test_pkgutil.py ============================================================================== --- python/branches/py3k/Lib/test/test_pkgutil.py (original) +++ python/branches/py3k/Lib/test/test_pkgutil.py Sun Jul 5 08:42:44 2009 @@ -74,6 +74,12 @@ self.assertEqual(res1, RESOURCE_DATA) res2 = pkgutil.get_data(pkg, 'sub/res.txt') self.assertEqual(res2, RESOURCE_DATA) + + names = [] + for loader, name, ispkg in pkgutil.iter_modules([zip_file]): + names.append(name) + self.assertEqual(names, ['test_getdata_zipfile']) + del sys.path[0] del sys.modules[pkg] From python-checkins at python.org Sun Jul 5 08:50:09 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 06:50:09 -0000 Subject: [Python-checkins] r73857 - python/branches/py3k/Misc/NEWS Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 08:50:08 2009 New Revision: 73857 Log: Add NEWS entries for the changes I made recently. Modified: python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Jul 5 08:50:08 2009 @@ -43,6 +43,16 @@ - The deprecated function string.maketrans has been removed. +- Issue #4005: Fixed a crash of pydoc when there was a zip file present in + sys.path. + +Extension Modules +----------------- + +- Issue #4509: array.array objects are no longer modified after an operation + failing due to the resize restriction in-place when the object has exported + buffers. + Build ----- From solipsis at pitrou.net Sun Jul 5 10:36:52 2009 From: solipsis at pitrou.net (Antoine Pitrou) Date: Sun, 5 Jul 2009 08:36:52 +0000 (UTC) Subject: [Python-checkins] =?utf-8?q?r73850_-_in_python/branches/py3k=3A?= =?utf-8?q?=09Lib/test/test=5Farray=2Epy_Modules/arraymodule=2Ec?= References: <15943.9682182439$1246772312@news.gmane.org> Message-ID: writes: > > + def test_memoryview_no_resize(self): > + # Test for issue 4509. Perhaps you should have expanded the existing test_buffer() method instead? From python-checkins at python.org Sun Jul 5 12:01:25 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 05 Jul 2009 10:01:25 -0000 Subject: [Python-checkins] r73858 - in python/trunk: Lib/test/test_struct.py Misc/NEWS Modules/_struct.c Message-ID: Author: mark.dickinson Date: Sun Jul 5 12:01:24 2009 New Revision: 73858 Log: Issues #1530559, #1741130: Fix various inconsistencies in struct.pack integer packing, and reenable some previously broken tests. Modified: python/trunk/Lib/test/test_struct.py python/trunk/Misc/NEWS python/trunk/Modules/_struct.c Modified: python/trunk/Lib/test/test_struct.py ============================================================================== --- python/trunk/Lib/test/test_struct.py (original) +++ python/trunk/Lib/test/test_struct.py Sun Jul 5 12:01:24 2009 @@ -73,7 +73,7 @@ return try: struct.pack(format, number) - except (struct.error, TypeError): + except struct.error: if PY_STRUCT_FLOAT_COERCE: self.fail("expected DeprecationWarning for float coerce") except DeprecationWarning: @@ -220,12 +220,6 @@ class IntTester(unittest.TestCase): - # XXX Most std integer modes fail to test for out-of-range. - # The "i" and "l" codes appear to range-check OK on 32-bit boxes, but - # fail to check correctly on some 64-bit ones (Tru64 Unix + Compaq C - # reported by Mark Favas). - BUGGY_RANGE_CHECK = "bBhHiIlL" - def __init__(self, formatpair, bytesize): super(IntTester, self).__init__(methodName='test_one') self.assertEqual(len(formatpair), 2) @@ -289,12 +283,8 @@ else: # x is out of range -- verify pack realizes that. - if not PY_STRUCT_RANGE_CHECKING and code in self.BUGGY_RANGE_CHECK: - if verbose: - print "Skipping buggy range check for code", code - else: - deprecated_err(pack, ">" + code, x) - deprecated_err(pack, "<" + code, x) + deprecated_err(pack, ">" + code, x) + deprecated_err(pack, "<" + code, x) # Much the same for unsigned. code = self.unsigned_code @@ -338,12 +328,8 @@ else: # x is out of range -- verify pack realizes that. - if not PY_STRUCT_RANGE_CHECKING and code in self.BUGGY_RANGE_CHECK: - if verbose: - print "Skipping buggy range check for code", code - else: - deprecated_err(pack, ">" + code, x) - deprecated_err(pack, "<" + code, x) + deprecated_err(pack, ">" + code, x) + deprecated_err(pack, "<" + code, x) def run(self): from random import randrange @@ -374,10 +360,25 @@ self.test_one(x) # Some error cases. + class NotAnIntNS(object): + def __int__(self): + return 42 + + def __long__(self): + return 1729L + + class NotAnIntOS: + def __int__(self): + return 10585 + + def __long__(self): + return -163L + for direction in "<>": for code in self.formatpair: - for badobject in "a string", 3+42j, randrange: - self.assertRaises((struct.error, TypeError), + for badobject in ("a string", 3+42j, randrange, + NotAnIntNS(), NotAnIntOS()): + self.assertRaises(struct.error, struct.pack, direction + code, badobject) @@ -447,7 +448,7 @@ import sys for endian in ('', '>', '<'): for cls in (int, long): - for fmt in ('B', 'H', 'I', 'L'): + for fmt in ('B', 'H', 'I', 'L', 'Q'): deprecated_err(struct.pack, endian + fmt, cls(-1)) deprecated_err(struct.pack, endian + 'B', cls(300)) @@ -455,12 +456,12 @@ deprecated_err(struct.pack, endian + 'I', sys.maxint * 4L) deprecated_err(struct.pack, endian + 'L', sys.maxint * 4L) + deprecated_err(struct.pack, endian + 'Q', 2**64) - def XXXtest_1530559(self): - # XXX This is broken: see the bug report + def test_1530559(self): # SF bug 1530559. struct.pack raises TypeError where it used to convert. for endian in ('', '>', '<'): - for fmt in ('B', 'H', 'I', 'L', 'b', 'h', 'i', 'l'): + for fmt in ('B', 'H', 'I', 'L', 'Q', 'b', 'h', 'i', 'l', 'q'): self.check_float_coerce(endian + fmt, 1.0) self.check_float_coerce(endian + fmt, 1.5) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Jul 5 12:01:24 2009 @@ -1167,6 +1167,21 @@ Extension Modules ----------------- +- Issues #1530559, #1741130: Fix various struct.pack inconsistencies + for the integer formats ('bBhHiIlLqQ'). In the following, '*' + represents any of '=', '<', '>'. + + - Packing a float now always gives a Deprecation Warning. + Previously it only warned for 'I', 'L', '*B', '*H', '*I', '*L'. + + - If x is not an int, long or float, then packing x will always + result in struct.error. Previously an x with an __int__ method + could be packed by 'b', 'B', 'h', 'H', 'i', 'l', '*b', '*h' + ,'*i', '*l', and an x with a __long__ method could be packed by + 'q', 'Q', '*q', '*Q'; for x with neither __int__ nor __long__, + TypeError used to be raised (with a confusing error message) for + 'I', 'L', '*B', '*H', '*I', '*L', and struct.error in other cases. + - Issue #4873: Fix resource leaks in error cases of pwd and grp. - Issue #4751: For hashlib algorithms provided by OpenSSL, the Python Modified: python/trunk/Modules/_struct.c ============================================================================== --- python/trunk/Modules/_struct.c (original) +++ python/trunk/Modules/_struct.c Sun Jul 5 12:01:24 2009 @@ -124,8 +124,6 @@ static PyObject * get_pylong(PyObject *v) { - PyNumberMethods *m; - assert(v != NULL); if (PyInt_Check(v)) return PyLong_FromLong(PyInt_AS_LONG(v)); @@ -133,73 +131,63 @@ Py_INCREF(v); return v; } - m = Py_TYPE(v)->tp_as_number; - if (m != NULL && m->nb_long != NULL) { - v = m->nb_long(v); - if (v == NULL) +#ifdef PY_STRUCT_FLOAT_COERCE + if (PyFloat_Check(v)) { + if (PyErr_WarnEx(PyExc_DeprecationWarning, FLOAT_COERCE, 2)<0) return NULL; - if (PyLong_Check(v)) - return v; - Py_DECREF(v); + return PyNumber_Long(v); } +#endif PyErr_SetString(StructError, "cannot convert argument to long"); return NULL; } -/* Helper routine to get a Python integer and raise the appropriate error - if it isn't one */ +/* Helper to convert a Python object to a C long. Raise StructError and + return -1 if v has the wrong type or is outside the range of a long. */ static int get_long(PyObject *v, long *p) { - long x = PyInt_AsLong(v); - if (x == -1 && PyErr_Occurred()) { -#ifdef PY_STRUCT_FLOAT_COERCE - if (PyFloat_Check(v)) { - PyObject *o; - int res; - PyErr_Clear(); - if (PyErr_WarnEx(PyExc_DeprecationWarning, FLOAT_COERCE, 2) < 0) - return -1; - o = PyNumber_Int(v); - if (o == NULL) - return -1; - res = get_long(o, p); - Py_DECREF(o); - return res; - } -#endif - if (PyErr_ExceptionMatches(PyExc_TypeError)) + long x; + + v = get_pylong(v); + if (v == NULL) + return -1; + assert(PyLong_Check(v)); + x = PyLong_AsLong(v); + Py_DECREF(v); + if (x == (long)-1 && PyErr_Occurred()) { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_SetString(StructError, - "required argument is not an integer"); + "argument out of range"); return -1; } *p = x; return 0; } - /* Same, but handling unsigned long */ #ifndef PY_STRUCT_OVERFLOW_MASKING static int get_ulong(PyObject *v, unsigned long *p) { - if (PyLong_Check(v)) { - unsigned long x = PyLong_AsUnsignedLong(v); - if (x == (unsigned long)(-1) && PyErr_Occurred()) - return -1; - *p = x; - return 0; - } - if (get_long(v, (long *)p) < 0) + unsigned long x; + + v = get_pylong(v); + if (v == NULL) return -1; - if (((long)*p) < 0) { - PyErr_SetString(StructError, - "unsigned argument is < 0"); + assert(PyLong_Check(v)); + x = PyLong_AsUnsignedLong(v); + Py_DECREF(v); + if (x == (unsigned long)-1 && PyErr_Occurred()) { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_SetString(StructError, + "argument out of range"); return -1; } + *p = x; return 0; } #endif /* PY_STRUCT_OVERFLOW_MASKING */ @@ -219,8 +207,12 @@ assert(PyLong_Check(v)); x = PyLong_AsLongLong(v); Py_DECREF(v); - if (x == (PY_LONG_LONG)-1 && PyErr_Occurred()) + if (x == (PY_LONG_LONG)-1 && PyErr_Occurred()) { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_SetString(StructError, + "argument out of range"); return -1; + } *p = x; return 0; } @@ -238,8 +230,12 @@ assert(PyLong_Check(v)); x = PyLong_AsUnsignedLongLong(v); Py_DECREF(v); - if (x == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred()) + if (x == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred()) { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_SetString(StructError, + "argument out of range"); return -1; + } *p = x; return 0; } @@ -256,79 +252,81 @@ static int get_wrapped_long(PyObject *v, long *p) { - if (get_long(v, p) < 0) { - if (PyLong_Check(v) && - PyErr_ExceptionMatches(PyExc_OverflowError)) { - PyObject *wrapped; - long x; - PyErr_Clear(); -#ifdef PY_STRUCT_FLOAT_COERCE - if (PyFloat_Check(v)) { - PyObject *o; - int res; - PyErr_Clear(); - if (PyErr_WarnEx(PyExc_DeprecationWarning, FLOAT_COERCE, 2) < 0) - return -1; - o = PyNumber_Int(v); - if (o == NULL) - return -1; - res = get_wrapped_long(o, p); - Py_DECREF(o); - return res; - } -#endif - if (PyErr_WarnEx(PyExc_DeprecationWarning, INT_OVERFLOW, 2) < 0) - return -1; - wrapped = PyNumber_And(v, pylong_ulong_mask); - if (wrapped == NULL) - return -1; - x = (long)PyLong_AsUnsignedLong(wrapped); - Py_DECREF(wrapped); - if (x == -1 && PyErr_Occurred()) - return -1; - *p = x; - } else { - return -1; - } + PyObject *wrapped; + long x; + + v = get_pylong(v); + if (v == NULL) + return -1; + assert(PyLong_Check(v)); + + x = PyLong_AsLong(v); + if (!(x == (long)-1 && PyErr_Occurred())) { + /* PyLong_AsLong succeeded; no need to wrap */ + Py_DECREF(v); + *p = x; + return 0; + } + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) { + Py_DECREF(v); + return -1; + } + + PyErr_Clear(); + if (PyErr_WarnEx(PyExc_DeprecationWarning, INT_OVERFLOW, 2) < 0) { + Py_DECREF(v); + return -1; } + wrapped = PyNumber_And(v, pylong_ulong_mask); + Py_DECREF(v); + if (wrapped == NULL) + return -1; + /* XXX we're relying on the (long) cast to preserve the value modulo + ULONG_MAX+1, but the C standards don't guarantee this */ + x = (long)PyLong_AsUnsignedLong(wrapped); + Py_DECREF(wrapped); + if (x == (long)-1 && PyErr_Occurred()) + return -1; + *p = x; return 0; } static int get_wrapped_ulong(PyObject *v, unsigned long *p) { - long x = (long)PyLong_AsUnsignedLong(v); - if (x == -1 && PyErr_Occurred()) { - PyObject *wrapped; - PyErr_Clear(); -#ifdef PY_STRUCT_FLOAT_COERCE - if (PyFloat_Check(v)) { - PyObject *o; - int res; - PyErr_Clear(); - if (PyErr_WarnEx(PyExc_DeprecationWarning, FLOAT_COERCE, 2) < 0) - return -1; - o = PyNumber_Int(v); - if (o == NULL) - return -1; - res = get_wrapped_ulong(o, p); - Py_DECREF(o); - return res; - } -#endif - wrapped = PyNumber_And(v, pylong_ulong_mask); - if (wrapped == NULL) - return -1; - if (PyErr_WarnEx(PyExc_DeprecationWarning, INT_OVERFLOW, 2) < 0) { - Py_DECREF(wrapped); - return -1; - } - x = (long)PyLong_AsUnsignedLong(wrapped); - Py_DECREF(wrapped); - if (x == -1 && PyErr_Occurred()) - return -1; + PyObject *wrapped; + unsigned long x; + + v = get_pylong(v); + if (v == NULL) + return -1; + assert(PyLong_Check(v)); + + x = PyLong_AsUnsignedLong(v); + if (!(x == (unsigned long)-1 && PyErr_Occurred())) { + Py_DECREF(v); + *p = x; + return 0; } - *p = (unsigned long)x; + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) { + Py_DECREF(v); + return -1; + } + + PyErr_Clear(); + if (PyErr_WarnEx(PyExc_DeprecationWarning, INT_OVERFLOW, 2) < 0) { + Py_DECREF(v); + return -1; + } + wrapped = PyNumber_And(v, pylong_ulong_mask); + Py_DECREF(v); + if (wrapped == NULL) + return -1; + x = PyLong_AsUnsignedLong(wrapped); + Py_DECREF(wrapped); + if (x == (unsigned long)-1 && PyErr_Occurred()) + return -1; + *p = x; return 0; } From python-checkins at python.org Sun Jul 5 12:02:40 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 05 Jul 2009 10:02:40 -0000 Subject: [Python-checkins] r73859 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Sun Jul 5 12:02:39 2009 New Revision: 73859 Log: Blocked revisions 73858 via svnmerge ........ r73858 | mark.dickinson | 2009-07-05 11:01:24 +0100 (Sun, 05 Jul 2009) | 3 lines Issues #1530559, #1741130: Fix various inconsistencies in struct.pack integer packing, and reenable some previously broken tests. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Sun Jul 5 12:03:49 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 05 Jul 2009 10:03:49 -0000 Subject: [Python-checkins] r73860 - python/branches/py3k Message-ID: Author: mark.dickinson Date: Sun Jul 5 12:03:49 2009 New Revision: 73860 Log: Blocked revisions 73858 via svnmerge ........ r73858 | mark.dickinson | 2009-07-05 11:01:24 +0100 (Sun, 05 Jul 2009) | 3 lines Issues #1530559, #1741130: Fix various inconsistencies in struct.pack integer packing, and reenable some previously broken tests. ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Sun Jul 5 13:22:07 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 05 Jul 2009 11:22:07 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/922 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti,mark.dickinson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_socketserver Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/threading.py", line 509, in _bootstrap_inner Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/threading.py", line 482, in _bootstrap [958420 refs] make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 5 16:15:53 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 05 Jul 2009 14:15:53 -0000 Subject: [Python-checkins] r73861 - in sandbox/trunk/2to3: README lib2to3/fixes/fix_operator.py Message-ID: Author: benjamin.peterson Date: Sun Jul 5 16:15:53 2009 New Revision: 73861 Log: cleanup and use unicode where appropiate Modified: sandbox/trunk/2to3/README sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py Modified: sandbox/trunk/2to3/README ============================================================================== --- sandbox/trunk/2to3/README (original) +++ sandbox/trunk/2to3/README Sun Jul 5 16:15:53 2009 @@ -1,7 +1,7 @@ Abstract ======== -A refactoring tool for converting Python 2.x code to 3.0. +A refactoring tool for converting Python 2.x code to 3.x. This is a work in progress! Bugs should be reported to http://bugs.python.org/ under the "2to3" category. @@ -11,12 +11,9 @@ ============= Run ``./2to3`` to convert stdin (``-``), files or directories given as -arguments. By default, the tool outputs a unified diff-formatted patch on -standard output and a "what was changed" summary on standard error, but the -``-w`` option can be given to write back converted files, creating -``.bak``-named backup files. +arguments. -2to3 must be run with at least Python 2.5. The intended path for migrating to +2to3 must be run with at least Python 2.6. The intended path for migrating to Python 3.x is to first migrate to 2.6 (in order to take advantage of Python 2.6's runtime compatibility checks). @@ -30,15 +27,15 @@ lib2to3/patcomp.py - pattern compiler lib2to3/pytree.py - parse tree nodes (not specific to Python, despite the name!) lib2to3/pygram.py - code specific to the Python grammar -example.py - example input for play.py and fix_*.py -find_pattern.py - script to help determine the PATTERN for a new fix +scripts/example.py - example input for play.py and fix_*.py +scripts/find_pattern.py - script to help determine the PATTERN for a new fix lib2to3/Grammar.txt - Python grammar input (accepts 2.x and 3.x syntax) lib2to3/Grammar.pickle - pickled grammar tables (generated file, not in subversion) lib2to3/PatternGrammar.txt - grammar for the pattern language used by patcomp.py lib2to3/PatternGrammar.pickle - pickled pattern grammar tables (generated file) lib2to3/pgen2/ - Parser generator and driver ([1]_, [2]_) lib2to3/fixes/ - Individual transformations -lib2to3tests/ - Test files for pytree, fixers, grammar, etc +lib2to3/tests/ - Test files for pytree, fixers, grammar, etc Capabilities Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py Sun Jul 5 16:15:53 2009 @@ -14,28 +14,27 @@ func = "'(' func=any ')'" PATTERN = """ power< module='operator' - trailer< '.' %(methods)s > trailer< %(func)s > > + trailer< '.' {methods} > trailer< {func} > > | - power< %(methods)s trailer< %(func)s > > - """ % locals() + power< {methods} trailer< {func} > > + """.format(methods=methods, func=func) def transform(self, node, results): method = results["method"][0] - if method.value == "sequenceIncludes": + if method.value == u"sequenceIncludes": if "module" not in results: # operator may not be in scope, so we can't make a change. self.warning(node, "You should use operator.contains here.") else: - method.value = "contains" + method.value = u"contains" method.changed() - return node - elif method.value == "isCallable": + elif method.value == u"isCallable": if "module" not in results: self.warning(node, "You should use hasattr(%s, '__call__') here." % results["func"].value) else: func = results["func"] - args = [func.clone(), String(", "), String("'__call__'")] - return Call(Name("hasattr"), args, prefix=node.get_prefix()) + args = [func.clone(), String(u", "), String(u"'__call__'")] + return Call(Name(u"hasattr"), args, prefix=node.get_prefix()) From python-checkins at python.org Sun Jul 5 21:57:01 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sun, 05 Jul 2009 19:57:01 -0000 Subject: [Python-checkins] r73862 - in python/branches/py3k: Lib/test/test_array.py Modules/arraymodule.c Message-ID: Author: alexandre.vassalotti Date: Sun Jul 5 21:57:00 2009 New Revision: 73862 Log: Add the fix for issue 4509 to the mapping methods. Modified: python/branches/py3k/Lib/test/test_array.py python/branches/py3k/Modules/arraymodule.c Modified: python/branches/py3k/Lib/test/test_array.py ============================================================================== --- python/branches/py3k/Lib/test/test_array.py (original) +++ python/branches/py3k/Lib/test/test_array.py Sun Jul 5 21:57:00 2009 @@ -723,22 +723,37 @@ def test_buffer(self): a = array.array(self.typecode, self.example) m = memoryview(a) - b = bytes(m) - self.assertEqual(b, a.tostring()) - self.assertEqual(b[0], a.tostring()[0]) - # Resizing is forbidden when there are buffer exports + expected = m.tobytes() + self.assertEqual(a.tostring(), expected) + self.assertEqual(a.tostring()[0], expected[0]) + # Resizing is forbidden when there are buffer exports. + # For issue 4509, we also check after each error that + # the array was not modified. self.assertRaises(BufferError, a.append, a[0]) + self.assertEqual(m.tobytes(), expected) self.assertRaises(BufferError, a.extend, a[0:1]) + self.assertEqual(m.tobytes(), expected) self.assertRaises(BufferError, a.remove, a[0]) + self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, a.pop, 0) + self.assertEqual(m.tobytes(), expected) self.assertRaises(BufferError, a.fromlist, a.tolist()) + self.assertEqual(m.tobytes(), expected) self.assertRaises(BufferError, a.fromstring, a.tostring()) + self.assertEqual(m.tobytes(), expected) if self.typecode == 'u': self.assertRaises(BufferError, a.fromunicode, a.tounicode()) + self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, operator.imul, a, 2) + self.assertEqual(m.tobytes(), expected) + self.assertRaises(BufferError, operator.imul, a, 0) + self.assertEqual(m.tobytes(), expected) self.assertRaises(BufferError, operator.setitem, a, slice(0, 0), a) + self.assertEqual(m.tobytes(), expected) self.assertRaises(BufferError, operator.delitem, a, 0) + self.assertEqual(m.tobytes(), expected) self.assertRaises(BufferError, operator.delitem, a, slice(0, 1)) - self.assertRaises(BufferError, operator.imul, a, 2) - self.assertRaises(BufferError, operator.imul, a, 0) + self.assertEqual(m.tobytes(), expected) def test_weakref(self): s = array.array(self.typecode, self.example) @@ -767,26 +782,6 @@ a = array.array('H', b"1234") self.assertEqual(len(a) * a.itemsize, 4) - def test_memoryview_no_resize(self): - # Test for issue 4509. - a = array.array(self.typecode, self.example) - m = memoryview(a) - expected = m.tobytes() - self.assertRaises(BufferError, a.pop, 0) - self.assertEqual(m.tobytes(), expected) - self.assertRaises(BufferError, a.remove, a[0]) - self.assertEqual(m.tobytes(), expected) - self.assertRaises(BufferError, a.__setitem__, slice(0, 0), a) - self.assertEqual(m.tobytes(), expected) - self.assertRaises(BufferError, a.__delitem__, slice(0, len(a))) - self.assertEqual(m.tobytes(), expected) - self.assertRaises(BufferError, a.__imul__, 2) - self.assertEqual(m.tobytes(), expected) - self.assertRaises(BufferError, a.__iadd__, a) - self.assertEqual(m.tobytes(), expected) - self.assertRaises(BufferError, a.extend, a) - self.assertEqual(m.tobytes(), expected) - class StringTest(BaseTest): Modified: python/branches/py3k/Modules/arraymodule.c ============================================================================== --- python/branches/py3k/Modules/arraymodule.c (original) +++ python/branches/py3k/Modules/arraymodule.c Sun Jul 5 21:57:00 2009 @@ -1699,6 +1699,16 @@ if ((step > 0 && stop < start) || (step < 0 && stop > start)) stop = start; + + /* Issue #4509: If the array has exported buffers and the slice + assignment would change the size of the array, fail early to make + sure we don't modify it. */ + if ((needed == 0 || slicelength != needed) && self->ob_exports > 0) { + PyErr_SetString(PyExc_BufferError, + "cannot resize an array that is exporting buffers"); + return -1; + } + if (step == 1) { if (slicelength > needed) { memmove(self->ob_item + (start + needed) * itemsize, From alexandre at peadrop.com Sun Jul 5 22:01:17 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Sun, 5 Jul 2009 16:01:17 -0400 Subject: [Python-checkins] r73850 - in python/branches/py3k: Lib/test/test_array.py Modules/arraymodule.c In-Reply-To: References: <15943.9682182439$1246772312@news.gmane.org> Message-ID: On Sun, Jul 5, 2009 at 4:36 AM, Antoine Pitrou wrote: > writes: >> >> + ? ?def test_memoryview_no_resize(self): >> + ? ? ? ?# Test for issue 4509. > > Perhaps you should have expanded the existing test_buffer() method instead? > Ah, thanks! And moving the tests to test_buffer exposed yet another bug! Now, I wonder why array defines item getters/setters both for the sequence protocol and mapping protocol... -- Alexandre From ncoghlan at gmail.com Sun Jul 5 22:37:46 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Mon, 06 Jul 2009 06:37:46 +1000 Subject: [Python-checkins] r73850 - in python/branches/py3k: Lib/test/test_array.py Modules/arraymodule.c In-Reply-To: References: <15943.9682182439$1246772312@news.gmane.org> Message-ID: <4A510F1A.7060901@gmail.com> Alexandre Vassalotti wrote: > On Sun, Jul 5, 2009 at 4:36 AM, Antoine Pitrou wrote: >> writes: >>> + def test_memoryview_no_resize(self): >>> + # Test for issue 4509. >> Perhaps you should have expanded the existing test_buffer() method instead? >> > > Ah, thanks! And moving the tests to test_buffer exposed yet another bug! > > Now, I wonder why array defines item getters/setters both for the > sequence protocol and mapping protocol... While I can't say for sure, my guess is that it would be due to the fact that most of the builtin and standard library types were written before extended slicing was added. When support for that was added by implementing the mapping protocol, support for the old sequence methods was retained. Keeping the implementation of the sequence protocol also triggers things like support for the default sequence iterator in iter() and operator.isSequence() returning True. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From python-checkins at python.org Sun Jul 5 22:56:57 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sun, 05 Jul 2009 20:56:57 -0000 Subject: [Python-checkins] r73863 - python/trunk/Lib/SocketServer.py Message-ID: Author: kristjan.jonsson Date: Sun Jul 5 22:56:57 2009 New Revision: 73863 Log: http://bugs.python.org/issue6382 close_request() (which can send a socket.shutdown()) must be called by the child process in a forking server. The parent must merely close the socket handle. Modified: python/trunk/Lib/SocketServer.py Modified: python/trunk/Lib/SocketServer.py ============================================================================== --- python/trunk/Lib/SocketServer.py (original) +++ python/trunk/Lib/SocketServer.py Sun Jul 5 22:56:57 2009 @@ -532,17 +532,19 @@ if self.active_children is None: self.active_children = [] self.active_children.append(pid) - self.close_request(request) + request.close() #close socket handle in parent process return else: # Child process. # This must never return, hence os._exit()! try: self.finish_request(request, client_address) + self.close_request(request) os._exit(0) except: try: self.handle_error(request, client_address) + self.close_request(request) finally: os._exit(1) From alexandre at peadrop.com Sun Jul 5 23:24:07 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Sun, 5 Jul 2009 17:24:07 -0400 Subject: [Python-checkins] r73850 - in python/branches/py3k: Lib/test/test_array.py Modules/arraymodule.c In-Reply-To: <4A510F1A.7060901@gmail.com> References: <15943.9682182439$1246772312@news.gmane.org> <4A510F1A.7060901@gmail.com> Message-ID: On Sun, Jul 5, 2009 at 4:37 PM, Nick Coghlan wrote: > Keeping the implementation of the sequence protocol also triggers things > like support for the default sequence iterator in iter() and > operator.isSequence() returning True. > However, operator.isSequence was removed in 3.x and array has its own custom iterator. In addition, nulling out sq_items and sq_ass_item doesn't trigger any test to fail. So, it looks like we have an opportunity to delete a few lines of code from the array module. From python-checkins at python.org Mon Jul 6 14:50:52 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 06 Jul 2009 12:50:52 -0000 Subject: [Python-checkins] r73864 - in python/trunk: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS setup.py Message-ID: Author: tarek.ziade Date: Mon Jul 6 14:50:46 2009 New Revision: 73864 Log: Fixed #6377: distutils compiler switch ignored (and added a deprecation warning if compiler is not used as supposed = a string option) Modified: python/trunk/Lib/distutils/command/build_ext.py python/trunk/Lib/distutils/tests/test_build_ext.py python/trunk/Misc/NEWS python/trunk/setup.py Modified: python/trunk/Lib/distutils/command/build_ext.py ============================================================================== --- python/trunk/Lib/distutils/command/build_ext.py (original) +++ python/trunk/Lib/distutils/command/build_ext.py Mon Jul 6 14:50:46 2009 @@ -8,6 +8,8 @@ import sys, os, string, re from types import * +from warnings import warn + from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -113,6 +115,36 @@ "list available compilers", show_compilers), ] + + # making 'compiler' a property to deprecate + # its usage as something else than a compiler type + # e.g. like a compiler instance + def __init__(self, dist): + self._compiler = None + Command.__init__(self, dist) + + def __setattr__(self, name, value): + # need this to make sure setattr() (used in distutils) + # doesn't kill our property + if name == 'compiler': + self._set_compiler(value) + else: + self.__dict__[name] = value + + def _set_compiler(self, compiler): + if not isinstance(compiler, str) and compiler is not None: + # we don't want to allow that anymore in the future + warn("'compiler' specify the compiler type in build_ext. " + "If you want to get the compiler object itself, " + "use 'compiler_obj'", PendingDeprecationWarning) + + self._compiler = compiler + + def _get_compiler(self): + return self._compiler + + compiler = property(_get_compiler, _set_compiler) + def initialize_options (self): self.extensions = None self.build_lib = None @@ -311,38 +343,38 @@ # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=None, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) - customize_compiler(self.compiler) + self.compiler_obj = new_compiler(compiler=self.compiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) + customize_compiler(self.compiler_obj) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler.initialize(self.plat_name) + self.compiler_obj.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler.set_include_dirs(self.include_dirs) + self.compiler_obj.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler.define_macro(name, value) + self.compiler_obj.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro(macro) + self.compiler_obj.undefine_macro(macro) if self.libraries is not None: - self.compiler.set_libraries(self.libraries) + self.compiler_obj.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler.set_library_dirs(self.library_dirs) + self.compiler_obj.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler.set_runtime_library_dirs(self.rpath) + self.compiler_obj.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler.set_link_objects(self.link_objects) + self.compiler_obj.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -504,13 +536,13 @@ for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self.compiler_obj.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -531,9 +563,9 @@ extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler.detect_language(sources) + language = ext.language or self.compiler_obj.detect_language(sources) - self.compiler.link_shared_object( + self.compiler_obj.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -712,7 +744,7 @@ # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler, MSVCCompiler): + if not isinstance(self.compiler_obj, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' Modified: python/trunk/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) +++ python/trunk/Lib/distutils/tests/test_build_ext.py Mon Jul 6 14:50:46 2009 @@ -3,6 +3,9 @@ import tempfile import shutil from StringIO import StringIO +import warnings +from test.test_support import check_warnings +from test.test_support import captured_stdout from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext @@ -395,6 +398,17 @@ wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') self.assertEquals(wanted, path) + def test_compiler_deprecation_warning(self): + dist = Distribution() + cmd = build_ext(dist) + + with check_warnings() as w: + warnings.simplefilter("always") + cmd.compiler = object() + self.assertEquals(len(w.warnings), 1) + cmd.compile = 'unix' + self.assertEquals(len(w.warnings), 1) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jul 6 14:50:46 2009 @@ -347,6 +347,9 @@ Library ------- +- Issue #6377: Enabled the compiler option, and deprecate its usage as an + attribute. + - Issue #6413: Fixed the log level in distutils.dist for announce. - Issue #3392: The subprocess communicate() method no longer fails in select() Modified: python/trunk/setup.py ============================================================================== --- python/trunk/setup.py (original) +++ python/trunk/setup.py Mon Jul 6 14:50:46 2009 @@ -184,7 +184,7 @@ if compiler is not None: (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags - self.compiler.set_executables(**args) + self.compiler_obj.set_executables(**args) build_ext.build_extensions(self) @@ -299,8 +299,8 @@ def detect_modules(self): # Ensure that /usr/local is always used - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + add_dir_to_list(self.compiler_obj.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler_obj.include_dirs, '/usr/local/include') # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. @@ -309,9 +309,9 @@ # the environment variable is not set even though the value were passed # into configure and stored in the Makefile (issue found on OS X 10.3). for env_var, arg_name, dir_list in ( - ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), - ('LDFLAGS', '-L', self.compiler.library_dirs), - ('CPPFLAGS', '-I', self.compiler.include_dirs)): + ('LDFLAGS', '-R', self.compiler_obj.runtime_library_dirs), + ('LDFLAGS', '-L', self.compiler_obj.library_dirs), + ('CPPFLAGS', '-I', self.compiler_obj.include_dirs)): env_val = sysconfig.get_config_var(env_var) if env_val: # To prevent optparse from raising an exception about any @@ -337,9 +337,9 @@ add_dir_to_list(dir_list, directory) if os.path.normpath(sys.prefix) != '/usr': - add_dir_to_list(self.compiler.library_dirs, + add_dir_to_list(self.compiler_obj.library_dirs, sysconfig.get_config_var("LIBDIR")) - add_dir_to_list(self.compiler.include_dirs, + add_dir_to_list(self.compiler_obj.include_dirs, sysconfig.get_config_var("INCLUDEDIR")) try: @@ -350,11 +350,11 @@ # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. - lib_dirs = self.compiler.library_dirs + [ + lib_dirs = self.compiler_obj.library_dirs + [ '/lib64', '/usr/lib64', '/lib', '/usr/lib', ] - inc_dirs = self.compiler.include_dirs + ['/usr/include'] + inc_dirs = self.compiler_obj.include_dirs + ['/usr/include'] exts = [] missing = [] @@ -545,7 +545,7 @@ missing.extend(['imageop']) # readline - do_readline = self.compiler.find_library_file(lib_dirs, 'readline') + do_readline = self.compiler_obj.find_library_file(lib_dirs, 'readline') if platform == 'darwin': # and os.uname()[2] < '9.': # MacOSX 10.4 has a broken readline. Don't try to build # the readline module unless the user has installed a fixed @@ -566,17 +566,17 @@ readline_extra_link_args = () readline_libs = ['readline'] - if self.compiler.find_library_file(lib_dirs, - 'ncursesw'): + if self.compiler_obj.find_library_file(lib_dirs, + 'ncursesw'): readline_libs.append('ncursesw') - elif self.compiler.find_library_file(lib_dirs, - 'ncurses'): + elif self.compiler_obj.find_library_file(lib_dirs, + 'ncurses'): readline_libs.append('ncurses') - elif self.compiler.find_library_file(lib_dirs, 'curses'): + elif self.compiler_obj.find_library_file(lib_dirs, 'curses'): readline_libs.append('curses') - elif self.compiler.find_library_file(lib_dirs + - ['/usr/lib/termcap'], - 'termcap'): + elif self.compiler_obj.find_library_file(lib_dirs + + ['/usr/lib/termcap'], + 'termcap'): readline_libs.append('termcap') exts.append( Extension('readline', ['readline.c'], library_dirs=['/usr/lib/termcap'], @@ -588,7 +588,7 @@ if platform not in ['mac']: # crypt module. - if self.compiler.find_library_file(lib_dirs, 'crypt'): + if self.compiler_obj.find_library_file(lib_dirs, 'crypt'): libs = ['crypt'] else: libs = [] @@ -615,7 +615,7 @@ ['/usr/kerberos/include']) if krb5_h: ssl_incs += krb5_h - ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, + ssl_libs = find_library_file(self.compiler_obj, 'ssl',lib_dirs, ['/usr/local/ssl/lib', '/usr/contrib/ssl/lib/' ] ) @@ -840,7 +840,7 @@ for dblib in (('db-%d.%d' % db_ver), ('db%d%d' % db_ver), ('db%d' % db_ver[0])): - dblib_file = self.compiler.find_library_file( + dblib_file = self.compiler_obj.find_library_file( db_dirs_to_check + lib_dirs, dblib ) if dblib_file: dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] @@ -924,7 +924,7 @@ os.path.join(sqlite_incdir, '..', '..', 'lib64'), os.path.join(sqlite_incdir, '..', '..', 'lib'), ] - sqlite_libfile = self.compiler.find_library_file( + sqlite_libfile = self.compiler_obj.find_library_file( sqlite_dirs_to_check + lib_dirs, 'sqlite3') if sqlite_libfile: sqlite_libdir = [os.path.abspath(os.path.dirname(sqlite_libfile))] @@ -1014,7 +1014,8 @@ if cand == "ndbm": if find_file("ndbm.h", inc_dirs, []) is not None: # Some systems have -lndbm, others don't - if self.compiler.find_library_file(lib_dirs, 'ndbm'): + if self.compiler_obj.find_library_file(lib_dirs, + 'ndbm'): ndbm_libs = ['ndbm'] else: ndbm_libs = [] @@ -1027,9 +1028,10 @@ break elif cand == "gdbm": - if self.compiler.find_library_file(lib_dirs, 'gdbm'): + if self.compiler_obj.find_library_file(lib_dirs, 'gdbm'): gdbm_libs = ['gdbm'] - if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'): + if self.compiler_obj.find_library_file(lib_dirs, + 'gdbm_compat'): gdbm_libs.append('gdbm_compat') if find_file("gdbm/ndbm.h", inc_dirs, []) is not None: print "building dbm using gdbm" @@ -1068,7 +1070,7 @@ missing.append('dbm') # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: - if (self.compiler.find_library_file(lib_dirs, 'gdbm')): + if (self.compiler_obj.find_library_file(lib_dirs, 'gdbm')): exts.append( Extension('gdbm', ['gdbmmodule.c'], libraries = ['gdbm'] ) ) else: @@ -1086,7 +1088,7 @@ # Sun yellow pages. Some systems have the functions in libc. if platform not in ['cygwin', 'atheos', 'qnx6']: - if (self.compiler.find_library_file(lib_dirs, 'nsl')): + if (self.compiler_obj.find_library_file(lib_dirs, 'nsl')): libs = ['nsl'] else: libs = [] @@ -1100,24 +1102,24 @@ # Curses support, requiring the System V version of curses, often # provided by the ncurses library. panel_library = 'panel' - if (self.compiler.find_library_file(lib_dirs, 'ncursesw')): + if (self.compiler_obj.find_library_file(lib_dirs, 'ncursesw')): curses_libs = ['ncursesw'] # Bug 1464056: If _curses.so links with ncursesw, # _curses_panel.so must link with panelw. panel_library = 'panelw' exts.append( Extension('_curses', ['_cursesmodule.c'], libraries = curses_libs) ) - elif (self.compiler.find_library_file(lib_dirs, 'ncurses')): + elif (self.compiler_obj.find_library_file(lib_dirs, 'ncurses')): curses_libs = ['ncurses'] exts.append( Extension('_curses', ['_cursesmodule.c'], libraries = curses_libs) ) - elif (self.compiler.find_library_file(lib_dirs, 'curses') + elif (self.compiler_obj.find_library_file(lib_dirs, 'curses') and platform != 'darwin'): # OSX has an old Berkeley curses, not good enough for # the _curses module. - if (self.compiler.find_library_file(lib_dirs, 'terminfo')): + if (self.compiler_obj.find_library_file(lib_dirs, 'terminfo')): curses_libs = ['curses', 'terminfo'] - elif (self.compiler.find_library_file(lib_dirs, 'termcap')): + elif (self.compiler_obj.find_library_file(lib_dirs, 'termcap')): curses_libs = ['curses', 'termcap'] else: curses_libs = ['curses'] @@ -1129,7 +1131,7 @@ # If the curses module is enabled, check for the panel module if (module_enabled(exts, '_curses') and - self.compiler.find_library_file(lib_dirs, panel_library)): + self.compiler_obj.find_library_file(lib_dirs, panel_library)): exts.append( Extension('_curses_panel', ['_curses_panel.c'], libraries = [panel_library] + curses_libs) ) else: @@ -1162,7 +1164,7 @@ version = line.split()[2] break if version >= version_req: - if (self.compiler.find_library_file(lib_dirs, 'z')): + if (self.compiler_obj.find_library_file(lib_dirs, 'z')): if sys.platform == "darwin": zlib_extra_link_args = ('-Wl,-search_paths_first',) else: @@ -1194,7 +1196,7 @@ extra_link_args = extra_link_args) ) # Gustavo Niemeyer's bz2 module. - if (self.compiler.find_library_file(lib_dirs, 'bz2')): + if (self.compiler_obj.find_library_file(lib_dirs, 'bz2')): if sys.platform == "darwin": bz2_extra_link_args = ('-Wl,-search_paths_first',) else: @@ -1539,8 +1541,10 @@ tcllib = tklib = tcl_includes = tk_includes = None for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2', '82', '8.1', '81', '8.0', '80']: - tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version) - tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version) + tklib = self.compiler_obj.find_library_file(lib_dirs, + 'tk' + version) + tcllib = self.compiler_obj.find_library_file(lib_dirs, + 'tcl' + version) if tklib and tcllib: # Exit the loop when we've found the Tcl/Tk libraries break @@ -1598,12 +1602,12 @@ return # Check for BLT extension - if self.compiler.find_library_file(lib_dirs + added_lib_dirs, - 'BLT8.0'): + if self.compiler_obj.find_library_file(lib_dirs + added_lib_dirs, + 'BLT8.0'): defs.append( ('WITH_BLT', 1) ) libs.append('BLT8.0') - elif self.compiler.find_library_file(lib_dirs + added_lib_dirs, - 'BLT'): + elif self.compiler_obj.find_library_file(lib_dirs + added_lib_dirs, + 'BLT'): defs.append( ('WITH_BLT', 1) ) libs.append('BLT') @@ -1657,7 +1661,7 @@ ]] # Add .S (preprocessed assembly) to C compiler source extensions. - self.compiler.src_extensions.append('.S') + self.compiler_obj.src_extensions.append('.S') include_dirs = [os.path.join(ffi_srcdir, 'include'), os.path.join(ffi_srcdir, 'powerpc')] @@ -1702,7 +1706,7 @@ ffi_srcdir = os.path.join(fficonfig['ffi_srcdir'], 'src') # Add .S (preprocessed assembly) to C compiler source extensions. - self.compiler.src_extensions.append('.S') + self.compiler_obj.src_extensions.append('.S') include_dirs = [os.path.join(ffi_builddir, 'include'), ffi_builddir, ffi_srcdir] @@ -1780,7 +1784,7 @@ ffi_lib = None if ffi_inc is not None: for lib_name in ('ffi_convenience', 'ffi_pic', 'ffi'): - if (self.compiler.find_library_file(lib_dirs, lib_name)): + if (self.compiler_obj.find_library_file(lib_dirs, lib_name)): ffi_lib = lib_name break From python-checkins at python.org Mon Jul 6 15:12:02 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 06 Jul 2009 13:12:02 -0000 Subject: [Python-checkins] r73865 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Mon Jul 6 15:12:02 2009 New Revision: 73865 Log: Blocked revisions 73864 via svnmerge ........ r73864 | tarek.ziade | 2009-07-06 14:50:46 +0200 (Mon, 06 Jul 2009) | 1 line Fixed #6377: distutils compiler switch ignored (and added a deprecation warning if compiler is not used as supposed = a string option) ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Mon Jul 6 15:52:18 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 06 Jul 2009 13:52:18 -0000 Subject: [Python-checkins] r73866 - in python/branches/py3k: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS setup.py Message-ID: Author: tarek.ziade Date: Mon Jul 6 15:52:17 2009 New Revision: 73866 Log: Merged revisions 73864 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73864 | tarek.ziade | 2009-07-06 14:50:46 +0200 (Mon, 06 Jul 2009) | 1 line Fixed #6377: distutils compiler switch ignored (and added a deprecation warning if compiler is not used as supposed = a string option) ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/command/build_ext.py python/branches/py3k/Lib/distutils/tests/test_build_ext.py python/branches/py3k/Misc/NEWS python/branches/py3k/setup.py Modified: python/branches/py3k/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/command/build_ext.py (original) +++ python/branches/py3k/Lib/distutils/command/build_ext.py Mon Jul 6 15:52:17 2009 @@ -7,6 +7,8 @@ __revision__ = "$Id$" import sys, os, re +from warnings import warn + from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -112,6 +114,35 @@ "list available compilers", show_compilers), ] + # making 'compiler' a property to deprecate + # its usage as something else than a compiler type + # e.g. like a compiler instance + def __init__(self, dist): + self._compiler = None + Command.__init__(self, dist) + + def __setattr__(self, name, value): + # need this to make sure setattr() (used in distutils) + # doesn't kill our property + if name == 'compiler': + self._set_compiler(value) + else: + self.__dict__[name] = value + + def _set_compiler(self, compiler): + if not isinstance(compiler, str) and compiler is not None: + # we don't want to allow that anymore in the future + warn("'compiler' specify the compiler type in build_ext. " + "If you want to get the compiler object itself, " + "use 'compiler_obj'", PendingDeprecationWarning) + + self._compiler = compiler + + def _get_compiler(self): + return self._compiler + + compiler = property(_get_compiler, _set_compiler) + def initialize_options(self): self.extensions = None self.build_lib = None @@ -310,38 +341,38 @@ # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=None, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) - customize_compiler(self.compiler) + self.compiler_obj = new_compiler(compiler=self.compiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) + customize_compiler(self.compiler_obj) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler.initialize(self.plat_name) + self.compiler_obj.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler.set_include_dirs(self.include_dirs) + self.compiler_obj.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler.define_macro(name, value) + self.compiler_obj.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro(macro) + self.compiler_obj.undefine_macro(macro) if self.libraries is not None: - self.compiler.set_libraries(self.libraries) + self.compiler_obj.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler.set_library_dirs(self.library_dirs) + self.compiler_obj.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler.set_runtime_library_dirs(self.rpath) + self.compiler_obj.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler.set_link_objects(self.link_objects) + self.compiler_obj.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -502,13 +533,13 @@ for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self.compiler_obj.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -529,9 +560,9 @@ extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler.detect_language(sources) + language = ext.language or self.compiler_obj.detect_language(sources) - self.compiler.link_shared_object( + self.compiler_obj.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -698,7 +729,7 @@ # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler, MSVCCompiler): + if not isinstance(self.compiler_obj, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' Modified: python/branches/py3k/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_ext.py Mon Jul 6 15:52:17 2009 @@ -3,6 +3,9 @@ import tempfile import shutil from io import StringIO +import warnings +from test.support import check_warnings +from test.support import captured_stdout from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext @@ -395,6 +398,17 @@ wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') self.assertEquals(wanted, path) + def test_compiler_deprecation_warning(self): + dist = Distribution() + cmd = build_ext(dist) + + with check_warnings() as w: + warnings.simplefilter("always") + cmd.compiler = object() + self.assertEquals(len(w.warnings), 1) + cmd.compile = 'unix' + self.assertEquals(len(w.warnings), 1) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Jul 6 15:52:17 2009 @@ -878,6 +878,9 @@ Library ------- +- Issue #6377: Enabled the compiler option, and deprecate its usage as an + attribute. + - Issue #6413: Fixed the log level in distutils.dist for announce. - Issue #6403: Fixed package path usage in build_ext. Modified: python/branches/py3k/setup.py ============================================================================== --- python/branches/py3k/setup.py (original) +++ python/branches/py3k/setup.py Mon Jul 6 15:52:17 2009 @@ -174,7 +174,7 @@ if compiler is not None: (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags - self.compiler.set_executables(**args) + self.compiler_obj.set_executables(**args) build_ext.build_extensions(self) @@ -295,8 +295,8 @@ def detect_modules(self): # Ensure that /usr/local is always used - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + add_dir_to_list(self.compiler_obj.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler_obj.include_dirs, '/usr/local/include') # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. @@ -305,9 +305,9 @@ # the environment variable is not set even though the value were passed # into configure and stored in the Makefile (issue found on OS X 10.3). for env_var, arg_name, dir_list in ( - ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), - ('LDFLAGS', '-L', self.compiler.library_dirs), - ('CPPFLAGS', '-I', self.compiler.include_dirs)): + ('LDFLAGS', '-R', self.compiler_obj.runtime_library_dirs), + ('LDFLAGS', '-L', self.compiler_obj.library_dirs), + ('CPPFLAGS', '-I', self.compiler_obj.include_dirs)): env_val = sysconfig.get_config_var(env_var) if env_val: # To prevent optparse from raising an exception about any @@ -333,19 +333,19 @@ add_dir_to_list(dir_list, directory) if os.path.normpath(sys.prefix) != '/usr': - add_dir_to_list(self.compiler.library_dirs, + add_dir_to_list(self.compiler_obj.library_dirs, sysconfig.get_config_var("LIBDIR")) - add_dir_to_list(self.compiler.include_dirs, + add_dir_to_list(self.compiler_obj.include_dirs, sysconfig.get_config_var("INCLUDEDIR")) # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. - lib_dirs = self.compiler.library_dirs + [ + lib_dirs = self.compiler_obj.library_dirs + [ '/lib64', '/usr/lib64', '/lib', '/usr/lib', ] - inc_dirs = self.compiler.include_dirs + ['/usr/include'] + inc_dirs = self.compiler_obj.include_dirs + ['/usr/include'] exts = [] missing = [] @@ -493,7 +493,7 @@ exts.append( Extension('audioop', ['audioop.c']) ) # readline - do_readline = self.compiler.find_library_file(lib_dirs, 'readline') + do_readline = self.compiler_obj.find_library_file(lib_dirs, 'readline') if platform == 'darwin': # and os.uname()[2] < '9.': # MacOSX 10.4 has a broken readline. Don't try to build # the readline module unless the user has installed a fixed @@ -514,17 +514,17 @@ readline_extra_link_args = () readline_libs = ['readline'] - if self.compiler.find_library_file(lib_dirs, - 'ncursesw'): + if self.compiler_obj.find_library_file(lib_dirs, + 'ncursesw'): readline_libs.append('ncursesw') - elif self.compiler.find_library_file(lib_dirs, - 'ncurses'): + elif self.compiler_obj.find_library_file(lib_dirs, + 'ncurses'): readline_libs.append('ncurses') - elif self.compiler.find_library_file(lib_dirs, 'curses'): + elif self.compiler_obj.find_library_file(lib_dirs, 'curses'): readline_libs.append('curses') - elif self.compiler.find_library_file(lib_dirs + - ['/usr/lib/termcap'], - 'termcap'): + elif self.compiler_obj.find_library_file(lib_dirs + + ['/usr/lib/termcap'], + 'termcap'): readline_libs.append('termcap') exts.append( Extension('readline', ['readline.c'], library_dirs=['/usr/lib/termcap'], @@ -536,7 +536,7 @@ if platform not in ['mac']: # crypt module. - if self.compiler.find_library_file(lib_dirs, 'crypt'): + if self.compiler_obj.find_library_file(lib_dirs, 'crypt'): libs = ['crypt'] else: libs = [] @@ -563,7 +563,7 @@ ['/usr/kerberos/include']) if krb5_h: ssl_incs += krb5_h - ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, + ssl_libs = find_library_file(self.compiler_obj, 'ssl',lib_dirs, ['/usr/local/ssl/lib', '/usr/contrib/ssl/lib/' ] ) @@ -677,7 +677,7 @@ os.path.join(sqlite_incdir, '..', '..', 'lib64'), os.path.join(sqlite_incdir, '..', '..', 'lib'), ] - sqlite_libfile = self.compiler.find_library_file( + sqlite_libfile = self.compiler_obj.find_library_file( sqlite_dirs_to_check + lib_dirs, 'sqlite3') if sqlite_libfile: sqlite_libdir = [os.path.abspath(os.path.dirname(sqlite_libfile))] @@ -736,7 +736,8 @@ if cand == "ndbm": if find_file("ndbm.h", inc_dirs, []) is not None: # Some systems have -lndbm, others don't - if self.compiler.find_library_file(lib_dirs, 'ndbm'): + if self.compiler_obj.find_library_file(lib_dirs, + 'ndbm'): ndbm_libs = ['ndbm'] else: ndbm_libs = [] @@ -749,9 +750,10 @@ break elif cand == "gdbm": - if self.compiler.find_library_file(lib_dirs, 'gdbm'): + if self.compiler_obj.find_library_file(lib_dirs, 'gdbm'): gdbm_libs = ['gdbm'] - if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'): + if self.compiler_obj.find_library_file(lib_dirs, + 'gdbm_compat'): gdbm_libs.append('gdbm_compat') if find_file("gdbm/ndbm.h", inc_dirs, []) is not None: print("building dbm using gdbm") @@ -778,7 +780,7 @@ missing.append('_dbm') # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: - if (self.compiler.find_library_file(lib_dirs, 'gdbm')): + if (self.compiler_obj.find_library_file(lib_dirs, 'gdbm')): exts.append( Extension('_gdbm', ['_gdbmmodule.c'], libraries = ['gdbm'] ) ) else: @@ -796,7 +798,7 @@ # Sun yellow pages. Some systems have the functions in libc. if platform not in ['cygwin', 'atheos', 'qnx6']: - if (self.compiler.find_library_file(lib_dirs, 'nsl')): + if (self.compiler_obj.find_library_file(lib_dirs, 'nsl')): libs = ['nsl'] else: libs = [] @@ -810,24 +812,24 @@ # Curses support, requiring the System V version of curses, often # provided by the ncurses library. panel_library = 'panel' - if (self.compiler.find_library_file(lib_dirs, 'ncursesw')): + if (self.compiler_obj.find_library_file(lib_dirs, 'ncursesw')): curses_libs = ['ncursesw'] # Bug 1464056: If _curses.so links with ncursesw, # _curses_panel.so must link with panelw. panel_library = 'panelw' exts.append( Extension('_curses', ['_cursesmodule.c'], libraries = curses_libs) ) - elif (self.compiler.find_library_file(lib_dirs, 'ncurses')): + elif (self.compiler_obj.find_library_file(lib_dirs, 'ncurses')): curses_libs = ['ncurses'] exts.append( Extension('_curses', ['_cursesmodule.c'], libraries = curses_libs) ) - elif (self.compiler.find_library_file(lib_dirs, 'curses') + elif (self.compiler_obj.find_library_file(lib_dirs, 'curses') and platform != 'darwin'): # OSX has an old Berkeley curses, not good enough for # the _curses module. - if (self.compiler.find_library_file(lib_dirs, 'terminfo')): + if (self.compiler_obj.find_library_file(lib_dirs, 'terminfo')): curses_libs = ['curses', 'terminfo'] - elif (self.compiler.find_library_file(lib_dirs, 'termcap')): + elif (self.compiler_obj.find_library_file(lib_dirs, 'termcap')): curses_libs = ['curses', 'termcap'] else: curses_libs = ['curses'] @@ -839,7 +841,7 @@ # If the curses module is enabled, check for the panel module if (module_enabled(exts, '_curses') and - self.compiler.find_library_file(lib_dirs, panel_library)): + self.compiler_obj.find_library_file(lib_dirs, panel_library)): exts.append( Extension('_curses_panel', ['_curses_panel.c'], libraries = [panel_library] + curses_libs) ) else: @@ -872,7 +874,7 @@ version = line.split()[2] break if version >= version_req: - if (self.compiler.find_library_file(lib_dirs, 'z')): + if (self.compiler_obj.find_library_file(lib_dirs, 'z')): if sys.platform == "darwin": zlib_extra_link_args = ('-Wl,-search_paths_first',) else: @@ -904,7 +906,7 @@ extra_link_args = extra_link_args) ) # Gustavo Niemeyer's bz2 module. - if (self.compiler.find_library_file(lib_dirs, 'bz2')): + if (self.compiler_obj.find_library_file(lib_dirs, 'bz2')): if sys.platform == "darwin": bz2_extra_link_args = ('-Wl,-search_paths_first',) else: @@ -1130,8 +1132,10 @@ tcllib = tklib = tcl_includes = tk_includes = None for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2', '82', '8.1', '81', '8.0', '80']: - tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version) - tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version) + tklib = self.compiler_obj.find_library_file(lib_dirs, + 'tk' + version) + tcllib = self.compiler_obj.find_library_file(lib_dirs, + 'tcl' + version) if tklib and tcllib: # Exit the loop when we've found the Tcl/Tk libraries break @@ -1189,12 +1193,12 @@ return # Check for BLT extension - if self.compiler.find_library_file(lib_dirs + added_lib_dirs, - 'BLT8.0'): + if self.compiler_obj.find_library_file(lib_dirs + added_lib_dirs, + 'BLT8.0'): defs.append( ('WITH_BLT', 1) ) libs.append('BLT8.0') - elif self.compiler.find_library_file(lib_dirs + added_lib_dirs, - 'BLT'): + elif self.compiler_obj.find_library_file(lib_dirs + added_lib_dirs, + 'BLT'): defs.append( ('WITH_BLT', 1) ) libs.append('BLT') @@ -1248,7 +1252,7 @@ ]] # Add .S (preprocessed assembly) to C compiler source extensions. - self.compiler.src_extensions.append('.S') + self.compiler_obj.src_extensions.append('.S') include_dirs = [os.path.join(ffi_srcdir, 'include'), os.path.join(ffi_srcdir, 'powerpc')] @@ -1298,7 +1302,7 @@ ffi_srcdir = os.path.join(fficonfig['ffi_srcdir'], 'src') # Add .S (preprocessed assembly) to C compiler source extensions. - self.compiler.src_extensions.append('.S') + self.compiler_obj.src_extensions.append('.S') include_dirs = [os.path.join(ffi_builddir, 'include'), ffi_builddir, ffi_srcdir] @@ -1376,7 +1380,7 @@ ffi_lib = None if ffi_inc is not None: for lib_name in ('ffi_convenience', 'ffi_pic', 'ffi'): - if (self.compiler.find_library_file(lib_dirs, lib_name)): + if (self.compiler_obj.find_library_file(lib_dirs, lib_name)): ffi_lib = lib_name break From python-checkins at python.org Mon Jul 6 15:54:37 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 06 Jul 2009 13:54:37 -0000 Subject: [Python-checkins] r73867 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Mon Jul 6 15:54:37 2009 New Revision: 73867 Log: Blocked revisions 73866 via svnmerge ................ r73866 | tarek.ziade | 2009-07-06 15:52:17 +0200 (Mon, 06 Jul 2009) | 9 lines Merged revisions 73864 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73864 | tarek.ziade | 2009-07-06 14:50:46 +0200 (Mon, 06 Jul 2009) | 1 line Fixed #6377: distutils compiler switch ignored (and added a deprecation warning if compiler is not used as supposed = a string option) ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Tue Jul 7 02:43:08 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 07 Jul 2009 00:43:08 -0000 Subject: [Python-checkins] r73868 - in python/branches/py3k: Doc/reference/datamodel.rst Misc/NEWS Objects/typeobject.c Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 7 02:43:08 2009 New Revision: 73868 Log: #6428: py3k requires that __bool__ return a bool (and not an int) Fix the error message and the documentation. Modified: python/branches/py3k/Doc/reference/datamodel.rst python/branches/py3k/Misc/NEWS python/branches/py3k/Objects/typeobject.c Modified: python/branches/py3k/Doc/reference/datamodel.rst ============================================================================== --- python/branches/py3k/Doc/reference/datamodel.rst (original) +++ python/branches/py3k/Doc/reference/datamodel.rst Tue Jul 7 02:43:08 2009 @@ -1254,11 +1254,11 @@ .. index:: single: __len__() (mapping object method) Called to implement truth value testing and the built-in operation - ``bool()``; should return ``False`` or ``True``, or their integer equivalents - ``0`` or ``1``. When this method is not defined, :meth:`__len__` is called, - if it is defined, and the object is considered true if its result is nonzero. - If a class defines neither :meth:`__len__` nor :meth:`__bool__`, all its - instances are considered true. + ``bool()``; should return ``False`` or ``True``. When this method is not + defined, :meth:`__len__` is called, if it is defined, and the object is + considered true if its result is nonzero. If a class defines neither + :meth:`__len__` nor :meth:`__bool__`, all its instances are considered + true. .. _attribute-access: Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Tue Jul 7 02:43:08 2009 @@ -12,6 +12,10 @@ Core and Builtins ----------------- +- Issue #6428: Since Python 3.0, the __bool__ method must return a bool + object, and not an int. Fix the corresponding error message, and the + documentation. + - The deprecated PyCObject has been removed. - Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. Modified: python/branches/py3k/Objects/typeobject.c ============================================================================== --- python/branches/py3k/Objects/typeobject.c (original) +++ python/branches/py3k/Objects/typeobject.c Tue Jul 7 02:43:08 2009 @@ -4807,10 +4807,8 @@ } else { PyErr_Format(PyExc_TypeError, - "%s should return " - "bool or int, returned %s", - (using_len ? "__len__" - : "__bool__"), + "__bool__ should return " + "bool, returned %s", Py_TYPE(temp)->tp_name); result = -1; } From python-checkins at python.org Tue Jul 7 02:45:43 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 07 Jul 2009 00:45:43 -0000 Subject: [Python-checkins] r73869 - in python/branches/release31-maint: Doc/reference/datamodel.rst Misc/NEWS Objects/typeobject.c Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 7 02:45:43 2009 New Revision: 73869 Log: Merged revisions 73868 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r73868 | amaury.forgeotdarc | 2009-07-07 02:43:08 +0200 (mar., 07 juil. 2009) | 3 lines #6428: py3k requires that __bool__ return a bool (and not an int) Fix the error message and the documentation. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/reference/datamodel.rst python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Objects/typeobject.c Modified: python/branches/release31-maint/Doc/reference/datamodel.rst ============================================================================== --- python/branches/release31-maint/Doc/reference/datamodel.rst (original) +++ python/branches/release31-maint/Doc/reference/datamodel.rst Tue Jul 7 02:45:43 2009 @@ -1254,11 +1254,11 @@ .. index:: single: __len__() (mapping object method) Called to implement truth value testing and the built-in operation - ``bool()``; should return ``False`` or ``True``, or their integer equivalents - ``0`` or ``1``. When this method is not defined, :meth:`__len__` is called, - if it is defined, and the object is considered true if its result is nonzero. - If a class defines neither :meth:`__len__` nor :meth:`__bool__`, all its - instances are considered true. + ``bool()``; should return ``False`` or ``True``. When this method is not + defined, :meth:`__len__` is called, if it is defined, and the object is + considered true if its result is nonzero. If a class defines neither + :meth:`__len__` nor :meth:`__bool__`, all its instances are considered + true. .. _attribute-access: Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Tue Jul 7 02:45:43 2009 @@ -12,6 +12,10 @@ Core and Builtins ----------------- +- Issue #6428: Since Python 3.0, the __bool__ method must return a bool + object, and not an int. Fix the corresponding error message, and the + documentation. + - Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. This fixes a build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead of stdint.h on that platform. Modified: python/branches/release31-maint/Objects/typeobject.c ============================================================================== --- python/branches/release31-maint/Objects/typeobject.c (original) +++ python/branches/release31-maint/Objects/typeobject.c Tue Jul 7 02:45:43 2009 @@ -4807,10 +4807,8 @@ } else { PyErr_Format(PyExc_TypeError, - "%s should return " - "bool or int, returned %s", - (using_len ? "__len__" - : "__bool__"), + "__bool__ should return " + "bool, returned %s", Py_TYPE(temp)->tp_name); result = -1; } From python-checkins at python.org Tue Jul 7 03:06:13 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 07 Jul 2009 01:06:13 -0000 Subject: [Python-checkins] r73870 - in python/trunk: Lib/test/test_import.py Misc/NEWS Python/import.c Message-ID: Author: r.david.murray Date: Tue Jul 7 03:06:13 2009 New Revision: 73870 Log: Issue 6070: when creating a compiled file, after copying the mode bits, on posix zap the execute bit in case it was set on the .py file, since the compiled files are not directly executable on posix. Patch by Marco N. Modified: python/trunk/Lib/test/test_import.py python/trunk/Misc/NEWS python/trunk/Python/import.c Modified: python/trunk/Lib/test/test_import.py ============================================================================== --- python/trunk/Lib/test/test_import.py (original) +++ python/trunk/Lib/test/test_import.py Tue Jul 7 03:06:13 2009 @@ -1,5 +1,6 @@ import unittest import os +import stat import random import shutil import sys @@ -91,6 +92,23 @@ finally: del sys.path[0] + @unittest.skipUnless(os.name == 'posix', "test meaningful only on posix systems") + def test_execute_bit_not_copied(self): + # Issue 6070: under posix .pyc files got their execute bit set if + # the .py file had the execute bit set, but they aren't executable. + try: + fname = TESTFN + os.extsep + "py" + f = open(fname, 'w').close() + os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | + stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) + __import__(TESTFN) + s = os.stat(fname + 'c') + self.assertEquals(stat.S_IMODE(s.st_mode), + stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) + finally: + remove_files(TESTFN) + del sys.modules[TESTFN] + def testImpModule(self): # Verify that the imp module can correctly load and find .py files import imp @@ -232,6 +250,7 @@ else: self.fail("import by path didn't raise an exception") + class TestPycRewriting(unittest.TestCase): # Test that the `co_filename` attribute on code objects always points # to the right file, even when various things happen (e.g. both the .py Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Tue Jul 7 03:06:13 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue 6070: On posix platforms import no longer copies the execute bit + from the .py file to the .pyc file if it is set. Patch by Marco N. + - Issue #4618: When unicode arguments are passed to print(), the default separator and end should be unicode also. Modified: python/trunk/Python/import.c ============================================================================== --- python/trunk/Python/import.c (original) +++ python/trunk/Python/import.c Tue Jul 7 03:06:13 2009 @@ -881,7 +881,9 @@ { FILE *fp; time_t mtime = srcstat->st_mtime; - mode_t mode = srcstat->st_mode; +#ifndef MS_WINDOWS + mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH; +#endif fp = open_exclusive(cpathname, mode); if (fp == NULL) { From python-checkins at python.org Tue Jul 7 04:17:30 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 07 Jul 2009 02:17:30 -0000 Subject: [Python-checkins] r73871 - python/trunk/Objects/unicodeobject.c Message-ID: Author: alexandre.vassalotti Date: Tue Jul 7 04:17:30 2009 New Revision: 73871 Log: Grow the allocated buffer in PyUnicode_EncodeUTF7 to avoid buffer overrun. Without this change, test_unicode.UnicodeTest.test_codecs_utf7 crashes in debug mode. What happens is the unicode string u'\U000abcde' with a length of 1 encodes to the string '+2m/c3g-' of length 8. Since only 5 bytes is reserved in the buffer, a buffer overrun occurs. Modified: python/trunk/Objects/unicodeobject.c Modified: python/trunk/Objects/unicodeobject.c ============================================================================== --- python/trunk/Objects/unicodeobject.c (original) +++ python/trunk/Objects/unicodeobject.c Tue Jul 7 04:17:30 2009 @@ -1752,7 +1752,7 @@ { PyObject *v; /* It might be possible to tighten this worst case */ - Py_ssize_t allocated = 5 * size; + Py_ssize_t allocated = 8 * size; int inShift = 0; Py_ssize_t i = 0; unsigned int base64bits = 0; @@ -1760,7 +1760,7 @@ char * out; char * start; - if (allocated / 5 != size) + if (allocated / 8 != size) return PyErr_NoMemory(); if (size == 0) From python-checkins at python.org Tue Jul 7 07:06:04 2009 From: python-checkins at python.org (gregory.p.smith) Date: Tue, 07 Jul 2009 05:06:04 -0000 Subject: [Python-checkins] r73872 - python/branches/py3k/Lib/test/test_zipfile.py Message-ID: Author: gregory.p.smith Date: Tue Jul 7 07:06:04 2009 New Revision: 73872 Log: Add a unittest for r73566. Modified: python/branches/py3k/Lib/test/test_zipfile.py Modified: python/branches/py3k/Lib/test/test_zipfile.py ============================================================================== --- python/branches/py3k/Lib/test/test_zipfile.py (original) +++ python/branches/py3k/Lib/test/test_zipfile.py Tue Jul 7 07:06:04 2009 @@ -379,6 +379,14 @@ for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED) + def test_writestr_extended_local_header_issue1202(self): + orig_zip = zipfile.ZipFile(TESTFN2, 'w') + for data in 'abcdefghijklmnop': + zinfo = zipfile.ZipInfo(data) + zinfo.flag_bits |= 0x08 # Include an extended local header. + orig_zip.writestr(zinfo, data) + orig_zip.close() + def tearDown(self): os.remove(TESTFN) os.remove(TESTFN2) From python-checkins at python.org Tue Jul 7 08:49:41 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 07 Jul 2009 06:49:41 -0000 Subject: [Python-checkins] r73873 - python/trunk/Modules/nismodule.c Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 7 08:49:41 2009 New Revision: 73873 Log: #6420: Fix a compilation warning in the nis module, for OpenBSD and FreeBSD. Modified: python/trunk/Modules/nismodule.c Modified: python/trunk/Modules/nismodule.c ============================================================================== --- python/trunk/Modules/nismodule.c (original) +++ python/trunk/Modules/nismodule.c Tue Jul 7 08:49:41 2009 @@ -89,7 +89,7 @@ return map; } -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *); #else typedef int (*foreachfunc)(int, char *, int, char *, int, char *); From python-checkins at python.org Tue Jul 7 08:51:26 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 07 Jul 2009 06:51:26 -0000 Subject: [Python-checkins] r73874 - in python/branches/py3k: Modules/nismodule.c Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 7 08:51:26 2009 New Revision: 73874 Log: Merged revisions 73873 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73873 | amaury.forgeotdarc | 2009-07-07 08:49:41 +0200 (mar., 07 juil. 2009) | 2 lines #6420: Fix a compilation warning in the nis module, for OpenBSD and FreeBSD. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Modules/nismodule.c Modified: python/branches/py3k/Modules/nismodule.c ============================================================================== --- python/branches/py3k/Modules/nismodule.c (original) +++ python/branches/py3k/Modules/nismodule.c Tue Jul 7 08:51:26 2009 @@ -89,7 +89,7 @@ return map; } -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *); #else typedef int (*foreachfunc)(int, char *, int, char *, int, char *); From python-checkins at python.org Tue Jul 7 08:52:04 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 07 Jul 2009 06:52:04 -0000 Subject: [Python-checkins] r73875 - in python/branches/release26-maint: Modules/nismodule.c Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 7 08:52:04 2009 New Revision: 73875 Log: Merged revisions 73873 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73873 | amaury.forgeotdarc | 2009-07-07 08:49:41 +0200 (mar., 07 juil. 2009) | 2 lines #6420: Fix a compilation warning in the nis module, for OpenBSD and FreeBSD. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Modules/nismodule.c Modified: python/branches/release26-maint/Modules/nismodule.c ============================================================================== --- python/branches/release26-maint/Modules/nismodule.c (original) +++ python/branches/release26-maint/Modules/nismodule.c Tue Jul 7 08:52:04 2009 @@ -89,7 +89,7 @@ return map; } -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *); #else typedef int (*foreachfunc)(int, char *, int, char *, int, char *); From python-checkins at python.org Tue Jul 7 08:53:22 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 07 Jul 2009 06:53:22 -0000 Subject: [Python-checkins] r73876 - in python/branches/release31-maint: Modules/nismodule.c Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 7 08:53:22 2009 New Revision: 73876 Log: Merged revisions 73874 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73874 | amaury.forgeotdarc | 2009-07-07 08:51:26 +0200 (mar., 07 juil. 2009) | 9 lines Merged revisions 73873 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73873 | amaury.forgeotdarc | 2009-07-07 08:49:41 +0200 (mar., 07 juil. 2009) | 2 lines #6420: Fix a compilation warning in the nis module, for OpenBSD and FreeBSD. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Modules/nismodule.c Modified: python/branches/release31-maint/Modules/nismodule.c ============================================================================== --- python/branches/release31-maint/Modules/nismodule.c (original) +++ python/branches/release31-maint/Modules/nismodule.c Tue Jul 7 08:53:22 2009 @@ -89,7 +89,7 @@ return map; } -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *); #else typedef int (*foreachfunc)(int, char *, int, char *, int, char *); From python-checkins at python.org Tue Jul 7 11:01:35 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Tue, 07 Jul 2009 09:01:35 -0000 Subject: [Python-checkins] r73877 - python/trunk/Lib/SocketServer.py Message-ID: Author: kristjan.jonsson Date: Tue Jul 7 11:01:34 2009 New Revision: 73877 Log: http://bugs.python.org/issue6382 added the shutdown_request() which can perform shutdown before calling close. This is needed for the ForkingMixIn because different close semantics are required for child and parent process. shutdown_request(), for TCP servers, calls socket.shutdown() and then calls close_request(). Therefore, this is not an backwards incompatible change, since subclasses that continue to override close_request() continue to work. Modified: python/trunk/Lib/SocketServer.py Modified: python/trunk/Lib/SocketServer.py ============================================================================== --- python/trunk/Lib/SocketServer.py (original) +++ python/trunk/Lib/SocketServer.py Tue Jul 7 11:01:34 2009 @@ -168,6 +168,7 @@ - verify_request(request, client_address) - server_close() - process_request(request, client_address) + - shutdown_request(request) - close_request(request) - handle_error() @@ -281,7 +282,7 @@ self.process_request(request, client_address) except: self.handle_error(request, client_address) - self.close_request(request) + self.shutdown_request(request) def handle_timeout(self): """Called if no new request arrives within self.timeout. @@ -305,7 +306,7 @@ """ self.finish_request(request, client_address) - self.close_request(request) + self.shutdown_request(request) def server_close(self): """Called to clean-up the server. @@ -319,6 +320,10 @@ """Finish one request by instantiating RequestHandlerClass.""" self.RequestHandlerClass(request, client_address, self) + def shutdown_request(self, request): + """Called to shutdown and close an individual request.""" + self.close_request(request) + def close_request(self, request): """Called to clean up an individual request.""" pass @@ -359,6 +364,7 @@ - handle_timeout() - verify_request(request, client_address) - process_request(request, client_address) + - shutdown_request(request) - close_request(request) - handle_error() @@ -443,14 +449,18 @@ """ return self.socket.accept() - def close_request(self, request): - """Called to clean up an individual request.""" + def shutdown_request(self, request): + """Called to shutdown and close an individual request.""" try: #explicitly shutdown. socket.close() merely releases #the socket and waits for GC to perform the actual close. request.shutdown(socket.SHUT_WR) except socket.error: pass #some platforms may raise ENOTCONN here + self.close_request(request) + + def close_request(self, request): + """Called to clean up an individual request.""" request.close() @@ -472,6 +482,10 @@ # No need to call listen() for UDP. pass + def shutdown_request(self, request): + # No need to shutdown anything. + self.close_request(request) + def close_request(self, request): # No need to close anything. pass @@ -532,19 +546,19 @@ if self.active_children is None: self.active_children = [] self.active_children.append(pid) - request.close() #close socket handle in parent process + self.close_request(request) #close handle in parent process return else: # Child process. # This must never return, hence os._exit()! try: self.finish_request(request, client_address) - self.close_request(request) + self.shutdown_request(request) os._exit(0) except: try: self.handle_error(request, client_address) - self.close_request(request) + self.shutdown_request(request) finally: os._exit(1) @@ -564,10 +578,10 @@ """ try: self.finish_request(request, client_address) - self.close_request(request) + self.shutdown_request(request) except: self.handle_error(request, client_address) - self.close_request(request) + self.shutdown_request(request) def process_request(self, request, client_address): """Start a new thread to process the request.""" From python-checkins at python.org Tue Jul 7 11:09:10 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Tue, 07 Jul 2009 09:09:10 -0000 Subject: [Python-checkins] r73878 - python/branches/py3k/Lib/socketserver.py Message-ID: Author: kristjan.jonsson Date: Tue Jul 7 11:09:10 2009 New Revision: 73878 Log: http://bugs.python.org/issue6382 added the shutdown_request() which can perform shutdown before calling close. This is needed for the ForkingMixIn because different close semantics are required for child and parent process. shutdown_request(), for TCP servers, calls socket.shutdown() and then calls close_request(). Therefore, this is not an backwards incompatible change, since subclasses that continue to override close_request() continue to work. Modified: python/branches/py3k/Lib/socketserver.py Modified: python/branches/py3k/Lib/socketserver.py ============================================================================== --- python/branches/py3k/Lib/socketserver.py (original) +++ python/branches/py3k/Lib/socketserver.py Tue Jul 7 11:09:10 2009 @@ -168,6 +168,7 @@ - verify_request(request, client_address) - server_close() - process_request(request, client_address) + - shutdown_request(request) - close_request(request) - handle_error() @@ -281,7 +282,7 @@ self.process_request(request, client_address) except: self.handle_error(request, client_address) - self.close_request(request) + self.shutdown_request(request) def handle_timeout(self): """Called if no new request arrives within self.timeout. @@ -305,7 +306,7 @@ """ self.finish_request(request, client_address) - self.close_request(request) + self.shutdown_request(request) def server_close(self): """Called to clean-up the server. @@ -319,6 +320,10 @@ """Finish one request by instantiating RequestHandlerClass.""" self.RequestHandlerClass(request, client_address, self) + def shutdown_request(self, request): + """Called to shutdown and close an individual request.""" + self.close_request(request) + def close_request(self, request): """Called to clean up an individual request.""" pass @@ -359,6 +364,7 @@ - handle_timeout() - verify_request(request, client_address) - process_request(request, client_address) + - shutdown_request(request) - close_request(request) - handle_error() @@ -443,14 +449,18 @@ """ return self.socket.accept() - def close_request(self, request): - """Called to clean up an individual request.""" + def shutdown_request(self, request): + """Called to shutdown and close an individual request.""" try: #explicitly shutdown. socket.close() merely releases #the socket and waits for GC to perform the actual close. request.shutdown(socket.SHUT_WR) except socket.error: pass #some platforms may raise ENOTCONN here + self.close_request(request) + + def close_request(self, request): + """Called to clean up an individual request.""" request.close() @@ -472,6 +482,10 @@ # No need to call listen() for UDP. pass + def shutdown_request(self, request): + # No need to shutdown anything. + self.close_request(request) + def close_request(self, request): # No need to close anything. pass @@ -539,10 +553,12 @@ # This must never return, hence os._exit()! try: self.finish_request(request, client_address) + self.shutdown_request(request) os._exit(0) except: try: self.handle_error(request, client_address) + self.shutdown_request(request) finally: os._exit(1) @@ -562,10 +578,10 @@ """ try: self.finish_request(request, client_address) - self.close_request(request) + self.shutdown_request(request) except: self.handle_error(request, client_address) - self.close_request(request) + self.shutdown_request(request) def process_request(self, request, client_address): """Start a new thread to process the request.""" From python-checkins at python.org Tue Jul 7 11:54:17 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 07 Jul 2009 09:54:17 -0000 Subject: [Python-checkins] r73879 - python/trunk/Python/import.c Message-ID: Author: r.david.murray Date: Tue Jul 7 11:54:16 2009 New Revision: 73879 Log: Update issue 6070 patch to match the patch that was actually tested on Windows. Modified: python/trunk/Python/import.c Modified: python/trunk/Python/import.c ============================================================================== --- python/trunk/Python/import.c (original) +++ python/trunk/Python/import.c Tue Jul 7 11:54:16 2009 @@ -881,7 +881,9 @@ { FILE *fp; time_t mtime = srcstat->st_mtime; -#ifndef MS_WINDOWS +#ifdef MS_WINDOWS /* since Windows uses different permissions */ + mode_t mode = srcstat->st_mode & ~S_IEXEC; +#else mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH; #endif From buildbot at python.org Tue Jul 7 12:14:29 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 07 Jul 2009 10:14:29 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.1 Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.1/builds/7 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_posix ====================================================================== ERROR: test_getcwd_long_pathnames (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/test_posix.py", line 251, in test_getcwd_long_pathnames support.rmtree(base_path) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/support.py", line 181, in rmtree shutil.rmtree(path) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/shutil.py", line 239, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/shutil.py", line 237, in rmtree os.rmdir(path) OSError: [Errno 22] Invalid argument: '/home2/buildbot/slave/3.1.loewis-sun/build/@test.getcwd/@test.getcwd' sincerely, -The Buildbot From python-checkins at python.org Tue Jul 7 12:18:22 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 10:18:22 -0000 Subject: [Python-checkins] r73880 - python/trunk/Modules/_struct.c Message-ID: Author: mark.dickinson Date: Tue Jul 7 12:18:22 2009 New Revision: 73880 Log: Typo in error message Modified: python/trunk/Modules/_struct.c Modified: python/trunk/Modules/_struct.c ============================================================================== --- python/trunk/Modules/_struct.c (original) +++ python/trunk/Modules/_struct.c Tue Jul 7 12:18:22 2009 @@ -646,7 +646,7 @@ return -1; if (x < 0 || x > USHRT_MAX){ PyErr_SetString(StructError, - "short format requires 0 <= number <= " STRINGIFY(USHRT_MAX)); + "ushort format requires 0 <= number <= " STRINGIFY(USHRT_MAX)); return -1; } y = (unsigned short)x; From python-checkins at python.org Tue Jul 7 12:19:19 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 10:19:19 -0000 Subject: [Python-checkins] r73881 - in python/branches/release26-maint: Modules/_struct.c Message-ID: Author: mark.dickinson Date: Tue Jul 7 12:19:18 2009 New Revision: 73881 Log: Merged revisions 73880 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73880 | mark.dickinson | 2009-07-07 11:18:22 +0100 (Tue, 07 Jul 2009) | 1 line Typo in error message ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Modules/_struct.c Modified: python/branches/release26-maint/Modules/_struct.c ============================================================================== --- python/branches/release26-maint/Modules/_struct.c (original) +++ python/branches/release26-maint/Modules/_struct.c Tue Jul 7 12:19:18 2009 @@ -646,7 +646,7 @@ return -1; if (x < 0 || x > USHRT_MAX){ PyErr_SetString(StructError, - "short format requires 0 <= number <= " STRINGIFY(USHRT_MAX)); + "ushort format requires 0 <= number <= " STRINGIFY(USHRT_MAX)); return -1; } y = (unsigned short)x; From python-checkins at python.org Tue Jul 7 12:21:03 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 10:21:03 -0000 Subject: [Python-checkins] r73882 - in python/branches/py3k: Modules/_struct.c Message-ID: Author: mark.dickinson Date: Tue Jul 7 12:21:03 2009 New Revision: 73882 Log: Merged revisions 73880 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73880 | mark.dickinson | 2009-07-07 11:18:22 +0100 (Tue, 07 Jul 2009) | 1 line Typo in error message ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Modules/_struct.c Modified: python/branches/py3k/Modules/_struct.c ============================================================================== --- python/branches/py3k/Modules/_struct.c (original) +++ python/branches/py3k/Modules/_struct.c Tue Jul 7 12:21:03 2009 @@ -493,7 +493,7 @@ return -1; if (x < 0 || x > USHRT_MAX){ PyErr_SetString(StructError, - "short format requires 0 <= number <= " STRINGIFY(USHRT_MAX)); + "ushort format requires 0 <= number <= " STRINGIFY(USHRT_MAX)); return -1; } y = (unsigned short)x; From python-checkins at python.org Tue Jul 7 12:21:59 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 10:21:59 -0000 Subject: [Python-checkins] r73883 - in python/branches/release31-maint: Modules/_struct.c Message-ID: Author: mark.dickinson Date: Tue Jul 7 12:21:58 2009 New Revision: 73883 Log: Merged revisions 73882 via svnmerge from svn+ssh://pythondev at www.python.org/python/branches/py3k ................ r73882 | mark.dickinson | 2009-07-07 11:21:03 +0100 (Tue, 07 Jul 2009) | 9 lines Merged revisions 73880 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73880 | mark.dickinson | 2009-07-07 11:18:22 +0100 (Tue, 07 Jul 2009) | 1 line Typo in error message ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Modules/_struct.c Modified: python/branches/release31-maint/Modules/_struct.c ============================================================================== --- python/branches/release31-maint/Modules/_struct.c (original) +++ python/branches/release31-maint/Modules/_struct.c Tue Jul 7 12:21:58 2009 @@ -493,7 +493,7 @@ return -1; if (x < 0 || x > USHRT_MAX){ PyErr_SetString(StructError, - "short format requires 0 <= number <= " STRINGIFY(USHRT_MAX)); + "ushort format requires 0 <= number <= " STRINGIFY(USHRT_MAX)); return -1; } y = (unsigned short)x; From buildbot at python.org Tue Jul 7 12:55:56 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 07 Jul 2009 10:55:56 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 2.6 Message-ID: The Buildbot has detected a new failure of x86 gentoo 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%202.6/builds/399 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: mark.dickinson BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/home/buildslave/python-trunk/2.6.norwitz-x86/build/Lib/test/test_signal.py", line 165, in test_main pickle.dump(None, done_w) File "/home/buildslave/python-trunk/2.6.norwitz-x86/build/Lib/contextlib.py", line 153, in __exit__ self.thing.close() IOError: [Errno 9] Bad file descriptor make: *** [buildbottest] User defined signal 1 sincerely, -The Buildbot From python-checkins at python.org Tue Jul 7 13:08:23 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 11:08:23 -0000 Subject: [Python-checkins] r73884 - python/trunk/Lib/test/test_struct.py Message-ID: Author: mark.dickinson Date: Tue Jul 7 13:08:23 2009 New Revision: 73884 Log: Add skipping to struct test that only applies when overflow masking is in effect Modified: python/trunk/Lib/test/test_struct.py Modified: python/trunk/Lib/test/test_struct.py ============================================================================== --- python/trunk/Lib/test/test_struct.py (original) +++ python/trunk/Lib/test/test_struct.py Tue Jul 7 13:08:23 2009 @@ -465,6 +465,8 @@ self.check_float_coerce(endian + fmt, 1.0) self.check_float_coerce(endian + fmt, 1.5) + @unittest.skipUnless(PY_STRUCT_OVERFLOW_MASKING, + "only applies when overflow masking enabled") def test_issue4228(self): # Packing a long may yield either 32 or 64 bits x = struct.pack('L', -1)[:4] From python-checkins at python.org Tue Jul 7 13:09:07 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 11:09:07 -0000 Subject: [Python-checkins] r73885 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Tue Jul 7 13:09:07 2009 New Revision: 73885 Log: Blocked revisions 73884 via svnmerge ........ r73884 | mark.dickinson | 2009-07-07 12:08:23 +0100 (Tue, 07 Jul 2009) | 1 line Add skipping to struct test that only applies when overflow masking is in effect ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Tue Jul 7 13:09:38 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 11:09:38 -0000 Subject: [Python-checkins] r73886 - python/branches/py3k Message-ID: Author: mark.dickinson Date: Tue Jul 7 13:09:38 2009 New Revision: 73886 Log: Blocked revisions 73884 via svnmerge ........ r73884 | mark.dickinson | 2009-07-07 12:08:23 +0100 (Tue, 07 Jul 2009) | 1 line Add skipping to struct test that only applies when overflow masking is in effect ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Tue Jul 7 15:04:59 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 07 Jul 2009 13:04:59 -0000 Subject: [Python-checkins] r73887 - in python/branches/release26-maint: Lib/SocketServer.py Message-ID: Author: r.david.murray Date: Tue Jul 7 15:04:54 2009 New Revision: 73887 Log: Merged revisions 69927 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r69927 | neil.schemenauer | 2009-02-23 23:23:25 -0500 (Mon, 23 Feb 2009) | 1 line Fix call to os.waitpid, it does not take keyword args. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/SocketServer.py Modified: python/branches/release26-maint/Lib/SocketServer.py ============================================================================== --- python/branches/release26-maint/Lib/SocketServer.py (original) +++ python/branches/release26-maint/Lib/SocketServer.py Tue Jul 7 15:04:54 2009 @@ -487,7 +487,7 @@ # libraries that expect to be able to wait for their own # children. try: - pid, status = os.waitpid(0, options=0) + pid, status = os.waitpid(0, 0) except os.error: pid = None if pid not in self.active_children: continue From buildbot at python.org Tue Jul 7 15:57:03 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 07 Jul 2009 13:57:03 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1144 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: mark.dickinson BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Tue Jul 7 16:15:45 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 14:15:45 -0000 Subject: [Python-checkins] r73888 - python/trunk/Lib/test/test_struct.py Message-ID: Author: mark.dickinson Date: Tue Jul 7 16:15:45 2009 New Revision: 73888 Log: Expand test coverage for struct.pack with native integer packing; reorganize the test_struct module to remove duplicated code and tests. Modified: python/trunk/Lib/test/test_struct.py Modified: python/trunk/Lib/test/test_struct.py ============================================================================== --- python/trunk/Lib/test/test_struct.py (original) +++ python/trunk/Lib/test/test_struct.py Tue Jul 7 16:15:45 2009 @@ -11,7 +11,17 @@ import sys ISBIGENDIAN = sys.byteorder == "big" IS32BIT = sys.maxsize == 0x7fffffff -del sys + +integer_codes = 'b', 'B', 'h', 'H', 'i', 'I', 'l', 'L', 'q', 'Q' + +# Native 'q' packing isn't available on systems that don't have the C +# long long type. +try: + struct.pack('q', 5) +except struct.error: + HAVE_LONG_LONG = False +else: + HAVE_LONG_LONG = True try: import _struct @@ -58,7 +68,6 @@ raise TestFailed, "%s%s did not raise error" % ( func.__name__, args) - class StructTest(unittest.TestCase): @with_warning_restore @@ -183,136 +192,89 @@ if rev != arg: self.assertTrue(asy) - def test_native_qQ(self): - # can't pack -1 as unsigned regardless - self.assertRaises((struct.error, OverflowError), struct.pack, "Q", -1) - # can't pack string as 'q' regardless - self.assertRaises(struct.error, struct.pack, "q", "a") - # ditto, but 'Q' - self.assertRaises(struct.error, struct.pack, "Q", "a") - - try: - struct.pack("q", 5) - except struct.error: - # does not have native q/Q - pass - else: - bytes = struct.calcsize('q') - # The expected values here are in big-endian format, primarily - # because I'm on a little-endian machine and so this is the - # clearest way (for me) to force the code to get exercised. - for format, input, expected in ( - ('q', -1, '\xff' * bytes), - ('q', 0, '\x00' * bytes), - ('Q', 0, '\x00' * bytes), - ('q', 1L, '\x00' * (bytes-1) + '\x01'), - ('Q', (1L << (8*bytes))-1, '\xff' * bytes), - ('q', (1L << (8*bytes-1))-1, '\x7f' + '\xff' * (bytes - 1))): - got = struct.pack(format, input) - native_expected = bigendian_to_native(expected) - self.assertEqual(got, native_expected) - retrieved = struct.unpack(format, got)[0] - self.assertEqual(retrieved, input) + def test_calcsize(self): + expected_size = { + 'b': 1, 'B': 1, + 'h': 2, 'H': 2, + 'i': 4, 'I': 4, + 'l': 4, 'L': 4, + 'q': 8, 'Q': 8, + } + + # standard integer sizes + for code in integer_codes: + for byteorder in ('=', '<', '>', '!'): + format = byteorder+code + size = struct.calcsize(format) + self.assertEqual(size, expected_size[code]) + + # native integer sizes, except 'q' and 'Q' + for format_pair in ('bB', 'hH', 'iI', 'lL'): + for byteorder in ['', '@']: + signed_size = struct.calcsize(byteorder + format_pair[0]) + unsigned_size = struct.calcsize(byteorder + format_pair[1]) + self.assertEqual(signed_size, unsigned_size) + + # bounds for native integer sizes + self.assertTrue(struct.calcsize('b')==1) + self.assertTrue(2 <= struct.calcsize('h')) + self.assertTrue(4 <= struct.calcsize('l')) + self.assertTrue(struct.calcsize('h') <= struct.calcsize('i')) + self.assertTrue(struct.calcsize('i') <= struct.calcsize('l')) + + # tests for native 'q' and 'Q' when applicable + if HAVE_LONG_LONG: + self.assertEqual(struct.calcsize('q'), struct.calcsize('Q')) + self.assertTrue(8 <= struct.calcsize('q')) + self.assertTrue(struct.calcsize('l') <= struct.calcsize('q')) - def test_standard_integers(self): - # Standard integer tests (bBhHiIlLqQ). + def test_integers(self): + # Integer tests (bBhHiIlLqQ). import binascii class IntTester(unittest.TestCase): - - def __init__(self, formatpair, bytesize): + def __init__(self, format): super(IntTester, self).__init__(methodName='test_one') - self.assertEqual(len(formatpair), 2) - self.formatpair = formatpair - for direction in "<>!=": - for code in formatpair: - format = direction + code - self.assertEqual(struct.calcsize(format), bytesize) - self.bytesize = bytesize - self.bitsize = bytesize * 8 - self.signed_code, self.unsigned_code = formatpair - self.unsigned_min = 0 - self.unsigned_max = 2L**self.bitsize - 1 - self.signed_min = -(2L**(self.bitsize-1)) - self.signed_max = 2L**(self.bitsize-1) - 1 + self.format = format + self.code = format[-1] + self.direction = format[:-1] + if not self.direction in ('', '@', '=', '<', '>', '!'): + raise ValueError("unrecognized packing direction: %s" % + self.direction) + self.bytesize = struct.calcsize(format) + self.bitsize = self.bytesize * 8 + if self.code in tuple('bhilq'): + self.signed = True + self.min_value = -(2L**(self.bitsize-1)) + self.max_value = 2L**(self.bitsize-1) - 1 + elif self.code in tuple('BHILQ'): + self.signed = False + self.min_value = 0 + self.max_value = 2L**self.bitsize - 1 + else: + raise ValueError("unrecognized format code: %s" % + self.code) def test_one(self, x, pack=struct.pack, unpack=struct.unpack, unhexlify=binascii.unhexlify): - # Try signed. - code = self.signed_code - if self.signed_min <= x <= self.signed_max: - # Try big-endian. - expected = long(x) - if x < 0: - expected += 1L << self.bitsize - self.assertTrue(expected > 0) - expected = hex(expected)[2:-1] # chop "0x" and trailing 'L' - if len(expected) & 1: - expected = "0" + expected - expected = unhexlify(expected) - expected = "\x00" * (self.bytesize - len(expected)) + expected - # Pack work? - format = ">" + code - got = pack(format, x) - self.assertEqual(got, expected) - - # Unpack work? - retrieved = unpack(format, got)[0] - self.assertEqual(x, retrieved) - - # Adding any byte should cause a "too big" error. - self.assertRaises((struct.error, TypeError), unpack, format, - '\x01' + got) - # Try little-endian. - format = "<" + code - expected = string_reverse(expected) - - # Pack work? - got = pack(format, x) - self.assertEqual(got, expected) - - # Unpack work? - retrieved = unpack(format, got)[0] - self.assertEqual(x, retrieved) - - # Adding any byte should cause a "too big" error. - self.assertRaises((struct.error, TypeError), unpack, format, - '\x01' + got) - - else: - # x is out of range -- verify pack realizes that. - deprecated_err(pack, ">" + code, x) - deprecated_err(pack, "<" + code, x) - - # Much the same for unsigned. - code = self.unsigned_code - if self.unsigned_min <= x <= self.unsigned_max: - # Try big-endian. - format = ">" + code + format = self.format + if self.min_value <= x <= self.max_value: expected = long(x) - expected = hex(expected)[2:-1] # chop "0x" and trailing 'L' + if self.signed and x < 0: + expected += 1L << self.bitsize + self.assertTrue(expected >= 0) + expected = '%x' % expected if len(expected) & 1: expected = "0" + expected expected = unhexlify(expected) - expected = "\x00" * (self.bytesize - len(expected)) + expected - - # Pack work? - got = pack(format, x) - self.assertEqual(got, expected) - - # Unpack work? - retrieved = unpack(format, got)[0] - self.assertEqual(x, retrieved) - - # Adding any byte should cause a "too big" error. - self.assertRaises((struct.error, TypeError), unpack, format, - '\x01' + got) - - # Try little-endian. - format = "<" + code - expected = string_reverse(expected) + expected = ("\x00" * (self.bytesize - len(expected)) + + expected) + if (self.direction == '<' or + self.direction in ('', '@', '=') and not ISBIGENDIAN): + expected = string_reverse(expected) + self.assertEqual(len(expected), self.bytesize) # Pack work? got = pack(format, x) @@ -325,11 +287,9 @@ # Adding any byte should cause a "too big" error. self.assertRaises((struct.error, TypeError), unpack, format, '\x01' + got) - else: # x is out of range -- verify pack realizes that. - deprecated_err(pack, ">" + code, x) - deprecated_err(pack, "<" + code, x) + deprecated_err(pack, format, x) def run(self): from random import randrange @@ -346,18 +306,19 @@ val = (val << 8) | randrange(256) values.append(val) - # Try all those, and their negations, and +-1 from them. Note - # that this tests all power-of-2 boundaries in range, and a few out - # of range, plus +-(2**n +- 1). + # Values absorbed from other tests + values.extend([300, 700000, sys.maxint*4]) + + # Try all those, and their negations, and +-1 from + # them. Note that this tests all power-of-2 + # boundaries in range, and a few out of range, plus + # +-(2**n +- 1). for base in values: for val in -base, base: for incr in -1, 0, 1: x = val + incr - try: - x = int(x) - except OverflowError: - pass - self.test_one(x) + self.test_one(int(x)) + self.test_one(long(x)) # Some error cases. class NotAnIntNS(object): @@ -374,21 +335,21 @@ def __long__(self): return -163L - for direction in "<>": - for code in self.formatpair: - for badobject in ("a string", 3+42j, randrange, - NotAnIntNS(), NotAnIntOS()): - self.assertRaises(struct.error, - struct.pack, direction + code, - badobject) - - for args in [("bB", 1), - ("hH", 2), - ("iI", 4), - ("lL", 4), - ("qQ", 8)]: - t = IntTester(*args) - t.run() + for badobject in ("a string", 3+42j, randrange, + NotAnIntNS(), NotAnIntOS()): + self.assertRaises(struct.error, + struct.pack, format, + badobject) + + byteorders = '', '@', '=', '<', '>', '!' + for code in integer_codes: + for byteorder in byteorders: + if (byteorder in ('', '@') and code in ('q', 'Q') and + not HAVE_LONG_LONG): + continue + format = byteorder+code + t = IntTester(format) + t.run() def test_p_code(self): # Test p ("Pascal string") code. @@ -441,37 +402,13 @@ big = math.ldexp(big, 127 - 24) self.assertRaises(OverflowError, struct.pack, ">f", big) - if PY_STRUCT_RANGE_CHECKING: - def test_1229380(self): - # SF bug 1229380. No struct.pack exception for some out of - # range integers - import sys - for endian in ('', '>', '<'): - for cls in (int, long): - for fmt in ('B', 'H', 'I', 'L', 'Q'): - deprecated_err(struct.pack, endian + fmt, cls(-1)) - - deprecated_err(struct.pack, endian + 'B', cls(300)) - deprecated_err(struct.pack, endian + 'H', cls(70000)) - - deprecated_err(struct.pack, endian + 'I', sys.maxint * 4L) - deprecated_err(struct.pack, endian + 'L', sys.maxint * 4L) - deprecated_err(struct.pack, endian + 'Q', 2**64) - def test_1530559(self): # SF bug 1530559. struct.pack raises TypeError where it used to convert. for endian in ('', '>', '<'): - for fmt in ('B', 'H', 'I', 'L', 'Q', 'b', 'h', 'i', 'l', 'q'): + for fmt in integer_codes: self.check_float_coerce(endian + fmt, 1.0) self.check_float_coerce(endian + fmt, 1.5) - @unittest.skipUnless(PY_STRUCT_OVERFLOW_MASKING, - "only applies when overflow masking enabled") - def test_issue4228(self): - # Packing a long may yield either 32 or 64 bits - x = struct.pack('L', -1)[:4] - self.assertEqual(x, '\xff'*4) - def test_unpack_from(self): test_string = 'abcd01234' fmt = '4s' From python-checkins at python.org Tue Jul 7 16:18:02 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 14:18:02 -0000 Subject: [Python-checkins] r73889 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Tue Jul 7 16:18:02 2009 New Revision: 73889 Log: Blocked revisions 73888 via svnmerge ........ r73888 | mark.dickinson | 2009-07-07 15:15:45 +0100 (Tue, 07 Jul 2009) | 3 lines Expand test coverage for struct.pack with native integer packing; reorganize the test_struct module to remove duplicated code and tests. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Tue Jul 7 16:18:34 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 14:18:34 -0000 Subject: [Python-checkins] r73890 - python/branches/py3k Message-ID: Author: mark.dickinson Date: Tue Jul 7 16:18:33 2009 New Revision: 73890 Log: Blocked revisions 73888 via svnmerge ........ r73888 | mark.dickinson | 2009-07-07 15:15:45 +0100 (Tue, 07 Jul 2009) | 3 lines Expand test coverage for struct.pack with native integer packing; reorganize the test_struct module to remove duplicated code and tests. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Tue Jul 7 17:08:29 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 15:08:29 -0000 Subject: [Python-checkins] r73891 - in python/trunk: Lib/test/test_struct.py Misc/NEWS Modules/_struct.c Message-ID: Author: mark.dickinson Date: Tue Jul 7 17:08:28 2009 New Revision: 73891 Log: Issue #1523: Remove deprecated overflow masking in struct module, and make sure that out-of-range values consistently raise struct.error. Modified: python/trunk/Lib/test/test_struct.py python/trunk/Misc/NEWS python/trunk/Modules/_struct.c Modified: python/trunk/Lib/test/test_struct.py ============================================================================== --- python/trunk/Lib/test/test_struct.py (original) +++ python/trunk/Lib/test/test_struct.py Tue Jul 7 17:08:28 2009 @@ -26,12 +26,8 @@ try: import _struct except ImportError: - PY_STRUCT_RANGE_CHECKING = 0 - PY_STRUCT_OVERFLOW_MASKING = 1 PY_STRUCT_FLOAT_COERCE = 2 else: - PY_STRUCT_RANGE_CHECKING = getattr(_struct, '_PY_STRUCT_RANGE_CHECKING', 0) - PY_STRUCT_OVERFLOW_MASKING = getattr(_struct, '_PY_STRUCT_OVERFLOW_MASKING', 0) PY_STRUCT_FLOAT_COERCE = getattr(_struct, '_PY_STRUCT_FLOAT_COERCE', 0) def string_reverse(s): @@ -54,20 +50,6 @@ return func(*args, **kw) return decorator - at with_warning_restore -def deprecated_err(func, *args): - try: - func(*args) - except (struct.error, OverflowError): - pass - except DeprecationWarning: - if not PY_STRUCT_OVERFLOW_MASKING: - raise TestFailed, "%s%s expected to raise DeprecationWarning" % ( - func.__name__, args) - else: - raise TestFailed, "%s%s did not raise error" % ( - func.__name__, args) - class StructTest(unittest.TestCase): @with_warning_restore @@ -289,7 +271,7 @@ '\x01' + got) else: # x is out of range -- verify pack realizes that. - deprecated_err(pack, format, x) + self.assertRaises(struct.error, pack, format, x) def run(self): from random import randrange Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Tue Jul 7 17:08:28 2009 @@ -1173,6 +1173,10 @@ Extension Modules ----------------- +- Issue #1523: Remove deprecated overflow wrapping for struct.pack + with an integer format code ('bBhHiIlLqQ'). Packing an out-of-range + integer now consistently raises struct.error. + - Issues #1530559, #1741130: Fix various struct.pack inconsistencies for the integer formats ('bBhHiIlLqQ'). In the following, '*' represents any of '=', '<', '>'. Modified: python/trunk/Modules/_struct.c ============================================================================== --- python/trunk/Modules/_struct.c (original) +++ python/trunk/Modules/_struct.c Tue Jul 7 17:08:28 2009 @@ -17,20 +17,6 @@ typedef int Py_ssize_t; #endif -/* If PY_STRUCT_OVERFLOW_MASKING is defined, the struct module will wrap all input - numbers for explicit endians such that they fit in the given type, much - like explicit casting in C. A warning will be raised if the number did - not originally fit within the range of the requested type. If it is - not defined, then all range errors and overflow will be struct.error - exceptions. */ - -#define PY_STRUCT_OVERFLOW_MASKING 1 - -#ifdef PY_STRUCT_OVERFLOW_MASKING -static PyObject *pylong_ulong_mask = NULL; -static PyObject *pyint_zero = NULL; -#endif - /* If PY_STRUCT_FLOAT_COERCE is defined, the struct module will allow float arguments for integer formats with a warning for backwards compatibility. */ @@ -119,6 +105,8 @@ #pragma options align=reset #endif +static char *integer_codes = "bBhHiIlLqQ"; + /* Helper to get a PyLongObject by hook or by crook. Caller should decref. */ static PyObject * @@ -143,8 +131,9 @@ return NULL; } -/* Helper to convert a Python object to a C long. Raise StructError and - return -1 if v has the wrong type or is outside the range of a long. */ +/* Helper to convert a Python object to a C long. Sets an exception + (struct.error for an inconvertible type, OverflowError for + out-of-range values) and returns -1 on error. */ static int get_long(PyObject *v, long *p) @@ -157,19 +146,14 @@ assert(PyLong_Check(v)); x = PyLong_AsLong(v); Py_DECREF(v); - if (x == (long)-1 && PyErr_Occurred()) { - if (PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_SetString(StructError, - "argument out of range"); + if (x == (long)-1 && PyErr_Occurred()) return -1; - } *p = x; return 0; } /* Same, but handling unsigned long */ -#ifndef PY_STRUCT_OVERFLOW_MASKING static int get_ulong(PyObject *v, unsigned long *p) { @@ -181,16 +165,11 @@ assert(PyLong_Check(v)); x = PyLong_AsUnsignedLong(v); Py_DECREF(v); - if (x == (unsigned long)-1 && PyErr_Occurred()) { - if (PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_SetString(StructError, - "argument out of range"); + if (x == (unsigned long)-1 && PyErr_Occurred()) return -1; - } *p = x; return 0; } -#endif /* PY_STRUCT_OVERFLOW_MASKING */ #ifdef HAVE_LONG_LONG @@ -207,12 +186,8 @@ assert(PyLong_Check(v)); x = PyLong_AsLongLong(v); Py_DECREF(v); - if (x == (PY_LONG_LONG)-1 && PyErr_Occurred()) { - if (PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_SetString(StructError, - "argument out of range"); + if (x == (PY_LONG_LONG)-1 && PyErr_Occurred()) return -1; - } *p = x; return 0; } @@ -230,121 +205,16 @@ assert(PyLong_Check(v)); x = PyLong_AsUnsignedLongLong(v); Py_DECREF(v); - if (x == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred()) { - if (PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_SetString(StructError, - "argument out of range"); + if (x == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred()) return -1; - } *p = x; return 0; } #endif -#ifdef PY_STRUCT_OVERFLOW_MASKING - -/* Helper routine to get a Python integer and raise the appropriate error - if it isn't one */ - -#define INT_OVERFLOW "struct integer overflow masking is deprecated" - -static int -get_wrapped_long(PyObject *v, long *p) -{ - PyObject *wrapped; - long x; - - v = get_pylong(v); - if (v == NULL) - return -1; - assert(PyLong_Check(v)); - - x = PyLong_AsLong(v); - if (!(x == (long)-1 && PyErr_Occurred())) { - /* PyLong_AsLong succeeded; no need to wrap */ - Py_DECREF(v); - *p = x; - return 0; - } - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) { - Py_DECREF(v); - return -1; - } - - PyErr_Clear(); - if (PyErr_WarnEx(PyExc_DeprecationWarning, INT_OVERFLOW, 2) < 0) { - Py_DECREF(v); - return -1; - } - wrapped = PyNumber_And(v, pylong_ulong_mask); - Py_DECREF(v); - if (wrapped == NULL) - return -1; - /* XXX we're relying on the (long) cast to preserve the value modulo - ULONG_MAX+1, but the C standards don't guarantee this */ - x = (long)PyLong_AsUnsignedLong(wrapped); - Py_DECREF(wrapped); - if (x == (long)-1 && PyErr_Occurred()) - return -1; - *p = x; - return 0; -} - -static int -get_wrapped_ulong(PyObject *v, unsigned long *p) -{ - PyObject *wrapped; - unsigned long x; - - v = get_pylong(v); - if (v == NULL) - return -1; - assert(PyLong_Check(v)); - - x = PyLong_AsUnsignedLong(v); - if (!(x == (unsigned long)-1 && PyErr_Occurred())) { - Py_DECREF(v); - *p = x; - return 0; - } - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) { - Py_DECREF(v); - return -1; - } - - PyErr_Clear(); - if (PyErr_WarnEx(PyExc_DeprecationWarning, INT_OVERFLOW, 2) < 0) { - Py_DECREF(v); - return -1; - } - wrapped = PyNumber_And(v, pylong_ulong_mask); - Py_DECREF(v); - if (wrapped == NULL) - return -1; - x = PyLong_AsUnsignedLong(wrapped); - Py_DECREF(wrapped); - if (x == (unsigned long)-1 && PyErr_Occurred()) - return -1; - *p = x; - return 0; -} - -#define RANGE_ERROR(x, f, flag, mask) \ - do { \ - if (_range_error(f, flag) < 0) \ - return -1; \ - else \ - (x) &= (mask); \ - } while (0) - -#else - #define get_wrapped_long get_long #define get_wrapped_ulong get_ulong -#define RANGE_ERROR(x, f, flag, mask) return _range_error(f, flag) - -#endif /* Floating point helpers */ @@ -399,26 +269,6 @@ ~ largest, largest); } -#ifdef PY_STRUCT_OVERFLOW_MASKING - { - PyObject *ptype, *pvalue, *ptraceback; - PyObject *msg; - int rval; - PyErr_Fetch(&ptype, &pvalue, &ptraceback); - assert(pvalue != NULL); - msg = PyObject_Str(pvalue); - Py_XDECREF(ptype); - Py_XDECREF(pvalue); - Py_XDECREF(ptraceback); - if (msg == NULL) - return -1; - rval = PyErr_WarnEx(PyExc_DeprecationWarning, - PyString_AS_STRING(msg), 2); - Py_DECREF(msg); - if (rval == 0) - return 0; - } -#endif return -1; } @@ -663,7 +513,7 @@ return -1; #if (SIZEOF_LONG > SIZEOF_INT) if ((x < ((long)INT_MIN)) || (x > ((long)INT_MAX))) - RANGE_ERROR(x, f, 0, -1); + return _range_error(f, 0); #endif y = (int)x; memcpy(p, (char *)&y, sizeof y); @@ -680,7 +530,7 @@ y = (unsigned int)x; #if (SIZEOF_LONG > SIZEOF_INT) if (x > ((unsigned long)UINT_MAX)) - RANGE_ERROR(y, f, 1, -1); + return _range_error(f, 1); #endif memcpy(p, (char *)&y, sizeof y); return 0; @@ -912,14 +762,10 @@ i = f->size; if (i != SIZEOF_LONG) { if ((i == 2) && (x < -32768 || x > 32767)) - RANGE_ERROR(x, f, 0, 0xffffL); + return _range_error(f, 0); #if (SIZEOF_LONG != 4) else if ((i == 4) && (x < -2147483648L || x > 2147483647L)) - RANGE_ERROR(x, f, 0, 0xffffffffL); -#endif -#ifdef PY_STRUCT_OVERFLOW_MASKING - else if ((i == 1) && (x < -128 || x > 127)) - RANGE_ERROR(x, f, 0, 0xffL); + return _range_error(f, 0); #endif } do { @@ -941,7 +787,7 @@ unsigned long maxint = 1; maxint <<= (unsigned long)(i * 8); if (x >= maxint) - RANGE_ERROR(x, f, 1, maxint - 1); + return _range_error(f, 1); } do { p[--i] = (char)x; @@ -1017,14 +863,8 @@ static formatdef bigendian_table[] = { {'x', 1, 0, NULL}, -#ifdef PY_STRUCT_OVERFLOW_MASKING - /* Native packers do range checking without overflow masking. */ - {'b', 1, 0, nu_byte, bp_int}, - {'B', 1, 0, nu_ubyte, bp_uint}, -#else {'b', 1, 0, nu_byte, np_byte}, {'B', 1, 0, nu_ubyte, np_ubyte}, -#endif {'c', 1, 0, nu_char, np_char}, {'s', 1, 0, NULL}, {'p', 1, 0, NULL}, @@ -1140,14 +980,10 @@ i = f->size; if (i != SIZEOF_LONG) { if ((i == 2) && (x < -32768 || x > 32767)) - RANGE_ERROR(x, f, 0, 0xffffL); + return _range_error(f, 0); #if (SIZEOF_LONG != 4) else if ((i == 4) && (x < -2147483648L || x > 2147483647L)) - RANGE_ERROR(x, f, 0, 0xffffffffL); -#endif -#ifdef PY_STRUCT_OVERFLOW_MASKING - else if ((i == 1) && (x < -128 || x > 127)) - RANGE_ERROR(x, f, 0, 0xffL); + return _range_error(f, 0); #endif } do { @@ -1169,7 +1005,7 @@ unsigned long maxint = 1; maxint <<= (unsigned long)(i * 8); if (x >= maxint) - RANGE_ERROR(x, f, 1, maxint - 1); + return _range_error(f, 1); } do { *p++ = (char)x; @@ -1236,14 +1072,8 @@ static formatdef lilendian_table[] = { {'x', 1, 0, NULL}, -#ifdef PY_STRUCT_OVERFLOW_MASKING - /* Native packers do range checking without overflow masking. */ - {'b', 1, 0, nu_byte, lp_int}, - {'B', 1, 0, nu_ubyte, lp_uint}, -#else {'b', 1, 0, nu_byte, np_byte}, {'B', 1, 0, nu_ubyte, np_ubyte}, -#endif {'c', 1, 0, nu_char, np_char}, {'s', 1, 0, NULL}, {'p', 1, 0, NULL}, @@ -1645,7 +1475,8 @@ if (e->format == 's') { if (!PyString_Check(v)) { PyErr_SetString(StructError, - "argument for 's' must be a string"); + "argument for 's' must " + "be a string"); return -1; } n = PyString_GET_SIZE(v); @@ -1656,7 +1487,8 @@ } else if (e->format == 'p') { if (!PyString_Check(v)) { PyErr_SetString(StructError, - "argument for 'p' must be a string"); + "argument for 'p' must " + "be a string"); return -1; } n = PyString_GET_SIZE(v); @@ -1667,13 +1499,14 @@ if (n > 255) n = 255; *res = Py_SAFE_DOWNCAST(n, Py_ssize_t, unsigned char); - } else { - if (e->pack(res, v, e) < 0) { - if (PyLong_Check(v) && PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_SetString(StructError, - "long too large to convert to int"); - return -1; - } + } else if (e->pack(res, v, e) < 0) { + if (strchr(integer_codes, e->format) != NULL && + PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_Format(StructError, + "integer out of range for " + "'%c' format code", + e->format); + return -1; } } @@ -2081,25 +1914,9 @@ if (PyType_Ready(&PyStructType) < 0) return; -#ifdef PY_STRUCT_OVERFLOW_MASKING - if (pyint_zero == NULL) { - pyint_zero = PyInt_FromLong(0); - if (pyint_zero == NULL) - return; - } - if (pylong_ulong_mask == NULL) { -#if (SIZEOF_LONG == 4) - pylong_ulong_mask = PyLong_FromString("FFFFFFFF", NULL, 16); -#else - pylong_ulong_mask = PyLong_FromString("FFFFFFFFFFFFFFFF", NULL, 16); -#endif - if (pylong_ulong_mask == NULL) - return; - } - -#else - /* This speed trick can't be used until overflow masking goes away, because - native endian always raises exceptions instead of overflow masking. */ + /* This speed trick can't be used until overflow masking goes + away, because native endian always raises exceptions + instead of overflow masking. */ /* Check endian and swap in faster functions */ { @@ -2139,7 +1956,6 @@ native++; } } -#endif /* Add some symbolic constants to the module */ if (StructError == NULL) { @@ -2157,9 +1973,6 @@ PyModule_AddObject(m, "__version__", ver); PyModule_AddIntConstant(m, "_PY_STRUCT_RANGE_CHECKING", 1); -#ifdef PY_STRUCT_OVERFLOW_MASKING - PyModule_AddIntConstant(m, "_PY_STRUCT_OVERFLOW_MASKING", 1); -#endif #ifdef PY_STRUCT_FLOAT_COERCE PyModule_AddIntConstant(m, "_PY_STRUCT_FLOAT_COERCE", 1); #endif From python-checkins at python.org Tue Jul 7 17:09:03 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 15:09:03 -0000 Subject: [Python-checkins] r73892 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Tue Jul 7 17:09:03 2009 New Revision: 73892 Log: Blocked revisions 73891 via svnmerge ........ r73891 | mark.dickinson | 2009-07-07 16:08:28 +0100 (Tue, 07 Jul 2009) | 3 lines Issue #1523: Remove deprecated overflow masking in struct module, and make sure that out-of-range values consistently raise struct.error. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Tue Jul 7 17:09:34 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 07 Jul 2009 15:09:34 -0000 Subject: [Python-checkins] r73893 - python/branches/py3k Message-ID: Author: mark.dickinson Date: Tue Jul 7 17:09:33 2009 New Revision: 73893 Log: Blocked revisions 73891 via svnmerge ........ r73891 | mark.dickinson | 2009-07-07 16:08:28 +0100 (Tue, 07 Jul 2009) | 3 lines Issue #1523: Remove deprecated overflow masking in struct module, and make sure that out-of-range values consistently raise struct.error. ........ Modified: python/branches/py3k/ (props changed) From g.brandl at gmx.net Tue Jul 7 21:28:30 2009 From: g.brandl at gmx.net (Georg Brandl) Date: Tue, 07 Jul 2009 21:28:30 +0200 Subject: [Python-checkins] r73807 - python/branches/py3k/setup.py In-Reply-To: <20851.5821410858$1246627417@news.gmane.org> References: <20851.5821410858$1246627417@news.gmane.org> Message-ID: This should be reverted -- the support code is not for the bsddb module, but for building the dbm module with bsddb. Georg benjamin.peterson schrieb: > Author: benjamin.peterson > Date: Fri Jul 3 15:22:00 2009 > New Revision: 73807 > > Log: > rip out bsddb support code > > Modified: > python/branches/py3k/setup.py > > Modified: python/branches/py3k/setup.py > ============================================================================== > --- python/branches/py3k/setup.py (original) > +++ python/branches/py3k/setup.py Fri Jul 3 15:22:00 2009 > @@ -363,6 +363,7 @@ > inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) > > # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) > + # XXX db is not needed anymore, should this be removed? > if platform in ['osf1', 'unixware7', 'openunix8']: > lib_dirs += ['/usr/ccs/lib'] > > @@ -625,179 +626,6 @@ > exts.append( Extension('_md5', ['md5module.c']) ) > exts.append( Extension('_sha1', ['sha1module.c']) ) > > - # Modules that provide persistent dictionary-like semantics. You will > - # probably want to arrange for at least one of them to be available on > - # your machine, though none are defined by default because of library > - # dependencies. The Python module dbm/__init__.py provides an > - # implementation independent wrapper for these; dbm/dumb.py provides > - # similar functionality (but slower of course) implemented in Python. > - > - # Sleepycat^WOracle Berkeley DB interface. > - # http://www.oracle.com/database/berkeley-db/db/index.html > - # > - # This requires the Sleepycat^WOracle DB code. The supported versions > - # are set below. Visit the URL above to download > - # a release. Most open source OSes come with one or more > - # versions of BerkeleyDB already installed. > - > - max_db_ver = (4, 7) > - min_db_ver = (3, 3) > - db_setup_debug = False # verbose debug prints from this script? > - > - def allow_db_ver(db_ver): > - """Returns a boolean if the given BerkeleyDB version is acceptable. > - > - Args: > - db_ver: A tuple of the version to verify. > - """ > - if not (min_db_ver <= db_ver <= max_db_ver): > - return False > - return True > - > - def gen_db_minor_ver_nums(major): > - if major == 4: > - for x in range(max_db_ver[1]+1): > - if allow_db_ver((4, x)): > - yield x > - elif major == 3: > - for x in (3,): > - if allow_db_ver((3, x)): > - yield x > - else: > - raise ValueError("unknown major BerkeleyDB version", major) > - > - # construct a list of paths to look for the header file in on > - # top of the normal inc_dirs. > - db_inc_paths = [ > - '/usr/include/db4', > - '/usr/local/include/db4', > - '/opt/sfw/include/db4', > - '/usr/include/db3', > - '/usr/local/include/db3', > - '/opt/sfw/include/db3', > - # Fink defaults (http://fink.sourceforge.net/) > - '/sw/include/db4', > - '/sw/include/db3', > - ] > - # 4.x minor number specific paths > - for x in gen_db_minor_ver_nums(4): > - db_inc_paths.append('/usr/include/db4%d' % x) > - db_inc_paths.append('/usr/include/db4.%d' % x) > - db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) > - db_inc_paths.append('/usr/local/include/db4%d' % x) > - db_inc_paths.append('/pkg/db-4.%d/include' % x) > - db_inc_paths.append('/opt/db-4.%d/include' % x) > - # MacPorts default (http://www.macports.org/) > - db_inc_paths.append('/opt/local/include/db4%d' % x) > - # 3.x minor number specific paths > - for x in gen_db_minor_ver_nums(3): > - db_inc_paths.append('/usr/include/db3%d' % x) > - db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) > - db_inc_paths.append('/usr/local/include/db3%d' % x) > - db_inc_paths.append('/pkg/db-3.%d/include' % x) > - db_inc_paths.append('/opt/db-3.%d/include' % x) > - > - # Add some common subdirectories for Sleepycat DB to the list, > - # based on the standard include directories. This way DB3/4 gets > - # picked up when it is installed in a non-standard prefix and > - # the user has added that prefix into inc_dirs. > - std_variants = [] > - for dn in inc_dirs: > - std_variants.append(os.path.join(dn, 'db3')) > - std_variants.append(os.path.join(dn, 'db4')) > - for x in gen_db_minor_ver_nums(4): > - std_variants.append(os.path.join(dn, "db4%d"%x)) > - std_variants.append(os.path.join(dn, "db4.%d"%x)) > - for x in gen_db_minor_ver_nums(3): > - std_variants.append(os.path.join(dn, "db3%d"%x)) > - std_variants.append(os.path.join(dn, "db3.%d"%x)) > - > - db_inc_paths = std_variants + db_inc_paths > - db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)] > - > - db_ver_inc_map = {} > - > - class db_found(Exception): pass > - try: > - # See whether there is a Sleepycat header in the standard > - # search path. > - for d in inc_dirs + db_inc_paths: > - f = os.path.join(d, "db.h") > - if db_setup_debug: print("db: looking for db.h in", f) > - if os.path.exists(f): > - f = open(f).read() > - m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) > - if m: > - db_major = int(m.group(1)) > - m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) > - db_minor = int(m.group(1)) > - db_ver = (db_major, db_minor) > - > - # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug > - if db_ver == (4, 6): > - m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f) > - db_patch = int(m.group(1)) > - if db_patch < 21: > - print("db.h:", db_ver, "patch", db_patch, > - "being ignored (4.6.x must be >= 4.6.21)") > - continue > - > - if ( (db_ver not in db_ver_inc_map) and > - allow_db_ver(db_ver) ): > - # save the include directory with the db.h version > - # (first occurrence only) > - db_ver_inc_map[db_ver] = d > - if db_setup_debug: > - print("db.h: found", db_ver, "in", d) > - else: > - # we already found a header for this library version > - if db_setup_debug: print("db.h: ignoring", d) > - else: > - # ignore this header, it didn't contain a version number > - if db_setup_debug: > - print("db.h: no version number version in", d) > - > - db_found_vers = list(db_ver_inc_map.keys()) > - db_found_vers.sort() > - > - while db_found_vers: > - db_ver = db_found_vers.pop() > - db_incdir = db_ver_inc_map[db_ver] > - > - # check lib directories parallel to the location of the header > - db_dirs_to_check = [ > - db_incdir.replace("include", 'lib64'), > - db_incdir.replace("include", 'lib'), > - ] > - db_dirs_to_check = list(filter(os.path.isdir, db_dirs_to_check)) > - > - # Look for a version specific db-X.Y before an ambiguoius dbX > - # XXX should we -ever- look for a dbX name? Do any > - # systems really not name their library by version and > - # symlink to more general names? > - for dblib in (('db-%d.%d' % db_ver), > - ('db%d%d' % db_ver), > - ('db%d' % db_ver[0])): > - dblib_file = self.compiler.find_library_file( > - db_dirs_to_check + lib_dirs, dblib ) > - if dblib_file: > - dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] > - raise db_found > - else: > - if db_setup_debug: print("db lib: ", dblib, "not found") > - > - except db_found: > - if db_setup_debug: > - print("bsddb using BerkeleyDB lib:", db_ver, dblib) > - print("bsddb lib dir:", dblib_dir, " inc dir:", db_incdir) > - db_incs = [db_incdir] > - dblibs = [dblib] > - else: > - if db_setup_debug: print("db: no appropriate library found") > - db_incs = None > - dblibs = [] > - dblib_dir = None > - > # The sqlite interface > sqlite_setup_debug = False # verbose debug prints from this script? > > @@ -902,7 +730,7 @@ > if dbm_args: > dbm_order = dbm_args[-1].split(":") > else: > - dbm_order = "ndbm:gdbm:bdb".split(":") > + dbm_order = "ndbm:gdbm".split(":") > dbmext = None > for cand in dbm_order: > if cand == "ndbm": > @@ -943,18 +771,6 @@ > ], > libraries = gdbm_libs) > break > - elif cand == "bdb": > - if db_incs is not None: > - print("building dbm using bdb") > - dbmext = Extension('_dbm', ['_dbmmodule.c'], > - library_dirs=dblib_dir, > - runtime_library_dirs=dblib_dir, > - include_dirs=db_incs, > - define_macros=[ > - ('HAVE_BERKDB_H', None), > - ('DB_DBM_HSEARCH', None), > - ], > - libraries=dblibs) > break > if dbmext is not None: > exts.append(dbmext) From python-checkins at python.org Thu Jul 9 00:24:11 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 08 Jul 2009 22:24:11 -0000 Subject: [Python-checkins] r73894 - python/branches/py3k/Lib/test/test_zipfile.py Message-ID: Author: ezio.melotti Date: Thu Jul 9 00:24:06 2009 New Revision: 73894 Log: Merged revisions 73841 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73841 | ezio.melotti | 2009-07-04 17:58:27 +0300 (Sat, 04 Jul 2009) | 1 line if zlib -> skipUnless(zlib) and minor cleanups ........ Modified: python/branches/py3k/Lib/test/test_zipfile.py Modified: python/branches/py3k/Lib/test/test_zipfile.py ============================================================================== --- python/branches/py3k/Lib/test/test_zipfile.py (original) +++ python/branches/py3k/Lib/test/test_zipfile.py Thu Jul 9 00:24:06 2009 @@ -3,12 +3,20 @@ import zlib except ImportError: zlib = None -import zipfile, os, unittest, sys, shutil, struct, io + +import io +import os +import shutil +import struct +import zipfile +import unittest + from tempfile import TemporaryFile from random import randint, random +from unittest import skipUnless -import test.support as support +from test import support from test.support import TESTFN, run_unittest, findfile TESTFN2 = TESTFN + "2" @@ -210,43 +218,51 @@ for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipIterlinesTest(f, zipfile.ZIP_STORED) - if zlib: - def testDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.zipTest(f, zipfile.ZIP_DEFLATED) - def testOpenDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipOpenTest(f, zipfile.ZIP_DEFLATED) - def testRandomOpenDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipRandomOpenTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testOpenDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.zipOpenTest(f, zipfile.ZIP_DEFLATED) - def testReadlineDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipReadlineTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testRandomOpenDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.zipRandomOpenTest(f, zipfile.ZIP_DEFLATED) - def testReadlinesDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipReadlinesTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testReadlineDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.zipReadlineTest(f, zipfile.ZIP_DEFLATED) - def testIterlinesDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipIterlinesTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def testReadlinesDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.zipReadlinesTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def testIterlinesDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.zipIterlinesTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def testLowCompression(self): + # Checks for cases where compressed data is larger than original + # Create the ZIP archive + zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) + zipfp.writestr("strfile", '12') + zipfp.close() + + # Get an open object for strfile + zipfp = zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_DEFLATED) + openobj = zipfp.open("strfile") + self.assertEqual(openobj.read(1), b'1') + self.assertEqual(openobj.read(1), b'2') - def testLowCompression(self): - # Checks for cases where compressed data is larger than original - # Create the ZIP archive - zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) - zipfp.writestr("strfile", '12') - zipfp.close() - - # Get an open object for strfile - zipfp = zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_DEFLATED) - openobj = zipfp.open("strfile") - self.assertEqual(openobj.read(1), b'1') - self.assertEqual(openobj.read(1), b'2') def testAbsoluteArcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) @@ -388,8 +404,8 @@ orig_zip.close() def tearDown(self): - os.remove(TESTFN) - os.remove(TESTFN2) + support.unlink(TESTFN) + support.unlink(TESTFN2) class TestZip64InSmallFiles(unittest.TestCase): # These tests test the ZIP64 functionality without using large files, @@ -506,8 +522,8 @@ def tearDown(self): zipfile.ZIP64_LIMIT = self._limit - os.remove(TESTFN) - os.remove(TESTFN2) + support.unlink(TESTFN) + support.unlink(TESTFN2) class PyZipFileTests(unittest.TestCase): def testWritePyfile(self): @@ -1007,7 +1023,7 @@ zipf.close() def tearDown(self): - os.remove(TESTFN2) + support.unlink(TESTFN2) class TestWithDirectory(unittest.TestCase): def setUp(self): @@ -1034,7 +1050,7 @@ def tearDown(self): shutil.rmtree(TESTFN2) if os.path.exists(TESTFN): - os.remove(TESTFN) + support.unlink(TESTFN) class UniversalNewlineTests(unittest.TestCase): From buildbot at python.org Thu Jul 9 00:33:52 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 08 Jul 2009 22:33:52 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1147 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: ezio.melotti BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Abort trap sincerely, -The Buildbot From python-checkins at python.org Thu Jul 9 00:40:52 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 08 Jul 2009 22:40:52 -0000 Subject: [Python-checkins] r73895 - in python/trunk/Lib/distutils: command/build_ext.py tests/test_build_ext.py Message-ID: Author: tarek.ziade Date: Thu Jul 9 00:40:51 2009 New Revision: 73895 Log: Sets the compiler attribute to keep the old behavior for third-party packages. Modified: python/trunk/Lib/distutils/command/build_ext.py python/trunk/Lib/distutils/tests/test_build_ext.py Modified: python/trunk/Lib/distutils/command/build_ext.py ============================================================================== --- python/trunk/Lib/distutils/command/build_ext.py (original) +++ python/trunk/Lib/distutils/command/build_ext.py Thu Jul 9 00:40:51 2009 @@ -134,13 +134,17 @@ def _set_compiler(self, compiler): if not isinstance(compiler, str) and compiler is not None: # we don't want to allow that anymore in the future - warn("'compiler' specify the compiler type in build_ext. " + warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " "use 'compiler_obj'", PendingDeprecationWarning) - self._compiler = compiler def _get_compiler(self): + if not isinstance(self._compiler, str) and self._compiler is not None: + # we don't want to allow that anymore in the future + warn("'compiler' specifies the compiler type in build_ext. " + "If you want to get the compiler object itself, " + "use 'compiler_obj'", PendingDeprecationWarning) return self._compiler compiler = property(_get_compiler, _set_compiler) @@ -343,10 +347,22 @@ # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler_obj = new_compiler(compiler=self.compiler, + + # used to prevent the usage of an existing compiler for the + # compiler option when calling new_compiler() + # this will be removed in 3.3 and 2.8 + if not isinstance(self._compiler, str): + self._compiler = None + + self.compiler_obj = new_compiler(compiler=self._compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) + + # used to keep the compiler object reachable with + # "self.compiler". this will be removed in 3.3 and 2.8 + self._compiler = self.compiler_obj + customize_compiler(self.compiler_obj) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on Modified: python/trunk/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) +++ python/trunk/Lib/distutils/tests/test_build_ext.py Thu Jul 9 00:40:51 2009 @@ -402,12 +402,21 @@ dist = Distribution() cmd = build_ext(dist) + class MyCompiler(object): + def do_something(self): + pass + with check_warnings() as w: warnings.simplefilter("always") - cmd.compiler = object() + cmd.compiler = MyCompiler() self.assertEquals(len(w.warnings), 1) cmd.compile = 'unix' self.assertEquals(len(w.warnings), 1) + cmd.compiler = MyCompiler() + cmd.compiler.do_something() + # two more warnings genereated by the get + # and the set + self.assertEquals(len(w.warnings), 3) def test_suite(): src = _get_source_filename() From python-checkins at python.org Thu Jul 9 00:42:44 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 08 Jul 2009 22:42:44 -0000 Subject: [Python-checkins] r73896 - in python/branches/py3k: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Message-ID: Author: tarek.ziade Date: Thu Jul 9 00:42:43 2009 New Revision: 73896 Log: Merged revisions 73895 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73895 | tarek.ziade | 2009-07-09 00:40:51 +0200 (Thu, 09 Jul 2009) | 1 line Sets the compiler attribute to keep the old behavior for third-party packages. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/command/build_ext.py python/branches/py3k/Lib/distutils/tests/test_build_ext.py Modified: python/branches/py3k/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/command/build_ext.py (original) +++ python/branches/py3k/Lib/distutils/command/build_ext.py Thu Jul 9 00:42:43 2009 @@ -132,13 +132,17 @@ def _set_compiler(self, compiler): if not isinstance(compiler, str) and compiler is not None: # we don't want to allow that anymore in the future - warn("'compiler' specify the compiler type in build_ext. " + warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " "use 'compiler_obj'", PendingDeprecationWarning) - self._compiler = compiler def _get_compiler(self): + if not isinstance(self._compiler, str) and self._compiler is not None: + # we don't want to allow that anymore in the future + warn("'compiler' specifies the compiler type in build_ext. " + "If you want to get the compiler object itself, " + "use 'compiler_obj'", PendingDeprecationWarning) return self._compiler compiler = property(_get_compiler, _set_compiler) @@ -341,10 +345,22 @@ # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler_obj = new_compiler(compiler=self.compiler, + + # used to prevent the usage of an existing compiler for the + # compiler option when calling new_compiler() + # this will be removed in 3.3 and 2.8 + if not isinstance(self._compiler, str): + self._compiler = None + + self.compiler_obj = new_compiler(compiler=self._compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) + + # used to keep the compiler object reachable with + # "self.compiler". this will be removed in 3.3 and 2.8 + self._compiler = self.compiler_obj + customize_compiler(self.compiler_obj) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on Modified: python/branches/py3k/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_ext.py Thu Jul 9 00:42:43 2009 @@ -402,12 +402,21 @@ dist = Distribution() cmd = build_ext(dist) + class MyCompiler(object): + def do_something(self): + pass + with check_warnings() as w: warnings.simplefilter("always") - cmd.compiler = object() + cmd.compiler = MyCompiler() self.assertEquals(len(w.warnings), 1) cmd.compile = 'unix' self.assertEquals(len(w.warnings), 1) + cmd.compiler = MyCompiler() + cmd.compiler.do_something() + # two more warnings genereated by the get + # and the set + self.assertEquals(len(w.warnings), 3) def test_suite(): src = _get_source_filename() From python-checkins at python.org Thu Jul 9 00:43:58 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 08 Jul 2009 22:43:58 -0000 Subject: [Python-checkins] r73897 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Thu Jul 9 00:43:57 2009 New Revision: 73897 Log: Blocked revisions 73896 via svnmerge ................ r73896 | tarek.ziade | 2009-07-09 00:42:43 +0200 (Thu, 09 Jul 2009) | 9 lines Merged revisions 73895 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73895 | tarek.ziade | 2009-07-09 00:40:51 +0200 (Thu, 09 Jul 2009) | 1 line Sets the compiler attribute to keep the old behavior for third-party packages. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Thu Jul 9 00:44:59 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 08 Jul 2009 22:44:59 -0000 Subject: [Python-checkins] r73898 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Thu Jul 9 00:44:59 2009 New Revision: 73898 Log: Blocked revisions 73895 via svnmerge ........ r73895 | tarek.ziade | 2009-07-09 00:40:51 +0200 (Thu, 09 Jul 2009) | 1 line Sets the compiler attribute to keep the old behavior for third-party packages. ........ Modified: python/branches/release26-maint/ (props changed) From buildbot at python.org Thu Jul 9 00:53:10 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 08 Jul 2009 22:53:10 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/933 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: ezio.melotti BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_mailbox test_xmlrpc make: *** [buildbottest] Error 1 sincerely, -The Buildbot From rdmurray at bitdance.com Thu Jul 9 01:36:32 2009 From: rdmurray at bitdance.com (R. David Murray) Date: Wed, 8 Jul 2009 19:36:32 -0400 (EDT) Subject: [Python-checkins] r73895 - in python/trunk/Lib/distutils: command/build_ext.py tests/test_build_ext.py In-Reply-To: <20090708224058.DCD291BAAF2@kimball.webabinitio.net> References: <20090708224058.DCD291BAAF2@kimball.webabinitio.net> Message-ID: Tarek, if you want to remove something in 2.8 (if there is one) and 3.3, then unless I'm misunderstanding something I think you want a DeprecationWarning, not a PendingDeprecationWarning. On Wed, 8 Jul 2009 at 18:40, tarek.ziade wrote: > Author: tarek.ziade > Date: Thu Jul 9 00:40:51 2009 > New Revision: 73895 > > Log: > Sets the compiler attribute to keep the old behavior for third-party packages. > > Modified: > python/trunk/Lib/distutils/command/build_ext.py > python/trunk/Lib/distutils/tests/test_build_ext.py > > Modified: python/trunk/Lib/distutils/command/build_ext.py > ============================================================================== > --- python/trunk/Lib/distutils/command/build_ext.py (original) > +++ python/trunk/Lib/distutils/command/build_ext.py Thu Jul 9 00:40:51 2009 > @@ -134,13 +134,17 @@ > def _set_compiler(self, compiler): > if not isinstance(compiler, str) and compiler is not None: > # we don't want to allow that anymore in the future > - warn("'compiler' specify the compiler type in build_ext. " > + warn("'compiler' specifies the compiler type in build_ext. " > "If you want to get the compiler object itself, " > "use 'compiler_obj'", PendingDeprecationWarning) > - > self._compiler = compiler > > def _get_compiler(self): > + if not isinstance(self._compiler, str) and self._compiler is not None: > + # we don't want to allow that anymore in the future > + warn("'compiler' specifies the compiler type in build_ext. " > + "If you want to get the compiler object itself, " > + "use 'compiler_obj'", PendingDeprecationWarning) > return self._compiler > > compiler = property(_get_compiler, _set_compiler) > @@ -343,10 +347,22 @@ > > # Setup the CCompiler object that we'll use to do all the > # compiling and linking > - self.compiler_obj = new_compiler(compiler=self.compiler, > + > + # used to prevent the usage of an existing compiler for the > + # compiler option when calling new_compiler() > + # this will be removed in 3.3 and 2.8 > + if not isinstance(self._compiler, str): > + self._compiler = None > + > + self.compiler_obj = new_compiler(compiler=self._compiler, > verbose=self.verbose, > dry_run=self.dry_run, > force=self.force) > + > + # used to keep the compiler object reachable with > + # "self.compiler". this will be removed in 3.3 and 2.8 > + self._compiler = self.compiler_obj > + > customize_compiler(self.compiler_obj) > # If we are cross-compiling, init the compiler now (if we are not > # cross-compiling, init would not hurt, but people may rely on > > Modified: python/trunk/Lib/distutils/tests/test_build_ext.py > ============================================================================== > --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) > +++ python/trunk/Lib/distutils/tests/test_build_ext.py Thu Jul 9 00:40:51 2009 > @@ -402,12 +402,21 @@ > dist = Distribution() > cmd = build_ext(dist) > > + class MyCompiler(object): > + def do_something(self): > + pass > + > with check_warnings() as w: > warnings.simplefilter("always") > - cmd.compiler = object() > + cmd.compiler = MyCompiler() > self.assertEquals(len(w.warnings), 1) > cmd.compile = 'unix' > self.assertEquals(len(w.warnings), 1) > + cmd.compiler = MyCompiler() > + cmd.compiler.do_something() > + # two more warnings genereated by the get > + # and the set > + self.assertEquals(len(w.warnings), 3) > > def test_suite(): > src = _get_source_filename() > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins > From buildbot at python.org Thu Jul 9 02:57:28 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 09 Jul 2009 00:57:28 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.1 Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.1/builds/7 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' 1 test failed: test_import ====================================================================== ERROR: testImport (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 60, in test_with_extension mod = __import__(TESTFN) ImportError: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' sincerely, -The Buildbot From buildbot at python.org Thu Jul 9 03:14:31 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 09 Jul 2009 01:14:31 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.1 Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.1/builds/9 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_posix ====================================================================== ERROR: test_getcwd_long_pathnames (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/test_posix.py", line 251, in test_getcwd_long_pathnames support.rmtree(base_path) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/support.py", line 181, in rmtree shutil.rmtree(path) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/shutil.py", line 239, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/shutil.py", line 237, in rmtree os.rmdir(path) OSError: [Errno 22] Invalid argument: '/home2/buildbot/slave/3.1.loewis-sun/build/@test.getcwd/@test.getcwd' sincerely, -The Buildbot From python-checkins at python.org Thu Jul 9 03:43:42 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 01:43:42 -0000 Subject: [Python-checkins] r73899 - python/trunk/Lib/test/test_import.py Message-ID: Author: r.david.murray Date: Thu Jul 9 03:43:41 2009 New Revision: 73899 Log: Conditionalize test cleanup code to eliminate traceback, which will hopefully reveal the real problem. Modified: python/trunk/Lib/test/test_import.py Modified: python/trunk/Lib/test/test_import.py ============================================================================== --- python/trunk/Lib/test/test_import.py (original) +++ python/trunk/Lib/test/test_import.py Thu Jul 9 03:43:41 2009 @@ -107,7 +107,7 @@ stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) finally: remove_files(TESTFN) - del sys.modules[TESTFN] + if TESTFN in sys.modules: del sys.modules[TESTFN] def testImpModule(self): # Verify that the imp module can correctly load and find .py files From python-checkins at python.org Thu Jul 9 04:06:17 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 02:06:17 -0000 Subject: [Python-checkins] r73900 - python/trunk/Lib/test/test_import.py Message-ID: Author: r.david.murray Date: Thu Jul 9 04:06:17 2009 New Revision: 73900 Log: Make test work with -O. Modified: python/trunk/Lib/test/test_import.py Modified: python/trunk/Lib/test/test_import.py ============================================================================== --- python/trunk/Lib/test/test_import.py (original) +++ python/trunk/Lib/test/test_import.py Thu Jul 9 04:06:17 2009 @@ -7,7 +7,8 @@ import py_compile import warnings import marshal -from test.test_support import unlink, TESTFN, unload, run_unittest, check_warnings +from test.test_support import (unlink, TESTFN, unload, run_unittest, + check_warnings, TestFailed) def remove_files(name): @@ -102,7 +103,12 @@ os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) __import__(TESTFN) - s = os.stat(fname + 'c') + fn = fname + 'c' + if not os.path.exists(fn): + fn = fname + 'o' + if not os.path.exists(fn): raise TestFailed("__import__ did " + "not result in creation of either a .pyc or .pyo file") + s = os.stat(fn) self.assertEquals(stat.S_IMODE(s.st_mode), stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) finally: From buildbot at python.org Thu Jul 9 05:34:14 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 09 Jul 2009 03:34:14 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 2.6 Message-ID: The Buildbot has detected a new failure of x86 XP-4 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%202.6/builds/346 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_bsddb3 test_distutils ====================================================================== ERROR: test01_badpointer (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 21, in test01_badpointer dbs = dbshelve.open(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\dbshelve.py", line 106, in open d.open(filename, dbname, filetype, flags, mode) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\dbshelve.py", line 171, in open self.db.open(*args, **kwargs) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test03_repr_closed_db (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 37, in test03_repr_closed_db db = hashopen(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\__init__.py", line 361, in hashopen d.open(file, db.DB_HASH, flags, mode) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test04_repr_db (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 43, in test04_repr_db db = hashopen(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\__init__.py", line 361, in hashopen d.open(file, db.DB_HASH, flags, mode) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test05_double_free_make_key_dbt (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 65, in test05_double_free_make_key_dbt db.DB_CREATE | db.DB_THREAD) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test06_key_with_null_bytes (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 77, in test06_key_with_null_bytes db1.open(self.filename, None, db.DB_HASH, db.DB_CREATE) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test07_DB_set_flags_persists (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 101, in test07_DB_set_flags_persists db1.open(self.filename, db.DB_HASH, db.DB_CREATE) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() References: <20090708224058.DCD291BAAF2@kimball.webabinitio.net> Message-ID: <94bdd2610907090041k679b357cgdda39c54df52ecc5@mail.gmail.com> On Thu, Jul 9, 2009 at 1:36 AM, R. David Murray wrote: > Tarek, if you want to remove something in 2.8 (if there is one) and > 3.3, then unless I'm misunderstanding something I think you want a > DeprecationWarning, not a PendingDeprecationWarning.` Right, thanks, fixing it From python-checkins at python.org Thu Jul 9 09:42:43 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 09 Jul 2009 07:42:43 -0000 Subject: [Python-checkins] r73901 - python/trunk/Lib/distutils/command/build_ext.py Message-ID: Author: tarek.ziade Date: Thu Jul 9 09:42:42 2009 New Revision: 73901 Log: PendingDeprecationWarning -> DeprecationWarning in build_ext Modified: python/trunk/Lib/distutils/command/build_ext.py Modified: python/trunk/Lib/distutils/command/build_ext.py ============================================================================== --- python/trunk/Lib/distutils/command/build_ext.py (original) +++ python/trunk/Lib/distutils/command/build_ext.py Thu Jul 9 09:42:42 2009 @@ -136,7 +136,7 @@ # we don't want to allow that anymore in the future warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " - "use 'compiler_obj'", PendingDeprecationWarning) + "use 'compiler_obj'", DeprecationWarning) self._compiler = compiler def _get_compiler(self): @@ -144,7 +144,7 @@ # we don't want to allow that anymore in the future warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " - "use 'compiler_obj'", PendingDeprecationWarning) + "use 'compiler_obj'", DeprecationWarning) return self._compiler compiler = property(_get_compiler, _set_compiler) From python-checkins at python.org Thu Jul 9 09:44:25 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 09 Jul 2009 07:44:25 -0000 Subject: [Python-checkins] r73902 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Thu Jul 9 09:44:25 2009 New Revision: 73902 Log: Blocked revisions 73901 via svnmerge ........ r73901 | tarek.ziade | 2009-07-09 09:42:42 +0200 (Thu, 09 Jul 2009) | 1 line PendingDeprecationWarning -> DeprecationWarning in build_ext ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Thu Jul 9 09:46:10 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 09 Jul 2009 07:46:10 -0000 Subject: [Python-checkins] r73903 - in python/branches/py3k: Lib/distutils/command/build_ext.py Message-ID: Author: tarek.ziade Date: Thu Jul 9 09:46:10 2009 New Revision: 73903 Log: Merged revisions 73901 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73901 | tarek.ziade | 2009-07-09 09:42:42 +0200 (Thu, 09 Jul 2009) | 1 line PendingDeprecationWarning -> DeprecationWarning in build_ext ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/command/build_ext.py Modified: python/branches/py3k/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/command/build_ext.py (original) +++ python/branches/py3k/Lib/distutils/command/build_ext.py Thu Jul 9 09:46:10 2009 @@ -134,7 +134,7 @@ # we don't want to allow that anymore in the future warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " - "use 'compiler_obj'", PendingDeprecationWarning) + "use 'compiler_obj'", DeprecationWarning) self._compiler = compiler def _get_compiler(self): @@ -142,7 +142,7 @@ # we don't want to allow that anymore in the future warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " - "use 'compiler_obj'", PendingDeprecationWarning) + "use 'compiler_obj'", DeprecationWarning) return self._compiler compiler = property(_get_compiler, _set_compiler) From python-checkins at python.org Thu Jul 9 09:47:11 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 09 Jul 2009 07:47:11 -0000 Subject: [Python-checkins] r73904 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Thu Jul 9 09:47:11 2009 New Revision: 73904 Log: Blocked revisions 73903 via svnmerge ................ r73903 | tarek.ziade | 2009-07-09 09:46:10 +0200 (Thu, 09 Jul 2009) | 9 lines Merged revisions 73901 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73901 | tarek.ziade | 2009-07-09 09:42:42 +0200 (Thu, 09 Jul 2009) | 1 line PendingDeprecationWarning -> DeprecationWarning in build_ext ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Thu Jul 9 15:55:44 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 13:55:44 -0000 Subject: [Python-checkins] r73905 - python/trunk/Lib/test/test_import.py Message-ID: Author: r.david.murray Date: Thu Jul 9 15:55:44 2009 New Revision: 73905 Log: Specify umask in execute bit test to get consistent results and make sure we test resetting all three execute bits. Modified: python/trunk/Lib/test/test_import.py Modified: python/trunk/Lib/test/test_import.py ============================================================================== --- python/trunk/Lib/test/test_import.py (original) +++ python/trunk/Lib/test/test_import.py Thu Jul 9 15:55:44 2009 @@ -97,6 +97,7 @@ def test_execute_bit_not_copied(self): # Issue 6070: under posix .pyc files got their execute bit set if # the .py file had the execute bit set, but they aren't executable. + oldmask = os.umask(022) try: fname = TESTFN + os.extsep + "py" f = open(fname, 'w').close() @@ -112,6 +113,7 @@ self.assertEquals(stat.S_IMODE(s.st_mode), stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) finally: + os.umask(oldmask) remove_files(TESTFN) if TESTFN in sys.modules: del sys.modules[TESTFN] From python-checkins at python.org Thu Jul 9 17:35:33 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 15:35:33 -0000 Subject: [Python-checkins] r73906 - python/trunk/Lib/test/test_import.py Message-ID: Author: r.david.murray Date: Thu Jul 9 17:35:33 2009 New Revision: 73906 Log: Curdir needs to be in the path for the test to work on all buildbots. (I copied this from another import test, but currently this will fail if TESTFN ends up in /tmp...see issue 2609). Modified: python/trunk/Lib/test/test_import.py Modified: python/trunk/Lib/test/test_import.py ============================================================================== --- python/trunk/Lib/test/test_import.py (original) +++ python/trunk/Lib/test/test_import.py Thu Jul 9 17:35:33 2009 @@ -98,6 +98,7 @@ # Issue 6070: under posix .pyc files got their execute bit set if # the .py file had the execute bit set, but they aren't executable. oldmask = os.umask(022) + sys.path.insert(0, os.curdir) try: fname = TESTFN + os.extsep + "py" f = open(fname, 'w').close() @@ -116,6 +117,7 @@ os.umask(oldmask) remove_files(TESTFN) if TESTFN in sys.modules: del sys.modules[TESTFN] + del sys.path[0] def testImpModule(self): # Verify that the imp module can correctly load and find .py files From python-checkins at python.org Thu Jul 9 18:17:30 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 16:17:30 -0000 Subject: [Python-checkins] r73907 - python/trunk/Lib/test/test_posix.py Message-ID: Author: r.david.murray Date: Thu Jul 9 18:17:30 2009 New Revision: 73907 Log: Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see if the test gives useful failure info on Solaris buildbot. Modified: python/trunk/Lib/test/test_posix.py Modified: python/trunk/Lib/test/test_posix.py ============================================================================== --- python/trunk/Lib/test/test_posix.py (original) +++ python/trunk/Lib/test/test_posix.py Thu Jul 9 18:17:30 2009 @@ -267,7 +267,8 @@ _create_and_do_getcwd(dirname) finally: - shutil.rmtree(base_path) + # XXX: Temporarily ignore errors to see if the test gives useful failure info on Solaris buildbot + shutil.rmtree(base_path, ignore_errors=True) os.chdir(curdir) From python-checkins at python.org Thu Jul 9 20:41:03 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 18:41:03 -0000 Subject: [Python-checkins] r73908 - python/trunk/Lib/test/test_posix.py Message-ID: Author: r.david.murray Date: Thu Jul 9 20:41:03 2009 New Revision: 73908 Log: Try to fix Solaris buildbot rmtree failure in test_getcwd_long_pathnames cleanup. If this fix works, it means that Solaris is unique among our platforms in what happens when shutil.rmtree is called on the current working directory (ie: it doesn't work on Solaris, but it does everywhere else). Modified: python/trunk/Lib/test/test_posix.py Modified: python/trunk/Lib/test/test_posix.py ============================================================================== --- python/trunk/Lib/test/test_posix.py (original) +++ python/trunk/Lib/test/test_posix.py Thu Jul 9 20:41:03 2009 @@ -267,9 +267,8 @@ _create_and_do_getcwd(dirname) finally: - # XXX: Temporarily ignore errors to see if the test gives useful failure info on Solaris buildbot - shutil.rmtree(base_path, ignore_errors=True) os.chdir(curdir) + shutil.rmtree(base_path) def test_main(): From buildbot at python.org Thu Jul 9 21:16:27 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 09 Jul 2009 19:16:27 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/279 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: r.david.murray BUILD FAILED: failed 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 524, in __bootstrap_inner self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 477, 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 306, 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 68, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') 1 test failed: test_xmlrpc ====================================================================== FAIL: test_two (test.test_xmlrpc.KeepaliveServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/test/test_xmlrpc.py", line 548, in test_two self.assertTrue(len(self.RequestHandler.myRequests[-1]) >= 2) AssertionError: False is not True make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Thu Jul 9 21:47:27 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 19:47:27 -0000 Subject: [Python-checkins] r73909 - python/branches/py3k Message-ID: Author: r.david.murray Date: Thu Jul 9 21:47:26 2009 New Revision: 73909 Log: Blocked revisions 73907 via svnmerge ........ r73907 | r.david.murray | 2009-07-09 12:17:30 -0400 (Thu, 09 Jul 2009) | 4 lines Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see if the test gives useful failure info on Solaris buildbot. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Thu Jul 9 21:49:10 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 19:49:10 -0000 Subject: [Python-checkins] r73910 - python/branches/release26-maint Message-ID: Author: r.david.murray Date: Thu Jul 9 21:49:10 2009 New Revision: 73910 Log: Blocked revisions 73907 via svnmerge ........ r73907 | r.david.murray | 2009-07-09 12:17:30 -0400 (Thu, 09 Jul 2009) | 4 lines Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see if the test gives useful failure info on Solaris buildbot. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Thu Jul 9 21:51:32 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 19:51:32 -0000 Subject: [Python-checkins] r73911 - python/branches/py3k Message-ID: Author: r.david.murray Date: Thu Jul 9 21:51:32 2009 New Revision: 73911 Log: Unblocked revisions 73907 via svnmerge ........ r73907 | r.david.murray | 2009-07-09 12:17:30 -0400 (Thu, 09 Jul 2009) | 4 lines Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see if the test gives useful failure info on Solaris buildbot. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Thu Jul 9 22:04:50 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 20:04:50 -0000 Subject: [Python-checkins] r73912 - python/branches/release26-maint Message-ID: Author: r.david.murray Date: Thu Jul 9 22:04:49 2009 New Revision: 73912 Log: Unblocked revisions 73907 via svnmerge ........ r73907 | r.david.murray | 2009-07-09 12:17:30 -0400 (Thu, 09 Jul 2009) | 4 lines Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see if the test gives useful failure info on Solaris buildbot. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Thu Jul 9 22:12:32 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 20:12:32 -0000 Subject: [Python-checkins] r73913 - in python/branches/py3k: Lib/test/test_posix.py Message-ID: Author: r.david.murray Date: Thu Jul 9 22:12:31 2009 New Revision: 73913 Log: Merged revisions 73907-73908 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73907 | r.david.murray | 2009-07-09 12:17:30 -0400 (Thu, 09 Jul 2009) | 4 lines Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see if the test gives useful failure info on Solaris buildbot. ........ r73908 | r.david.murray | 2009-07-09 14:41:03 -0400 (Thu, 09 Jul 2009) | 6 lines Try to fix Solaris buildbot rmtree failure in test_getcwd_long_pathnames cleanup. If this fix works, it means that Solaris is unique among our platforms in what happens when shutil.rmtree is called on the current working directory (ie: it doesn't work on Solaris, but it does everywhere else). ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_posix.py Modified: python/branches/py3k/Lib/test/test_posix.py ============================================================================== --- python/branches/py3k/Lib/test/test_posix.py (original) +++ python/branches/py3k/Lib/test/test_posix.py Thu Jul 9 22:12:31 2009 @@ -248,8 +248,8 @@ _create_and_do_getcwd(dirname) finally: - support.rmtree(base_path) os.chdir(curdir) + support.rmtree(base_path) def test_main(): From python-checkins at python.org Thu Jul 9 22:13:41 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 20:13:41 -0000 Subject: [Python-checkins] r73914 - in python/branches/release26-maint: Lib/test/test_posix.py Message-ID: Author: r.david.murray Date: Thu Jul 9 22:13:41 2009 New Revision: 73914 Log: Merged revisions 73907-73908 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73907 | r.david.murray | 2009-07-09 12:17:30 -0400 (Thu, 09 Jul 2009) | 4 lines Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see if the test gives useful failure info on Solaris buildbot. ........ r73908 | r.david.murray | 2009-07-09 14:41:03 -0400 (Thu, 09 Jul 2009) | 6 lines Try to fix Solaris buildbot rmtree failure in test_getcwd_long_pathnames cleanup. If this fix works, it means that Solaris is unique among our platforms in what happens when shutil.rmtree is called on the current working directory (ie: it doesn't work on Solaris, but it does everywhere else). ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_posix.py Modified: python/branches/release26-maint/Lib/test/test_posix.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_posix.py (original) +++ python/branches/release26-maint/Lib/test/test_posix.py Thu Jul 9 22:13:41 2009 @@ -267,8 +267,8 @@ _create_and_do_getcwd(dirname) finally: - shutil.rmtree(base_path) os.chdir(curdir) + shutil.rmtree(base_path) def test_main(): From python-checkins at python.org Thu Jul 9 22:31:08 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 09 Jul 2009 20:31:08 -0000 Subject: [Python-checkins] r73915 - in python/branches/release31-maint: Lib/test/test_posix.py Message-ID: Author: r.david.murray Date: Thu Jul 9 22:31:08 2009 New Revision: 73915 Log: Merged revisions 73913 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73913 | r.david.murray | 2009-07-09 16:12:31 -0400 (Thu, 09 Jul 2009) | 18 lines Merged revisions 73907-73908 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73907 | r.david.murray | 2009-07-09 12:17:30 -0400 (Thu, 09 Jul 2009) | 4 lines Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see if the test gives useful failure info on Solaris buildbot. ........ r73908 | r.david.murray | 2009-07-09 14:41:03 -0400 (Thu, 09 Jul 2009) | 6 lines Try to fix Solaris buildbot rmtree failure in test_getcwd_long_pathnames cleanup. If this fix works, it means that Solaris is unique among our platforms in what happens when shutil.rmtree is called on the current working directory (ie: it doesn't work on Solaris, but it does everywhere else). ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_posix.py Modified: python/branches/release31-maint/Lib/test/test_posix.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_posix.py (original) +++ python/branches/release31-maint/Lib/test/test_posix.py Thu Jul 9 22:31:08 2009 @@ -248,8 +248,8 @@ _create_and_do_getcwd(dirname) finally: - support.rmtree(base_path) os.chdir(curdir) + support.rmtree(base_path) def test_main(): From buildbot at python.org Thu Jul 9 23:50:21 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 09 Jul 2009 21:50:21 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/937 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: r.david.murray BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_mailbox make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 10 00:00:08 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 09 Jul 2009 22:00:08 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1151 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: r.david.murray BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Abort trap sincerely, -The Buildbot From python-checkins at python.org Fri Jul 10 00:37:27 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 09 Jul 2009 22:37:27 -0000 Subject: [Python-checkins] r73916 - in python/trunk: Doc/library/select.rst Lib/subprocess.py Lib/test/test_subprocess.py Modules/selectmodule.c Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 10 00:37:22 2009 New Revision: 73916 Log: #6416: Fix compilation of the select module on Windows, as well as test_subprocess: PIPE_BUF is not defined on Windows, and probably has no meaning there. Anyway the subprocess module uses another way to perform non-blocking reads (with a thread) Modified: python/trunk/Doc/library/select.rst python/trunk/Lib/subprocess.py python/trunk/Lib/test/test_subprocess.py python/trunk/Modules/selectmodule.c Modified: python/trunk/Doc/library/select.rst ============================================================================== --- python/trunk/Doc/library/select.rst (original) +++ python/trunk/Doc/library/select.rst Fri Jul 10 00:37:22 2009 @@ -105,7 +105,7 @@ Files reported as ready for writing by :func:`select`, :func:`poll` or similar interfaces in this module are guaranteed to not block on a write of up to :const:`PIPE_BUF` bytes. - This value is guaranteed by POSIX to be at least 512. + This value is guaranteed by POSIX to be at least 512. Availability: Unix. .. versionadded:: 2.7 Modified: python/trunk/Lib/subprocess.py ============================================================================== --- python/trunk/Lib/subprocess.py (original) +++ python/trunk/Lib/subprocess.py Fri Jul 10 00:37:22 2009 @@ -418,6 +418,12 @@ import fcntl import pickle + # When select or poll has indicated that the file is writable, + # we can write up to _PIPE_BUF bytes without risk of blocking. + # POSIX defines PIPE_BUF as >= 512. + _PIPE_BUF = getattr(select, 'PIPE_BUF', 512) + + __all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", "check_output", "CalledProcessError"] @@ -426,11 +432,6 @@ except: MAXFD = 256 -# When select or poll has indicated that the file is writable, -# we can write up to _PIPE_BUF bytes without risk of blocking. -# POSIX defines PIPE_BUF as >= 512. -_PIPE_BUF = getattr(select, 'PIPE_BUF', 512) - _active = [] def _cleanup(): Modified: python/trunk/Lib/test/test_subprocess.py ============================================================================== --- python/trunk/Lib/test/test_subprocess.py (original) +++ python/trunk/Lib/test/test_subprocess.py Fri Jul 10 00:37:22 2009 @@ -769,7 +769,7 @@ unit_tests = [ProcessTestCase] -if subprocess._has_poll: +if getattr(subprocess, '_has_poll', False): class ProcessTestCaseNoPoll(ProcessTestCase): def setUp(self): subprocess._has_poll = False Modified: python/trunk/Modules/selectmodule.c ============================================================================== --- python/trunk/Modules/selectmodule.c (original) +++ python/trunk/Modules/selectmodule.c Fri Jul 10 00:37:22 2009 @@ -1746,7 +1746,9 @@ Py_INCREF(SelectError); PyModule_AddObject(m, "error", SelectError); +#ifdef PIPE_BUF PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF); +#endif #if defined(HAVE_POLL) #ifdef __APPLE__ From python-checkins at python.org Fri Jul 10 00:44:12 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 09 Jul 2009 22:44:12 -0000 Subject: [Python-checkins] r73917 - in python/branches/py3k: Doc/library/select.rst Lib/subprocess.py Lib/test/test_subprocess.py Modules/selectmodule.c Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 10 00:44:11 2009 New Revision: 73917 Log: Merged revisions 73916 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73916 | amaury.forgeotdarc | 2009-07-10 00:37:22 +0200 (ven., 10 juil. 2009) | 5 lines #6416: Fix compilation of the select module on Windows, as well as test_subprocess: PIPE_BUF is not defined on Windows, and probably has no meaning there. Anyway the subprocess module uses another way to perform non-blocking reads (with a thread) ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/select.rst python/branches/py3k/Lib/subprocess.py python/branches/py3k/Lib/test/test_subprocess.py python/branches/py3k/Modules/selectmodule.c Modified: python/branches/py3k/Doc/library/select.rst ============================================================================== --- python/branches/py3k/Doc/library/select.rst (original) +++ python/branches/py3k/Doc/library/select.rst Fri Jul 10 00:44:11 2009 @@ -99,7 +99,7 @@ Files reported as ready for writing by :func:`select`, :func:`poll` or similar interfaces in this module are guaranteed to not block on a write of up to :const:`PIPE_BUF` bytes. - This value is guaranteed by POSIX to be at least 512. + This value is guaranteed by POSIX to be at least 512. Availability: Unix. .. versionadded:: 2.7 Modified: python/branches/py3k/Lib/subprocess.py ============================================================================== --- python/branches/py3k/Lib/subprocess.py (original) +++ python/branches/py3k/Lib/subprocess.py Fri Jul 10 00:44:11 2009 @@ -376,6 +376,12 @@ import fcntl import pickle + # When select or poll has indicated that the file is writable, + # we can write up to _PIPE_BUF bytes without risk of blocking. + # POSIX defines PIPE_BUF as >= 512. + _PIPE_BUF = getattr(select, 'PIPE_BUF', 512) + + __all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", "getstatusoutput", "getoutput", "check_output", "CalledProcessError"] @@ -384,11 +390,6 @@ except: MAXFD = 256 -# When select or poll has indicated that the file is writable, -# we can write up to _PIPE_BUF bytes without risk of blocking. -# POSIX defines PIPE_BUF as >= 512. -_PIPE_BUF = getattr(select, 'PIPE_BUF', 512) - _active = [] def _cleanup(): Modified: python/branches/py3k/Lib/test/test_subprocess.py ============================================================================== --- python/branches/py3k/Lib/test/test_subprocess.py (original) +++ python/branches/py3k/Lib/test/test_subprocess.py Fri Jul 10 00:44:11 2009 @@ -801,7 +801,7 @@ unit_tests = [ProcessTestCase, CommandTests] -if subprocess._has_poll: +if getattr(subprocess, '_has_poll', False): class ProcessTestCaseNoPoll(ProcessTestCase): def setUp(self): subprocess._has_poll = False Modified: python/branches/py3k/Modules/selectmodule.c ============================================================================== --- python/branches/py3k/Modules/selectmodule.c (original) +++ python/branches/py3k/Modules/selectmodule.c Fri Jul 10 00:44:11 2009 @@ -1764,7 +1764,9 @@ Py_INCREF(SelectError); PyModule_AddObject(m, "error", SelectError); +#ifdef PIPE_BUF PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF); +#endif #if defined(HAVE_POLL) #ifdef __APPLE__ From python-checkins at python.org Fri Jul 10 01:00:40 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 09 Jul 2009 23:00:40 -0000 Subject: [Python-checkins] r73918 - python/branches/py3k/Lib/pdb.py Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 10 01:00:40 2009 New Revision: 73918 Log: #6323: pdb doesn't deal well with SyntaxErrors. It seems necessary to keep two layers of 'exec' (one in Bdb.run, one in Pdb._runscript); this allows the tracing function to be active when the inner 'exec' runs and tries to compile the real code. This partially revert r58127, the net effet of the two changes is to replace "exec('%s')" with "exec(%r)". Modified: python/branches/py3k/Lib/pdb.py Modified: python/branches/py3k/Lib/pdb.py ============================================================================== --- python/branches/py3k/Lib/pdb.py (original) +++ python/branches/py3k/Lib/pdb.py Fri Jul 10 01:00:40 2009 @@ -1211,7 +1211,7 @@ self.mainpyfile = self.canonic(filename) self._user_requested_quit = 0 with open(filename) as fp: - statement = fp.read() + statement = "exec(%r)" % (fp.read(),) self.run(statement) # Simplified interface From python-checkins at python.org Fri Jul 10 01:07:52 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 09 Jul 2009 23:07:52 -0000 Subject: [Python-checkins] r73919 - python/branches/py3k/Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 10 01:07:52 2009 New Revision: 73919 Log: NEWS entry for r73918. Modified: python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 10 01:07:52 2009 @@ -38,6 +38,9 @@ Library ------- +- Issue #6323: The pdb debugger did not exit when running a script with a + syntax error. + - Issue #3392: The subprocess communicate() method no longer fails in select() when file descriptors are large; communicate() now uses poll() when possible. From python-checkins at python.org Fri Jul 10 01:20:02 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 09 Jul 2009 23:20:02 -0000 Subject: [Python-checkins] r73920 - in python/branches/release31-maint: Lib/pdb.py Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 10 01:20:02 2009 New Revision: 73920 Log: Merged revisions 73918-73919 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r73918 | amaury.forgeotdarc | 2009-07-10 01:00:40 +0200 (ven., 10 juil. 2009) | 9 lines #6323: pdb doesn't deal well with SyntaxErrors. It seems necessary to keep two layers of 'exec' (one in Bdb.run, one in Pdb._runscript); this allows the tracing function to be active when the inner 'exec' runs and tries to compile the real code. This partially revert r58127, the net effet of the two changes is to replace "exec('%s')" with "exec(%r)". ........ r73919 | amaury.forgeotdarc | 2009-07-10 01:07:52 +0200 (ven., 10 juil. 2009) | 2 lines NEWS entry for r73918. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/pdb.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/pdb.py ============================================================================== --- python/branches/release31-maint/Lib/pdb.py (original) +++ python/branches/release31-maint/Lib/pdb.py Fri Jul 10 01:20:02 2009 @@ -1211,7 +1211,7 @@ self.mainpyfile = self.canonic(filename) self._user_requested_quit = 0 with open(filename) as fp: - statement = fp.read() + statement = "exec(%r)" % (fp.read(),) self.run(statement) # Simplified interface Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Jul 10 01:20:02 2009 @@ -34,6 +34,9 @@ Library ------- +- Issue #6323: The pdb debugger did not exit when running a script with a + syntax error. + - Issue #6369: Fix an RLE decompression bug in the binhex module. - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. From buildbot at python.org Fri Jul 10 01:55:34 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 09 Jul 2009 23:55:34 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.1 Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.1/builds/12 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_mailbox make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 10 07:36:46 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 05:36:46 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.1 Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.1/builds/10 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_urllibnet.py", line 39, in testURLread f = _open_with_retry(urllib.request.urlopen, "http://www.python.org/") File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_urllibnet.py", line 25, in _open_with_retry raise last_exc File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_urllibnet.py", line 19, in _open_with_retry return func(host, *args, **kwargs) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\urllib\request.py", line 119, in urlopen return _opener.open(url, data, timeout) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\urllib\request.py", line 342, in open response = self._open(req, data) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\urllib\request.py", line 360, in _open '_open', req) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\urllib\request.py", line 320, in _call_chain result = func(*args) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\urllib\request.py", line 1063, in http_open return self.do_open(http.client.HTTPConnection, req) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\urllib\request.py", line 1048, in do_open raise URLError(err) urllib.error.URLError: 2 tests failed: test_import test_urllibnet sincerely, -The Buildbot From python-checkins at python.org Fri Jul 10 11:10:33 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 09:10:33 -0000 Subject: [Python-checkins] r73921 - in python/trunk: Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Fri Jul 10 11:10:33 2009 New Revision: 73921 Log: Fixed #6455 (the test shall use pyd files under win32, rather than so files) Modified: python/trunk/Lib/distutils/tests/test_build_ext.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) +++ python/trunk/Lib/distutils/tests/test_build_ext.py Fri Jul 10 11:10:33 2009 @@ -362,6 +362,7 @@ self.assertEquals(lastdir, 'bar') def test_ext_fullpath(self): + ext = sysconfig.get_config_vars()['SO'] # building lxml.etree inplace #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') #etree_ext = Extension('lxml.etree', [etree_c]) @@ -372,14 +373,14 @@ cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') - wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) @@ -389,13 +390,13 @@ cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', - 'portmap.so') + 'portmap' + ext) self.assertEquals(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') - wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) def test_compiler_deprecation_warning(self): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Jul 10 11:10:33 2009 @@ -350,6 +350,8 @@ Library ------- +- Issue #6455: Fixed test_build_ext under win32. + - Issue #6377: Enabled the compiler option, and deprecate its usage as an attribute. From python-checkins at python.org Fri Jul 10 11:13:18 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 09:13:18 -0000 Subject: [Python-checkins] r73922 - in python/branches/release26-maint: Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Fri Jul 10 11:13:17 2009 New Revision: 73922 Log: Merged revisions 73921 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73921 | tarek.ziade | 2009-07-10 11:10:33 +0200 (Fri, 10 Jul 2009) | 1 line Fixed #6455 (the test shall use pyd files under win32, rather than so files) ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py Fri Jul 10 11:13:17 2009 @@ -296,20 +296,21 @@ self.assertEquals(lastdir, 'bar') def test_ext_fullpath(self): + ext = sysconfig.get_config_vars()['SO'] dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') - wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) @@ -319,13 +320,13 @@ cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', - 'portmap.so') + 'portmap' + ext) self.assertEquals(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') - wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) def test_suite(): Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Fri Jul 10 11:13:17 2009 @@ -262,6 +262,8 @@ Library ------- +- Issue #6455: Fixed test_build_ext under win32. + - Issue #6403: Fixed package path usage in build_ext. - Issue #6287: Added the license field in Distutils documentation. From python-checkins at python.org Fri Jul 10 11:14:31 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 09:14:31 -0000 Subject: [Python-checkins] r73923 - in python/branches/py3k: Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Fri Jul 10 11:14:31 2009 New Revision: 73923 Log: Merged revisions 73921 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73921 | tarek.ziade | 2009-07-10 11:10:33 +0200 (Fri, 10 Jul 2009) | 1 line Fixed #6455 (the test shall use pyd files under win32, rather than so files) ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/tests/test_build_ext.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_ext.py Fri Jul 10 11:14:31 2009 @@ -362,6 +362,7 @@ self.assertEquals(lastdir, 'bar') def test_ext_fullpath(self): + ext = sysconfig.get_config_vars()['SO'] # building lxml.etree inplace #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') #etree_ext = Extension('lxml.etree', [etree_c]) @@ -372,14 +373,14 @@ cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') - wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) @@ -389,13 +390,13 @@ cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', - 'portmap.so') + 'portmap' + ext) self.assertEquals(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') - wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) def test_compiler_deprecation_warning(self): Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 10 11:14:31 2009 @@ -885,6 +885,8 @@ Library ------- +- Issue #6455: Fixed test_build_ext under win32. + - Issue #6377: Enabled the compiler option, and deprecate its usage as an attribute. From python-checkins at python.org Fri Jul 10 11:16:08 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 09:16:08 -0000 Subject: [Python-checkins] r73924 - in python/branches/release31-maint: Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Fri Jul 10 11:16:07 2009 New Revision: 73924 Log: Merged revisions 73923 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73923 | tarek.ziade | 2009-07-10 11:14:31 +0200 (Fri, 10 Jul 2009) | 9 lines Merged revisions 73921 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73921 | tarek.ziade | 2009-07-10 11:10:33 +0200 (Fri, 10 Jul 2009) | 1 line Fixed #6455 (the test shall use pyd files under win32, rather than so files) ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py Fri Jul 10 11:16:07 2009 @@ -359,6 +359,7 @@ self.assertEquals(lastdir, 'bar') def test_ext_fullpath(self): + ext = sysconfig.get_config_vars()['SO'] # building lxml.etree inplace #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') #etree_ext = Extension('lxml.etree', [etree_c]) @@ -369,14 +370,14 @@ cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') - wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) @@ -386,13 +387,13 @@ cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', - 'portmap.so') + 'portmap' + ext) self.assertEquals(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') - wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) def test_suite(): Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Jul 10 11:16:07 2009 @@ -866,6 +866,8 @@ Library ------- +- Issue #6455: Fixed test_build_ext under win32. + - Issue #6413: Fixed the log level in distutils.dist for announce. - Issue #6403: Fixed package path usage in build_ext. From buildbot at python.org Fri Jul 10 11:39:07 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 09:39:07 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5141 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_xmlrpc make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 10 11:45:13 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 09:45:13 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/281 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: tarek.ziade BUILD FAILED: failed 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 524, in __bootstrap_inner self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 477, 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 306, 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 68, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') 1 test failed: test_xmlrpc make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 10 11:57:15 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 09:57:15 -0000 Subject: [Python-checkins] r73925 - python/trunk/Lib/distutils/tests/test_build.py Message-ID: Author: tarek.ziade Date: Fri Jul 10 11:57:15 2009 New Revision: 73925 Log: Added test coverage for distutils.command.build Added: python/trunk/Lib/distutils/tests/test_build.py (contents, props changed) Added: python/trunk/Lib/distutils/tests/test_build.py ============================================================================== --- (empty file) +++ python/trunk/Lib/distutils/tests/test_build.py Fri Jul 10 11:57:15 2009 @@ -0,0 +1,54 @@ +"""Tests for distutils.command.build.""" +import unittest +import os +import sys + +from distutils.command.build import build +from distutils.tests import support +from distutils.util import get_platform + +class BuildTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = build(dist) + cmd.finalize_options() + + # if not specified, plat_name gets the current platform + self.assertEquals(cmd.plat_name, get_platform()) + + # build_purelib is build + lib + wanted = os.path.join(cmd.build_base, 'lib') + self.assertEquals(cmd.build_purelib, wanted) + + # build_platlib is 'build/lib.platform-x.x[-pydebug]' + # examples: + # build/lib.macosx-10.3-i386-2.7 + plat_spec = '.%s-%s' % (cmd.plat_name, sys.version[0:3]) + if hasattr(sys, 'gettotalrefcount'): + self.assertTrue(cmd.build_platlib.endswith('-pydebug')) + plat_spec += '-pydebug' + wanted = os.path.join(cmd.build_base, 'lib' + plat_spec) + self.assertEquals(cmd.build_platlib, wanted) + + # by default, build_lib = build_purelib + self.assertEquals(cmd.build_lib, cmd.build_purelib) + + # build_temp is build/temp. + wanted = os.path.join(cmd.build_base, 'temp' + plat_spec) + self.assertEquals(cmd.build_temp, wanted) + + # build_scripts is build/scripts-x.x + wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3]) + self.assertEquals(cmd.build_scripts, wanted) + + # executable is os.path.normpath(sys.executable) + self.assertEquals(cmd.executable, os.path.normpath(sys.executable)) + +def test_suite(): + return unittest.makeSuite(BuildTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From python-checkins at python.org Fri Jul 10 12:00:21 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 10:00:21 -0000 Subject: [Python-checkins] r73926 - python/trunk/Lib/distutils/command/build.py Message-ID: Author: tarek.ziade Date: Fri Jul 10 12:00:21 2009 New Revision: 73926 Log: cleaned up distutils.command.build Modified: python/trunk/Lib/distutils/command/build.py Modified: python/trunk/Lib/distutils/command/build.py ============================================================================== --- python/trunk/Lib/distutils/command/build.py (original) +++ python/trunk/Lib/distutils/command/build.py Fri Jul 10 12:00:21 2009 @@ -9,13 +9,11 @@ from distutils.errors import DistutilsOptionError from distutils.util import get_platform - -def show_compilers (): +def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() - -class build (Command): +class build(Command): description = "build everything needed to install" @@ -53,7 +51,7 @@ "list available compilers", show_compilers), ] - def initialize_options (self): + def initialize_options(self): self.build_base = 'build' # these are decided only after 'build_base' has its final value # (unless overridden by the user or client) @@ -68,8 +66,7 @@ self.force = 0 self.executable = None - def finalize_options (self): - + def finalize_options(self): if self.plat_name is None: self.plat_name = get_platform() else: @@ -118,11 +115,8 @@ if self.executable is None: self.executable = os.path.normpath(sys.executable) - # finalize_options () - - - def run (self): + def run(self): # Run all relevant sub-commands. This will be some subset of: # - build_py - pure Python modules # - build_clib - standalone C libraries @@ -131,7 +125,6 @@ for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) - # -- Predicates for the sub-command list --------------------------- def has_pure_modules (self): @@ -146,11 +139,8 @@ def has_scripts (self): return self.distribution.has_scripts() - sub_commands = [('build_py', has_pure_modules), ('build_clib', has_c_libraries), ('build_ext', has_ext_modules), ('build_scripts', has_scripts), ] - -# class build From python-checkins at python.org Fri Jul 10 12:01:19 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 10:01:19 -0000 Subject: [Python-checkins] r73927 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Fri Jul 10 12:01:19 2009 New Revision: 73927 Log: Blocked revisions 73925-73926 via svnmerge ........ r73925 | tarek.ziade | 2009-07-10 11:57:15 +0200 (Fri, 10 Jul 2009) | 1 line Added test coverage for distutils.command.build ........ r73926 | tarek.ziade | 2009-07-10 12:00:21 +0200 (Fri, 10 Jul 2009) | 1 line cleaned up distutils.command.build ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Fri Jul 10 12:03:20 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 10:03:20 -0000 Subject: [Python-checkins] r73928 - in python/branches/py3k: Lib/distutils/command/build.py Lib/distutils/tests/test_build.py Message-ID: Author: tarek.ziade Date: Fri Jul 10 12:03:20 2009 New Revision: 73928 Log: Merged revisions 73925-73926 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73925 | tarek.ziade | 2009-07-10 11:57:15 +0200 (Fri, 10 Jul 2009) | 1 line Added test coverage for distutils.command.build ........ r73926 | tarek.ziade | 2009-07-10 12:00:21 +0200 (Fri, 10 Jul 2009) | 1 line cleaned up distutils.command.build ........ Added: python/branches/py3k/Lib/distutils/tests/test_build.py - copied unchanged from r73926, /python/trunk/Lib/distutils/tests/test_build.py Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/command/build.py Modified: python/branches/py3k/Lib/distutils/command/build.py ============================================================================== --- python/branches/py3k/Lib/distutils/command/build.py (original) +++ python/branches/py3k/Lib/distutils/command/build.py Fri Jul 10 12:03:20 2009 @@ -9,12 +9,10 @@ from distutils.errors import DistutilsOptionError from distutils.util import get_platform - def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() - class build(Command): description = "build everything needed to install" @@ -127,7 +125,6 @@ for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) - # -- Predicates for the sub-command list --------------------------- def has_pure_modules(self): @@ -142,7 +139,6 @@ def has_scripts(self): return self.distribution.has_scripts() - sub_commands = [('build_py', has_pure_modules), ('build_clib', has_c_libraries), ('build_ext', has_ext_modules), From python-checkins at python.org Fri Jul 10 12:04:03 2009 From: python-checkins at python.org (tarek.ziade) Date: Fri, 10 Jul 2009 10:04:03 -0000 Subject: [Python-checkins] r73929 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Fri Jul 10 12:04:03 2009 New Revision: 73929 Log: Blocked revisions 73928 via svnmerge ................ r73928 | tarek.ziade | 2009-07-10 12:03:20 +0200 (Fri, 10 Jul 2009) | 13 lines Merged revisions 73925-73926 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73925 | tarek.ziade | 2009-07-10 11:57:15 +0200 (Fri, 10 Jul 2009) | 1 line Added test coverage for distutils.command.build ........ r73926 | tarek.ziade | 2009-07-10 12:00:21 +0200 (Fri, 10 Jul 2009) | 1 line cleaned up distutils.command.build ........ ................ Modified: python/branches/release31-maint/ (props changed) From buildbot at python.org Fri Jul 10 13:24:05 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 11:24:05 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 3.1 Message-ID: The Buildbot has detected a new failure of x86 gentoo 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%203.1/builds/14 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Unknown signal 32 sincerely, -The Buildbot From buildbot at python.org Fri Jul 10 13:43:06 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 11:43:06 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1299 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_email_renamed make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 10 14:06:41 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 12:06:41 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.x Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.x/builds/926 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: amaury.forgeotdarc,tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_capi sincerely, -The Buildbot From buildbot at python.org Fri Jul 10 14:08:26 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 12:08:26 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/941 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_xmlrpc ====================================================================== FAIL: test_two (test.test_xmlrpc.KeepaliveServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_xmlrpc.py", line 514, in test_two self.assertTrue(len(self.RequestHandler.myRequests[-1]) >= 2) AssertionError: False is not True make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 10 18:47:42 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Fri, 10 Jul 2009 16:47:42 -0000 Subject: [Python-checkins] r73930 - python/trunk/Lib/subprocess.py Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 10 18:47:42 2009 New Revision: 73930 Log: #6447: typo in subprocess docstring Modified: python/trunk/Lib/subprocess.py Modified: python/trunk/Lib/subprocess.py ============================================================================== --- python/trunk/Lib/subprocess.py (original) +++ python/trunk/Lib/subprocess.py Fri Jul 10 18:47:42 2009 @@ -720,7 +720,7 @@ # Windows methods # def _get_handles(self, stdin, stdout, stderr): - """Construct and return tupel with IO objects: + """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin is None and stdout is None and stderr is None: @@ -965,7 +965,7 @@ # POSIX methods # def _get_handles(self, stdin, stdout, stderr): - """Construct and return tupel with IO objects: + """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ p2cread, p2cwrite = None, None From buildbot at python.org Fri Jul 10 19:16:16 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 17:16:16 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5143 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_xmlrpc make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 10 22:25:56 2009 From: python-checkins at python.org (ezio.melotti) Date: Fri, 10 Jul 2009 20:25:56 -0000 Subject: [Python-checkins] r73931 - python/trunk/Lib/test/test_zipfile.py Message-ID: Author: ezio.melotti Date: Fri Jul 10 22:25:56 2009 New Revision: 73931 Log: more cleanups and if zlib -> skipUnless(zlib) Modified: python/trunk/Lib/test/test_zipfile.py Modified: python/trunk/Lib/test/test_zipfile.py ============================================================================== --- python/trunk/Lib/test/test_zipfile.py (original) +++ python/trunk/Lib/test/test_zipfile.py Fri Jul 10 22:25:56 2009 @@ -16,8 +16,7 @@ from random import randint, random from unittest import skipUnless -import test.test_support as support -from test.test_support import TESTFN, run_unittest, findfile +from test.test_support import TESTFN, run_unittest, findfile, unlink TESTFN2 = TESTFN + "2" TESTFNDIR = TESTFN + "d" @@ -28,6 +27,7 @@ ('/ziptest2dir/ziptest3dir/_ziptest3', 'azsxdcfvgb'), ('ziptest2dir/ziptest3dir/ziptest4dir/_ziptest3', '6y7u8i9o0p')] + class TestsWithSourceFile(unittest.TestCase): def setUp(self): self.line_gen = ["Zipfile test line %d. random float: %f" % (i, random()) @@ -61,7 +61,6 @@ stdout = sys.stdout try: sys.stdout = fp - zipfp.printdir() finally: sys.stdout = stdout @@ -106,7 +105,7 @@ zipfp.testzip() zipfp.close() - def testStored(self): + def test_Stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipTest(f, zipfile.ZIP_STORED) @@ -135,11 +134,11 @@ self.assertEqual(''.join(zipdata2), self.data) zipfp.close() - def testOpenStored(self): + def test_OpenStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipOpenTest(f, zipfile.ZIP_STORED) - def testOpenViaZipInfo(self): + def test_OpenViaZipInfo(self): # Create the ZIP archive zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.writestr("name", "foo") @@ -174,7 +173,7 @@ self.assertEqual(''.join(zipdata1), self.data) zipfp.close() - def testRandomOpenStored(self): + def test_RandomOpenStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipRandomOpenTest(f, zipfile.ZIP_STORED) @@ -211,50 +210,50 @@ zipfp.close() - def testReadlineStored(self): + def test_ReadlineStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipReadlineTest(f, zipfile.ZIP_STORED) - def testReadlinesStored(self): + def test_ReadlinesStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipReadlinesTest(f, zipfile.ZIP_STORED) - def testIterlinesStored(self): + def test_IterlinesStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipIterlinesTest(f, zipfile.ZIP_STORED) @skipUnless(zlib, "requires zlib") - def testDeflated(self): + def test_Deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testOpenDeflated(self): + def test_OpenDeflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipOpenTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testRandomOpenDeflated(self): + def test_RandomOpenDeflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipRandomOpenTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testReadlineDeflated(self): + def test_ReadlineDeflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipReadlineTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testReadlinesDeflated(self): + def test_ReadlinesDeflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipReadlinesTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testIterlinesDeflated(self): + def test_IterlinesDeflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipIterlinesTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testLowCompression(self): + def test_LowCompression(self): # Checks for cases where compressed data is larger than original # Create the ZIP archive zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) @@ -267,7 +266,7 @@ self.assertEqual(openobj.read(1), '1') self.assertEqual(openobj.read(1), '2') - def testAbsoluteArcnames(self): + def test_AbsoluteArcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.write(TESTFN, "/absolute") zipfp.close() @@ -276,7 +275,7 @@ self.assertEqual(zipfp.namelist(), ["absolute"]) zipfp.close() - def testAppendToZipFile(self): + def test_AppendToZipFile(self): # Test appending to an existing zipfile zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.write(TESTFN, TESTFN) @@ -286,7 +285,7 @@ self.assertEqual(zipfp.namelist(), [TESTFN, "strfile"]) zipfp.close() - def testAppendToNonZipFile(self): + def test_AppendToNonZipFile(self): # Test appending to an existing file that is not a zipfile # NOTE: this test fails if len(d) < 22 because of the first # line "fpin.seek(-22, 2)" in _EndRecData @@ -333,7 +332,7 @@ self.assertRaises(RuntimeError, zipf.write, TESTFN) zipf.close() - def testExtract(self): + def test_Extract(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata) @@ -362,7 +361,7 @@ # remove the test file subdirectories shutil.rmtree(os.path.join(os.getcwd(), 'ziptest2dir')) - def testExtractAll(self): + def test_ExtractAll(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata) @@ -394,13 +393,14 @@ zinfo = zipfp.getinfo('strfile') self.assertEqual(zinfo.external_attr, 0600 << 16) - def test_writestr_permissions(self): + def test_WritestrPermissions(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED) def tearDown(self): - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) + class TestZip64InSmallFiles(unittest.TestCase): # These tests test the ZIP64 functionality without using large files, @@ -430,7 +430,7 @@ zipfp.writestr, "another"+os.extsep+"name", self.data) zipfp.close() - def testLargeFileException(self): + def test_LargeFileException(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.largeFileExceptionTest(f, zipfile.ZIP_STORED) self.largeFileExceptionTest2(f, zipfile.ZIP_STORED) @@ -498,20 +498,18 @@ # Check that testzip doesn't raise an exception zipfp.testzip() - zipfp.close() - def testStored(self): + def test_Stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipTest(f, zipfile.ZIP_STORED) + @skipUnless(zlib, "requires zlib") + def test_Deflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.zipTest(f, zipfile.ZIP_DEFLATED) - if zlib: - def testDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipTest(f, zipfile.ZIP_DEFLATED) - - def testAbsoluteArcnames(self): + def test_AbsoluteArcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED, allowZip64=True) zipfp.write(TESTFN, "/absolute") zipfp.close() @@ -522,11 +520,12 @@ def tearDown(self): zipfile.ZIP64_LIMIT = self._limit - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) + class PyZipFileTests(unittest.TestCase): - def testWritePyfile(self): + def test_WritePyfile(self): zipfp = zipfile.PyZipFile(TemporaryFile(), "w") fn = __file__ if fn.endswith('.pyc') or fn.endswith('.pyo'): @@ -539,7 +538,6 @@ self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() - zipfp = zipfile.PyZipFile(TemporaryFile(), "w") fn = __file__ if fn.endswith('.pyc') or fn.endswith('.pyo'): @@ -552,7 +550,7 @@ self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() - def testWritePythonPackage(self): + def test_WritePythonPackage(self): import email packagedir = os.path.dirname(email.__file__) @@ -564,7 +562,7 @@ self.assertTrue('email/__init__.pyo' in names or 'email/__init__.pyc' in names) self.assertTrue('email/mime/text.pyo' in names or 'email/mime/text.pyc' in names) - def testWritePythonDirectory(self): + def test_WritePythonDirectory(self): os.mkdir(TESTFN2) try: fp = open(os.path.join(TESTFN2, "mod1.py"), "w") @@ -590,7 +588,7 @@ finally: shutil.rmtree(TESTFN2) - def testWriteNonPyfile(self): + def test_WriteNonPyfile(self): zipfp = zipfile.PyZipFile(TemporaryFile(), "w") file(TESTFN, 'w').write('most definitely not a python file') self.assertRaises(RuntimeError, zipfp.writepy, TESTFN) @@ -598,7 +596,7 @@ class OtherTests(unittest.TestCase): - def testUnicodeFilenames(self): + def test_UnicodeFilenames(self): zf = zipfile.ZipFile(TESTFN, "w") zf.writestr(u"foo.txt", "Test for unicode filename") zf.writestr(u"\xf6.txt", "Test for unicode filename") @@ -609,7 +607,7 @@ self.assertEqual(zf.filelist[1].filename, u"\xf6.txt") zf.close() - def testCreateNonExistentFileForAppend(self): + def test_CreateNonExistentFileForAppend(self): if os.path.exists(TESTFN): os.unlink(TESTFN) @@ -620,7 +618,7 @@ zf = zipfile.ZipFile(TESTFN, 'a') zf.writestr(filename, content) zf.close() - except IOError, (errno, errmsg): + except IOError: self.fail('Could not append data to a non-existent zip file.') self.assertTrue(os.path.exists(TESTFN)) @@ -629,7 +627,7 @@ self.assertEqual(zf.read(filename), content) zf.close() - def testCloseErroneousFile(self): + def test_CloseErroneousFile(self): # This test checks that the ZipFile constructor closes the file object # it opens if there's an error in the file. If it doesn't, the traceback # holds a reference to the ZipFile object and, indirectly, the file object. @@ -644,7 +642,7 @@ except zipfile.BadZipfile: pass - def testIsZipErroneousFile(self): + def test_IsZipErroneousFile(self): # This test checks that the is_zipfile function correctly identifies # a file that is not a zip file @@ -666,7 +664,7 @@ chk = zipfile.is_zipfile(fp) self.assertTrue(not chk) - def testIsZipValidFile(self): + def test_IsZipValidFile(self): # This test checks that the is_zipfile function correctly identifies # a file that is a zip file @@ -691,7 +689,7 @@ chk = zipfile.is_zipfile(fp) self.assertTrue(chk) - def testNonExistentFileRaisesIOError(self): + def test_NonExistentFileRaisesIOError(self): # make sure we don't raise an AttributeError when a partially-constructed # ZipFile instance is finalized; this tests for regression on SF tracker # bug #403871. @@ -705,7 +703,7 @@ # quickly. self.assertRaises(IOError, zipfile.ZipFile, TESTFN) - def testClosedZipRaisesRuntimeError(self): + def test_ClosedZipRaisesRuntimeError(self): # Verify that testzip() doesn't swallow inappropriate exceptions. data = StringIO() zipf = zipfile.ZipFile(data, mode="w") @@ -774,7 +772,7 @@ self.assertEqual(zipfile.sizeEndCentDir64, 56) self.assertEqual(zipfile.sizeEndCentDir64Locator, 20) - def testComments(self): + def test_Comments(self): # This test checks that comments on the archive are handled properly # check default comment is empty @@ -816,8 +814,9 @@ zipfr.close() def tearDown(self): - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) + class DecryptionTests(unittest.TestCase): # This test checks that ZIP decryption works. Since the library does not @@ -861,19 +860,19 @@ self.zip2.close() os.unlink(TESTFN2) - def testNoPassword(self): + def test_NoPassword(self): # Reading the encrypted file without password # must generate a RunTime exception self.assertRaises(RuntimeError, self.zip.read, "test.txt") self.assertRaises(RuntimeError, self.zip2.read, "zero") - def testBadPassword(self): + def test_BadPassword(self): self.zip.setpassword("perl") self.assertRaises(RuntimeError, self.zip.read, "test.txt") self.zip2.setpassword("perl") self.assertRaises(RuntimeError, self.zip2.read, "zero") - def testGoodPassword(self): + def test_GoodPassword(self): self.zip.setpassword("python") self.assertEquals(self.zip.read("test.txt"), self.plain) self.zip2.setpassword("12345") @@ -891,8 +890,8 @@ fp.close() def tearDown(self): - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) def makeTestArchive(self, f, compression): # Create the ZIP archive @@ -912,7 +911,7 @@ self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data) zipfp.close() - def testStored(self): + def test_Stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipTest(f, zipfile.ZIP_STORED) @@ -946,7 +945,7 @@ self.assertEqual(testdata1, self.data) zipfp.close() - def testOpenStored(self): + def test_OpenStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipOpenTest(f, zipfile.ZIP_STORED) @@ -968,10 +967,11 @@ self.assertEqual(testdata, self.data) zipfp.close() - def testRandomOpenStored(self): + def test_RandomOpenStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zipRandomOpenTest(f, zipfile.ZIP_STORED) + class TestsWithMultipleOpens(unittest.TestCase): def setUp(self): # Create the ZIP archive @@ -980,7 +980,7 @@ zipfp.writestr('twos', '2'*FIXEDTEST_SIZE) zipfp.close() - def testSameFile(self): + def test_SameFile(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -993,7 +993,7 @@ self.assertEqual(data1, data2) zipf.close() - def testDifferentFile(self): + def test_DifferentFile(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -1007,7 +1007,7 @@ self.assertEqual(data2, '2'*FIXEDTEST_SIZE) zipf.close() - def testInterleaved(self): + def test_Interleaved(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -1022,25 +1022,26 @@ zipf.close() def tearDown(self): - support.unlink(TESTFN2) + unlink(TESTFN2) + class TestWithDirectory(unittest.TestCase): def setUp(self): os.mkdir(TESTFN2) - def testExtractDir(self): + def test_ExtractDir(self): zipf = zipfile.ZipFile(findfile("zipdir.zip")) zipf.extractall(TESTFN2) self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a"))) self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a", "b"))) self.assertTrue(os.path.exists(os.path.join(TESTFN2, "a", "b", "c"))) - def test_bug_6050(self): + def test_Bug6050(self): # Extraction should succeed if directories already exist os.mkdir(os.path.join(TESTFN2, "a")) - self.testExtractDir() + self.test_ExtractDir() - def testStoreDir(self): + def test_StoreDir(self): os.mkdir(os.path.join(TESTFN2, "x")) zipf = zipfile.ZipFile(TESTFN, "w") zipf.write(os.path.join(TESTFN2, "x"), "x") @@ -1049,7 +1050,7 @@ def tearDown(self): shutil.rmtree(TESTFN2) if os.path.exists(TESTFN): - support.unlink(TESTFN) + unlink(TESTFN) class UniversalNewlineTests(unittest.TestCase): @@ -1116,51 +1117,54 @@ zipfp.close() - def testReadStored(self): + def test_ReadStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.readTest(f, zipfile.ZIP_STORED) - def testReadlineStored(self): + def test_ReadlineStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.readlineTest(f, zipfile.ZIP_STORED) - def testReadlinesStored(self): + def test_ReadlinesStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.readlinesTest(f, zipfile.ZIP_STORED) - def testIterlinesStored(self): + def test_IterlinesStored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.iterlinesTest(f, zipfile.ZIP_STORED) - if zlib: - def testReadDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readTest(f, zipfile.ZIP_DEFLATED) - - def testReadlineDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readlineTest(f, zipfile.ZIP_DEFLATED) - - def testReadlinesDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readlinesTest(f, zipfile.ZIP_DEFLATED) - - def testIterlinesDeflated(self): - for f in (TESTFN2, TemporaryFile(), StringIO()): - self.iterlinesTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def test_ReadDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.readTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def test_ReadlineDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.readlineTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def test_ReadlinesDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.readlinesTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def test_IterlinesDeflated(self): + for f in (TESTFN2, TemporaryFile(), StringIO()): + self.iterlinesTest(f, zipfile.ZIP_DEFLATED) def tearDown(self): for sep, fn in self.arcfiles.items(): os.remove(fn) - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) def test_main(): run_unittest(TestsWithSourceFile, TestZip64InSmallFiles, OtherTests, PyZipFileTests, DecryptionTests, TestsWithMultipleOpens, - TestWithDirectory, - UniversalNewlineTests, TestsWithRandomBinaryFiles) + TestWithDirectory, UniversalNewlineTests, + TestsWithRandomBinaryFiles) if __name__ == "__main__": test_main() From buildbot at python.org Fri Jul 10 22:56:29 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 20:56:29 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.x Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.x/builds/758 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest.py", line 543, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test_848_tmp Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test_848_tmp' 2 tests failed: test_import test_xmlrpc sincerely, -The Buildbot From buildbot at python.org Fri Jul 10 23:00:46 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 21:00:46 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/284 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: ezio.melotti BUILD FAILED: failed 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 524, in __bootstrap_inner self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 477, 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 306, 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 68, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') 1 test failed: test_xmlrpc make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 10 23:06:55 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 10 Jul 2009 21:06:55 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1301 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: ezio.melotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_applesingle make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jul 11 10:44:48 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sat, 11 Jul 2009 08:44:48 -0000 Subject: [Python-checkins] r73932 - python/trunk/Lib/test/test_xmlrpc.py Message-ID: Author: kristjan.jonsson Date: Sat Jul 11 10:44:43 2009 New Revision: 73932 Log: http://bugs.python.org/issue6460 Need to be careful with thread switching when testing the xmlrpc server. The server thread may not have updated stats when the client thread tests them. Modified: python/trunk/Lib/test/test_xmlrpc.py Modified: python/trunk/Lib/test/test_xmlrpc.py ============================================================================== --- python/trunk/Lib/test/test_xmlrpc.py (original) +++ python/trunk/Lib/test/test_xmlrpc.py Sat Jul 11 10:44:43 2009 @@ -541,11 +541,17 @@ def test_two(self): p = xmlrpclib.ServerProxy(URL) + #do three requests. self.assertEqual(p.pow(6,8), 6**8) self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + + #they should have all been handled by a single request handler self.assertEqual(len(self.RequestHandler.myRequests), 1) - #we may or may not catch the final "append" with the empty line - self.assertTrue(len(self.RequestHandler.myRequests[-1]) >= 2) + + #check that we did at least two (the third may be pending append + #due to thread scheduling) + self.assertGreaterEqual(len(self.RequestHandler.myRequests[-1]), 2) #A test case that verifies that gzip encoding works in both directions #(for a request and the response) From python-checkins at python.org Sat Jul 11 11:09:59 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Sat, 11 Jul 2009 09:09:59 -0000 Subject: [Python-checkins] r73933 - python/trunk/Lib/test/test_popen.py Message-ID: Author: amaury.forgeotdarc Date: Sat Jul 11 11:09:59 2009 New Revision: 73933 Log: Add basic tests for the return value of os.popen().close(). According to #6358, python 3.0 has a different implementation that behaves differently. Modified: python/trunk/Lib/test/test_popen.py Modified: python/trunk/Lib/test/test_popen.py ============================================================================== --- python/trunk/Lib/test/test_popen.py (original) +++ python/trunk/Lib/test/test_popen.py Sat Jul 11 11:09:59 2009 @@ -40,6 +40,13 @@ ) test_support.reap_children() + def test_return_code(self): + self.assertEqual(os.popen("exit 0").close(), None) + if os.name == 'nt': + self.assertEqual(os.popen("exit 42").close(), 42) + else: + self.assertEqual(os.popen("exit 42").close(), 42 << 8) + def test_main(): test_support.run_unittest(PopenTest) From python-checkins at python.org Sat Jul 11 11:35:13 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Sat, 11 Jul 2009 09:35:13 -0000 Subject: [Python-checkins] r73934 - in python/branches/py3k: Lib/os.py Lib/test/test_popen.py Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Sat Jul 11 11:35:13 2009 New Revision: 73934 Log: #6358: Merge r73933: Add basic tests for the return value of os.popen().close(). And fix the implementation to make these tests pass with py3k Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/os.py python/branches/py3k/Lib/test/test_popen.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/os.py ============================================================================== --- python/branches/py3k/Lib/os.py (original) +++ python/branches/py3k/Lib/os.py Sat Jul 11 11:35:13 2009 @@ -643,7 +643,13 @@ self._proc = proc def close(self): self._stream.close() - return self._proc.wait() << 8 # Shift left to match old behavior + returncode = self._proc.wait() + if returncode == 0: + return None + if name == 'nt': + return returncode + else: + return returncode << 8 # Shift left to match old behavior def __getattr__(self, name): return getattr(self._stream, name) def __iter__(self): Modified: python/branches/py3k/Lib/test/test_popen.py ============================================================================== --- python/branches/py3k/Lib/test/test_popen.py (original) +++ python/branches/py3k/Lib/test/test_popen.py Sat Jul 11 11:35:13 2009 @@ -42,6 +42,13 @@ ) support.reap_children() + def test_return_code(self): + self.assertEqual(os.popen("exit 0").close(), None) + if os.name == 'nt': + self.assertEqual(os.popen("exit 42").close(), 42) + else: + self.assertEqual(os.popen("exit 42").close(), 42 << 8) + def test_main(): support.run_unittest(PopenTest) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sat Jul 11 11:35:13 2009 @@ -38,6 +38,9 @@ Library ------- +- Issue #6358: The exit status of a command started with os.popen() was + reported differently than it did with python 2.x. + - Issue #6323: The pdb debugger did not exit when running a script with a syntax error. From python-checkins at python.org Sat Jul 11 11:37:09 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Sat, 11 Jul 2009 09:37:09 -0000 Subject: [Python-checkins] r73935 - in python/branches/release31-maint: Lib/os.py Lib/test/test_popen.py Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Sat Jul 11 11:37:09 2009 New Revision: 73935 Log: Merged revisions 73934 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r73934 | amaury.forgeotdarc | 2009-07-11 11:35:13 +0200 (sam., 11 juil. 2009) | 3 lines #6358: Merge r73933: Add basic tests for the return value of os.popen().close(). And fix the implementation to make these tests pass with py3k ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/os.py python/branches/release31-maint/Lib/test/test_popen.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/os.py ============================================================================== --- python/branches/release31-maint/Lib/os.py (original) +++ python/branches/release31-maint/Lib/os.py Sat Jul 11 11:37:09 2009 @@ -643,7 +643,13 @@ self._proc = proc def close(self): self._stream.close() - return self._proc.wait() << 8 # Shift left to match old behavior + returncode = self._proc.wait() + if returncode == 0: + return None + if name == 'nt': + return returncode + else: + return returncode << 8 # Shift left to match old behavior def __getattr__(self, name): return getattr(self._stream, name) def __iter__(self): Modified: python/branches/release31-maint/Lib/test/test_popen.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_popen.py (original) +++ python/branches/release31-maint/Lib/test/test_popen.py Sat Jul 11 11:37:09 2009 @@ -42,6 +42,13 @@ ) support.reap_children() + def test_return_code(self): + self.assertEqual(os.popen("exit 0").close(), None) + if os.name == 'nt': + self.assertEqual(os.popen("exit 42").close(), 42) + else: + self.assertEqual(os.popen("exit 42").close(), 42 << 8) + def test_main(): support.run_unittest(PopenTest) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sat Jul 11 11:37:09 2009 @@ -34,6 +34,9 @@ Library ------- +- Issue #6358: The exit status of a command started with os.popen() was + reported differently than it did with python 2.x. + - Issue #6323: The pdb debugger did not exit when running a script with a syntax error. From buildbot at python.org Sat Jul 11 11:50:23 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 09:50:23 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1303 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Abort trap sincerely, -The Buildbot From python-checkins at python.org Sat Jul 11 12:08:50 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:08:50 -0000 Subject: [Python-checkins] r73936 - python/branches/py3k/setup.py Message-ID: Author: georg.brandl Date: Sat Jul 11 12:08:49 2009 New Revision: 73936 Log: Revert r73807, which removed code to be able to build _dbm with bsddb. Modified: python/branches/py3k/setup.py Modified: python/branches/py3k/setup.py ============================================================================== --- python/branches/py3k/setup.py (original) +++ python/branches/py3k/setup.py Sat Jul 11 12:08:49 2009 @@ -363,7 +363,6 @@ inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) - # XXX db is not needed anymore, should this be removed? if platform in ['osf1', 'unixware7', 'openunix8']: lib_dirs += ['/usr/ccs/lib'] @@ -626,6 +625,179 @@ exts.append( Extension('_md5', ['md5module.c']) ) exts.append( Extension('_sha1', ['sha1module.c']) ) + # Modules that provide persistent dictionary-like semantics. You will + # probably want to arrange for at least one of them to be available on + # your machine, though none are defined by default because of library + # dependencies. The Python module dbm/__init__.py provides an + # implementation independent wrapper for these; dbm/dumb.py provides + # similar functionality (but slower of course) implemented in Python. + + # Sleepycat^WOracle Berkeley DB interface. + # http://www.oracle.com/database/berkeley-db/db/index.html + # + # This requires the Sleepycat^WOracle DB code. The supported versions + # are set below. Visit the URL above to download + # a release. Most open source OSes come with one or more + # versions of BerkeleyDB already installed. + + max_db_ver = (4, 7) + min_db_ver = (3, 3) + db_setup_debug = False # verbose debug prints from this script? + + def allow_db_ver(db_ver): + """Returns a boolean if the given BerkeleyDB version is acceptable. + + Args: + db_ver: A tuple of the version to verify. + """ + if not (min_db_ver <= db_ver <= max_db_ver): + return False + return True + + def gen_db_minor_ver_nums(major): + if major == 4: + for x in range(max_db_ver[1]+1): + if allow_db_ver((4, x)): + yield x + elif major == 3: + for x in (3,): + if allow_db_ver((3, x)): + yield x + else: + raise ValueError("unknown major BerkeleyDB version", major) + + # construct a list of paths to look for the header file in on + # top of the normal inc_dirs. + db_inc_paths = [ + '/usr/include/db4', + '/usr/local/include/db4', + '/opt/sfw/include/db4', + '/usr/include/db3', + '/usr/local/include/db3', + '/opt/sfw/include/db3', + # Fink defaults (http://fink.sourceforge.net/) + '/sw/include/db4', + '/sw/include/db3', + ] + # 4.x minor number specific paths + for x in gen_db_minor_ver_nums(4): + db_inc_paths.append('/usr/include/db4%d' % x) + db_inc_paths.append('/usr/include/db4.%d' % x) + db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) + db_inc_paths.append('/usr/local/include/db4%d' % x) + db_inc_paths.append('/pkg/db-4.%d/include' % x) + db_inc_paths.append('/opt/db-4.%d/include' % x) + # MacPorts default (http://www.macports.org/) + db_inc_paths.append('/opt/local/include/db4%d' % x) + # 3.x minor number specific paths + for x in gen_db_minor_ver_nums(3): + db_inc_paths.append('/usr/include/db3%d' % x) + db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) + db_inc_paths.append('/usr/local/include/db3%d' % x) + db_inc_paths.append('/pkg/db-3.%d/include' % x) + db_inc_paths.append('/opt/db-3.%d/include' % x) + + # Add some common subdirectories for Sleepycat DB to the list, + # based on the standard include directories. This way DB3/4 gets + # picked up when it is installed in a non-standard prefix and + # the user has added that prefix into inc_dirs. + std_variants = [] + for dn in inc_dirs: + std_variants.append(os.path.join(dn, 'db3')) + std_variants.append(os.path.join(dn, 'db4')) + for x in gen_db_minor_ver_nums(4): + std_variants.append(os.path.join(dn, "db4%d"%x)) + std_variants.append(os.path.join(dn, "db4.%d"%x)) + for x in gen_db_minor_ver_nums(3): + std_variants.append(os.path.join(dn, "db3%d"%x)) + std_variants.append(os.path.join(dn, "db3.%d"%x)) + + db_inc_paths = std_variants + db_inc_paths + db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)] + + db_ver_inc_map = {} + + class db_found(Exception): pass + try: + # See whether there is a Sleepycat header in the standard + # search path. + for d in inc_dirs + db_inc_paths: + f = os.path.join(d, "db.h") + if db_setup_debug: print("db: looking for db.h in", f) + if os.path.exists(f): + f = open(f).read() + m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) + if m: + db_major = int(m.group(1)) + m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) + db_minor = int(m.group(1)) + db_ver = (db_major, db_minor) + + # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug + if db_ver == (4, 6): + m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f) + db_patch = int(m.group(1)) + if db_patch < 21: + print("db.h:", db_ver, "patch", db_patch, + "being ignored (4.6.x must be >= 4.6.21)") + continue + + if ( (db_ver not in db_ver_inc_map) and + allow_db_ver(db_ver) ): + # save the include directory with the db.h version + # (first occurrence only) + db_ver_inc_map[db_ver] = d + if db_setup_debug: + print("db.h: found", db_ver, "in", d) + else: + # we already found a header for this library version + if db_setup_debug: print("db.h: ignoring", d) + else: + # ignore this header, it didn't contain a version number + if db_setup_debug: + print("db.h: no version number version in", d) + + db_found_vers = list(db_ver_inc_map.keys()) + db_found_vers.sort() + + while db_found_vers: + db_ver = db_found_vers.pop() + db_incdir = db_ver_inc_map[db_ver] + + # check lib directories parallel to the location of the header + db_dirs_to_check = [ + db_incdir.replace("include", 'lib64'), + db_incdir.replace("include", 'lib'), + ] + db_dirs_to_check = list(filter(os.path.isdir, db_dirs_to_check)) + + # Look for a version specific db-X.Y before an ambiguoius dbX + # XXX should we -ever- look for a dbX name? Do any + # systems really not name their library by version and + # symlink to more general names? + for dblib in (('db-%d.%d' % db_ver), + ('db%d%d' % db_ver), + ('db%d' % db_ver[0])): + dblib_file = self.compiler.find_library_file( + db_dirs_to_check + lib_dirs, dblib ) + if dblib_file: + dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] + raise db_found + else: + if db_setup_debug: print("db lib: ", dblib, "not found") + + except db_found: + if db_setup_debug: + print("bsddb using BerkeleyDB lib:", db_ver, dblib) + print("bsddb lib dir:", dblib_dir, " inc dir:", db_incdir) + db_incs = [db_incdir] + dblibs = [dblib] + else: + if db_setup_debug: print("db: no appropriate library found") + db_incs = None + dblibs = [] + dblib_dir = None + # The sqlite interface sqlite_setup_debug = False # verbose debug prints from this script? @@ -730,7 +902,7 @@ if dbm_args: dbm_order = dbm_args[-1].split(":") else: - dbm_order = "ndbm:gdbm".split(":") + dbm_order = "ndbm:gdbm:bdb".split(":") dbmext = None for cand in dbm_order: if cand == "ndbm": @@ -773,6 +945,18 @@ ], libraries = gdbm_libs) break + elif cand == "bdb": + if db_incs is not None: + print("building dbm using bdb") + dbmext = Extension('_dbm', ['_dbmmodule.c'], + library_dirs=dblib_dir, + runtime_library_dirs=dblib_dir, + include_dirs=db_incs, + define_macros=[ + ('HAVE_BERKDB_H', None), + ('DB_DBM_HSEARCH', None), + ], + libraries=dblibs) break if dbmext is not None: exts.append(dbmext) From python-checkins at python.org Sat Jul 11 12:12:36 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:12:36 -0000 Subject: [Python-checkins] r73937 - python/trunk/Doc/c-api/import.rst Message-ID: Author: georg.brandl Date: Sat Jul 11 12:12:36 2009 New Revision: 73937 Log: Fix style. Modified: python/trunk/Doc/c-api/import.rst Modified: python/trunk/Doc/c-api/import.rst ============================================================================== --- python/trunk/Doc/c-api/import.rst (original) +++ python/trunk/Doc/c-api/import.rst Sat Jul 11 12:12:36 2009 @@ -28,10 +28,10 @@ leaves the module in ``sys.modules``. .. versionchanged:: 2.4 - failing imports remove incomplete module objects. + Failing imports remove incomplete module objects. .. versionchanged:: 2.6 - always use absolute imports + Always uses absolute imports. .. cfunction:: PyObject* PyImport_ImportModuleNoBlock(const char *name) @@ -62,7 +62,7 @@ unless a non-empty *fromlist* was given. .. versionchanged:: 2.4 - failing imports remove incomplete module objects. + Failing imports remove incomplete module objects. .. versionchanged:: 2.6 The function is an alias for :cfunc:`PyImport_ImportModuleLevel` with @@ -95,7 +95,7 @@ are installed in the current environment, e.g. by :mod:`rexec` or :mod:`ihooks`. .. versionchanged:: 2.6 - always use absolute imports + Always uses absolute imports. .. cfunction:: PyObject* PyImport_ReloadModule(PyObject *m) From python-checkins at python.org Sat Jul 11 12:14:54 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:14:54 -0000 Subject: [Python-checkins] r73938 - python/trunk/Doc/extending/extending.rst Message-ID: Author: georg.brandl Date: Sat Jul 11 12:14:54 2009 New Revision: 73938 Log: #6446: fix import_spam() function to use correct error and reference handling. Modified: python/trunk/Doc/extending/extending.rst Modified: python/trunk/Doc/extending/extending.rst ============================================================================== --- python/trunk/Doc/extending/extending.rst (original) +++ python/trunk/Doc/extending/extending.rst Sat Jul 11 12:14:54 2009 @@ -1219,16 +1219,23 @@ static int import_spam(void) { - PyObject *module = PyImport_ImportModule("spam"); + PyObject *c_api_object; + PyObject *module; - if (module != NULL) { - PyObject *c_api_object = PyObject_GetAttrString(module, "_C_API"); - if (c_api_object == NULL) - return -1; - if (PyCObject_Check(c_api_object)) - PySpam_API = (void **)PyCObject_AsVoidPtr(c_api_object); - Py_DECREF(c_api_object); + module = PyImport_ImportModule("spam"); + if (module == NULL) + return -1; + + c_api_object = PyObject_GetAttrString(module, "_C_API"); + if (c_api_object == NULL) { + Py_DECREF(module); + return -1; } + if (PyCObject_Check(c_api_object)) + PySpam_API = (void **)PyCObject_AsVoidPtr(c_api_object); + + Py_DECREF(c_api_object); + Py_DECREF(module); return 0; } From python-checkins at python.org Sat Jul 11 12:18:10 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:18:10 -0000 Subject: [Python-checkins] r73939 - python/trunk/Doc/library/imp.rst Message-ID: Author: georg.brandl Date: Sat Jul 11 12:18:10 2009 New Revision: 73939 Log: #6448: clarify docs for find_module(). Modified: python/trunk/Doc/library/imp.rst Modified: python/trunk/Doc/library/imp.rst ============================================================================== --- python/trunk/Doc/library/imp.rst (original) +++ python/trunk/Doc/library/imp.rst Sat Jul 11 12:18:10 2009 @@ -34,16 +34,17 @@ .. function:: find_module(name[, path]) - Try to find the module *name* on the search path *path*. If *path* is a list - of directory names, each directory is searched for files with any of the - suffixes returned by :func:`get_suffixes` above. Invalid names in the list - are silently ignored (but all list items must be strings). If *path* is - omitted or ``None``, the list of directory names given by ``sys.path`` is - searched, but first it searches a few special places: it tries to find a - built-in module with the given name (:const:`C_BUILTIN`), then a frozen - module (:const:`PY_FROZEN`), and on some systems some other places are looked - in as well (on Windows, it looks in the registry which may point to a - specific file). + Try to find the module *name*. If *path* is omitted or ``None``, the list of + directory names given by ``sys.path`` is searched, but first a few special + places are searched: the function tries to find a built-in module with the + given name (:const:`C_BUILTIN`), then a frozen module (:const:`PY_FROZEN`), + and on some systems some other places are looked in as well (on Windows, it + looks in the registry which may point to a specific file). + + Otherwise, *path* must be a list of directory names; each directory is + searched for files with any of the suffixes returned by :func:`get_suffixes` + above. Invalid names in the list are silently ignored (but all list items + must be strings). If search is successful, the return value is a 3-element tuple ``(file, pathname, description)``: From buildbot at python.org Sat Jul 11 12:32:50 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 10:32:50 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.1 Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.1/builds/15 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_mailbox make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jul 11 12:37:39 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:37:39 -0000 Subject: [Python-checkins] r73940 - python/trunk/Doc/library/array.rst Message-ID: Author: georg.brandl Date: Sat Jul 11 12:37:38 2009 New Revision: 73940 Log: #6430: add note about size of "u" type. Modified: python/trunk/Doc/library/array.rst Modified: python/trunk/Doc/library/array.rst ============================================================================== --- python/trunk/Doc/library/array.rst (original) +++ python/trunk/Doc/library/array.rst Sat Jul 11 12:37:38 2009 @@ -24,7 +24,7 @@ +-----------+----------------+-------------------+-----------------------+ | ``'B'`` | unsigned char | int | 1 | +-----------+----------------+-------------------+-----------------------+ -| ``'u'`` | Py_UNICODE | Unicode character | 2 | +| ``'u'`` | Py_UNICODE | Unicode character | 2 (see note) | +-----------+----------------+-------------------+-----------------------+ | ``'h'`` | signed short | int | 2 | +-----------+----------------+-------------------+-----------------------+ @@ -43,6 +43,11 @@ | ``'d'`` | double | float | 8 | +-----------+----------------+-------------------+-----------------------+ +.. note:: + + The ``'u'`` typecode corresponds to Python's unicode character. On narrow + Unicode builds this is 2-bytes, on wide builds this is 4-bytes. + The actual representation of values is determined by the machine architecture (strictly speaking, by the C implementation). The actual size can be accessed through the :attr:`itemsize` attribute. The values stored for ``'L'`` and From python-checkins at python.org Sat Jul 11 12:39:01 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:39:01 -0000 Subject: [Python-checkins] r73941 - in python/branches/py3k: Doc/library/array.rst Message-ID: Author: georg.brandl Date: Sat Jul 11 12:39:00 2009 New Revision: 73941 Log: Merged revisions 73940 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73940 | georg.brandl | 2009-07-11 12:37:38 +0200 (Sa, 11 Jul 2009) | 1 line #6430: add note about size of "u" type. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/array.rst Modified: python/branches/py3k/Doc/library/array.rst ============================================================================== --- python/branches/py3k/Doc/library/array.rst (original) +++ python/branches/py3k/Doc/library/array.rst Sat Jul 11 12:39:00 2009 @@ -21,7 +21,7 @@ +-----------+----------------+-------------------+-----------------------+ | ``'B'`` | unsigned char | int | 1 | +-----------+----------------+-------------------+-----------------------+ -| ``'u'`` | Py_UNICODE | Unicode character | 2 | +| ``'u'`` | Py_UNICODE | Unicode character | 2 (see note) | +-----------+----------------+-------------------+-----------------------+ | ``'h'`` | signed short | int | 2 | +-----------+----------------+-------------------+-----------------------+ @@ -40,6 +40,11 @@ | ``'d'`` | double | float | 8 | +-----------+----------------+-------------------+-----------------------+ +.. note:: + + The ``'u'`` typecode corresponds to Python's unicode character. On narrow + Unicode builds this is 2-bytes, on wide builds this is 4-bytes. + The actual representation of values is determined by the machine architecture (strictly speaking, by the C implementation). The actual size can be accessed through the :attr:`itemsize` attribute. From python-checkins at python.org Sat Jul 11 12:39:24 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:39:24 -0000 Subject: [Python-checkins] r73942 - python/branches/py3k/Modules/arraymodule.c Message-ID: Author: georg.brandl Date: Sat Jul 11 12:39:23 2009 New Revision: 73942 Log: #6430: remove mention of "w" array typecode. Modified: python/branches/py3k/Modules/arraymodule.c Modified: python/branches/py3k/Modules/arraymodule.c ============================================================================== --- python/branches/py3k/Modules/arraymodule.c (original) +++ python/branches/py3k/Modules/arraymodule.c Sat Jul 11 12:39:23 2009 @@ -1978,7 +1978,6 @@ 'H' unsigned integer 2 \n\ 'i' signed integer 2 \n\ 'I' unsigned integer 2 \n\ - 'w' unicode character 4 \n\ 'l' signed integer 4 \n\ 'L' unsigned integer 4 \n\ 'f' floating point 4 \n\ From python-checkins at python.org Sat Jul 11 12:43:09 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:43:09 -0000 Subject: [Python-checkins] r73943 - in python/branches/py3k/Doc: c-api/structures.rst extending/extending.rst Message-ID: Author: georg.brandl Date: Sat Jul 11 12:43:08 2009 New Revision: 73943 Log: #6421: The self argument of module-level PyCFunctions is now a reference to the module object. Modified: python/branches/py3k/Doc/c-api/structures.rst python/branches/py3k/Doc/extending/extending.rst Modified: python/branches/py3k/Doc/c-api/structures.rst ============================================================================== --- python/branches/py3k/Doc/c-api/structures.rst (original) +++ python/branches/py3k/Doc/c-api/structures.rst Sat Jul 11 12:43:08 2009 @@ -146,12 +146,10 @@ This is the typical calling convention, where the methods have the type :ctype:`PyCFunction`. The function expects two :ctype:`PyObject\*` values. - The first one is the *self* object for methods; for module functions, it - has the value given to :cfunc:`Py_InitModule4` (or *NULL* if - :cfunc:`Py_InitModule` was used). The second parameter (often called - *args*) is a tuple object representing all arguments. This parameter is - typically processed using :cfunc:`PyArg_ParseTuple` or - :cfunc:`PyArg_UnpackTuple`. + The first one is the *self* object for methods; for module functions, it is + the module object. The second parameter (often called *args*) is a tuple + object representing all arguments. This parameter is typically processed + using :cfunc:`PyArg_ParseTuple` or :cfunc:`PyArg_UnpackTuple`. .. data:: METH_KEYWORDS @@ -167,9 +165,9 @@ Methods without parameters don't need to check whether arguments are given if they are listed with the :const:`METH_NOARGS` flag. They need to be of type - :ctype:`PyCFunction`. When used with object methods, the first parameter is - typically named ``self`` and will hold a reference to the object instance. - In all cases the second parameter will be *NULL*. + :ctype:`PyCFunction`. The first parameter is typically named *self* and will + hold a reference to the module or object instance. In all cases the second + parameter will be *NULL*. .. data:: METH_O Modified: python/branches/py3k/Doc/extending/extending.rst ============================================================================== --- python/branches/py3k/Doc/extending/extending.rst (original) +++ python/branches/py3k/Doc/extending/extending.rst Sat Jul 11 12:43:08 2009 @@ -82,10 +82,8 @@ function. The C function always has two arguments, conventionally named *self* and *args*. -The *self* argument is only used when the C function implements a built-in -method, not a function. In the example, *self* will always be a *NULL* pointer, -since we are defining a function, not a method. (This is done so that the -interpreter doesn't have to understand two different types of C functions.) +The *self* argument points to the module object for module-level functions; +for a method it would point to the object instance. The *args* argument will be a pointer to a Python tuple object containing the arguments. Each item of the tuple corresponds to an argument in the call's From buildbot at python.org Sat Jul 11 12:43:11 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 10:43:11 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.1 Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.1/builds/15 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_signal make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jul 11 12:48:32 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 11 Jul 2009 10:48:32 -0000 Subject: [Python-checkins] r73944 - python/trunk/Lib/distutils/command/build_ext.py Message-ID: Author: tarek.ziade Date: Sat Jul 11 12:48:31 2009 New Revision: 73944 Log: cleaned up distutils.build_ext module Modified: python/trunk/Lib/distutils/command/build_ext.py Modified: python/trunk/Lib/distutils/command/build_ext.py ============================================================================== --- python/trunk/Lib/distutils/command/build_ext.py (original) +++ python/trunk/Lib/distutils/command/build_ext.py Sat Jul 11 12:48:31 2009 @@ -6,8 +6,7 @@ __revision__ = "$Id$" -import sys, os, string, re -from types import * +import sys, os, re from warnings import warn from distutils.core import Command @@ -41,7 +40,7 @@ show_compilers() -class build_ext (Command): +class build_ext(Command): description = "build C/C++ extensions (compile/link to build directory)" @@ -149,7 +148,7 @@ compiler = property(_get_compiler, _set_compiler) - def initialize_options (self): + def initialize_options(self): self.extensions = None self.build_lib = None self.plat_name = None @@ -213,13 +212,13 @@ self.libraries = [] if self.library_dirs is None: self.library_dirs = [] - elif type(self.library_dirs) is StringType: - self.library_dirs = string.split(self.library_dirs, os.pathsep) + elif isinstance(self.library_dirs, str): + self.library_dirs = self.library_dirs.split(os.pathsep) if self.rpath is None: self.rpath = [] - elif type(self.rpath) is StringType: - self.rpath = string.split(self.rpath, os.pathsep) + elif isinstance(self.rpath, str): + self.rpath = self.rpath.split(os.pathsep) # for extensions under windows use different directories # for Release and Debug builds. @@ -296,7 +295,7 @@ if self.define: defines = self.define.split(',') - self.define = map(lambda symbol: (symbol, '1'), defines) + self.define = [(symbol, '1') for symbol in defines] # The option for macros to undefine is also a string from the # option parsing, but has to be a list. Multiple symbols can also @@ -512,7 +511,7 @@ def build_extension(self, ext): sources = ext.sources - if sources is None or type(sources) not in (ListType, TupleType): + if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError, \ ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + @@ -593,14 +592,12 @@ target_lang=language) - def swig_sources (self, sources, extension): - + def swig_sources(self, sources, extension): """Walk the list of source files in 'sources', looking for SWIG interface (.i) files. Run SWIG on all that are found, and return a modified 'sources' list with SWIG source files replaced by the generated C (or C++) files. """ - new_sources = [] swig_sources = [] swig_targets = {} @@ -649,9 +646,7 @@ return new_sources - # swig_sources () - - def find_swig (self): + def find_swig(self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. @@ -680,8 +675,6 @@ ("I don't know how to find (much less run) SWIG " "on platform '%s'") % os.name - # find_swig () - # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) def get_ext_fullpath(self, ext_name): @@ -726,29 +719,28 @@ "foo\bar.pyd"). """ from distutils.sysconfig import get_config_var - ext_path = string.split(ext_name, '.') + ext_path = ext_name.split('.') # OS/2 has an 8 character module (extension) limit :-( if os.name == "os2": ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return apply(os.path.join, ext_path) + '_d' + so_ext + return os.path.join(*ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext - def get_export_symbols (self, ext): + def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "init" + module_name. Only relevant on Windows, where the .pyd file (DLL) must export the module "init" function. """ - - initfunc_name = "init" + string.split(ext.name,'.')[-1] + initfunc_name = "init" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols - def get_libraries (self, ext): + def get_libraries(self, ext): """Return the list of libraries to link against when building a shared extension. On most platforms, this is just 'ext.libraries'; on Windows and OS/2, we add the Python library (eg. python20.dll). @@ -821,5 +813,3 @@ return ext.libraries + [pythonlib] else: return ext.libraries - -# class build_ext From python-checkins at python.org Sat Jul 11 12:51:31 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 10:51:31 -0000 Subject: [Python-checkins] r73945 - python/trunk/Doc/library/locale.rst Message-ID: Author: georg.brandl Date: Sat Jul 11 12:51:31 2009 New Revision: 73945 Log: #6456: clarify the meaning of constants used as arguments to nl_langinfo(). Modified: python/trunk/Doc/library/locale.rst Modified: python/trunk/Doc/library/locale.rst ============================================================================== --- python/trunk/Doc/library/locale.rst (original) +++ python/trunk/Doc/library/locale.rst Sat Jul 11 12:51:31 2009 @@ -148,10 +148,124 @@ .. function:: nl_langinfo(option) - Return some locale-specific information as a string. This function is not - available on all systems, and the set of possible options might also vary across - platforms. The possible argument values are numbers, for which symbolic - constants are available in the locale module. + Return some locale-specific information as a string. This function is not + available on all systems, and the set of possible options might also vary + across platforms. The possible argument values are numbers, for which + symbolic constants are available in the locale module. + + The :func:`nl_langinfo` function accepts one of the following keys. Most + descriptions are taken from the corresponding description in the GNU C + library. + + .. data:: CODESET + + Get a string with the name of the character encoding used in the + selected locale. + + .. data:: D_T_FMT + + Get a string that can be used as a format string for :func:`strftime` to + represent time and date in a locale-specific way. + + .. data:: D_FMT + + Get a string that can be used as a format string for :func:`strftime` to + represent a date in a locale-specific way. + + .. data:: T_FMT + + Get a string that can be used as a format string for :func:`strftime` to + represent a time in a locale-specific way. + + .. data:: T_FMT_AMPM + + Get a format string for :func:`strftime` to represent time in the am/pm + format. + + .. data:: DAY_1 ... DAY_7 + + Get the name of the n-th day of the week. + + .. note:: + + This follows the US convention of :const:`DAY_1` being Sunday, not the + international convention (ISO 8601) that Monday is the first day of the + week. + + .. data:: ABDAY_1 ... ABDAY_7 + + Get the abbreviated name of the n-th day of the week. + + .. data:: MON_1 ... MON_12 + + Get the name of the n-th month. + + .. data:: ABMON_1 ... ABMON_12 + + Get the abbreviated name of the n-th month. + + .. data:: RADIXCHAR + + Get the radix character (decimal dot, decimal comma, etc.) + + .. data:: THOUSEP + + Get the separator character for thousands (groups of three digits). + + .. data:: YESEXPR + + Get a regular expression that can be used with the regex function to + recognize a positive response to a yes/no question. + + .. note:: + + The expression is in the syntax suitable for the :cfunc:`regex` function + from the C library, which might differ from the syntax used in :mod:`re`. + + .. data:: NOEXPR + + Get a regular expression that can be used with the regex(3) function to + recognize a negative response to a yes/no question. + + .. data:: CRNCYSTR + + Get the currency symbol, preceded by "-" if the symbol should appear before + the value, "+" if the symbol should appear after the value, or "." if the + symbol should replace the radix character. + + .. data:: ERA + + Get a string that represents the era used in the current locale. + + Most locales do not define this value. An example of a locale which does + define this value is the Japanese one. In Japan, the traditional + representation of dates includes the name of the era corresponding to the + then-emperor's reign. + + Normally it should not be necessary to use this value directly. Specifying + the ``E`` modifier in their format strings causes the :func:`strftime` + function to use this information. The format of the returned string is not + specified, and therefore you should not assume knowledge of it on different + systems. + + .. data:: ERA_YEAR + + Get the year in the relevant era of the locale. + + .. data:: ERA_D_T_FMT + + Get a format string for :func:`strftime` to represent dates and times in a + locale-specific era-based way. + + .. data:: ERA_D_FMT + + Get a format string for :func:`strftime` to represent time in a + locale-specific era-based way. + + .. data:: ALT_DIGITS + + Get a representation of up to 100 values used to represent the values + 0 to 99. .. function:: getdefaultlocale([envvars]) @@ -360,140 +474,13 @@ This is a symbolic constant used for different values returned by :func:`localeconv`. -The :func:`nl_langinfo` function accepts one of the following keys. Most -descriptions are taken from the corresponding description in the GNU C library. - - -.. data:: CODESET - - Return a string with the name of the character encoding used in the selected - locale. - - -.. data:: D_T_FMT - - Return a string that can be used as a format string for strftime(3) to represent - time and date in a locale-specific way. - - -.. data:: D_FMT - - Return a string that can be used as a format string for strftime(3) to represent - a date in a locale-specific way. - - -.. data:: T_FMT - - Return a string that can be used as a format string for strftime(3) to represent - a time in a locale-specific way. - - -.. data:: T_FMT_AMPM - - The return value can be used as a format string for 'strftime' to represent time - in the am/pm format. - - -.. data:: DAY_1 ... DAY_7 - - Return name of the n-th day of the week. - - .. note:: - - This follows the US convention of :const:`DAY_1` being Sunday, not the - international convention (ISO 8601) that Monday is the first day of the week. - - -.. data:: ABDAY_1 ... ABDAY_7 - - Return abbreviated name of the n-th day of the week. - - -.. data:: MON_1 ... MON_12 - - Return name of the n-th month. - - -.. data:: ABMON_1 ... ABMON_12 - - Return abbreviated name of the n-th month. - - -.. data:: RADIXCHAR - - Return radix character (decimal dot, decimal comma, etc.) - - -.. data:: THOUSEP - - Return separator character for thousands (groups of three digits). - - -.. data:: YESEXPR - - Return a regular expression that can be used with the regex function to - recognize a positive response to a yes/no question. - - .. note:: - - The expression is in the syntax suitable for the :cfunc:`regex` function from - the C library, which might differ from the syntax used in :mod:`re`. - - -.. data:: NOEXPR - - Return a regular expression that can be used with the regex(3) function to - recognize a negative response to a yes/no question. - - -.. data:: CRNCYSTR - - Return the currency symbol, preceded by "-" if the symbol should appear before - the value, "+" if the symbol should appear after the value, or "." if the symbol - should replace the radix character. - - -.. data:: ERA - - The return value represents the era used in the current locale. - - Most locales do not define this value. An example of a locale which does define - this value is the Japanese one. In Japan, the traditional representation of - dates includes the name of the era corresponding to the then-emperor's reign. - - Normally it should not be necessary to use this value directly. Specifying the - ``E`` modifier in their format strings causes the :func:`strftime` function to - use this information. The format of the returned string is not specified, and - therefore you should not assume knowledge of it on different systems. - - -.. data:: ERA_YEAR - - The return value gives the year in the relevant era of the locale. - - -.. data:: ERA_D_T_FMT - - This return value can be used as a format string for :func:`strftime` to - represent dates and times in a locale-specific era-based way. - - -.. data:: ERA_D_FMT - - This return value can be used as a format string for :func:`strftime` to - represent time in a locale-specific era-based way. - - -.. data:: ALT_DIGITS - - The return value is a representation of up to 100 values used to represent the - values 0 to 99. Example:: >>> import locale >>> loc = locale.getlocale() # get current locale - >>> locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform + # use German locale; name might vary with platform + >>> locale.setlocale(locale.LC_ALL, 'de_DE') >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale >>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale From python-checkins at python.org Sat Jul 11 12:55:27 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 11 Jul 2009 10:55:27 -0000 Subject: [Python-checkins] r73946 - in python/trunk: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 11 12:55:27 2009 New Revision: 73946 Log: fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' Modified: python/trunk/Lib/distutils/command/build_ext.py python/trunk/Lib/distutils/tests/test_build_ext.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/distutils/command/build_ext.py ============================================================================== --- python/trunk/Lib/distutils/command/build_ext.py (original) +++ python/trunk/Lib/distutils/command/build_ext.py Sat Jul 11 12:55:27 2009 @@ -732,10 +732,10 @@ def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "init" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "init" function. + provided, "PyInit_" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "PyInit_" function. """ - initfunc_name = "init" + ext.name.split('.')[-1] + initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols Modified: python/trunk/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) +++ python/trunk/Lib/distutils/tests/test_build_ext.py Sat Jul 11 12:55:27 2009 @@ -299,7 +299,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jul 11 12:55:27 2009 @@ -350,6 +350,9 @@ Library ------- +- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the + "PyInit" prefix, rather than "init". + - Issue #6455: Fixed test_build_ext under win32. - Issue #6377: Enabled the compiler option, and deprecate its usage as an From python-checkins at python.org Sat Jul 11 12:57:49 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 11 Jul 2009 10:57:49 -0000 Subject: [Python-checkins] r73947 - in python/branches/release26-maint: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 11 12:57:49 2009 New Revision: 73947 Log: Merged revisions 73946 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73946 | tarek.ziade | 2009-07-11 12:55:27 +0200 (Sat, 11 Jul 2009) | 1 line fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/distutils/command/build_ext.py python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/command/build_ext.py (original) +++ python/branches/release26-maint/Lib/distutils/command/build_ext.py Sat Jul 11 12:57:49 2009 @@ -680,11 +680,10 @@ def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "init" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "init" function. + provided, "PyInit_" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "PyInit_" function. """ - - initfunc_name = "init" + string.split(ext.name,'.')[-1] + initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols Modified: python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py Sat Jul 11 12:57:49 2009 @@ -233,7 +233,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {};\n') ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sat Jul 11 12:57:49 2009 @@ -262,6 +262,9 @@ Library ------- +- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the + "PyInit" prefix, rather than "init". + - Issue #6455: Fixed test_build_ext under win32. - Issue #6403: Fixed package path usage in build_ext. From python-checkins at python.org Sat Jul 11 12:59:57 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 11 Jul 2009 10:59:57 -0000 Subject: [Python-checkins] r73948 - in python/branches/py3k: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 11 12:59:56 2009 New Revision: 73948 Log: Merged revisions 73946 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73946 | tarek.ziade | 2009-07-11 12:55:27 +0200 (Sat, 11 Jul 2009) | 1 line fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/command/build_ext.py python/branches/py3k/Lib/distutils/tests/test_build_ext.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/command/build_ext.py (original) +++ python/branches/py3k/Lib/distutils/command/build_ext.py Sat Jul 11 12:59:56 2009 @@ -726,7 +726,7 @@ """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "PyInit_" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "init" function. + the .pyd file (DLL) must export the module "PyInit_" function. """ initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: Modified: python/branches/py3k/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_build_ext.py Sat Jul 11 12:59:56 2009 @@ -299,7 +299,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sat Jul 11 12:59:56 2009 @@ -888,6 +888,9 @@ Library ------- +- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the + "PyInit" prefix, rather than "init". + - Issue #6455: Fixed test_build_ext under win32. - Issue #6377: Enabled the compiler option, and deprecate its usage as an From python-checkins at python.org Sat Jul 11 13:01:14 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 11 Jul 2009 11:01:14 -0000 Subject: [Python-checkins] r73949 - in python/branches/release31-maint: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 11 13:01:14 2009 New Revision: 73949 Log: Merged revisions 73948 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r73948 | tarek.ziade | 2009-07-11 12:59:56 +0200 (Sat, 11 Jul 2009) | 9 lines Merged revisions 73946 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73946 | tarek.ziade | 2009-07-11 12:55:27 +0200 (Sat, 11 Jul 2009) | 1 line fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/command/build_ext.py python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/command/build_ext.py (original) +++ python/branches/release31-maint/Lib/distutils/command/build_ext.py Sat Jul 11 13:01:14 2009 @@ -679,7 +679,7 @@ """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "PyInit_" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "init" function. + the .pyd file (DLL) must export the module "PyInit_" function. """ initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: Modified: python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_build_ext.py Sat Jul 11 13:01:14 2009 @@ -296,7 +296,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sat Jul 11 13:01:14 2009 @@ -869,6 +869,9 @@ Library ------- +- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the + "PyInit" prefix, rather than "init". + - Issue #6455: Fixed test_build_ext under win32. - Issue #6413: Fixed the log level in distutils.dist for announce. From python-checkins at python.org Sat Jul 11 13:02:29 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 11 Jul 2009 11:02:29 -0000 Subject: [Python-checkins] r73950 - python/branches/py3k Message-ID: Author: tarek.ziade Date: Sat Jul 11 13:02:29 2009 New Revision: 73950 Log: Blocked revisions 73944 via svnmerge ........ r73944 | tarek.ziade | 2009-07-11 12:48:31 +0200 (Sat, 11 Jul 2009) | 1 line cleaned up distutils.build_ext module ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Sat Jul 11 13:20:57 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 11:20:57 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2317 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: kristjan.jonsson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 sincerely, -The Buildbot From solipsis at pitrou.net Sat Jul 11 13:24:58 2009 From: solipsis at pitrou.net (Antoine Pitrou) Date: Sat, 11 Jul 2009 11:24:58 +0000 (UTC) Subject: [Python-checkins] =?utf-8?q?r73931_-_python/trunk/Lib/test/test?= =?utf-8?q?=5Fzipfile=2Epy?= References: <35758.2046454356$1247257570@news.gmane.org> Message-ID: Hello, > - def testStored(self): > + def test_OpenStored(self): If you want to PEP8-ify method names, please do it entirely: `test_open_stored` instead of `test_OpenStored` Regards Antoine. From buildbot at python.org Sat Jul 11 15:02:48 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 13:02:48 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/288 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: tarek.ziade BUILD FAILED: failed 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 524, in __bootstrap_inner self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 477, 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 306, 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 68, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') 1 test failed: test_mailbox make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Sat Jul 11 15:26:07 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 13:26:07 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/945 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_xmlrpc ====================================================================== FAIL: test_two (test.test_xmlrpc.KeepaliveServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_xmlrpc.py", line 514, in test_two self.assertTrue(len(self.RequestHandler.myRequests[-1]) >= 2) AssertionError: False is not True make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jul 11 16:23:39 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 11 Jul 2009 14:23:39 -0000 Subject: [Python-checkins] r73951 - python/trunk/Doc/library/array.rst Message-ID: Author: georg.brandl Date: Sat Jul 11 16:23:38 2009 New Revision: 73951 Log: array.array is actually a class. Modified: python/trunk/Doc/library/array.rst Modified: python/trunk/Doc/library/array.rst ============================================================================== --- python/trunk/Doc/library/array.rst (original) +++ python/trunk/Doc/library/array.rst Sat Jul 11 16:23:38 2009 @@ -58,9 +58,9 @@ The module defines the following type: -.. function:: array(typecode[, initializer]) +.. class:: array(typecode[, initializer]) - Return a new array whose items are restricted by *typecode*, and initialized + A new array whose items are restricted by *typecode*, and initialized from the optional *initializer* value, which must be a list, string, or iterable over elements of the appropriate type. @@ -75,7 +75,7 @@ .. data:: ArrayType - Obsolete alias for :func:`array`. + Obsolete alias for :class:`array`. Array objects support the ordinary sequence operations of indexing, slicing, concatenation, and multiplication. When using slice assignment, the assigned @@ -85,7 +85,6 @@ The following data items and methods are also supported: - .. attribute:: array.typecode The typecode character used to create the array. From python-checkins at python.org Sat Jul 11 16:33:51 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Sat, 11 Jul 2009 14:33:51 -0000 Subject: [Python-checkins] r73952 - in python/trunk: Lib/email/base64mime.py Lib/email/header.py Lib/email/message.py Lib/email/quoprimime.py Lib/email/test/test_email_codecs.py Lib/email/test/test_email_torture.py Lib/test/test_old_mailbox.py Lib/wsgiref/headers.py Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Sat Jul 11 16:33:51 2009 New Revision: 73952 Log: #2622 Import errors in email.message, from a py2app standalone application. Patch by Mads Kiilerich, Reviewed by Barry Warsaw. Modified: python/trunk/Lib/email/base64mime.py python/trunk/Lib/email/header.py python/trunk/Lib/email/message.py python/trunk/Lib/email/quoprimime.py python/trunk/Lib/email/test/test_email_codecs.py python/trunk/Lib/email/test/test_email_torture.py python/trunk/Lib/test/test_old_mailbox.py python/trunk/Lib/wsgiref/headers.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/email/base64mime.py ============================================================================== --- python/trunk/Lib/email/base64mime.py (original) +++ python/trunk/Lib/email/base64mime.py Sat Jul 11 16:33:51 2009 @@ -20,7 +20,7 @@ This module does not do the line wrapping or end-of-line character conversion necessary for proper internationalized headers; it only does dumb encoding and -decoding. To deal with the various line wrapping issues, use the email.Header +decoding. To deal with the various line wrapping issues, use the email.header module. """ @@ -167,7 +167,7 @@ This function does not parse a full MIME header value encoded with base64 (like =?iso-8895-1?b?bmloISBuaWgh?=) -- please use the high - level email.Header class for that functionality. + level email.header class for that functionality. """ if not s: return s Modified: python/trunk/Lib/email/header.py ============================================================================== --- python/trunk/Lib/email/header.py (original) +++ python/trunk/Lib/email/header.py Sat Jul 11 16:33:51 2009 @@ -62,7 +62,7 @@ header, otherwise a lower-case string containing the name of the character set specified in the encoded string. - An email.Errors.HeaderParseError may be raised when certain decoding error + An email.errors.HeaderParseError may be raised when certain decoding error occurs (e.g. a base64 decoding exception). """ # If no encoding, just return the header @@ -337,8 +337,8 @@ # different charsets and/or encodings, and the resulting header will # accurately reflect each setting. # - # Each encoding can be email.Utils.QP (quoted-printable, for - # ASCII-like character sets like iso-8859-1), email.Utils.BASE64 + # Each encoding can be email.utils.QP (quoted-printable, for + # ASCII-like character sets like iso-8859-1), email.utils.BASE64 # (Base64, for non-ASCII like character sets like KOI8-R and # iso-2022-jp), or None (no encoding). # Modified: python/trunk/Lib/email/message.py ============================================================================== --- python/trunk/Lib/email/message.py (original) +++ python/trunk/Lib/email/message.py Sat Jul 11 16:33:51 2009 @@ -129,7 +129,7 @@ "From ". For more flexibility, use the flatten() method of a Generator instance. """ - from email.Generator import Generator + from email.generator import Generator fp = StringIO() g = Generator(fp) g.flatten(self, unixfrom=unixfrom) @@ -787,4 +787,4 @@ return [part.get_content_charset(failobj) for part in self.walk()] # I.e. def walk(self): ... - from email.Iterators import walk + from email.iterators import walk Modified: python/trunk/Lib/email/quoprimime.py ============================================================================== --- python/trunk/Lib/email/quoprimime.py (original) +++ python/trunk/Lib/email/quoprimime.py Sat Jul 11 16:33:51 2009 @@ -11,7 +11,7 @@ allowed in email bodies or headers. Quoted-printable is very space-inefficient for encoding binary files; use the -email.base64MIME module for that instead. +email.base64mime module for that instead. This module provides an interface to encode and decode both headers and bodies with quoted-printable encoding. @@ -23,7 +23,7 @@ This module does not do the line wrapping or end-of-line character conversion necessary for proper internationalized headers; it only does dumb encoding and decoding. To deal with the various line -wrapping issues, use the email.Header module. +wrapping issues, use the email.header module. """ __all__ = [ @@ -330,7 +330,7 @@ This function does not parse a full MIME header value encoded with quoted-printable (like =?iso-8895-1?q?Hello_World?=) -- please use - the high level email.Header class for that functionality. + the high level email.header class for that functionality. """ s = s.replace('_', ' ') return re.sub(r'=\w{2}', _unquote_match, s) Modified: python/trunk/Lib/email/test/test_email_codecs.py ============================================================================== --- python/trunk/Lib/email/test/test_email_codecs.py (original) +++ python/trunk/Lib/email/test/test_email_codecs.py Sat Jul 11 16:33:51 2009 @@ -6,9 +6,9 @@ from test.test_support import run_unittest from email.test.test_email import TestEmailBase -from email.Charset import Charset -from email.Header import Header, decode_header -from email.Message import Message +from email.charset import Charset +from email.header import Header, decode_header +from email.message import Message # We're compatible with Python 2.3, but it doesn't have the built-in Asian # codecs, so we have to skip all these tests. Modified: python/trunk/Lib/email/test/test_email_torture.py ============================================================================== --- python/trunk/Lib/email/test/test_email_torture.py (original) +++ python/trunk/Lib/email/test/test_email_torture.py Sat Jul 11 16:33:51 2009 @@ -17,7 +17,7 @@ import email from email import __file__ as testfile -from email.Iterators import _structure +from email.iterators import _structure def openfile(filename): from os.path import join, dirname, abspath Modified: python/trunk/Lib/test/test_old_mailbox.py ============================================================================== --- python/trunk/Lib/test/test_old_mailbox.py (original) +++ python/trunk/Lib/test/test_old_mailbox.py Sat Jul 11 16:33:51 2009 @@ -99,11 +99,11 @@ def test_unix_mbox(self): ### should be better! - import email.Parser + import email.parser fname = self.createMessage("cur", True) n = 0 for msg in mailbox.PortableUnixMailbox(open(fname), - email.Parser.Parser().parse): + email.parser.Parser().parse): n += 1 self.assertEqual(msg["subject"], "Simple Test") self.assertEqual(len(str(msg)), len(FROM_)+len(DUMMY_MESSAGE)) Modified: python/trunk/Lib/wsgiref/headers.py ============================================================================== --- python/trunk/Lib/wsgiref/headers.py (original) +++ python/trunk/Lib/wsgiref/headers.py Sat Jul 11 16:33:51 2009 @@ -1,6 +1,6 @@ """Manage HTTP Response Headers -Much of this module is red-handedly pilfered from email.Message in the stdlib, +Much of this module is red-handedly pilfered from email.message in the stdlib, so portions are Copyright (C) 2001,2002 Python Software Foundation, and were written by Barry Warsaw. """ @@ -174,7 +174,7 @@ h.add_header('content-disposition', 'attachment', filename='bud.gif') - Note that unlike the corresponding 'email.Message' method, this does + Note that unlike the corresponding 'email.message' method, this does *not* handle '(charset, language, value)' tuples: all values must be strings or None. """ Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jul 11 16:33:51 2009 @@ -350,6 +350,9 @@ Library ------- +- Issue #2622: Fixed an ImportError when importing email.messsage from a + standalone application built with py2exe or py2app. + - Issue #6459: distutils.command.build_ext.get_export_symbols now uses the "PyInit" prefix, rather than "init". From python-checkins at python.org Sat Jul 11 16:37:20 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Sat, 11 Jul 2009 14:37:20 -0000 Subject: [Python-checkins] r73953 - in python/branches/release26-maint: Lib/email/base64mime.py Lib/email/header.py Lib/email/message.py Lib/email/quoprimime.py Lib/email/test/test_email_codecs.py Lib/email/test/test_email_torture.py Lib/test/test_old_mailbox.py Lib/wsgiref/headers.py Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Sat Jul 11 16:37:20 2009 New Revision: 73953 Log: Merged revisions 73952 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73952 | amaury.forgeotdarc | 2009-07-11 16:33:51 +0200 (sam., 11 juil. 2009) | 4 lines #2622 Import errors in email.message, from a py2app standalone application. Patch by Mads Kiilerich, Reviewed by Barry Warsaw. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/email/base64mime.py python/branches/release26-maint/Lib/email/header.py python/branches/release26-maint/Lib/email/message.py python/branches/release26-maint/Lib/email/quoprimime.py python/branches/release26-maint/Lib/email/test/test_email_codecs.py python/branches/release26-maint/Lib/email/test/test_email_torture.py python/branches/release26-maint/Lib/test/test_old_mailbox.py python/branches/release26-maint/Lib/wsgiref/headers.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/email/base64mime.py ============================================================================== --- python/branches/release26-maint/Lib/email/base64mime.py (original) +++ python/branches/release26-maint/Lib/email/base64mime.py Sat Jul 11 16:37:20 2009 @@ -20,7 +20,7 @@ This module does not do the line wrapping or end-of-line character conversion necessary for proper internationalized headers; it only does dumb encoding and -decoding. To deal with the various line wrapping issues, use the email.Header +decoding. To deal with the various line wrapping issues, use the email.header module. """ @@ -167,7 +167,7 @@ This function does not parse a full MIME header value encoded with base64 (like =?iso-8895-1?b?bmloISBuaWgh?=) -- please use the high - level email.Header class for that functionality. + level email.header class for that functionality. """ if not s: return s Modified: python/branches/release26-maint/Lib/email/header.py ============================================================================== --- python/branches/release26-maint/Lib/email/header.py (original) +++ python/branches/release26-maint/Lib/email/header.py Sat Jul 11 16:37:20 2009 @@ -62,7 +62,7 @@ header, otherwise a lower-case string containing the name of the character set specified in the encoded string. - An email.Errors.HeaderParseError may be raised when certain decoding error + An email.errors.HeaderParseError may be raised when certain decoding error occurs (e.g. a base64 decoding exception). """ # If no encoding, just return the header @@ -337,8 +337,8 @@ # different charsets and/or encodings, and the resulting header will # accurately reflect each setting. # - # Each encoding can be email.Utils.QP (quoted-printable, for - # ASCII-like character sets like iso-8859-1), email.Utils.BASE64 + # Each encoding can be email.utils.QP (quoted-printable, for + # ASCII-like character sets like iso-8859-1), email.utils.BASE64 # (Base64, for non-ASCII like character sets like KOI8-R and # iso-2022-jp), or None (no encoding). # Modified: python/branches/release26-maint/Lib/email/message.py ============================================================================== --- python/branches/release26-maint/Lib/email/message.py (original) +++ python/branches/release26-maint/Lib/email/message.py Sat Jul 11 16:37:20 2009 @@ -129,7 +129,7 @@ "From ". For more flexibility, use the flatten() method of a Generator instance. """ - from email.Generator import Generator + from email.generator import Generator fp = StringIO() g = Generator(fp) g.flatten(self, unixfrom=unixfrom) @@ -787,4 +787,4 @@ return [part.get_content_charset(failobj) for part in self.walk()] # I.e. def walk(self): ... - from email.Iterators import walk + from email.iterators import walk Modified: python/branches/release26-maint/Lib/email/quoprimime.py ============================================================================== --- python/branches/release26-maint/Lib/email/quoprimime.py (original) +++ python/branches/release26-maint/Lib/email/quoprimime.py Sat Jul 11 16:37:20 2009 @@ -11,7 +11,7 @@ allowed in email bodies or headers. Quoted-printable is very space-inefficient for encoding binary files; use the -email.base64MIME module for that instead. +email.base64mime module for that instead. This module provides an interface to encode and decode both headers and bodies with quoted-printable encoding. @@ -23,7 +23,7 @@ This module does not do the line wrapping or end-of-line character conversion necessary for proper internationalized headers; it only does dumb encoding and decoding. To deal with the various line -wrapping issues, use the email.Header module. +wrapping issues, use the email.header module. """ __all__ = [ @@ -330,7 +330,7 @@ This function does not parse a full MIME header value encoded with quoted-printable (like =?iso-8895-1?q?Hello_World?=) -- please use - the high level email.Header class for that functionality. + the high level email.header class for that functionality. """ s = s.replace('_', ' ') return re.sub(r'=\w{2}', _unquote_match, s) Modified: python/branches/release26-maint/Lib/email/test/test_email_codecs.py ============================================================================== --- python/branches/release26-maint/Lib/email/test/test_email_codecs.py (original) +++ python/branches/release26-maint/Lib/email/test/test_email_codecs.py Sat Jul 11 16:37:20 2009 @@ -6,9 +6,9 @@ from test.test_support import TestSkipped, run_unittest from email.test.test_email import TestEmailBase -from email.Charset import Charset -from email.Header import Header, decode_header -from email.Message import Message +from email.charset import Charset +from email.header import Header, decode_header +from email.message import Message # We're compatible with Python 2.3, but it doesn't have the built-in Asian # codecs, so we have to skip all these tests. Modified: python/branches/release26-maint/Lib/email/test/test_email_torture.py ============================================================================== --- python/branches/release26-maint/Lib/email/test/test_email_torture.py (original) +++ python/branches/release26-maint/Lib/email/test/test_email_torture.py Sat Jul 11 16:37:20 2009 @@ -17,7 +17,7 @@ import email from email import __file__ as testfile -from email.Iterators import _structure +from email.iterators import _structure def openfile(filename): from os.path import join, dirname, abspath Modified: python/branches/release26-maint/Lib/test/test_old_mailbox.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_old_mailbox.py (original) +++ python/branches/release26-maint/Lib/test/test_old_mailbox.py Sat Jul 11 16:37:20 2009 @@ -99,11 +99,11 @@ def test_unix_mbox(self): ### should be better! - import email.Parser + import email.parser fname = self.createMessage("cur", True) n = 0 for msg in mailbox.PortableUnixMailbox(open(fname), - email.Parser.Parser().parse): + email.parser.Parser().parse): n += 1 self.assertEqual(msg["subject"], "Simple Test") self.assertEqual(len(str(msg)), len(FROM_)+len(DUMMY_MESSAGE)) Modified: python/branches/release26-maint/Lib/wsgiref/headers.py ============================================================================== --- python/branches/release26-maint/Lib/wsgiref/headers.py (original) +++ python/branches/release26-maint/Lib/wsgiref/headers.py Sat Jul 11 16:37:20 2009 @@ -1,6 +1,6 @@ """Manage HTTP Response Headers -Much of this module is red-handedly pilfered from email.Message in the stdlib, +Much of this module is red-handedly pilfered from email.message in the stdlib, so portions are Copyright (C) 2001,2002 Python Software Foundation, and were written by Barry Warsaw. """ @@ -174,7 +174,7 @@ h.add_header('content-disposition', 'attachment', filename='bud.gif') - Note that unlike the corresponding 'email.Message' method, this does + Note that unlike the corresponding 'email.message' method, this does *not* handle '(charset, language, value)' tuples: all values must be strings or None. """ Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sat Jul 11 16:37:20 2009 @@ -262,6 +262,9 @@ Library ------- +- Issue #2622: Fixed an ImportError when importing email.messsage from a + standalone application built with py2exe or py2app. + - Issue #6459: distutils.command.build_ext.get_export_symbols now uses the "PyInit" prefix, rather than "init". From buildbot at python.org Sat Jul 11 17:15:02 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 15:15:02 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1306 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: amaury.forgeotdarc,georg.brandl BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/threading.py", line 524, in __bootstrap_inner self.run() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/test/test_ftplib.py", line 203, in run asyncore.loop(timeout=0.1, count=1) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asyncore.py", line 211, in loop poll_fun(timeout, map) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asyncore.py", line 148, in poll read(obj) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asyncore.py", line 80, in read obj.handle_error() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asyncore.py", line 76, in read obj.handle_read_event() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asyncore.py", line 421, in handle_read_event self.handle_read() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asynchat.py", line 112, in handle_read self.handle_error() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asynchat.py", line 110, in handle_read data = self.recv (self.ac_in_buffer_size) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asyncore.py", line 370, in recv data = self.socket.recv(buffer_size) error: [Errno 9] Bad file descriptor Traceback (most recent call last): File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/threading.py", line 524, in __bootstrap_inner self.run() File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/test/test_ftplib.py", line 203, in run asyncore.loop(timeout=0.1, count=1) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asyncore.py", line 211, in loop poll_fun(timeout, map) File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/asyncore.py", line 137, in poll r, w, e = select.select(r, w, e, timeout) error: (9, 'Bad file descriptor') 1 test failed: test_ftplib make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jul 11 19:21:00 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 11 Jul 2009 17:21:00 -0000 Subject: [Python-checkins] r73954 - in python/trunk: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 11 19:21:00 2009 New Revision: 73954 Log: reverted changes for #6459 (doesn't apply on 2.x) Modified: python/trunk/Lib/distutils/command/build_ext.py python/trunk/Lib/distutils/tests/test_build_ext.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/distutils/command/build_ext.py ============================================================================== --- python/trunk/Lib/distutils/command/build_ext.py (original) +++ python/trunk/Lib/distutils/command/build_ext.py Sat Jul 11 19:21:00 2009 @@ -732,10 +732,10 @@ def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "PyInit_" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "PyInit_" function. + provided, "init" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "init" function. """ - initfunc_name = "PyInit_" + ext.name.split('.')[-1] + initfunc_name = "init" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols Modified: python/trunk/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) +++ python/trunk/Lib/distutils/tests/test_build_ext.py Sat Jul 11 19:21:00 2009 @@ -299,7 +299,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void PyInit_foo(void) {};\n') + self.write_file(c_file, 'void init_foo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jul 11 19:21:00 2009 @@ -353,9 +353,6 @@ - Issue #2622: Fixed an ImportError when importing email.messsage from a standalone application built with py2exe or py2app. -- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the - "PyInit" prefix, rather than "init". - - Issue #6455: Fixed test_build_ext under win32. - Issue #6377: Enabled the compiler option, and deprecate its usage as an From python-checkins at python.org Sat Jul 11 19:22:14 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 11 Jul 2009 17:22:14 -0000 Subject: [Python-checkins] r73955 - in python/branches/release26-maint: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Jul 11 19:22:14 2009 New Revision: 73955 Log: Merged revisions 73954 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73954 | tarek.ziade | 2009-07-11 19:21:00 +0200 (Sat, 11 Jul 2009) | 1 line reverted changes for #6459 (doesn't apply on 2.x) ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/distutils/command/build_ext.py python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/distutils/command/build_ext.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/command/build_ext.py (original) +++ python/branches/release26-maint/Lib/distutils/command/build_ext.py Sat Jul 11 19:22:14 2009 @@ -680,10 +680,10 @@ def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "PyInit_" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "PyInit_" function. + provided, "init" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "init" function. """ - initfunc_name = "PyInit_" + ext.name.split('.')[-1] + initfunc_name = "init" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols Modified: python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py Sat Jul 11 19:22:14 2009 @@ -233,7 +233,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void PyInit_foo(void) {};\n') + self.write_file(c_file, 'void init_foo(void) {};\n') ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sat Jul 11 19:22:14 2009 @@ -265,9 +265,6 @@ - Issue #2622: Fixed an ImportError when importing email.messsage from a standalone application built with py2exe or py2app. -- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the - "PyInit" prefix, rather than "init". - - Issue #6455: Fixed test_build_ext under win32. - Issue #6403: Fixed package path usage in build_ext. From buildbot at python.org Sat Jul 11 19:40:09 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 17:40:09 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/290 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: tarek.ziade BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From python-checkins at python.org Sat Jul 11 20:28:48 2009 From: python-checkins at python.org (ezio.melotti) Date: Sat, 11 Jul 2009 18:28:48 -0000 Subject: [Python-checkins] r73956 - python/branches/py3k/Lib/test/test_zipfile.py Message-ID: Author: ezio.melotti Date: Sat Jul 11 20:28:48 2009 New Revision: 73956 Log: Merged revisions 73931 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73931 | ezio.melotti | 2009-07-10 23:25:56 +0300 (Fri, 10 Jul 2009) | 1 line more cleanups and if zlib -> skipUnless(zlib) ........ Modified: python/branches/py3k/Lib/test/test_zipfile.py Modified: python/branches/py3k/Lib/test/test_zipfile.py ============================================================================== --- python/branches/py3k/Lib/test/test_zipfile.py (original) +++ python/branches/py3k/Lib/test/test_zipfile.py Sat Jul 11 20:28:48 2009 @@ -16,8 +16,7 @@ from random import randint, random from unittest import skipUnless -from test import support -from test.support import TESTFN, run_unittest, findfile +from test.support import TESTFN, run_unittest, findfile, unlink TESTFN2 = TESTFN + "2" TESTFNDIR = TESTFN + "d" @@ -28,6 +27,7 @@ ('/ziptest2dir/ziptest3dir/_ziptest3', 'azsxdcfvgb'), ('ziptest2dir/ziptest3dir/ziptest4dir/_ziptest3', '6y7u8i9o0p')] + class TestsWithSourceFile(unittest.TestCase): def setUp(self): self.line_gen = (bytes("Zipfile test line %d. random float: %f" % @@ -60,7 +60,6 @@ # Print the ZIP directory fp = io.StringIO() zipfp.printdir(file=fp) - directory = fp.getvalue() lines = directory.splitlines() self.assertEquals(len(lines), 4) # Number of files + header @@ -101,7 +100,7 @@ zipfp.testzip() zipfp.close() - def testStored(self): + def test_Stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipTest(f, zipfile.ZIP_STORED) @@ -130,11 +129,11 @@ self.assertEqual(b''.join(zipdata2), self.data) zipfp.close() - def testOpenStored(self): + def test_OpenStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipOpenTest(f, zipfile.ZIP_STORED) - def testOpenViaZipInfo(self): + def test_OpenViaZipInfo(self): # Create the ZIP archive zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.writestr("name", "foo") @@ -169,7 +168,7 @@ self.assertEqual(b''.join(zipdata1), self.data) zipfp.close() - def testRandomOpenStored(self): + def test_RandomOpenStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipRandomOpenTest(f, zipfile.ZIP_STORED) @@ -206,51 +205,51 @@ zipfp.close() - def testReadlineStored(self): + def test_ReadlineStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipReadlineTest(f, zipfile.ZIP_STORED) - def testReadlinesStored(self): + def test_ReadlinesStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipReadlinesTest(f, zipfile.ZIP_STORED) - def testIterlinesStored(self): + def test_IterlinesStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipIterlinesTest(f, zipfile.ZIP_STORED) @skipUnless(zlib, "requires zlib") - def testDeflated(self): + def test_Deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testOpenDeflated(self): + def test_OpenDeflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipOpenTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testRandomOpenDeflated(self): + def test_RandomOpenDeflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipRandomOpenTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testReadlineDeflated(self): + def test_ReadlineDeflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipReadlineTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testReadlinesDeflated(self): + def test_ReadlinesDeflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipReadlinesTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testIterlinesDeflated(self): + def test_IterlinesDeflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipIterlinesTest(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def testLowCompression(self): + def test_LowCompression(self): # Checks for cases where compressed data is larger than original # Create the ZIP archive zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) @@ -263,8 +262,7 @@ self.assertEqual(openobj.read(1), b'1') self.assertEqual(openobj.read(1), b'2') - - def testAbsoluteArcnames(self): + def test_AbsoluteArcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.write(TESTFN, "/absolute") zipfp.close() @@ -273,7 +271,7 @@ self.assertEqual(zipfp.namelist(), ["absolute"]) zipfp.close() - def testAppendToZipFile(self): + def test_AppendToZipFile(self): # Test appending to an existing zipfile zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.write(TESTFN, TESTFN) @@ -283,7 +281,7 @@ self.assertEqual(zipfp.namelist(), [TESTFN, "strfile"]) zipfp.close() - def testAppendToNonZipFile(self): + def test_AppendToNonZipFile(self): # Test appending to an existing file that is not a zipfile # NOTE: this test fails if len(d) < 22 because of the first # line "fpin.seek(-22, 2)" in _EndRecData @@ -330,7 +328,7 @@ self.assertRaises(RuntimeError, zipf.write, TESTFN) zipf.close() - def testExtract(self): + def test_Extract(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata) @@ -359,7 +357,7 @@ # remove the test file subdirectories shutil.rmtree(os.path.join(os.getcwd(), 'ziptest2dir')) - def testExtractAll(self): + def test_ExtractAll(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata) @@ -391,7 +389,7 @@ zinfo = zipfp.getinfo('strfile') self.assertEqual(zinfo.external_attr, 0o600 << 16) - def test_writestr_permissions(self): + def test_WritestrPermissions(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED) @@ -404,8 +402,9 @@ orig_zip.close() def tearDown(self): - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) + class TestZip64InSmallFiles(unittest.TestCase): # These tests test the ZIP64 functionality without using large files, @@ -436,7 +435,7 @@ zipfp.writestr, "another.name", self.data) zipfp.close() - def testLargeFileException(self): + def test_LargeFileException(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.largeFileExceptionTest(f, zipfile.ZIP_STORED) self.largeFileExceptionTest2(f, zipfile.ZIP_STORED) @@ -498,20 +497,18 @@ # Check that testzip doesn't raise an exception zipfp.testzip() - zipfp.close() - def testStored(self): + def test_Stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipTest(f, zipfile.ZIP_STORED) + @skipUnless(zlib, "requires zlib") + def test_Deflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.zipTest(f, zipfile.ZIP_DEFLATED) - if zlib: - def testDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipTest(f, zipfile.ZIP_DEFLATED) - - def testAbsoluteArcnames(self): + def test_AbsoluteArcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED, allowZip64=True) zipfp.write(TESTFN, "/absolute") zipfp.close() @@ -522,11 +519,12 @@ def tearDown(self): zipfile.ZIP64_LIMIT = self._limit - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) + class PyZipFileTests(unittest.TestCase): - def testWritePyfile(self): + def test_WritePyfile(self): zipfp = zipfile.PyZipFile(TemporaryFile(), "w") fn = __file__ if fn.endswith('.pyc') or fn.endswith('.pyo'): @@ -539,7 +537,6 @@ self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() - zipfp = zipfile.PyZipFile(TemporaryFile(), "w") fn = __file__ if fn.endswith('.pyc') or fn.endswith('.pyo'): @@ -552,7 +549,7 @@ self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() - def testWritePythonPackage(self): + def test_WritePythonPackage(self): import email packagedir = os.path.dirname(email.__file__) @@ -564,7 +561,7 @@ self.assertTrue('email/__init__.pyo' in names or 'email/__init__.pyc' in names) self.assertTrue('email/mime/text.pyo' in names or 'email/mime/text.pyc' in names) - def testWritePythonDirectory(self): + def test_WritePythonDirectory(self): os.mkdir(TESTFN2) try: fp = open(os.path.join(TESTFN2, "mod1.py"), "w") @@ -590,7 +587,7 @@ finally: shutil.rmtree(TESTFN2) - def testWriteNonPyfile(self): + def test_WriteNonPyfile(self): zipfp = zipfile.PyZipFile(TemporaryFile(), "w") open(TESTFN, 'w').write('most definitely not a python file') self.assertRaises(RuntimeError, zipfp.writepy, TESTFN) @@ -598,7 +595,7 @@ class OtherTests(unittest.TestCase): - def testUnicodeFilenames(self): + def test_UnicodeFilenames(self): zf = zipfile.ZipFile(TESTFN, "w") zf.writestr("foo.txt", "Test for unicode filename") zf.writestr("\xf6.txt", "Test for unicode filename") @@ -608,7 +605,7 @@ self.assertEqual(zf.filelist[1].filename, "\xf6.txt") zf.close() - def testCreateNonExistentFileForAppend(self): + def test_CreateNonExistentFileForAppend(self): if os.path.exists(TESTFN): os.unlink(TESTFN) @@ -628,7 +625,7 @@ self.assertEqual(zf.read(filename), content) zf.close() - def testCloseErroneousFile(self): + def test_CloseErroneousFile(self): # This test checks that the ZipFile constructor closes the file object # it opens if there's an error in the file. If it doesn't, the traceback # holds a reference to the ZipFile object and, indirectly, the file object. @@ -643,7 +640,7 @@ except zipfile.BadZipfile: pass - def testIsZipErroneousFile(self): + def test_IsZipErroneousFile(self): # This test checks that the is_zipfile function correctly identifies # a file that is not a zip file @@ -665,7 +662,7 @@ chk = zipfile.is_zipfile(fp) self.assertTrue(not chk) - def testIsZipValidFile(self): + def test_IsZipValidFile(self): # This test checks that the is_zipfile function correctly identifies # a file that is a zip file @@ -690,7 +687,7 @@ chk = zipfile.is_zipfile(fp) self.assertTrue(chk) - def testNonExistentFileRaisesIOError(self): + def test_NonExistentFileRaisesIOError(self): # make sure we don't raise an AttributeError when a partially-constructed # ZipFile instance is finalized; this tests for regression on SF tracker # bug #403871. @@ -704,7 +701,7 @@ # quickly. self.assertRaises(IOError, zipfile.ZipFile, TESTFN) - def testClosedZipRaisesRuntimeError(self): + def test_ClosedZipRaisesRuntimeError(self): # Verify that testzip() doesn't swallow inappropriate exceptions. data = io.BytesIO() zipf = zipfile.ZipFile(data, mode="w") @@ -773,7 +770,7 @@ self.assertEqual(zipfile.sizeEndCentDir64, 56) self.assertEqual(zipfile.sizeEndCentDir64Locator, 20) - def testComments(self): + def test_Comments(self): # This test checks that comments on the archive are handled properly # check default comment is empty @@ -816,8 +813,9 @@ zipfr.close() def tearDown(self): - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) + class DecryptionTests(unittest.TestCase): # This test checks that ZIP decryption works. Since the library does not @@ -861,19 +859,19 @@ self.zip2.close() os.unlink(TESTFN2) - def testNoPassword(self): + def test_NoPassword(self): # Reading the encrypted file without password # must generate a RunTime exception self.assertRaises(RuntimeError, self.zip.read, "test.txt") self.assertRaises(RuntimeError, self.zip2.read, "zero") - def testBadPassword(self): + def test_BadPassword(self): self.zip.setpassword(b"perl") self.assertRaises(RuntimeError, self.zip.read, "test.txt") self.zip2.setpassword(b"perl") self.assertRaises(RuntimeError, self.zip2.read, "zero") - def testGoodPassword(self): + def test_GoodPassword(self): self.zip.setpassword(b"python") self.assertEquals(self.zip.read("test.txt"), self.plain) self.zip2.setpassword(b"12345") @@ -892,8 +890,8 @@ fp.close() def tearDown(self): - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) def makeTestArchive(self, f, compression): # Create the ZIP archive @@ -913,7 +911,7 @@ self.assertEqual(zipfp.read("another.name"), self.data) zipfp.close() - def testStored(self): + def test_Stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipTest(f, zipfile.ZIP_STORED) @@ -947,7 +945,7 @@ self.assertEqual(testdata1, self.data) zipfp.close() - def testOpenStored(self): + def test_OpenStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipOpenTest(f, zipfile.ZIP_STORED) @@ -969,10 +967,11 @@ self.assertEqual(testdata, self.data) zipfp.close() - def testRandomOpenStored(self): + def test_RandomOpenStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zipRandomOpenTest(f, zipfile.ZIP_STORED) + class TestsWithMultipleOpens(unittest.TestCase): def setUp(self): # Create the ZIP archive @@ -981,7 +980,7 @@ zipfp.writestr('twos', '2'*FIXEDTEST_SIZE) zipfp.close() - def testSameFile(self): + def test_SameFile(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -994,7 +993,7 @@ self.assertEqual(data1, data2) zipf.close() - def testDifferentFile(self): + def test_DifferentFile(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -1008,7 +1007,7 @@ self.assertEqual(data2, b'2'*FIXEDTEST_SIZE) zipf.close() - def testInterleaved(self): + def test_Interleaved(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -1023,25 +1022,26 @@ zipf.close() def tearDown(self): - support.unlink(TESTFN2) + unlink(TESTFN2) + class TestWithDirectory(unittest.TestCase): def setUp(self): os.mkdir(TESTFN2) - def testExtractDir(self): + def test_ExtractDir(self): zipf = zipfile.ZipFile(findfile("zipdir.zip")) zipf.extractall(TESTFN2) self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a"))) self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a", "b"))) self.assertTrue(os.path.exists(os.path.join(TESTFN2, "a", "b", "c"))) - def test_bug_6050(self): + def test_Bug6050(self): # Extraction should succeed if directories already exist os.mkdir(os.path.join(TESTFN2, "a")) - self.testExtractDir() + self.test_ExtractDir() - def testStoreDir(self): + def test_StoreDir(self): os.mkdir(os.path.join(TESTFN2, "x")) zipf = zipfile.ZipFile(TESTFN, "w") zipf.write(os.path.join(TESTFN2, "x"), "x") @@ -1050,7 +1050,7 @@ def tearDown(self): shutil.rmtree(TESTFN2) if os.path.exists(TESTFN): - support.unlink(TESTFN) + unlink(TESTFN) class UniversalNewlineTests(unittest.TestCase): @@ -1123,51 +1123,54 @@ zipfp.close() - def testReadStored(self): + def test_ReadStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.readTest(f, zipfile.ZIP_STORED) - def testReadlineStored(self): + def test_ReadlineStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.readlineTest(f, zipfile.ZIP_STORED) - def testReadlinesStored(self): + def test_ReadlinesStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.readlinesTest(f, zipfile.ZIP_STORED) - def testIterlinesStored(self): + def test_IterlinesStored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.iterlinesTest(f, zipfile.ZIP_STORED) - if zlib: - def testReadDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readTest(f, zipfile.ZIP_DEFLATED) - - def testReadlineDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readlineTest(f, zipfile.ZIP_DEFLATED) - - def testReadlinesDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readlinesTest(f, zipfile.ZIP_DEFLATED) - - def testIterlinesDeflated(self): - for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.iterlinesTest(f, zipfile.ZIP_DEFLATED) + @skipUnless(zlib, "requires zlib") + def test_ReadDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.readTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def test_ReadlineDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.readlineTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def test_ReadlinesDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.readlinesTest(f, zipfile.ZIP_DEFLATED) + + @skipUnless(zlib, "requires zlib") + def test_IterlinesDeflated(self): + for f in (TESTFN2, TemporaryFile(), io.BytesIO()): + self.iterlinesTest(f, zipfile.ZIP_DEFLATED) def tearDown(self): for sep, fn in self.arcfiles.items(): os.remove(fn) - support.unlink(TESTFN) - support.unlink(TESTFN2) + unlink(TESTFN) + unlink(TESTFN2) def test_main(): run_unittest(TestsWithSourceFile, TestZip64InSmallFiles, OtherTests, PyZipFileTests, DecryptionTests, TestsWithMultipleOpens, - TestWithDirectory, - UniversalNewlineTests, TestsWithRandomBinaryFiles) + TestWithDirectory, UniversalNewlineTests, + TestsWithRandomBinaryFiles) if __name__ == "__main__": test_main() From python-checkins at python.org Sat Jul 11 22:49:56 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 20:49:56 -0000 Subject: [Python-checkins] r73957 - in sandbox/trunk/2to3/lib2to3: refactor.py tests/data/different_encoding.py Message-ID: Author: benjamin.peterson Date: Sat Jul 11 22:49:56 2009 New Revision: 73957 Log: fix a calls to str() with unicode() Modified: sandbox/trunk/2to3/lib2to3/refactor.py sandbox/trunk/2to3/lib2to3/tests/data/different_encoding.py Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sat Jul 11 22:49:56 2009 @@ -343,7 +343,7 @@ if results: new = fixer.transform(node, results) if new is not None and (new != node or - str(new) != str(node)): + unicode(new) != unicode(node)): node.replace(new) node = new Modified: sandbox/trunk/2to3/lib2to3/tests/data/different_encoding.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/data/different_encoding.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/data/different_encoding.py Sat Jul 11 22:49:56 2009 @@ -1,3 +1,6 @@ #!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -print u'??????????????????????????????????????????????????????????????' +# -*- coding: utf-8 -*- +print u'????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' + +def f(x): + print '%s\t-> ??(%2i):%s ??(%s)' From python-checkins at python.org Sat Jul 11 22:51:51 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 20:51:51 -0000 Subject: [Python-checkins] r73958 - sandbox/trunk/2to3/lib2to3/refactor.py Message-ID: Author: benjamin.peterson Date: Sat Jul 11 22:51:51 2009 New Revision: 73958 Log: more str() -> unicode() Modified: sandbox/trunk/2to3/lib2to3/refactor.py Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sat Jul 11 22:51:51 2009 @@ -298,7 +298,7 @@ else: tree = self.refactor_string(input, "") if tree and tree.was_changed: - self.processed_file(str(tree), "", input) + self.processed_file(unicode(tree), "", input) else: self.log_debug("No changes in stdin") @@ -452,7 +452,7 @@ filename, lineno, err.__class__.__name__, err) return block if self.refactor_tree(tree, filename): - new = str(tree).splitlines(True) + new = unicode(tree).splitlines(True) # Undo the adjustment of the line numbers in wrap_toks() below. clipped, new = new[:lineno-1], new[lineno-1:] assert clipped == [u"\n"] * (lineno-1), clipped From python-checkins at python.org Sat Jul 11 22:55:00 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 20:55:00 -0000 Subject: [Python-checkins] r73957 - svn:log Message-ID: Author: benjamin.peterson Revision: 73957 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1 @@ -fix a calls to str() with unicode() \ No newline at end of file +fix calls to str() with unicode() \ No newline at end of file From python-checkins at python.org Sat Jul 11 23:40:08 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 21:40:08 -0000 Subject: [Python-checkins] r73959 - sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Sat Jul 11 23:40:08 2009 New Revision: 73959 Log: add tests for refactor_dir() Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Sat Jul 11 23:40:08 2009 @@ -7,6 +7,7 @@ import operator import StringIO import tempfile +import shutil import unittest from lib2to3 import refactor, pygram, fixer_base @@ -143,6 +144,36 @@ test_file = os.path.join(FIXER_DIR, "parrot_example.py") self.check_file_refactoring(test_file, _DEFAULT_FIXERS) + def test_refactor_dir(self): + def check(structure, expected): + def mock_refactor_file(self, f, *args): + got.append(f) + save_func = refactor.RefactoringTool.refactor_file + refactor.RefactoringTool.refactor_file = mock_refactor_file + rt = self.rt() + got = [] + dir = tempfile.mkdtemp(prefix="2to3-test_refactor") + try: + os.mkdir(os.path.join(dir, "a_dir")) + for fn in structure: + open(os.path.join(dir, fn), "wb").close() + rt.refactor_dir(dir) + finally: + refactor.RefactoringTool.refactor_file = save_func + shutil.rmtree(dir) + self.assertEqual(got, + [os.path.join(dir, path) for path in expected]) + check([], []) + tree = ["nothing", + "hi.py", + ".dumb", + ".after.py"] + expected = ["hi.py"] + check(tree, expected) + tree = ["hi.py", + "a_dir/stuff.py"] + check(tree, tree) + def test_file_encoding(self): fn = os.path.join(TEST_DATA_DIR, "different_encoding.py") self.check_file_refactoring(fn) From python-checkins at python.org Sat Jul 11 23:44:32 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 21:44:32 -0000 Subject: [Python-checkins] r73960 - in sandbox/trunk/2to3/lib2to3: refactor.py tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Sat Jul 11 23:44:32 2009 New Revision: 73960 Log: don't parse files just because they end with 'py' (no dot) Modified: sandbox/trunk/2to3/lib2to3/refactor.py sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sat Jul 11 23:44:32 2009 @@ -220,7 +220,8 @@ dirnames.sort() filenames.sort() for name in filenames: - if not name.startswith(".") and name.endswith("py"): + if not name.startswith(".") and \ + os.path.splitext(name)[1].endswith("py"): fullname = os.path.join(dirpath, name) self.refactor_file(fullname, write, doctests_only) # Modify dirnames in-place to remove subdirs with leading dots Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Sat Jul 11 23:44:32 2009 @@ -167,7 +167,8 @@ tree = ["nothing", "hi.py", ".dumb", - ".after.py"] + ".after.py", + "sappy"] expected = ["hi.py"] check(tree, expected) tree = ["hi.py", From python-checkins at python.org Sat Jul 11 23:57:17 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sat, 11 Jul 2009 21:57:17 -0000 Subject: [Python-checkins] r73961 - python/branches/py3k/Lib/test/test_xmlrpc.py Message-ID: Author: kristjan.jonsson Date: Sat Jul 11 23:57:16 2009 New Revision: 73961 Log: merging revision 73932 from trunk: http://bugs.python.org/issue6460 Need to be careful with thread switching when testing the xmlrpc server. The server thread may not have updated stats when the client thread tests them. Modified: python/branches/py3k/Lib/test/test_xmlrpc.py Modified: python/branches/py3k/Lib/test/test_xmlrpc.py ============================================================================== --- python/branches/py3k/Lib/test/test_xmlrpc.py (original) +++ python/branches/py3k/Lib/test/test_xmlrpc.py Sat Jul 11 23:57:16 2009 @@ -507,11 +507,17 @@ def test_two(self): p = xmlrpclib.ServerProxy(URL) + #do three requests. self.assertEqual(p.pow(6,8), 6**8) self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + + #they should have all been handled by a single request handler self.assertEqual(len(self.RequestHandler.myRequests), 1) - #we may or may not catch the final "append" with the empty line - self.assertTrue(len(self.RequestHandler.myRequests[-1]) >= 2) + + #check that we did at least two (the third may be pending append + #due to thread scheduling) + self.assertGreaterEqual(len(self.RequestHandler.myRequests[-1]), 2) #A test case that verifies that gzip encoding works in both directions #(for a request and the response) From python-checkins at python.org Sun Jul 12 00:15:14 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 22:15:14 -0000 Subject: [Python-checkins] r73962 - in python/trunk: .bzrignore .hgignore Lib/test/data Lib/test/test_support.py Makefile.pre.in Message-ID: Author: benjamin.peterson Date: Sun Jul 12 00:15:13 2009 New Revision: 73962 Log: put downloaded test support files in Lib/data instead of the cwd Added: python/trunk/Lib/test/data/ (props changed) Modified: python/trunk/ (props changed) python/trunk/.bzrignore python/trunk/.hgignore python/trunk/Lib/test/test_support.py python/trunk/Makefile.pre.in Modified: python/trunk/.bzrignore ============================================================================== --- python/trunk/.bzrignore (original) +++ python/trunk/.bzrignore Sun Jul 12 00:15:13 2009 @@ -14,24 +14,7 @@ pyconfig.h libpython*.a python.exe -CP936.TXT -SHIFT_JISX0213.TXT -JOHAB.TXT -EUC-JP.TXT -NormalizationTest-3.2.0.txt -NormalizationTest.txt -BIG5.TXT -BIG5HKSCS-2004.TXT -CP949.TXT -EUC-CN.TXT -BIG5HKSCS.TXT -SHIFTJIS.TXT -EUC-KR.TXT -EUC-JISX0213.TXT -CP932.TXT -CP950.TXT reflog.txt -gb-18030-2000.xml tags TAGS .gdb_history Modified: python/trunk/.hgignore ============================================================================== --- python/trunk/.hgignore (original) +++ python/trunk/.hgignore Sun Jul 12 00:15:13 2009 @@ -1,24 +1,8 @@ .gdb_history .purify .svn -BIG5.TXT -BIG5HKSCS-2004.TXT -BIG5HKSCS.TXT -CP932.TXT -CP936.TXT -CP949.TXT -CP950.TXT -EUC-CN.TXT -EUC-JISX0213.TXT -EUC-JP.TXT -EUC-KR.TXT -JOHAB.TXT Makefile Makefile.pre -NormalizationTest-3.2.0.txt -NormalizationTest.txt -SHIFTJIS.TXT -SHIFT_JISX0213.TXT TAGS autom4te.cache build @@ -28,7 +12,6 @@ config.status config.status.lineno db_home -gb-18030-2000.xml platform pyconfig.h python Modified: python/trunk/Lib/test/test_support.py ============================================================================== --- python/trunk/Lib/test/test_support.py (original) +++ python/trunk/Lib/test/test_support.py Sun Jul 12 00:15:13 2009 @@ -468,13 +468,12 @@ requires('urlfetch') filename = urlparse.urlparse(url)[2].split('/')[-1] # '/': it's URL! - for path in [os.path.curdir, os.path.pardir]: - fn = os.path.join(path, filename) - if os.path.exists(fn): - return open(fn) + fn = os.path.join(os.path.dirname(__file__), "data", filename) + if os.path.exists(fn): + return open(fn) print >> get_original_stdout(), '\tfetching %s ...' % url - fn, _ = urllib.urlretrieve(url, filename) + fn, _ = urllib.urlretrieve(url, fn) return open(fn) Modified: python/trunk/Makefile.pre.in ============================================================================== --- python/trunk/Makefile.pre.in (original) +++ python/trunk/Makefile.pre.in Sun Jul 12 00:15:13 2009 @@ -1173,6 +1173,7 @@ # remove all generated files, even Makefile[.pre] # Keep configure and Python-ast.[ch], it's possible they can't be generated distclean: clobber + -rm -f Lib/test/data/* -rm -f core Makefile Makefile.pre config.status \ Modules/Setup Modules/Setup.local Modules/Setup.config find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ From python-checkins at python.org Sun Jul 12 00:23:21 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 22:23:21 -0000 Subject: [Python-checkins] r73962 - svn:log Message-ID: Author: benjamin.peterson Revision: 73962 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1 @@ -put downloaded test support files in Lib/data instead of the cwd \ No newline at end of file +put downloaded test support files in Lib/test/data instead of the cwd \ No newline at end of file From python-checkins at python.org Sun Jul 12 00:25:24 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 22:25:24 -0000 Subject: [Python-checkins] r73963 - in python/trunk: .bzrignore .hgignore Message-ID: Author: benjamin.peterson Date: Sun Jul 12 00:25:24 2009 New Revision: 73963 Log: ignore things in Lib/test/data/ Modified: python/trunk/.bzrignore python/trunk/.hgignore Modified: python/trunk/.bzrignore ============================================================================== --- python/trunk/.bzrignore (original) +++ python/trunk/.bzrignore Sun Jul 12 00:25:24 2009 @@ -28,5 +28,6 @@ Modules/Setup.local Modules/config.c Parser/pgen +Lib/test/data/* Lib/lib2to3/Grammar*.pickle Lib/lib2to3/PatternGrammar*.pickle Modified: python/trunk/.hgignore ============================================================================== --- python/trunk/.hgignore (original) +++ python/trunk/.hgignore Sun Jul 12 00:25:24 2009 @@ -42,6 +42,7 @@ *.rej *~ Lib/lib2to3/*.pickle +Lib/test/data/* PCbuild/*.exe PCbuild/*.dll PCbuild/*.pdb From python-checkins at python.org Sun Jul 12 00:30:15 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 22:30:15 -0000 Subject: [Python-checkins] r73964 - sandbox/trunk/2to3/lib2to3/fixes/fix_long.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 00:30:15 2009 New Revision: 73964 Log: simplify Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_long.py Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_long.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_long.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_long.py Sun Jul 12 00:30:15 2009 @@ -5,18 +5,15 @@ """ # Local imports -from .. import fixer_base -from ..fixer_util import Name, Number, is_probably_builtin +from lib2to3 import fixer_base +from lib2to3.fixer_util import is_probably_builtin class FixLong(fixer_base.BaseFix): PATTERN = "'long'" - static_int = Name(u"int") - def transform(self, node, results): if is_probably_builtin(node): - new = self.static_int.clone() - new.prefix = node.prefix - return new + node.value = u"int" + node.changed() From python-checkins at python.org Sun Jul 12 00:31:30 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 22:31:30 -0000 Subject: [Python-checkins] r73965 - in sandbox/trunk/2to3/lib2to3: fixes/fix_operator.py refactor.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 00:31:30 2009 New Revision: 73965 Log: remove usage of get_prefix() Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py sandbox/trunk/2to3/lib2to3/refactor.py Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py Sun Jul 12 00:31:30 2009 @@ -37,4 +37,4 @@ else: func = results["func"] args = [func.clone(), String(u", "), String(u"'__call__'")] - return Call(Name(u"hasattr"), args, prefix=node.get_prefix()) + return Call(Name(u"hasattr"), args, prefix=node.prefix) Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sun Jul 12 00:31:30 2009 @@ -343,8 +343,7 @@ results = fixer.match(node) if results: new = fixer.transform(node, results) - if new is not None and (new != node or - unicode(new) != unicode(node)): + if new is not None: node.replace(new) node = new From python-checkins at python.org Sun Jul 12 00:33:35 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 22:33:35 -0000 Subject: [Python-checkins] r73966 - sandbox/trunk/2to3/lib2to3/refactor.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 00:33:35 2009 New Revision: 73966 Log: revert unintended change in 73965 Modified: sandbox/trunk/2to3/lib2to3/refactor.py Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sun Jul 12 00:33:35 2009 @@ -343,7 +343,8 @@ results = fixer.match(node) if results: new = fixer.transform(node, results) - if new is not None: + if new is not None and (new != node or + unicode(new) != unicode(node)): node.replace(new) node = new From python-checkins at python.org Sun Jul 12 00:34:44 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 11 Jul 2009 22:34:44 -0000 Subject: [Python-checkins] r73967 - sandbox/trunk/2to3/lib2to3/refactor.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 00:34:44 2009 New Revision: 73967 Log: avoid expensive checks and assume the node did change Modified: sandbox/trunk/2to3/lib2to3/refactor.py Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sun Jul 12 00:34:44 2009 @@ -343,8 +343,7 @@ results = fixer.match(node) if results: new = fixer.transform(node, results) - if new is not None and (new != node or - unicode(new) != unicode(node)): + if new is not None: node.replace(new) node = new From buildbot at python.org Sun Jul 12 00:38:36 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 22:38:36 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1160 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: kristjan.jonsson BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From buildbot at python.org Sun Jul 12 01:52:53 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 11 Jul 2009 23:52:53 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1309 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_asynchat make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 12 03:46:47 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 01:46:47 -0000 Subject: [Python-checkins] r73968 - in sandbox/trunk/2to3/lib2to3: refactor.py tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 03:46:46 2009 New Revision: 73968 Log: use a regular dict for the heads to avoid adding lists in the loop Modified: sandbox/trunk/2to3/lib2to3/refactor.py sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sun Jul 12 03:46:46 2009 @@ -16,7 +16,7 @@ import sys import logging import operator -from collections import defaultdict +import collections from itertools import chain # Local imports @@ -36,6 +36,11 @@ fix_names.append(name[:-3]) return fix_names + +class _EveryNode(Exception): + pass + + def get_head_types(pat): """ Accepts a pytree Pattern Node and returns a set of the pattern types which will match first. """ @@ -44,12 +49,14 @@ # NodePatters must either have no type and no content # or a type and content -- so they don't get any farther # Always return leafs + if pat.type is None: + raise _EveryNode return set([pat.type]) if isinstance(pat, pytree.NegatedPattern): if pat.content: return get_head_types(pat.content) - return set([None]) # Negated Patterns don't have a type + raise _EveryNode # Negated Patterns don't have a type if isinstance(pat, pytree.WildcardPattern): # Recurse on each node in content @@ -61,17 +68,28 @@ raise Exception("Oh no! I don't understand pattern %s" %(pat)) + def get_headnode_dict(fixer_list): """ Accepts a list of fixers and returns a dictionary of head node type --> fixer list. """ - head_nodes = defaultdict(list) + head_nodes = collections.defaultdict(list) + every = [] for fixer in fixer_list: - if not fixer.pattern: - head_nodes[None].append(fixer) - continue - for t in get_head_types(fixer.pattern): - head_nodes[t].append(fixer) - return head_nodes + if fixer.pattern: + try: + heads = get_head_types(fixer.pattern) + except _EveryNode: + every.append(fixer) + else: + for node_type in heads: + head_nodes[node_type].append(fixer) + else: + every.append(fixer) + for node_type in chain(pygram.python_grammar.symbol2number.itervalues(), + pygram.python_grammar.tokens): + head_nodes[node_type].extend(every) + return dict(head_nodes) + def get_fixers_from_package(pkg_name): """ @@ -339,7 +357,7 @@ if not fixers: return for node in traversal: - for fixer in fixers[node.type] + fixers[None]: + for fixer in fixers[node.type]: results = fixer.match(node) if results: new = fixer.transform(node, results) Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Sun Jul 12 03:46:46 2009 @@ -11,6 +11,7 @@ import unittest from lib2to3 import refactor, pygram, fixer_base +from lib2to3.pgen2 import token from . import support @@ -64,17 +65,23 @@ def test_get_headnode_dict(self): class NoneFix(fixer_base.BaseFix): - PATTERN = None + pass class FileInputFix(fixer_base.BaseFix): PATTERN = "file_input< any * >" + class SimpleFix(fixer_base.BaseFix): + PATTERN = "'name'" + no_head = NoneFix({}, []) with_head = FileInputFix({}, []) - d = refactor.get_headnode_dict([no_head, with_head]) - expected = {None: [no_head], - pygram.python_symbols.file_input : [with_head]} - self.assertEqual(d, expected) + simple = SimpleFix({}, []) + d = refactor.get_headnode_dict([no_head, with_head, simple]) + self.assertEqual(d[pygram.python_symbols.file_input], + [with_head, no_head, simple]) + del d[pygram.python_symbols.file_input] + for fixes in d.itervalues(): + self.assertEqual(fixes, [no_head, simple]) def test_fixer_loading(self): from myfixes.fix_first import FixFirst From python-checkins at python.org Sun Jul 12 03:50:43 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 01:50:43 -0000 Subject: [Python-checkins] r73969 - in sandbox/trunk/2to3/lib2to3: refactor.py tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 03:50:43 2009 New Revision: 73969 Log: prefix headnode functions with '_' Modified: sandbox/trunk/2to3/lib2to3/refactor.py sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sun Jul 12 03:50:43 2009 @@ -41,7 +41,7 @@ pass -def get_head_types(pat): +def _get_head_types(pat): """ Accepts a pytree Pattern Node and returns a set of the pattern types which will match first. """ @@ -55,7 +55,7 @@ if isinstance(pat, pytree.NegatedPattern): if pat.content: - return get_head_types(pat.content) + return _get_head_types(pat.content) raise _EveryNode # Negated Patterns don't have a type if isinstance(pat, pytree.WildcardPattern): @@ -63,13 +63,13 @@ r = set() for p in pat.content: for x in p: - r.update(get_head_types(x)) + r.update(_get_head_types(x)) return r raise Exception("Oh no! I don't understand pattern %s" %(pat)) -def get_headnode_dict(fixer_list): +def _get_headnode_dict(fixer_list): """ Accepts a list of fixers and returns a dictionary of head node type --> fixer list. """ head_nodes = collections.defaultdict(list) @@ -77,7 +77,7 @@ for fixer in fixer_list: if fixer.pattern: try: - heads = get_head_types(fixer.pattern) + heads = _get_head_types(fixer.pattern) except _EveryNode: every.append(fixer) else: @@ -153,8 +153,8 @@ logger=self.logger) self.pre_order, self.post_order = self.get_fixers() - self.pre_order_heads = get_headnode_dict(self.pre_order) - self.post_order_heads = get_headnode_dict(self.post_order) + self.pre_order_heads = _get_headnode_dict(self.pre_order) + self.post_order_heads = _get_headnode_dict(self.post_order) self.files = [] # List of files that were or should be modified Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Sun Jul 12 03:50:43 2009 @@ -76,7 +76,7 @@ no_head = NoneFix({}, []) with_head = FileInputFix({}, []) simple = SimpleFix({}, []) - d = refactor.get_headnode_dict([no_head, with_head, simple]) + d = refactor._get_headnode_dict([no_head, with_head, simple]) self.assertEqual(d[pygram.python_symbols.file_input], [with_head, no_head, simple]) del d[pygram.python_symbols.file_input] From python-checkins at python.org Sun Jul 12 04:04:47 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Sun, 12 Jul 2009 02:04:47 -0000 Subject: [Python-checkins] r73970 - python/trunk/Lib/distutils/tests/test_build_ext.py Message-ID: Author: hirokazu.yamamoto Date: Sun Jul 12 04:04:47 2009 New Revision: 73970 Log: Fixed distutils test. Modified: python/trunk/Lib/distutils/tests/test_build_ext.py Modified: python/trunk/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_ext.py (original) +++ python/trunk/Lib/distutils/tests/test_build_ext.py Sun Jul 12 04:04:47 2009 @@ -299,7 +299,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void init_foo(void) {};\n') + self.write_file(c_file, 'void initfoo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From python-checkins at python.org Sun Jul 12 04:09:25 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Sun, 12 Jul 2009 02:09:25 -0000 Subject: [Python-checkins] r73971 - in python/branches/release26-maint: Lib/distutils/tests/test_build_ext.py Message-ID: Author: hirokazu.yamamoto Date: Sun Jul 12 04:09:25 2009 New Revision: 73971 Log: Merged revisions 73970 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73970 | hirokazu.yamamoto | 2009-07-12 11:04:47 +0900 | 1 line Fixed distutils test. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py Modified: python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py (original) +++ python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py Sun Jul 12 04:09:25 2009 @@ -233,7 +233,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void init_foo(void) {};\n') + self.write_file(c_file, 'void initfoo(void) {};\n') ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From python-checkins at python.org Sun Jul 12 04:25:45 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 02:25:45 -0000 Subject: [Python-checkins] r73972 - in sandbox/trunk/2to3/lib2to3: fixer_base.py fixes/fix_ne.py fixes/fix_numliterals.py patcomp.py refactor.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 04:25:45 2009 New Revision: 73972 Log: try to make the head node dict as sparse as possible Modified: sandbox/trunk/2to3/lib2to3/fixer_base.py sandbox/trunk/2to3/lib2to3/fixes/fix_ne.py sandbox/trunk/2to3/lib2to3/fixes/fix_numliterals.py sandbox/trunk/2to3/lib2to3/patcomp.py sandbox/trunk/2to3/lib2to3/refactor.py Modified: sandbox/trunk/2to3/lib2to3/fixer_base.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixer_base.py (original) +++ sandbox/trunk/2to3/lib2to3/fixer_base.py Sun Jul 12 04:25:45 2009 @@ -33,6 +33,8 @@ explicit = False # Is this ignored by refactor.py -f all? run_order = 5 # Fixers will be sorted by run order before execution # Lower numbers will be run first. + _accept_type = None # [Advanced and not public] This tells RefactoringTool + # which node type to accept when there's not a pattern. # Shortcut for access to Python grammar symbols syms = pygram.python_symbols Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_ne.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_ne.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_ne.py Sun Jul 12 04:25:45 2009 @@ -12,9 +12,11 @@ class FixNe(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NOTEQUAL + def match(self, node): # Override - return node.type == token.NOTEQUAL and node.value == u"<>" + return node.value == u"<>" def transform(self, node, results): new = pytree.Leaf(token.NOTEQUAL, u"!=", prefix=node.prefix) Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_numliterals.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_numliterals.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_numliterals.py Sun Jul 12 04:25:45 2009 @@ -12,10 +12,11 @@ class FixNumliterals(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NUMBER + def match(self, node): # Override - return (node.type == token.NUMBER and - (node.value.startswith(u"0") or node.value[-1] in u"Ll")) + return (node.value.startswith(u"0") or node.value[-1] in u"Ll") def transform(self, node, results): val = node.value Modified: sandbox/trunk/2to3/lib2to3/patcomp.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/patcomp.py (original) +++ sandbox/trunk/2to3/lib2to3/patcomp.py Sun Jul 12 04:25:45 2009 @@ -14,7 +14,7 @@ import os # Fairly local imports -from .pgen2 import driver, literals, token, tokenize, parse +from .pgen2 import driver, literals, token, tokenize, parse, grammar # Really local imports from . import pytree @@ -138,7 +138,7 @@ node = nodes[0] if node.type == token.STRING: value = unicode(literals.evalString(node.value)) - return pytree.LeafPattern(content=value) + return pytree.LeafPattern(_type_of_literal(value), value) elif node.type == token.NAME: value = node.value if value.isupper(): @@ -179,6 +179,15 @@ "TOKEN": None} +def _type_of_literal(value): + if value[0].isalpha(): + return token.NAME + elif value in grammar.opmap: + return grammar.opmap[value] + else: + return None + + def pattern_convert(grammar, raw_node_info): """Converts raw node information to a Node or Leaf instance.""" type, value, context, children = raw_node_info Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sun Jul 12 04:25:45 2009 @@ -84,7 +84,10 @@ for node_type in heads: head_nodes[node_type].append(fixer) else: - every.append(fixer) + if fixer._accept_type is not None: + head_nodes[fixer._accept_type].append(fixer) + else: + every.append(fixer) for node_type in chain(pygram.python_grammar.symbol2number.itervalues(), pygram.python_grammar.tokens): head_nodes[node_type].extend(every) From python-checkins at python.org Sun Jul 12 04:59:49 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 02:59:49 -0000 Subject: [Python-checkins] r73973 - sandbox/trunk/2to3/lib2to3/main.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 04:59:49 2009 New Revision: 73973 Log: a better idea; add an option to *not* print diffs Modified: sandbox/trunk/2to3/lib2to3/main.py Modified: sandbox/trunk/2to3/lib2to3/main.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/main.py (original) +++ sandbox/trunk/2to3/lib2to3/main.py Sun Jul 12 04:59:49 2009 @@ -94,8 +94,8 @@ help="Modify the grammar so that print() is a function") parser.add_option("-v", "--verbose", action="store_true", help="More verbose logging") - parser.add_option("-s", "--show-diffs", action="store_true", - help="Show diffs of the refactored file") + parser.add_option("--no-diffs", action="store_true", + help="Don't show diffs of the refactoring") parser.add_option("-w", "--write", action="store_true", help="Write back modified files") parser.add_option("-n", "--nobackups", action="store_true", default=False, @@ -104,7 +104,7 @@ # Parse command line arguments refactor_stdin = False options, args = parser.parse_args(args) - if not options.write and not options.show_diffs: + if not options.write and options.no_diffs: warn("not writing files and not printing diffs; that's not very useful") if not options.write and options.nobackups: parser.error("Can't use -n without -w") @@ -145,7 +145,7 @@ requested = avail_fixes.union(explicit) fixer_names = requested.difference(unwanted_fixes) rt = StdoutRefactoringTool(sorted(fixer_names), rt_opts, sorted(explicit), - options.nobackups, options.show_diffs) + options.nobackups, not options.no_diffs) # Refactor all files and directories passed as arguments if not rt.errors: From python-checkins at python.org Sun Jul 12 05:00:29 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 03:00:29 -0000 Subject: [Python-checkins] r73974 - sandbox/trunk/2to3/lib2to3/main.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 05:00:29 2009 New Revision: 73974 Log: add space Modified: sandbox/trunk/2to3/lib2to3/main.py Modified: sandbox/trunk/2to3/lib2to3/main.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/main.py (original) +++ sandbox/trunk/2to3/lib2to3/main.py Sun Jul 12 05:00:29 2009 @@ -115,13 +115,13 @@ if not args: return 0 if not args: - print >>sys.stderr, "At least one file or directory argument required." - print >>sys.stderr, "Use --help to show usage." + print >> sys.stderr, "At least one file or directory argument required." + print >> sys.stderr, "Use --help to show usage." return 2 if "-" in args: refactor_stdin = True if options.write: - print >>sys.stderr, "Can't write to stdin." + print >> sys.stderr, "Can't write to stdin." return 2 # Set up logging handler From buildbot at python.org Sun Jul 12 09:45:10 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 12 Jul 2009 07:45:10 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 2.6 Message-ID: The Buildbot has detected a new failure of x86 XP-4 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%202.6/builds/355 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: hirokazu.yamamoto BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 ====================================================================== ERROR: test01_badpointer (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 21, in test01_badpointer dbs = dbshelve.open(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\dbshelve.py", line 106, in open d.open(filename, dbname, filetype, flags, mode) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\dbshelve.py", line 171, in open self.db.open(*args, **kwargs) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test03_repr_closed_db (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 37, in test03_repr_closed_db db = hashopen(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\__init__.py", line 361, in hashopen d.open(file, db.DB_HASH, flags, mode) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test04_repr_db (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 43, in test04_repr_db db = hashopen(self.filename) File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\__init__.py", line 361, in hashopen d.open(file, db.DB_HASH, flags, mode) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test05_double_free_make_key_dbt (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 65, in test05_double_free_make_key_dbt db.DB_CREATE | db.DB_THREAD) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test06_key_with_null_bytes (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 77, in test06_key_with_null_bytes db1.open(self.filename, None, db.DB_HASH, db.DB_CREATE) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') ====================================================================== ERROR: test07_DB_set_flags_persists (bsddb.test.test_misc.MiscTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\2.6.bolen-windows\build\lib\bsddb\test\test_misc.py", line 101, in test07_DB_set_flags_persists db1.open(self.filename, db.DB_HASH, db.DB_CREATE) DBFileExistsError: (17, 'File exists -- __fop_file_setup: Retry limit (100) exceeded') sincerely, -The Buildbot From python-checkins at python.org Sun Jul 12 10:27:27 2009 From: python-checkins at python.org (tarek.ziade) Date: Sun, 12 Jul 2009 08:27:27 -0000 Subject: [Python-checkins] r73975 - in python/branches/py3k: Lib/distutils/cygwinccompiler.py Lib/distutils/tests/test_cygwinccompiler.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sun Jul 12 10:27:26 2009 New Revision: 73975 Log: Fixed #6438: distutils.cygwinccompiler.get_versions was trying to use a re string pattern on a bytes Modified: python/branches/py3k/Lib/distutils/cygwinccompiler.py python/branches/py3k/Lib/distutils/tests/test_cygwinccompiler.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/distutils/cygwinccompiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/cygwinccompiler.py (original) +++ python/branches/py3k/Lib/distutils/cygwinccompiler.py Sun Jul 12 10:27:26 2009 @@ -359,7 +359,7 @@ return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') def _find_exe_version(cmd): """Find the version of an executable by running `cmd` in the shell. @@ -378,7 +378,9 @@ result = RE_VERSION.search(out_string) if result is None: return None - return LooseVersion(result.group(1)) + # LooseVersion works with strings + # so we need to decode our bytes + return LooseVersion(result.group(1).decode()) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. Modified: python/branches/py3k/Lib/distutils/tests/test_cygwinccompiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_cygwinccompiler.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_cygwinccompiler.py Sun Jul 12 10:27:26 2009 @@ -2,7 +2,7 @@ import unittest import sys import os -from io import StringIO +from io import BytesIO import subprocess from distutils import cygwinccompiler @@ -19,7 +19,8 @@ self.cmd = cmd.split()[0] exes = self.test_class._exes if self.cmd in exes: - self.stdout = StringIO(exes[self.cmd]) + # issue #6438 in Python 3.x, Popen returns bytes + self.stdout = BytesIO(exes[self.cmd]) else: self.stdout = os.popen(cmd, 'r') @@ -87,30 +88,30 @@ self.assertEquals(get_versions(), (None, None, None)) # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' + self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' res = get_versions() self.assertEquals(str(res[0]), '3.4.5') # and let's see what happens when the version # doesn't match the regular expression # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = 'very strange output' + self._exes['gcc'] = b'very strange output' res = get_versions() self.assertEquals(res[0], None) # same thing for ld - self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' res = get_versions() self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' res = get_versions() self.assertEquals(res[1], None) # and dllwrap - self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' + self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' res = get_versions() self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = 'Cheese Wrap' + self._exes['dllwrap'] = b'Cheese Wrap' res = get_versions() self.assertEquals(res[2], None) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Jul 12 10:27:26 2009 @@ -132,6 +132,10 @@ Library ------- +- Issue #6438: Fixed distutils.cygwinccompiler.get_versions : the regular + expression string pattern was trying to match against a bytes returned by + Popen. Tested under win32 to build the py-postgresql project. + - Issue #6258: Support AMD64 in bdist_msi. - Issue #6195: fixed doctest to no longer try to read 'source' data from From python-checkins at python.org Sun Jul 12 10:39:08 2009 From: python-checkins at python.org (tarek.ziade) Date: Sun, 12 Jul 2009 08:39:08 -0000 Subject: [Python-checkins] r73976 - in python/branches/release31-maint: Lib/distutils/cygwinccompiler.py Lib/distutils/tests/test_cygwinccompiler.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sun Jul 12 10:39:08 2009 New Revision: 73976 Log: Merged revisions 73975 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r73975 | tarek.ziade | 2009-07-12 10:27:26 +0200 (Sun, 12 Jul 2009) | 1 line Fixed #6438: distutils.cygwinccompiler.get_versions was trying to use a re string pattern on a bytes ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/cygwinccompiler.py python/branches/release31-maint/Lib/distutils/tests/test_cygwinccompiler.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/distutils/cygwinccompiler.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/cygwinccompiler.py (original) +++ python/branches/release31-maint/Lib/distutils/cygwinccompiler.py Sun Jul 12 10:39:08 2009 @@ -359,7 +359,7 @@ return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') def _find_exe_version(cmd): """Find the version of an executable by running `cmd` in the shell. @@ -378,7 +378,9 @@ result = RE_VERSION.search(out_string) if result is None: return None - return LooseVersion(result.group(1)) + # LooseVersion works with strings + # so we need to decode our bytes + return LooseVersion(result.group(1).decode()) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. Modified: python/branches/release31-maint/Lib/distutils/tests/test_cygwinccompiler.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_cygwinccompiler.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_cygwinccompiler.py Sun Jul 12 10:39:08 2009 @@ -2,7 +2,7 @@ import unittest import sys import os -from io import StringIO +from io import BytesIO import subprocess from distutils import cygwinccompiler @@ -19,7 +19,8 @@ self.cmd = cmd.split()[0] exes = self.test_class._exes if self.cmd in exes: - self.stdout = StringIO(exes[self.cmd]) + # issue #6438 in Python 3.x, Popen returns bytes + self.stdout = BytesIO(exes[self.cmd]) else: self.stdout = os.popen(cmd, 'r') @@ -87,30 +88,30 @@ self.assertEquals(get_versions(), (None, None, None)) # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' + self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' res = get_versions() self.assertEquals(str(res[0]), '3.4.5') # and let's see what happens when the version # doesn't match the regular expression # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = 'very strange output' + self._exes['gcc'] = b'very strange output' res = get_versions() self.assertEquals(res[0], None) # same thing for ld - self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' res = get_versions() self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' res = get_versions() self.assertEquals(res[1], None) # and dllwrap - self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' + self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' res = get_versions() self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = 'Cheese Wrap' + self._exes['dllwrap'] = b'Cheese Wrap' res = get_versions() self.assertEquals(res[2], None) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sun Jul 12 10:39:08 2009 @@ -113,6 +113,10 @@ Library ------- +- Issue #6438: Fixed distutils.cygwinccompiler.get_versions : the regular + expression string pattern was trying to match against a bytes returned by + Popen. Tested under win32 to build the py-postgresql project. + - Issue #6258: Support AMD64 in bdist_msi. - Issue #6195: fixed doctest to no longer try to read 'source' data from From buildbot at python.org Sun Jul 12 13:25:45 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 12 Jul 2009 11:25:45 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.1 Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.1/builds/15 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' 1 test failed: test_import ====================================================================== ERROR: testImport (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 60, in test_with_extension mod = __import__(TESTFN) ImportError: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' sincerely, -The Buildbot From python-checkins at python.org Sun Jul 12 17:16:07 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 15:16:07 -0000 Subject: [Python-checkins] r73977 - sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 17:16:07 2009 New Revision: 73977 Log: update get_headnode_dict tests for recent changes Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Sun Jul 12 17:16:07 2009 @@ -77,11 +77,12 @@ with_head = FileInputFix({}, []) simple = SimpleFix({}, []) d = refactor._get_headnode_dict([no_head, with_head, simple]) - self.assertEqual(d[pygram.python_symbols.file_input], - [with_head, no_head, simple]) - del d[pygram.python_symbols.file_input] + top_fixes = d.pop(pygram.python_symbols.file_input) + self.assertEqual(top_fixes, [with_head, no_head]) + name_fixes = d.pop(token.NAME) + self.assertEqual(name_fixes, [simple, no_head]) for fixes in d.itervalues(): - self.assertEqual(fixes, [no_head, simple]) + self.assertEqual(fixes, [no_head]) def test_fixer_loading(self): from myfixes.fix_first import FixFirst From python-checkins at python.org Sun Jul 12 18:43:19 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Sun, 12 Jul 2009 16:43:19 -0000 Subject: [Python-checkins] r73978 - in python/branches/py3k: Lib/email/base64mime.py Lib/email/header.py Lib/email/quoprimime.py Lib/email/test/test_email_torture.py Lib/wsgiref/headers.py Message-ID: Author: amaury.forgeotdarc Date: Sun Jul 12 18:43:19 2009 New Revision: 73978 Log: Merged revisions 73952 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk (Only docstrings were modified, won't backport to 3.1) ........ r73952 | amaury.forgeotdarc | 2009-07-11 16:33:51 +0200 (sam., 11 juil. 2009) | 4 lines #2622 Import errors in email.message, from a py2app standalone application. Patch by Mads Kiilerich, Reviewed by Barry Warsaw. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/email/base64mime.py python/branches/py3k/Lib/email/header.py python/branches/py3k/Lib/email/quoprimime.py python/branches/py3k/Lib/email/test/test_email_torture.py python/branches/py3k/Lib/wsgiref/headers.py Modified: python/branches/py3k/Lib/email/base64mime.py ============================================================================== --- python/branches/py3k/Lib/email/base64mime.py (original) +++ python/branches/py3k/Lib/email/base64mime.py Sun Jul 12 18:43:19 2009 @@ -20,7 +20,7 @@ This module does not do the line wrapping or end-of-line character conversion necessary for proper internationalized headers; it only does dumb encoding and -decoding. To deal with the various line wrapping issues, use the email.Header +decoding. To deal with the various line wrapping issues, use the email.header module. """ @@ -104,7 +104,7 @@ This function does not parse a full MIME header value encoded with base64 (like =?iso-8895-1?b?bmloISBuaWgh?=) -- please use the high - level email.Header class for that functionality. + level email.header class for that functionality. """ if not string: return bytes() Modified: python/branches/py3k/Lib/email/header.py ============================================================================== --- python/branches/py3k/Lib/email/header.py (original) +++ python/branches/py3k/Lib/email/header.py Sun Jul 12 18:43:19 2009 @@ -61,7 +61,7 @@ otherwise a lower-case string containing the name of the character set specified in the encoded string. - An email.Errors.HeaderParseError may be raised when certain decoding error + An email.errors.HeaderParseError may be raised when certain decoding error occurs (e.g. a base64 decoding exception). """ # If no encoding, just return the header with no charset. Modified: python/branches/py3k/Lib/email/quoprimime.py ============================================================================== --- python/branches/py3k/Lib/email/quoprimime.py (original) +++ python/branches/py3k/Lib/email/quoprimime.py Sun Jul 12 18:43:19 2009 @@ -11,7 +11,7 @@ allowed in email bodies or headers. Quoted-printable is very space-inefficient for encoding binary files; use the -email.base64MIME module for that instead. +email.base64mime module for that instead. This module provides an interface to encode and decode both headers and bodies with quoted-printable encoding. @@ -23,7 +23,7 @@ This module does not do the line wrapping or end-of-line character conversion necessary for proper internationalized headers; it only does dumb encoding and decoding. To deal with the various line -wrapping issues, use the email.Header module. +wrapping issues, use the email.header module. """ __all__ = [ @@ -291,7 +291,7 @@ This function does not parse a full MIME header value encoded with quoted-printable (like =?iso-8895-1?q?Hello_World?=) -- please use - the high level email.Header class for that functionality. + the high level email.header class for that functionality. """ s = s.replace('_', ' ') return re.sub(r'=\w{2}', _unquote_match, s, re.ASCII) Modified: python/branches/py3k/Lib/email/test/test_email_torture.py ============================================================================== --- python/branches/py3k/Lib/email/test/test_email_torture.py (original) +++ python/branches/py3k/Lib/email/test/test_email_torture.py Sun Jul 12 18:43:19 2009 @@ -17,7 +17,7 @@ import email from email import __file__ as testfile -from email.Iterators import _structure +from email.iterators import _structure def openfile(filename): from os.path import join, dirname, abspath Modified: python/branches/py3k/Lib/wsgiref/headers.py ============================================================================== --- python/branches/py3k/Lib/wsgiref/headers.py (original) +++ python/branches/py3k/Lib/wsgiref/headers.py Sun Jul 12 18:43:19 2009 @@ -1,6 +1,6 @@ """Manage HTTP Response Headers -Much of this module is red-handedly pilfered from email.Message in the stdlib, +Much of this module is red-handedly pilfered from email.message in the stdlib, so portions are Copyright (C) 2001,2002 Python Software Foundation, and were written by Barry Warsaw. """ @@ -184,7 +184,7 @@ h.add_header('content-disposition', 'attachment', filename='bud.gif') - Note that unlike the corresponding 'email.Message' method, this does + Note that unlike the corresponding 'email.message' method, this does *not* handle '(charset, language, value)' tuples: all values must be strings or None. """ From python-checkins at python.org Sun Jul 12 18:56:54 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 16:56:54 -0000 Subject: [Python-checkins] r73979 - python/trunk/Doc/library/warnings.rst Message-ID: Author: benjamin.peterson Date: Sun Jul 12 18:56:54 2009 New Revision: 73979 Log: add versionadded Modified: python/trunk/Doc/library/warnings.rst Modified: python/trunk/Doc/library/warnings.rst ============================================================================== --- python/trunk/Doc/library/warnings.rst (original) +++ python/trunk/Doc/library/warnings.rst Sun Jul 12 18:56:54 2009 @@ -279,6 +279,8 @@ be a string and *category* a subclass of :exc:`Warning`. :func:`warnpy3k` is using :exc:`DeprecationWarning` as default warning class. + .. versionadded:: 2.6 + .. function:: showwarning(message, category, filename, lineno[, file[, line]]) From python-checkins at python.org Sun Jul 12 19:02:22 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 17:02:22 -0000 Subject: [Python-checkins] r73980 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Sun Jul 12 19:02:22 2009 New Revision: 73980 Log: Blocked revisions 73979 via svnmerge ........ r73979 | benjamin.peterson | 2009-07-12 11:56:54 -0500 (Sun, 12 Jul 2009) | 1 line add versionadded ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Sun Jul 12 19:02:27 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 12 Jul 2009 17:02:27 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 3.x Message-ID: The Buildbot has detected a new failure of x86 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%203.x/builds/1068 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Unknown signal 32 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 12 19:06:40 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 17:06:40 -0000 Subject: [Python-checkins] r73981 - in sandbox/trunk/2to3/lib2to3: fixes/fix_print.py main.py pgen2/grammar.py pygram.py refactor.py tests/test_fixers.py tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 19:06:39 2009 New Revision: 73981 Log: detect when "from __future__ import print_function" is given Deprecate the 'print_function' option and the -p flag Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_print.py sandbox/trunk/2to3/lib2to3/main.py sandbox/trunk/2to3/lib2to3/pgen2/grammar.py sandbox/trunk/2to3/lib2to3/pygram.py sandbox/trunk/2to3/lib2to3/refactor.py sandbox/trunk/2to3/lib2to3/tests/test_fixers.py sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_print.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_print.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_print.py Sun Jul 12 19:06:39 2009 @@ -26,20 +26,15 @@ ) -class FixPrint(fixer_base.ConditionalFix): +class FixPrint(fixer_base.BaseFix): PATTERN = """ simple_stmt< any* bare='print' any* > | print_stmt """ - skip_on = '__future__.print_function' - def transform(self, node, results): assert results - if self.should_skip(node): - return - bare_print = results.get("bare") if bare_print: Modified: sandbox/trunk/2to3/lib2to3/main.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/main.py (original) +++ sandbox/trunk/2to3/lib2to3/main.py Sun Jul 12 19:06:39 2009 @@ -91,7 +91,8 @@ parser.add_option("-l", "--list-fixes", action="store_true", help="List available transformations (fixes/fix_*.py)") parser.add_option("-p", "--print-function", action="store_true", - help="Modify the grammar so that print() is a function") + help="DEPRECATED Modify the grammar so that print() is " + "a function") parser.add_option("-v", "--verbose", action="store_true", help="More verbose logging") parser.add_option("--no-diffs", action="store_true", @@ -106,6 +107,9 @@ options, args = parser.parse_args(args) if not options.write and options.no_diffs: warn("not writing files and not printing diffs; that's not very useful") + if options.print_function: + warn("-p is deprecated; " + "detection of from __future__ import print_function is automatic") if not options.write and options.nobackups: parser.error("Can't use -n without -w") if options.list_fixes: @@ -129,7 +133,6 @@ logging.basicConfig(format='%(name)s: %(message)s', level=level) # Initialize the refactoring tool - rt_opts = {"print_function" : options.print_function} avail_fixes = set(refactor.get_fixers_from_package(fixer_pkg)) unwanted_fixes = set(fixer_pkg + ".fix_" + fix for fix in options.nofix) explicit = set() @@ -144,7 +147,7 @@ else: requested = avail_fixes.union(explicit) fixer_names = requested.difference(unwanted_fixes) - rt = StdoutRefactoringTool(sorted(fixer_names), rt_opts, sorted(explicit), + rt = StdoutRefactoringTool(sorted(fixer_names), None, sorted(explicit), options.nobackups, not options.no_diffs) # Refactor all files and directories passed as arguments Modified: sandbox/trunk/2to3/lib2to3/pgen2/grammar.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/pgen2/grammar.py (original) +++ sandbox/trunk/2to3/lib2to3/pgen2/grammar.py Sun Jul 12 19:06:39 2009 @@ -97,6 +97,19 @@ f.close() self.__dict__.update(d) + def copy(self): + """ + Copy the grammar. + """ + new = self.__class__() + for dict_attr in ("symbol2number", "number2symbol", "dfas", "keywords", + "tokens", "symbol2label"): + setattr(new, dict_attr, getattr(self, dict_attr).copy()) + new.labels = self.labels[:] + new.states = self.states[:] + new.start = self.start + return new + def report(self): """Dump the grammar tables to standard output, for debugging.""" from pprint import pprint Modified: sandbox/trunk/2to3/lib2to3/pygram.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/pygram.py (original) +++ sandbox/trunk/2to3/lib2to3/pygram.py Sun Jul 12 19:06:39 2009 @@ -28,4 +28,8 @@ python_grammar = driver.load_grammar(_GRAMMAR_FILE) + python_symbols = Symbols(python_grammar) + +python_grammar_no_print_statement = python_grammar.copy() +del python_grammar_no_print_statement.keywords["print"] Modified: sandbox/trunk/2to3/lib2to3/refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/refactor.py Sun Jul 12 19:06:39 2009 @@ -17,10 +17,12 @@ import logging import operator import collections +import StringIO +import warnings from itertools import chain # Local imports -from .pgen2 import driver, tokenize +from .pgen2 import driver, tokenize, token from . import pytree, pygram @@ -121,13 +123,56 @@ _to_system_newlines = _identity +def _detect_future_print(source): + have_docstring = False + gen = tokenize.generate_tokens(StringIO.StringIO(source).readline) + def advance(): + tok = next(gen) + return tok[0], tok[1] + ignore = frozenset((token.NEWLINE, tokenize.NL, token.COMMENT)) + try: + while True: + tp, value = advance() + if tp in ignore: + continue + elif tp == token.STRING: + if have_docstring: + break + have_docstring = True + elif tp == token.NAME: + if value == u"from": + tp, value = advance() + if tp != token.NAME and value != u"__future__": + break + tp, value = advance() + if tp != token.NAME and value != u"import": + break + tp, value = advance() + if tp == token.OP and value == u"(": + tp, value = advance() + while tp == token.NAME: + if value == u"print_function": + return True + tp, value = advance() + if tp != token.OP and value != u",": + break + tp, value = advance() + else: + break + else: + break + except StopIteration: + pass + return False + + class FixerError(Exception): """A fixer could not be loaded.""" class RefactoringTool(object): - _default_options = {"print_function": False} + _default_options = {} CLASS_PREFIX = "Fix" # The prefix for fixer classes FILE_PREFIX = "fix_" # The prefix for modules with a fixer within @@ -144,13 +189,14 @@ self.explicit = explicit or [] self.options = self._default_options.copy() if options is not None: + if "print_function" in options: + warnings.warn("the 'print_function' option is deprecated", + DeprecationWarning) self.options.update(options) self.errors = [] self.logger = logging.getLogger("RefactoringTool") self.fixer_log = [] self.wrote = False - if self.options["print_function"]: - del pygram.python_grammar.keywords["print"] self.driver = driver.Driver(pygram.python_grammar, convert=pytree.convert, logger=self.logger) @@ -298,12 +344,16 @@ An AST corresponding to the refactored input stream; None if there were errors during the parse. """ + if _detect_future_print(data): + self.driver.grammar = pygram.python_grammar_no_print_statement try: tree = self.driver.parse_string(data) except Exception, err: self.log_error("Can't parse %s: %s: %s", name, err.__class__.__name__, err) return + finally: + self.driver.grammar = pygram.python_grammar self.log_debug("Refactoring %s", name) self.refactor_tree(tree, name) return tree Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_fixers.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Sun Jul 12 19:06:39 2009 @@ -379,18 +379,15 @@ self.unchanged(s) def test_idempotency_print_as_function(self): - print_stmt = pygram.python_grammar.keywords.pop("print") - try: - s = """print(1, 1+1, 1+1+1)""" - self.unchanged(s) + self.refactor.driver.grammar = pygram.python_grammar_no_print_statement + s = """print(1, 1+1, 1+1+1)""" + self.unchanged(s) - s = """print()""" - self.unchanged(s) + s = """print()""" + self.unchanged(s) - s = """print('')""" - self.unchanged(s) - finally: - pygram.python_grammar.keywords["print"] = print_stmt + s = """print('')""" + self.unchanged(s) def test_1(self): b = """print 1, 1+1, 1+1+1""" @@ -462,29 +459,15 @@ a = """print(file=sys.stderr)""" self.check(b, a) - # With from __future__ import print_function def test_with_future_print_function(self): - # XXX: These tests won't actually do anything until the parser - # is fixed so it won't crash when it sees print(x=y). - # When #2412 is fixed, the try/except block can be taken - # out and the tests can be run like normal. - try: - s = "from __future__ import print_function\n"\ - "print('Hai!', end=' ')" - self.unchanged(s) + s = "from __future__ import print_function\n" \ + "print('Hai!', end=' ')" + self.unchanged(s) - b = "print 'Hello, world!'" - a = "print('Hello, world!')" - self.check(b, a) + b = "print 'Hello, world!'" + a = "print('Hello, world!')" + self.check(b, a) - s = "from __future__ import *\n"\ - "print('Hai!', end=' ')" - self.unchanged(s) - except: - return - else: - self.assertFalse(True, "#2421 has been fixed -- printing tests "\ - "need to be updated!") class Test_exec(FixerTestCase): fixer = "exec" Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Sun Jul 12 19:06:39 2009 @@ -9,6 +9,7 @@ import tempfile import shutil import unittest +import warnings from lib2to3 import refactor, pygram, fixer_base from lib2to3.pgen2 import token @@ -44,14 +45,11 @@ return refactor.RefactoringTool(fixers, options, explicit) def test_print_function_option(self): - gram = pygram.python_grammar - save = gram.keywords["print"] - try: - rt = self.rt({"print_function" : True}) - self.assertRaises(KeyError, operator.itemgetter("print"), - gram.keywords) - finally: - gram.keywords["print"] = save + with warnings.catch_warnings(record=True) as w: + refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) + self.assertEqual(len(w), 1) + msg, = w + self.assertTrue(msg.category is DeprecationWarning) def test_fixer_loading_helpers(self): contents = ["explicit", "first", "last", "parrot", "preorder"] @@ -63,6 +61,43 @@ self.assertEqual(full_names, ["myfixes.fix_" + name for name in contents]) + def test_detect_future_print(self): + run = refactor._detect_future_print + self.assertFalse(run("")) + self.assertTrue(run("from __future__ import print_function")) + self.assertFalse(run("from __future__ import generators")) + self.assertFalse(run("from __future__ import generators, feature")) + input = "from __future__ import generators, print_function" + self.assertTrue(run(input)) + input ="from __future__ import print_function, generators" + self.assertTrue(run(input)) + input = "from __future__ import (print_function,)" + self.assertTrue(run(input)) + input = "from __future__ import (generators, print_function)" + self.assertTrue(run(input)) + input = "from __future__ import (generators, nested_scopes)" + self.assertFalse(run(input)) + input = """from __future__ import generators +from __future__ import print_function""" + self.assertTrue(run(input)) + self.assertFalse(run("from")) + self.assertFalse(run("from 4")) + self.assertFalse(run("from x")) + self.assertFalse(run("from x 5")) + self.assertFalse(run("from x im")) + self.assertFalse(run("from x import")) + self.assertFalse(run("from x import 4")) + input = "'docstring'\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "'docstring'\n'somng'\nfrom __future__ import print_function" + self.assertFalse(run(input)) + input = "# comment\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "# comment\n'doc'\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "class x: pass\nfrom __future__ import print_function" + self.assertFalse(run(input)) + def test_get_headnode_dict(self): class NoneFix(fixer_base.BaseFix): pass From buildbot at python.org Sun Jul 12 19:13:40 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 12 Jul 2009 17:13:40 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/949 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_codecs test_io ====================================================================== ERROR: test_basics (test.test_codecs.BasicUnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 1360, in test_basics encodedresult += encoder.encode(c) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_decoder_state (test.test_codecs.BasicUnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 1445, in test_decoder_state self.check_state_handling_decode(encoding, u, u.encode(encoding)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 30, in check_state_handling_decode part1 = d.decode(s[:i]) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1753, in test_basic_io self.assertEquals(f.read(), "abc") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1748, in test_basic_io self.assertEquals(f.write("abc"), 3) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_destructor (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1698, in test_destructor t.write("abc") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_detach (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1531, in test_detach t.write("howdy") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1796, in read decoder.decode(self.buffer.read(), final=True)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_writing (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1593, in test_encoding_errors_writing self.assertRaises(UnicodeError, t.write, "\xff") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 493, in readlines return list(self) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1811, in __next__ line = self.readline() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1888, in readline while self._read_chunk(): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_output (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1682, in test_newlines_output txt.write("AAA\nB") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 12 22:47:14 2009 From: python-checkins at python.org (raymond.hettinger) Date: Sun, 12 Jul 2009 20:47:14 -0000 Subject: [Python-checkins] r73982 - python/branches/release31-maint/Doc/library/string.rst Message-ID: Author: raymond.hettinger Date: Sun Jul 12 22:47:13 2009 New Revision: 73982 Log: Document the thousands separator. Modified: python/branches/release31-maint/Doc/library/string.rst Modified: python/branches/release31-maint/Doc/library/string.rst ============================================================================== --- python/branches/release31-maint/Doc/library/string.rst (original) +++ python/branches/release31-maint/Doc/library/string.rst Sun Jul 12 22:47:13 2009 @@ -300,7 +300,7 @@ The general form of a *standard format specifier* is: .. productionlist:: sf - format_spec: [[`fill`]`align`][`sign`][#][0][`width`][.`precision`][`type`] + format_spec: [[`fill`]`align`][`sign`][#][0][`width`][,][.`precision`][`type`] fill: align: "<" | ">" | "=" | "^" sign: "+" | "-" | " " @@ -358,6 +358,10 @@ hexadecimal output. If present, it specifies that the output will be prefixed by ``'0b'``, ``'0o'``, or ``'0x'``, respectively. +The ``','`` option signals the use of a comma for a thousands separator. +For a locale aware separator, use the ``'n'`` integer presentation type +instead. + *width* is a decimal integer defining the minimum field width. If not specified, then the field width will be determined by the content. From python-checkins at python.org Sun Jul 12 22:49:21 2009 From: python-checkins at python.org (raymond.hettinger) Date: Sun, 12 Jul 2009 20:49:21 -0000 Subject: [Python-checkins] r73983 - python/branches/py3k/Doc/library/string.rst Message-ID: Author: raymond.hettinger Date: Sun Jul 12 22:49:21 2009 New Revision: 73983 Log: Document the thousands separator. Modified: python/branches/py3k/Doc/library/string.rst Modified: python/branches/py3k/Doc/library/string.rst ============================================================================== --- python/branches/py3k/Doc/library/string.rst (original) +++ python/branches/py3k/Doc/library/string.rst Sun Jul 12 22:49:21 2009 @@ -300,7 +300,7 @@ The general form of a *standard format specifier* is: .. productionlist:: sf - format_spec: [[`fill`]`align`][`sign`][#][0][`width`][.`precision`][`type`] + format_spec: [[`fill`]`align`][`sign`][#][0][`width`][,][.`precision`][`type`] fill: align: "<" | ">" | "=" | "^" sign: "+" | "-" | " " @@ -358,6 +358,10 @@ hexadecimal output. If present, it specifies that the output will be prefixed by ``'0b'``, ``'0o'``, or ``'0x'``, respectively. +The ``','`` option signals the use of a comma for a thousands separator. +For a locale aware separator, use the ``'n'`` integer presentation type +instead. + *width* is a decimal integer defining the minimum field width. If not specified, then the field width will be determined by the content. From python-checkins at python.org Sun Jul 12 23:16:37 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 21:16:37 -0000 Subject: [Python-checkins] r73984 - sandbox/trunk/2to3/lib2to3/tests/test_util.py Message-ID: Author: benjamin.peterson Date: Sun Jul 12 23:16:37 2009 New Revision: 73984 Log: add tests for Call; thanks Joe Amenta Modified: sandbox/trunk/2to3/lib2to3/tests/test_util.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_util.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_util.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_util.py Sun Jul 12 23:16:37 2009 @@ -1,4 +1,4 @@ -""" Test suite for the code in fixes.util """ +""" Test suite for the code in fixer_util """ # Testing imports from . import support @@ -7,10 +7,10 @@ import os.path # Local imports -from .. import pytree -from .. import fixer_util -from ..fixer_util import Attr, Name - +from lib2to3.pytree import Node, Leaf +from lib2to3 import fixer_util +from lib2to3.fixer_util import Attr, Name, Call, Comma +from lib2to3.pgen2 import token def parse(code, strip_levels=0): # The topmost node is file_input, which we don't care about. @@ -24,7 +24,7 @@ class MacroTestCase(support.TestCase): def assertStr(self, node, string): if isinstance(node, (tuple, list)): - node = pytree.Node(fixer_util.syms.simple_stmt, node) + node = Node(fixer_util.syms.simple_stmt, node) self.assertEqual(str(node), string) @@ -78,6 +78,31 @@ self.assertStr(Name("a", prefix="b"), "ba") +class Test_Call(MacroTestCase): + def _Call(self, name, args=None, prefix=None): + """Help the next test""" + children = [] + if isinstance(args, list): + for arg in args: + children.append(arg) + children.append(Comma()) + children.pop() + return Call(Name(name), children, prefix) + + def test(self): + kids = [None, + [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 2), + Leaf(token.NUMBER, 3)], + [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 3), + Leaf(token.NUMBER, 2), Leaf(token.NUMBER, 4)], + [Leaf(token.STRING, "b"), Leaf(token.STRING, "j", prefix=" ")] + ] + self.assertStr(self._Call("A"), "A()") + self.assertStr(self._Call("b", kids[1]), "b(1,2,3)") + self.assertStr(self._Call("a.b().c", kids[2]), "a.b().c(1,3,2,4)") + self.assertStr(self._Call("d", kids[3], prefix=" "), " d(b, j)") + + class Test_does_tree_import(support.TestCase): def _find_bind_rec(self, name, node): # Search a tree for a binding -- used to find the starting From python-checkins at python.org Sun Jul 12 23:18:55 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 21:18:55 -0000 Subject: [Python-checkins] r73985 - python/trunk/Misc/ACKS Message-ID: Author: benjamin.peterson Date: Sun Jul 12 23:18:55 2009 New Revision: 73985 Log: add Joe Modified: python/trunk/Misc/ACKS Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Sun Jul 12 23:18:55 2009 @@ -16,6 +16,7 @@ Jyrki Alakuijala Billy G. Allie Kevin Altis +Joe Amenta Mark Anacker Anders Andersen John Anderson @@ -811,5 +812,5 @@ Mike Zarnstorff Siebren van der Zee Uwe Zessin -Tarek Ziad? +Tarek Ziad?? Peter ?strand From python-checkins at python.org Mon Jul 13 00:42:08 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sun, 12 Jul 2009 22:42:08 -0000 Subject: [Python-checkins] r73986 - python/trunk/Lib/test/test_xmlrpc.py Message-ID: Author: kristjan.jonsson Date: Mon Jul 13 00:42:08 2009 New Revision: 73986 Log: http://bugs.python.org/issue6267 Add more tests for the xlmrpc.ServerProxy Modified: python/trunk/Lib/test/test_xmlrpc.py Modified: python/trunk/Lib/test/test_xmlrpc.py ============================================================================== --- python/trunk/Lib/test/test_xmlrpc.py (original) +++ python/trunk/Lib/test/test_xmlrpc.py Mon Jul 13 00:42:08 2009 @@ -352,13 +352,14 @@ class BaseServerTestCase(unittest.TestCase): requestHandler = None + request_count = 1 def setUp(self): # enable traceback reporting SimpleXMLRPCServer.SimpleXMLRPCServer._send_traceback_header = True self.evt = threading.Event() # start server thread to handle requests - serv_args = (self.evt, 1, self.requestHandler) + serv_args = (self.evt, self.request_count, self.requestHandler) threading.Thread(target=http_server, args=serv_args).start() # wait for the server to be ready @@ -518,7 +519,7 @@ #A test case that verifies that a server using the HTTP/1.1 keep-alive mechanism #does indeed serve subsequent requests on the same connection -class KeepaliveServerTestCase(BaseServerTestCase): +class BaseKeepaliveServerTestCase(BaseServerTestCase): #a request handler that supports keep-alive and logs requests into a #class variable class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): @@ -527,10 +528,11 @@ myRequests = [] def handle(self): self.myRequests.append([]) + self.reqidx = len(self.myRequests)-1 return self.parentClass.handle(self) def handle_one_request(self): result = self.parentClass.handle_one_request(self) - self.myRequests[-1].append(self.raw_requestline) + self.myRequests[self.reqidx].append(self.raw_requestline) return result requestHandler = RequestHandler @@ -539,6 +541,9 @@ self.RequestHandler.myRequests = [] return BaseServerTestCase.setUp(self) +#A test case that verifies that a server using the HTTP/1.1 keep-alive mechanism +#does indeed serve subsequent requests on the same connection +class KeepaliveServerTestCase1(BaseKeepaliveServerTestCase): def test_two(self): p = xmlrpclib.ServerProxy(URL) #do three requests. @@ -553,6 +558,37 @@ #due to thread scheduling) self.assertGreaterEqual(len(self.RequestHandler.myRequests[-1]), 2) +#test special attribute access on the serverproxy, through the __call__ +#function. +class KeepaliveServerTestCase2(BaseKeepaliveServerTestCase): + #ask for two keepalive requests to be handled. + request_count=2 + + def test_close(self): + p = xmlrpclib.ServerProxy(URL) + #do some requests with close. + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + p("close")() #this should trigger a new keep-alive request + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + + #they should have all been two request handlers, each having logged at least + #two complete requests + self.assertEqual(len(self.RequestHandler.myRequests), 2) + self.assertGreaterEqual(len(self.RequestHandler.myRequests[-1]), 2) + self.assertGreaterEqual(len(self.RequestHandler.myRequests[-2]), 2) + + def test_transport(self): + p = xmlrpclib.ServerProxy(URL) + #do some requests with close. + self.assertEqual(p.pow(6,8), 6**8) + p("transport").close() #same as above, really. + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(len(self.RequestHandler.myRequests), 2) + #A test case that verifies that gzip encoding works in both directions #(for a request and the response) class GzipServerTestCase(BaseServerTestCase): @@ -880,7 +916,8 @@ xmlrpc_tests = [XMLRPCTestCase, HelperTestCase, DateTimeTestCase, BinaryTestCase, FaultTestCase, TransportSubclassTestCase] xmlrpc_tests.append(SimpleServerTestCase) - xmlrpc_tests.append(KeepaliveServerTestCase) + xmlrpc_tests.append(KeepaliveServerTestCase1) + xmlrpc_tests.append(KeepaliveServerTestCase2) xmlrpc_tests.append(GzipServerTestCase) xmlrpc_tests.append(ServerProxyTestCase) xmlrpc_tests.append(FailingServerTestCase) From python-checkins at python.org Mon Jul 13 00:45:18 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sun, 12 Jul 2009 22:45:18 -0000 Subject: [Python-checkins] r73987 - python/branches/py3k/Lib/test/test_xmlrpc.py Message-ID: Author: kristjan.jonsson Date: Mon Jul 13 00:45:18 2009 New Revision: 73987 Log: merging revision 73986 from trunk: http://bugs.python.org/issue6267 Add more tests for the xlmrpc.ServerProxy Modified: python/branches/py3k/Lib/test/test_xmlrpc.py Modified: python/branches/py3k/Lib/test/test_xmlrpc.py ============================================================================== --- python/branches/py3k/Lib/test/test_xmlrpc.py (original) +++ python/branches/py3k/Lib/test/test_xmlrpc.py Mon Jul 13 00:45:18 2009 @@ -322,13 +322,14 @@ class BaseServerTestCase(unittest.TestCase): requestHandler = None + request_count = 1 def setUp(self): # enable traceback reporting xmlrpc.server.SimpleXMLRPCServer._send_traceback_header = True self.evt = threading.Event() # start server thread to handle requests - serv_args = (self.evt, 1, self.requestHandler) + serv_args = (self.evt, self.request_count, self.requestHandler) threading.Thread(target=http_server, args=serv_args).start() # wait for the server to be ready @@ -484,7 +485,7 @@ #A test case that verifies that a server using the HTTP/1.1 keep-alive mechanism #does indeed serve subsequent requests on the same connection -class KeepaliveServerTestCase(BaseServerTestCase): +class BaseKeepaliveServerTestCase(BaseServerTestCase): #a request handler that supports keep-alive and logs requests into a #class variable class RequestHandler(xmlrpc.server.SimpleXMLRPCRequestHandler): @@ -493,10 +494,11 @@ myRequests = [] def handle(self): self.myRequests.append([]) + self.reqidx = len(self.myRequests)-1 return self.parentClass.handle(self) def handle_one_request(self): result = self.parentClass.handle_one_request(self) - self.myRequests[-1].append(self.raw_requestline) + self.myRequests[self.reqidx].append(self.raw_requestline) return result requestHandler = RequestHandler @@ -505,6 +507,9 @@ self.RequestHandler.myRequests = [] return BaseServerTestCase.setUp(self) +#A test case that verifies that a server using the HTTP/1.1 keep-alive mechanism +#does indeed serve subsequent requests on the same connection +class KeepaliveServerTestCase1(BaseKeepaliveServerTestCase): def test_two(self): p = xmlrpclib.ServerProxy(URL) #do three requests. @@ -519,6 +524,37 @@ #due to thread scheduling) self.assertGreaterEqual(len(self.RequestHandler.myRequests[-1]), 2) +#test special attribute access on the serverproxy, through the __call__ +#function. +class KeepaliveServerTestCase2(BaseKeepaliveServerTestCase): + #ask for two keepalive requests to be handled. + request_count=2 + + def test_close(self): + p = xmlrpclib.ServerProxy(URL) + #do some requests with close. + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + p("close")() #this should trigger a new keep-alive request + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(p.pow(6,8), 6**8) + + #they should have all been two request handlers, each having logged at least + #two complete requests + self.assertEqual(len(self.RequestHandler.myRequests), 2) + self.assertGreaterEqual(len(self.RequestHandler.myRequests[-1]), 2) + self.assertGreaterEqual(len(self.RequestHandler.myRequests[-2]), 2) + + def test_transport(self): + p = xmlrpclib.ServerProxy(URL) + #do some requests with close. + self.assertEqual(p.pow(6,8), 6**8) + p("transport").close() #same as above, really. + self.assertEqual(p.pow(6,8), 6**8) + self.assertEqual(len(self.RequestHandler.myRequests), 2) + #A test case that verifies that gzip encoding works in both directions #(for a request and the response) class GzipServerTestCase(BaseServerTestCase): @@ -761,7 +797,8 @@ xmlrpc_tests = [XMLRPCTestCase, HelperTestCase, DateTimeTestCase, BinaryTestCase, FaultTestCase] xmlrpc_tests.append(SimpleServerTestCase) - xmlrpc_tests.append(KeepaliveServerTestCase) + xmlrpc_tests.append(KeepaliveServerTestCase1) + xmlrpc_tests.append(KeepaliveServerTestCase2) xmlrpc_tests.append(GzipServerTestCase) xmlrpc_tests.append(ServerProxyTestCase) xmlrpc_tests.append(FailingServerTestCase) From python-checkins at python.org Mon Jul 13 01:40:33 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 23:40:33 -0000 Subject: [Python-checkins] r73988 - python/trunk/Misc/ACKS Message-ID: Author: benjamin.peterson Date: Mon Jul 13 01:40:33 2009 New Revision: 73988 Log: fix Tarek's name Modified: python/trunk/Misc/ACKS Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Mon Jul 13 01:40:33 2009 @@ -812,5 +812,5 @@ Mike Zarnstorff Siebren van der Zee Uwe Zessin -Tarek Ziad?? +Tarek Ziad? Peter ?strand From python-checkins at python.org Mon Jul 13 01:44:43 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 23:44:43 -0000 Subject: [Python-checkins] r73989 - python/trunk/Misc/ACKS Message-ID: Author: benjamin.peterson Date: Mon Jul 13 01:44:43 2009 New Revision: 73989 Log: change encoding to utf-8 Modified: python/trunk/Misc/ACKS Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Mon Jul 13 01:44:43 2009 @@ -8,7 +8,7 @@ --Guido -PS: In the standard Python distribution, this file is encoded in Latin-1. +PS: In the standard Python distribution, this file is encoded in UTF-8. David Abrahams Jim Ahlstrom @@ -20,7 +20,7 @@ Mark Anacker Anders Andersen John Anderson -Erik Anders?n +Erik Anders??n Oliver Andrich Ross Andrus Jason Asbahr @@ -195,7 +195,7 @@ Eugene Dvurechenski Josip Dzolonga Maxim Dzumanenko -Walter D?rwald +Walter D??rwald Hans Eckardt Grant Edwards John Ehresman @@ -205,7 +205,7 @@ Jeff Epler Tom Epperly Stoffel Erasmus -J?rgen A. Erhard +J??rgen A. Erhard Michael Ernst Ben Escoto Andy Eskilsson @@ -228,7 +228,7 @@ Nils Fischbeck Frederik Fix Matt Fleming -Hern?n Mart?nez Foffani +Hern??n Mart??nez Foffani Michael Foord Amaury Forgeot d'Arc Doug Fort @@ -242,7 +242,7 @@ Peter Funk Geoff Furnish Ulisses Furquim -Hagen F?rstenau +Hagen F??rstenau Achim Gaedke Martin von Gagern Lele Gaifax @@ -274,13 +274,13 @@ Duncan Grisby Dag Gruneau Michael Guravage -Lars Gust?bel -Thomas G?ttler +Lars Gust??bel +Thomas G??ttler Barry Haddow Paul ten Hagen Rasmus Hahn Peter Haight -V?clav Haisman +V??clav Haisman Bob Halley Jesse Hallio Jun Hamano @@ -304,7 +304,7 @@ James Henstridge Chris Herborth Ivan Herman -J?rgen Hermann +J??rgen Hermann Gary Herron Thomas Herve Bernhard Herzog @@ -341,7 +341,7 @@ Greg Humphreys Eric Huss Jeremy Hylton -Gerhard H?ring +Gerhard H??ring Mihai Ibanescu Lars Immisch Tony Ingraldi @@ -357,7 +357,7 @@ Jack Jansen Bill Janssen Drew Jenkins -Flemming Kj?r Jensen +Flemming Kj??r Jensen Jiba Orjan Johansen Fredrik Johansson @@ -454,7 +454,7 @@ Mark Lutz Jim Lynch Mikael Lyngvig -Martin von L?wis +Martin von L??wis Andrew I MacIntyre Tim MacKenzie Nick Maclaren @@ -466,7 +466,7 @@ Doug Marien Alex Martelli Anthony Martin -S?bastien Martini +S??bastien Martini Roger Masse Nick Mathewson Graham Matthews @@ -513,7 +513,7 @@ Trent Nelson Tony Nelson Chad Netzer -Max Neunh?ffer +Max Neunh??ffer George Neville-Neil Johannes Nicolai Samuel Nicolary @@ -542,7 +542,7 @@ Ondrej Palkovsky Mike Pall Todd R. Palmer -Juan David Ib??ez Palomar +Juan David Ib????ez Palomar Jan Palus M. Papillon Peter Parente @@ -553,7 +553,7 @@ Samuele Pedroni Marcel van der Peijl Steven Pemberton -Santiago Peres?n +Santiago Peres??n Mark Perrego Trevor Perrin Gabriel de Perthuis @@ -569,11 +569,11 @@ Jim St. Pierre Dan Pierson Martijn Pieters -Fran?ois Pinard +Fran??ois Pinard Zach Pincus Michael Piotrowski Antoine Pitrou -Jean-Fran?ois Pi?ronne +Jean-Fran??ois Pi??ronne Guilherme Polo Michael Pomraning Iustin Pop @@ -582,8 +582,8 @@ Paul Prescod Donovan Preston Steve Purcell -Fernando P?rez -Eduardo P?rez +Fernando P??rez +Eduardo P??rez Brian Quinlan Anders Qvist Burton Radons @@ -656,7 +656,7 @@ Steven Scott Barry Scott Nick Seidenman -??iga Seilnach +????iga Seilnach Fred Sells Jiwon Seo Jerry Seutter @@ -736,7 +736,7 @@ Stephen Turner Bill Tutt Doobee R. Tzeck -Eren T?rkay +Eren T??rkay Lionel Ulmer Roger Upole Michael Urman @@ -812,5 +812,5 @@ Mike Zarnstorff Siebren van der Zee Uwe Zessin -Tarek Ziad? -Peter ?strand +Tarek Ziad?? +Peter ??strand From python-checkins at python.org Mon Jul 13 01:49:23 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 23:49:23 -0000 Subject: [Python-checkins] r73990 - python/trunk/Misc/ACKS Message-ID: Author: benjamin.peterson Date: Mon Jul 13 01:49:23 2009 New Revision: 73990 Log: fix another name Modified: python/trunk/Misc/ACKS Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Mon Jul 13 01:49:23 2009 @@ -656,7 +656,7 @@ Steven Scott Barry Scott Nick Seidenman -??iga Seilnach +?iga Seilnach Fred Sells Jiwon Seo Jerry Seutter From python-checkins at python.org Mon Jul 13 01:56:19 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 23:56:19 -0000 Subject: [Python-checkins] r73991 - python/trunk/Misc/NEWS Message-ID: Author: benjamin.peterson Date: Mon Jul 13 01:56:18 2009 New Revision: 73991 Log: change encoding to utf-8 Modified: python/trunk/Misc/NEWS Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jul 13 01:56:18 2009 @@ -49,7 +49,7 @@ possible to update the lineno attribute of the current frame. - Issue #5330: C functions called with keyword arguments were not reported by - the various profiling modules (profile, cProfile). Patch by Hagen F?rstenau. + the various profiling modules (profile, cProfile). Patch by Hagen F??rstenau. - Issue #5982: staticmethod and classmethod now expose the wrapped function with __func__. @@ -222,7 +222,7 @@ - Issue #4074: Change the criteria for doing a full garbage collection (i.e. collecting the oldest generation) so that allocating lots of objects without destroying them does not show quadratic performance. Based on a proposal by - Martin von L??wis at + Martin von L????wis at http://mail.python.org/pipermail/python-dev/2008-June/080579.html. - Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t. From python-checkins at python.org Mon Jul 13 01:58:08 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 12 Jul 2009 23:58:08 -0000 Subject: [Python-checkins] r73992 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Mon Jul 13 01:58:08 2009 New Revision: 73992 Log: Blocked revisions 73991 via svnmerge ........ r73991 | benjamin.peterson | 2009-07-12 18:56:18 -0500 (Sun, 12 Jul 2009) | 1 line change encoding to utf-8 ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Mon Jul 13 02:00:31 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 13 Jul 2009 00:00:31 -0000 Subject: [Python-checkins] r73993 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Mon Jul 13 02:00:31 2009 New Revision: 73993 Log: Unblocked revisions 73991 via svnmerge ........ r73991 | benjamin.peterson | 2009-07-12 18:56:18 -0500 (Sun, 12 Jul 2009) | 1 line change encoding to utf-8 ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Mon Jul 13 02:03:20 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 13 Jul 2009 00:03:20 -0000 Subject: [Python-checkins] r73994 - python/trunk/Misc/NEWS Message-ID: Author: benjamin.peterson Date: Mon Jul 13 02:03:20 2009 New Revision: 73994 Log: fix umlaut Modified: python/trunk/Misc/NEWS Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jul 13 02:03:20 2009 @@ -222,7 +222,7 @@ - Issue #4074: Change the criteria for doing a full garbage collection (i.e. collecting the oldest generation) so that allocating lots of objects without destroying them does not show quadratic performance. Based on a proposal by - Martin von L??wis at + Martin von L?wis at http://mail.python.org/pipermail/python-dev/2008-June/080579.html. - Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t. From buildbot at python.org Mon Jul 13 02:46:05 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 13 Jul 2009 00:46:05 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2322 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,kristjan.jonsson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() Author: vinay.sajip Date: Mon Jul 13 13:21:05 2009 New Revision: 73995 Log: Issue #6314: logging: Extra checks on the "level" argument in more places. Modified: python/trunk/Lib/logging/__init__.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/logging/__init__.py ============================================================================== --- python/trunk/Lib/logging/__init__.py (original) +++ python/trunk/Lib/logging/__init__.py Mon Jul 13 13:21:05 2009 @@ -174,6 +174,17 @@ finally: _releaseLock() +def _checkLevel(level): + if isinstance(level, int): + rv = level + elif str(level) == level: + if level not in _levelNames: + raise ValueError("Unknown level: %r" % level) + rv = _levelNames[level] + else: + raise TypeError("Level not an integer or a valid string: %r" % level) + return rv + #--------------------------------------------------------------------------- # Thread-related stuff #--------------------------------------------------------------------------- @@ -593,7 +604,7 @@ and the filter list to empty. """ Filterer.__init__(self) - self.level = level + self.level = _checkLevel(level) self.formatter = None #get the module data lock, as we're updating a shared structure. _acquireLock() @@ -631,7 +642,7 @@ """ Set the logging level of this handler. """ - self.level = level + self.level = _checkLevel(level) def format(self, record): """ @@ -1010,7 +1021,7 @@ """ Filterer.__init__(self) self.name = name - self.level = level + self.level = _checkLevel(level) self.parent = None self.propagate = 1 self.handlers = [] @@ -1020,7 +1031,7 @@ """ Set the logging level of this logger. """ - self.level = level + self.level = _checkLevel(level) def debug(self, msg, *args, **kwargs): """ @@ -1397,10 +1408,6 @@ root.addHandler(hdlr) level = kwargs.get("level") if level is not None: - if str(level) == level: # If a string was passed, do more checks - if level not in _levelNames: - raise ValueError("Unknown level: %r" % level) - level = _levelNames[level] root.setLevel(level) #--------------------------------------------------------------------------- Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jul 13 13:21:05 2009 @@ -350,12 +350,14 @@ Library ------- +- Issue #6314: logging: Extra checks on the "level" argument in more places. + - Issue #2622: Fixed an ImportError when importing email.messsage from a standalone application built with py2exe or py2app. -- Issue #6455: Fixed test_build_ext under win32. +- Issue #6455: Fixed test_build_ext under win32. -- Issue #6377: Enabled the compiler option, and deprecate its usage as an +- Issue #6377: Enabled the compiler option, and deprecate its usage as an attribute. - Issue #6413: Fixed the log level in distutils.dist for announce. @@ -365,11 +367,11 @@ - Issue #6403: Fixed package path usage in build_ext. -- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was +- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was unconditionally calling "os.close(sys.stdin.fileno())" resulting in file descriptor errors -- Issue #6365: Distutils build_ext inplace mode was copying the compiled +- Issue #6365: Distutils build_ext inplace mode was copying the compiled extension in a subdirectory if the extension name had dots. - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. From python-checkins at python.org Mon Jul 13 13:28:30 2009 From: python-checkins at python.org (vinay.sajip) Date: Mon, 13 Jul 2009 11:28:30 -0000 Subject: [Python-checkins] r73996 - in python/branches/py3k: Lib/logging/__init__.py Misc/NEWS Message-ID: Author: vinay.sajip Date: Mon Jul 13 13:28:25 2009 New Revision: 73996 Log: Issue #6314: logging: Extra checks on the "level" argument. Modified: python/branches/py3k/Lib/logging/__init__.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/logging/__init__.py ============================================================================== --- python/branches/py3k/Lib/logging/__init__.py (original) +++ python/branches/py3k/Lib/logging/__init__.py Mon Jul 13 13:28:25 2009 @@ -176,6 +176,17 @@ finally: _releaseLock() +def _checkLevel(level): + if isinstance(level, int): + rv = level + elif str(level) == level: + if level not in _levelNames: + raise ValueError("Unknown level: %r" % level) + rv = _levelNames[level] + else: + raise TypeError("Level not an integer or a valid string: %r" % level) + return rv + #--------------------------------------------------------------------------- # Thread-related stuff #--------------------------------------------------------------------------- @@ -593,7 +604,7 @@ and the filter list to empty. """ Filterer.__init__(self) - self.level = level + self.level = _checkLevel(level) self.formatter = None #get the module data lock, as we're updating a shared structure. _acquireLock() @@ -631,7 +642,7 @@ """ Set the logging level of this handler. """ - self.level = level + self.level = _checkLevel(level) def format(self, record): """ @@ -1009,7 +1020,7 @@ """ Filterer.__init__(self) self.name = name - self.level = level + self.level = _checkLevel(level) self.parent = None self.propagate = 1 self.handlers = [] @@ -1019,7 +1030,7 @@ """ Set the logging level of this logger. """ - self.level = level + self.level = _checkLevel(level) def debug(self, msg, *args, **kwargs): """ @@ -1396,10 +1407,6 @@ root.addHandler(hdlr) level = kwargs.get("level") if level is not None: - if str(level) == level: # If a string was passed, do more checks - if level not in _levelNames: - raise ValueError("Unknown level: %r" % level) - level = _levelNames[level] root.setLevel(level) #--------------------------------------------------------------------------- Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Jul 13 13:28:25 2009 @@ -90,8 +90,7 @@ Library ------- -- Issue #6314: logging.basicConfig() performs extra checks on the "level" - argument. +- Issue #6314: logging: performs extra checks on the "level" argument. - Issue #6274: Fixed possible file descriptors leak in subprocess.py @@ -133,7 +132,7 @@ ------- - Issue #6438: Fixed distutils.cygwinccompiler.get_versions : the regular - expression string pattern was trying to match against a bytes returned by + expression string pattern was trying to match against a bytes returned by Popen. Tested under win32 to build the py-postgresql project. - Issue #6258: Support AMD64 in bdist_msi. @@ -892,22 +891,22 @@ Library ------- -- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the - "PyInit" prefix, rather than "init". +- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the + "PyInit" prefix, rather than "init". -- Issue #6455: Fixed test_build_ext under win32. +- Issue #6455: Fixed test_build_ext under win32. -- Issue #6377: Enabled the compiler option, and deprecate its usage as an +- Issue #6377: Enabled the compiler option, and deprecate its usage as an attribute. - Issue #6413: Fixed the log level in distutils.dist for announce. - Issue #6403: Fixed package path usage in build_ext. -- Issue #6365: Distutils build_ext inplace mode was copying the compiled +- Issue #6365: Distutils build_ext inplace mode was copying the compiled extension in a subdirectory if the extension name had dots. -- Issue #6164: Added an AIX specific linker argument in Distutils +- Issue #6164: Added an AIX specific linker argument in Distutils unixcompiler. Original patch by Sridhar Ratnakumar. - Issue #6286: Now Distutils upload command is based on urllib2 instead of From python-checkins at python.org Mon Jul 13 18:32:47 2009 From: python-checkins at python.org (michael.foord) Date: Mon, 13 Jul 2009 16:32:47 -0000 Subject: [Python-checkins] r73997 - in python/branches/release26-maint/Lib: test/test_unittest.py unittest.py Message-ID: Author: michael.foord Date: Mon Jul 13 18:32:47 2009 New Revision: 73997 Log: Move initialising unittest.TestProgram.testRunner into runTests. Issue 6418. Modified: python/branches/release26-maint/Lib/test/test_unittest.py python/branches/release26-maint/Lib/unittest.py Modified: python/branches/release26-maint/Lib/test/test_unittest.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_unittest.py (original) +++ python/branches/release26-maint/Lib/test/test_unittest.py Mon Jul 13 18:32:47 2009 @@ -6,6 +6,7 @@ TestCase.{assert,fail}* methods (some are tested implicitly) """ +import sys from test import test_support import unittest from unittest import TestCase @@ -2285,15 +2286,6 @@ self.failIfAlmostEqual, 0, .1+.1j, places=0) -class Test_TestProgram(TestCase): - - def testTestProgram_testRunnerArgument(self): - program = object.__new__(unittest.TestProgram) - program.parseArgs = lambda _: None - program.runTests = lambda: None - program.__init__(testRunner=None) - self.assertEqual(program.testRunner, unittest.TextTestRunner) - ###################################################################### ## Main @@ -2302,7 +2294,7 @@ def test_main(): test_support.run_unittest(Test_TestCase, Test_TestLoader, Test_TestSuite, Test_TestResult, Test_FunctionTestCase, - Test_Assertions, Test_TestProgram) + Test_Assertions) if __name__ == "__main__": test_main() Modified: python/branches/release26-maint/Lib/unittest.py ============================================================================== --- python/branches/release26-maint/Lib/unittest.py (original) +++ python/branches/release26-maint/Lib/unittest.py Mon Jul 13 18:32:47 2009 @@ -800,8 +800,6 @@ def __init__(self, module='__main__', defaultTest=None, argv=None, testRunner=None, testLoader=defaultTestLoader): - if testRunner is None: - testRunner = TextTestRunner if type(module) == type(''): self.module = __import__(module) for part in module.split('.')[1:]: @@ -851,6 +849,9 @@ self.module) def runTests(self): + if self.testRunner is None: + self.testRunner = TextTestRunner + if isinstance(self.testRunner, (type, types.ClassType)): try: testRunner = self.testRunner(verbosity=self.verbosity) From buildbot at python.org Mon Jul 13 19:06:07 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 13 Jul 2009 17:06:07 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 2.6 Message-ID: The Buildbot has detected a new failure of amd64 gentoo 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%202.6/builds/133 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: michael.foord BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From python-checkins at python.org Mon Jul 13 21:14:17 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Mon, 13 Jul 2009 19:14:17 -0000 Subject: [Python-checkins] r73998 - in python/trunk: PC/VS7.1/pcbuild.sln PC/VS8.0/pcbuild.sln PC/bdist_wininst/wininst-7.1.sln PC/bdist_wininst/wininst-8.sln PC/example_nt/example.sln PCbuild/pcbuild.sln Message-ID: Author: amaury.forgeotdarc Date: Mon Jul 13 21:14:17 2009 New Revision: 73998 Log: Set svn:eol-style=CRLF on all Visual Studio solution files. This should allow direct compilation from a downloaded source tar ball. Modified: python/trunk/PC/VS7.1/pcbuild.sln (contents, props changed) python/trunk/PC/VS8.0/pcbuild.sln (contents, props changed) python/trunk/PC/bdist_wininst/wininst-7.1.sln (contents, props changed) python/trunk/PC/bdist_wininst/wininst-8.sln (contents, props changed) python/trunk/PC/example_nt/example.sln (contents, props changed) python/trunk/PCbuild/pcbuild.sln (contents, props changed) Modified: python/trunk/PC/VS7.1/pcbuild.sln ============================================================================== --- python/trunk/PC/VS7.1/pcbuild.sln (original) +++ python/trunk/PC/VS7.1/pcbuild.sln Mon Jul 13 21:14:17 2009 @@ -1,288 +1,288 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{E1DBB220-D64B-423D-A545-539A55AA7FE2}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{324F66C2-44D0-4D50-B979-F9DAE7FD36DB}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{59CBF474-9E06-4C50-9142-C44A118BB447}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{5B51DFF7-5DC0-41F8-8791-A4AB7114A151}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{AC557788-6354-43F7-BE05-C9C8C59A344A}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - ProjectSection(ProjectDependencies) = postProject - {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} - {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{97239A56-DBC0-41D2-BC14-C87D9B97D63B}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{51F35FAE-FB92-4B2C-9187-1542C065AD77}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{F22F40F4-D318-40DC-96B3-88DC81CE0894}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}" - ProjectSection(ProjectDependencies) = postProject - {F22F40F4-D318-40DC-96B3-88DC81CE0894} = {F22F40F4-D318-40DC-96B3-88DC81CE0894} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{2FF0A312-22F9-4C34-B070-842916DE27A9}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - ReleaseAMD64 = ReleaseAMD64 - ReleaseItanium = ReleaseItanium - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug.ActiveCfg = Debug|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug.Build.0 = Debug|Win32 - {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 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.Build.0 = Debug|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.ActiveCfg = Release|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.Build.0 = Release|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.ActiveCfg = Debug|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.Build.0 = Debug|Win32 - {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 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.Build.0 = Debug|Win32 - {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 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.Build.0 = Debug|Win32 - {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 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.Build.0 = Debug|Win32 - {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 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.Build.0 = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.ActiveCfg = Debug|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.Build.0 = Debug|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.ActiveCfg = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.Build.0 = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.ActiveCfg = Debug|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.Build.0 = Debug|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.ActiveCfg = Release|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.Build.0 = Release|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.ActiveCfg = Debug|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.Build.0 = Debug|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.ActiveCfg = Release|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.Build.0 = Release|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.ActiveCfg = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.Build.0 = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.Build.0 = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseAMD64.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseItanium.ActiveCfg = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.ActiveCfg = Debug|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.Build.0 = Debug|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.ActiveCfg = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.Build.0 = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.ActiveCfg = Debug|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.Build.0 = Debug|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.ActiveCfg = Release|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.Build.0 = Release|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.ActiveCfg = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.Build.0 = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.Build.0 = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.ActiveCfg = Debug|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.Build.0 = Debug|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.ActiveCfg = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.Build.0 = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.ActiveCfg = Debug|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.Build.0 = Debug|Win32 - {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 - {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 - GlobalSection(SolutionItems) = postSolution - ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c - readme.txt = readme.txt - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{E1DBB220-D64B-423D-A545-539A55AA7FE2}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{324F66C2-44D0-4D50-B979-F9DAE7FD36DB}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{59CBF474-9E06-4C50-9142-C44A118BB447}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{5B51DFF7-5DC0-41F8-8791-A4AB7114A151}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{AC557788-6354-43F7-BE05-C9C8C59A344A}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" + ProjectSection(ProjectDependencies) = postProject + {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} + {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{97239A56-DBC0-41D2-BC14-C87D9B97D63B}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{51F35FAE-FB92-4B2C-9187-1542C065AD77}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{F22F40F4-D318-40DC-96B3-88DC81CE0894}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}" + ProjectSection(ProjectDependencies) = postProject + {F22F40F4-D318-40DC-96B3-88DC81CE0894} = {F22F40F4-D318-40DC-96B3-88DC81CE0894} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{2FF0A312-22F9-4C34-B070-842916DE27A9}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + ReleaseAMD64 = ReleaseAMD64 + ReleaseItanium = ReleaseItanium + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug.ActiveCfg = Debug|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Debug.Build.0 = Debug|Win32 + {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 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.Build.0 = Debug|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.ActiveCfg = Release|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.Build.0 = Release|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.ActiveCfg = Debug|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.Build.0 = Debug|Win32 + {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 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.Build.0 = Debug|Win32 + {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 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.Build.0 = Debug|Win32 + {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 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.Build.0 = Debug|Win32 + {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 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.Build.0 = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.ActiveCfg = Debug|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.Build.0 = Debug|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.ActiveCfg = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.Build.0 = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.ActiveCfg = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.Build.0 = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.ActiveCfg = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.Build.0 = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.ActiveCfg = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.Build.0 = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.ActiveCfg = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.ActiveCfg = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.Build.0 = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.ActiveCfg = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.Build.0 = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.ActiveCfg = Debug|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.Build.0 = Debug|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.ActiveCfg = Release|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.Build.0 = Release|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.ActiveCfg = Debug|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.Build.0 = Debug|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.ActiveCfg = Release|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.Build.0 = Release|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.ActiveCfg = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.Build.0 = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.Build.0 = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseAMD64.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseItanium.ActiveCfg = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.ActiveCfg = Debug|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.Build.0 = Debug|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.ActiveCfg = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.Build.0 = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.ActiveCfg = Debug|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.Build.0 = Debug|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.ActiveCfg = Release|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.Build.0 = Release|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.ActiveCfg = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.Build.0 = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.Build.0 = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.ActiveCfg = Debug|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.Build.0 = Debug|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.ActiveCfg = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.Build.0 = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.ActiveCfg = Debug|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.Build.0 = Debug|Win32 + {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 + {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 + GlobalSection(SolutionItems) = postSolution + ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c + readme.txt = readme.txt + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Modified: python/trunk/PC/VS8.0/pcbuild.sln ============================================================================== --- python/trunk/PC/VS8.0/pcbuild.sln (original) +++ python/trunk/PC/VS8.0/pcbuild.sln Mon Jul 13 21:14:17 2009 @@ -1,559 +1,559 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - ProjectSection(ProjectDependencies) = postProject - {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" - ProjectSection(SolutionItems) = preProject - ..\..\Modules\getbuildinfo.c = ..\..\Modules\getbuildinfo.c - readme.txt = readme.txt - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{B4D38F3F-68FB-42EC-A45D-E00657BB3627}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - PGInstrument|Win32 = PGInstrument|Win32 - PGInstrument|x64 = PGInstrument|x64 - PGUpdate|Win32 = PGUpdate|Win32 - PGUpdate|x64 = PGUpdate|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.Build.0 = Debug|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.ActiveCfg = Debug|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.Build.0 = Debug|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.ActiveCfg = Release|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.Build.0 = Release|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.ActiveCfg = Release|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.Build.0 = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" + ProjectSection(ProjectDependencies) = postProject + {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" + ProjectSection(SolutionItems) = preProject + ..\..\Modules\getbuildinfo.c = ..\..\Modules\getbuildinfo.c + readme.txt = readme.txt + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{B4D38F3F-68FB-42EC-A45D-E00657BB3627}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + PGInstrument|Win32 = PGInstrument|Win32 + PGInstrument|x64 = PGInstrument|x64 + PGUpdate|Win32 = PGUpdate|Win32 + PGUpdate|x64 = PGUpdate|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.Build.0 = Debug|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.ActiveCfg = Debug|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.Build.0 = Debug|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.ActiveCfg = Release|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.Build.0 = Release|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.ActiveCfg = Release|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.Build.0 = Release|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Modified: python/trunk/PC/bdist_wininst/wininst-7.1.sln ============================================================================== --- python/trunk/PC/bdist_wininst/wininst-7.1.sln (original) +++ python/trunk/PC/bdist_wininst/wininst-7.1.sln Mon Jul 13 21:14:17 2009 @@ -1,21 +1,21 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-7.1.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.ActiveCfg = Debug|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.Build.0 = Debug|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-7.1.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.ActiveCfg = Debug|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.Build.0 = Debug|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Modified: python/trunk/PC/bdist_wininst/wininst-8.sln ============================================================================== --- python/trunk/PC/bdist_wininst/wininst-8.sln (original) +++ python/trunk/PC/bdist_wininst/wininst-8.sln Mon Jul 13 21:14:17 2009 @@ -1,19 +1,19 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-8.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Debug|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.Build.0 = Debug|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-8.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.Build.0 = Debug|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Modified: python/trunk/PC/example_nt/example.sln ============================================================================== --- python/trunk/PC/example_nt/example.sln (original) +++ python/trunk/PC/example_nt/example.sln Mon Jul 13 21:14:17 2009 @@ -1,21 +1,21 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj", "{A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.ActiveCfg = Debug|Win32 - {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.Build.0 = Debug|Win32 - {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.ActiveCfg = Release|Win32 - {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj", "{A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.ActiveCfg = Debug|Win32 + {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.Build.0 = Debug|Win32 + {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.ActiveCfg = Release|Win32 + {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Modified: python/trunk/PCbuild/pcbuild.sln ============================================================================== --- python/trunk/PCbuild/pcbuild.sln (original) +++ python/trunk/PCbuild/pcbuild.sln Mon Jul 13 21:14:17 2009 @@ -1,559 +1,559 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - ProjectSection(ProjectDependencies) = postProject - {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" - ProjectSection(SolutionItems) = preProject - ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c - readme.txt = readme.txt - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{B4D38F3F-68FB-42EC-A45D-E00657BB3627}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - PGInstrument|Win32 = PGInstrument|Win32 - PGInstrument|x64 = PGInstrument|x64 - PGUpdate|Win32 = PGUpdate|Win32 - PGUpdate|x64 = PGUpdate|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.Build.0 = Debug|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.ActiveCfg = Debug|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.Build.0 = Debug|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.ActiveCfg = Release|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.Build.0 = Release|Win32 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.ActiveCfg = Release|x64 - {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.Build.0 = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" + ProjectSection(ProjectDependencies) = postProject + {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" + ProjectSection(SolutionItems) = preProject + ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c + readme.txt = readme.txt + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{B4D38F3F-68FB-42EC-A45D-E00657BB3627}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + PGInstrument|Win32 = PGInstrument|Win32 + PGInstrument|x64 = PGInstrument|x64 + PGUpdate|Win32 = PGUpdate|Win32 + PGUpdate|x64 = PGUpdate|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.Build.0 = Debug|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.ActiveCfg = Debug|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.Build.0 = Debug|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.ActiveCfg = Release|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.Build.0 = Release|Win32 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.ActiveCfg = Release|x64 + {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.Build.0 = Release|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal From python-checkins at python.org Mon Jul 13 21:17:00 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Mon, 13 Jul 2009 19:17:00 -0000 Subject: [Python-checkins] r73999 - in python/branches/py3k: PC/VS7.1/pcbuild.sln PC/VS8.0/pcbuild.sln PC/bdist_wininst/wininst-7.1.sln PC/bdist_wininst/wininst-8.sln PC/example_nt/example.sln PCbuild/pcbuild.sln Message-ID: Author: amaury.forgeotdarc Date: Mon Jul 13 21:17:00 2009 New Revision: 73999 Log: Merged revisions 73998 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73998 | amaury.forgeotdarc | 2009-07-13 21:14:17 +0200 (lun., 13 juil. 2009) | 3 lines Set svn:eol-style=CRLF on all Visual Studio solution files. This should allow direct compilation from a downloaded source tar ball. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/PC/VS7.1/pcbuild.sln (contents, props changed) python/branches/py3k/PC/VS8.0/pcbuild.sln (contents, props changed) python/branches/py3k/PC/bdist_wininst/wininst-7.1.sln (contents, props changed) python/branches/py3k/PC/bdist_wininst/wininst-8.sln (contents, props changed) python/branches/py3k/PC/example_nt/example.sln (contents, props changed) python/branches/py3k/PCbuild/pcbuild.sln (contents, props changed) Modified: python/branches/py3k/PC/VS7.1/pcbuild.sln ============================================================================== --- python/branches/py3k/PC/VS7.1/pcbuild.sln (original) +++ python/branches/py3k/PC/VS7.1/pcbuild.sln Mon Jul 13 21:17:00 2009 @@ -1,275 +1,275 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{324F66C2-44D0-4D50-B979-F9DAE7FD36DB}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{59CBF474-9E06-4C50-9142-C44A118BB447}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{5B51DFF7-5DC0-41F8-8791-A4AB7114A151}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{AC557788-6354-43F7-BE05-C9C8C59A344A}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - ProjectSection(ProjectDependencies) = postProject - {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} - {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{97239A56-DBC0-41D2-BC14-C87D9B97D63B}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{51F35FAE-FB92-4B2C-9187-1542C065AD77}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{F22F40F4-D318-40DC-96B3-88DC81CE0894}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}" - ProjectSection(ProjectDependencies) = postProject - {F22F40F4-D318-40DC-96B3-88DC81CE0894} = {F22F40F4-D318-40DC-96B3-88DC81CE0894} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{2FF0A312-22F9-4C34-B070-842916DE27A9}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - ReleaseAMD64 = ReleaseAMD64 - ReleaseItanium = ReleaseItanium - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.ActiveCfg = Debug|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.Build.0 = Debug|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.ActiveCfg = Release|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.Build.0 = Release|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.ActiveCfg = Debug|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.Build.0 = Debug|Win32 - {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 - {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.Build.0 = Debug|Win32 - {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 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.Build.0 = Debug|Win32 - {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 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.Build.0 = Debug|Win32 - {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 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.Build.0 = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.ActiveCfg = Debug|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.Build.0 = Debug|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.ActiveCfg = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.Build.0 = Release|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.ActiveCfg = Debug|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.Build.0 = Debug|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.ActiveCfg = Release|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.Build.0 = Release|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.ActiveCfg = Debug|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.Build.0 = Debug|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.ActiveCfg = Release|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.Build.0 = Release|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.ActiveCfg = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.Build.0 = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.Build.0 = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseAMD64.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseItanium.ActiveCfg = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.ActiveCfg = Debug|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.Build.0 = Debug|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.ActiveCfg = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.Build.0 = Release|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.ActiveCfg = Debug|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.Build.0 = Debug|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.ActiveCfg = Release|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.Build.0 = Release|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.ActiveCfg = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.Build.0 = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.Build.0 = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.ActiveCfg = Debug|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.Build.0 = Debug|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.ActiveCfg = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.Build.0 = Release|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 - {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.ActiveCfg = Debug|Win32 - {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.Build.0 = Debug|Win32 - {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 - {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 - GlobalSection(SolutionItems) = postSolution - ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c - readme.txt = readme.txt - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{324F66C2-44D0-4D50-B979-F9DAE7FD36DB}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{59CBF474-9E06-4C50-9142-C44A118BB447}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{5B51DFF7-5DC0-41F8-8791-A4AB7114A151}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{AC557788-6354-43F7-BE05-C9C8C59A344A}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" + ProjectSection(ProjectDependencies) = postProject + {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} + {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{97239A56-DBC0-41D2-BC14-C87D9B97D63B}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{51F35FAE-FB92-4B2C-9187-1542C065AD77}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{F22F40F4-D318-40DC-96B3-88DC81CE0894}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}" + ProjectSection(ProjectDependencies) = postProject + {F22F40F4-D318-40DC-96B3-88DC81CE0894} = {F22F40F4-D318-40DC-96B3-88DC81CE0894} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{2FF0A312-22F9-4C34-B070-842916DE27A9}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + ReleaseAMD64 = ReleaseAMD64 + ReleaseItanium = ReleaseItanium + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.ActiveCfg = Debug|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.Build.0 = Debug|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.ActiveCfg = Release|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Release.Build.0 = Release|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.ActiveCfg = Debug|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Debug.Build.0 = Debug|Win32 + {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 + {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.Build.0 = Debug|Win32 + {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 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.Build.0 = Debug|Win32 + {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 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.Build.0 = Debug|Win32 + {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 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseAMD64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.ReleaseItanium.Build.0 = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.ActiveCfg = Debug|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Debug.Build.0 = Debug|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.ActiveCfg = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.Release.Build.0 = Release|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {7E551393-3C43-47F8-9F3F-5BC368A6C487}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.ActiveCfg = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug.Build.0 = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.ActiveCfg = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release.Build.0 = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.ActiveCfg = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug.Build.0 = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.ActiveCfg = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.ActiveCfg = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug.Build.0 = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.ActiveCfg = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release.Build.0 = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.ActiveCfg = Debug|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Debug.Build.0 = Debug|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.ActiveCfg = Release|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.Release.Build.0 = Release|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {97239A56-DBC0-41D2-BC14-C87D9B97D63B}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.ActiveCfg = Debug|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Debug.Build.0 = Debug|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.ActiveCfg = Release|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.Release.Build.0 = Release|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.ActiveCfg = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug.Build.0 = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release.Build.0 = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseAMD64.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.ReleaseItanium.ActiveCfg = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.ActiveCfg = Debug|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Debug.Build.0 = Debug|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.ActiveCfg = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.Release.Build.0 = Release|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {51F35FAE-FB92-4B2C-9187-1542C065AD77}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.ActiveCfg = Debug|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Debug.Build.0 = Debug|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.ActiveCfg = Release|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.Build.0 = Release|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.ActiveCfg = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.Build.0 = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseAMD64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.Build.0 = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.ActiveCfg = Debug|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Debug.Build.0 = Debug|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.ActiveCfg = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.Release.Build.0 = Release|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 + {2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.ActiveCfg = Debug|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.Build.0 = Debug|Win32 + {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 + {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 + GlobalSection(SolutionItems) = postSolution + ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c + readme.txt = readme.txt + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Modified: python/branches/py3k/PC/VS8.0/pcbuild.sln ============================================================================== --- python/branches/py3k/PC/VS8.0/pcbuild.sln (original) +++ python/branches/py3k/PC/VS8.0/pcbuild.sln Mon Jul 13 21:17:00 2009 @@ -1,537 +1,537 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - ProjectSection(ProjectDependencies) = postProject - {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" - ProjectSection(SolutionItems) = preProject - ..\..\Modules\getbuildinfo.c = ..\..\Modules\getbuildinfo.c - readme.txt = readme.txt - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - PGInstrument|Win32 = PGInstrument|Win32 - PGInstrument|x64 = PGInstrument|x64 - PGUpdate|Win32 = PGUpdate|Win32 - PGUpdate|x64 = PGUpdate|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" + ProjectSection(ProjectDependencies) = postProject + {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" + ProjectSection(SolutionItems) = preProject + ..\..\Modules\getbuildinfo.c = ..\..\Modules\getbuildinfo.c + readme.txt = readme.txt + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + PGInstrument|Win32 = PGInstrument|Win32 + PGInstrument|x64 = PGInstrument|x64 + PGUpdate|Win32 = PGUpdate|Win32 + PGUpdate|x64 = PGUpdate|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Modified: python/branches/py3k/PC/bdist_wininst/wininst-7.1.sln ============================================================================== --- python/branches/py3k/PC/bdist_wininst/wininst-7.1.sln (original) +++ python/branches/py3k/PC/bdist_wininst/wininst-7.1.sln Mon Jul 13 21:17:00 2009 @@ -1,21 +1,21 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-7.1.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.ActiveCfg = Debug|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.Build.0 = Debug|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-7.1.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.ActiveCfg = Debug|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.Build.0 = Debug|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Modified: python/branches/py3k/PC/bdist_wininst/wininst-8.sln ============================================================================== --- python/branches/py3k/PC/bdist_wininst/wininst-8.sln (original) +++ python/branches/py3k/PC/bdist_wininst/wininst-8.sln Mon Jul 13 21:17:00 2009 @@ -1,19 +1,19 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-8.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Debug|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.Build.0 = Debug|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-8.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.Build.0 = Debug|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Modified: python/branches/py3k/PC/example_nt/example.sln ============================================================================== --- python/branches/py3k/PC/example_nt/example.sln (original) +++ python/branches/py3k/PC/example_nt/example.sln Mon Jul 13 21:17:00 2009 @@ -1,21 +1,21 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj", "{A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.ActiveCfg = Debug|Win32 - {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.Build.0 = Debug|Win32 - {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.ActiveCfg = Release|Win32 - {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj", "{A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.ActiveCfg = Debug|Win32 + {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.Build.0 = Debug|Win32 + {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.ActiveCfg = Release|Win32 + {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Modified: python/branches/py3k/PCbuild/pcbuild.sln ============================================================================== --- python/branches/py3k/PCbuild/pcbuild.sln (original) +++ python/branches/py3k/PCbuild/pcbuild.sln Mon Jul 13 21:17:00 2009 @@ -1,537 +1,537 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - ProjectSection(ProjectDependencies) = postProject - {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" - ProjectSection(SolutionItems) = preProject - ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c - readme.txt = readme.txt - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" - ProjectSection(ProjectDependencies) = postProject - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" - ProjectSection(ProjectDependencies) = postProject - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - PGInstrument|Win32 = PGInstrument|Win32 - PGInstrument|x64 = PGInstrument|x64 - PGUpdate|Win32 = PGUpdate|Win32 - PGUpdate|x64 = PGUpdate|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32 - {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64 - {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64 - {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64 - {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" + ProjectSection(ProjectDependencies) = postProject + {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" + ProjectSection(SolutionItems) = preProject + ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c + readme.txt = readme.txt + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" + ProjectSection(ProjectDependencies) = postProject + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" + ProjectSection(ProjectDependencies) = postProject + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" + ProjectSection(ProjectDependencies) = postProject + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + PGInstrument|Win32 = PGInstrument|Win32 + PGInstrument|x64 = PGInstrument|x64 + PGUpdate|Win32 = PGUpdate|Win32 + PGUpdate|x64 = PGUpdate|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 + {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32 + {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 + {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 + {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64 + {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 + {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 + {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 + {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 + {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 + {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64 + {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 + {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 + {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 + {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 + {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 + {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 + {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 + {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 + {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 + {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32 + {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 + {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 + {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 + {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64 + {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal From buildbot at python.org Mon Jul 13 21:49:54 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 13 Jul 2009 19:49:54 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/296 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_mailbox make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Mon Jul 13 22:01:12 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Mon, 13 Jul 2009 20:01:12 -0000 Subject: [Python-checkins] r74000 - in python/trunk: Lib/encodings/cp720.py Tools/unicode/genwincodec.py Tools/unicode/genwincodecs.bat Message-ID: Author: amaury.forgeotdarc Date: Mon Jul 13 22:01:11 2009 New Revision: 74000 Log: #1616979: Add the cp720 (Arabic DOS) encoding. Since there is no official mapping file from unicode.org, the codec file is generated on Windows with the new genwincodec.py script. Added: python/trunk/Lib/encodings/cp720.py python/trunk/Tools/unicode/genwincodec.py python/trunk/Tools/unicode/genwincodecs.bat Added: python/trunk/Lib/encodings/cp720.py ============================================================================== --- (empty file) +++ python/trunk/Lib/encodings/cp720.py Mon Jul 13 22:01:11 2009 @@ -0,0 +1,311 @@ +"""Python Character Mapping Codec cp720 generated on Windows: +Vista 6.0.6002 SP2 Multiprocessor Free with the command: + python Tools/unicode/genwincodec.py 720 +"""#" + + +import codecs + +### Codec APIs + +class Codec(codecs.Codec): + + def encode(self,input,errors='strict'): + return codecs.charmap_encode(input,errors,encoding_table) + + def decode(self,input,errors='strict'): + return codecs.charmap_decode(input,errors,decoding_table) + +class IncrementalEncoder(codecs.IncrementalEncoder): + def encode(self, input, final=False): + return codecs.charmap_encode(input,self.errors,encoding_table)[0] + +class IncrementalDecoder(codecs.IncrementalDecoder): + def decode(self, input, final=False): + return codecs.charmap_decode(input,self.errors,decoding_table)[0] + +class StreamWriter(Codec,codecs.StreamWriter): + pass + +class StreamReader(Codec,codecs.StreamReader): + pass + +### encodings module API + +def getregentry(): + return codecs.CodecInfo( + name='cp720', + encode=Codec().encode, + decode=Codec().decode, + incrementalencoder=IncrementalEncoder, + incrementaldecoder=IncrementalDecoder, + streamreader=StreamReader, + streamwriter=StreamWriter, + ) + + +### Decoding Table + +decoding_table = ( + u'\x00' # 0x00 -> CONTROL CHARACTER + u'\x01' # 0x01 -> CONTROL CHARACTER + u'\x02' # 0x02 -> CONTROL CHARACTER + u'\x03' # 0x03 -> CONTROL CHARACTER + u'\x04' # 0x04 -> CONTROL CHARACTER + u'\x05' # 0x05 -> CONTROL CHARACTER + u'\x06' # 0x06 -> CONTROL CHARACTER + u'\x07' # 0x07 -> CONTROL CHARACTER + u'\x08' # 0x08 -> CONTROL CHARACTER + u'\t' # 0x09 -> CONTROL CHARACTER + u'\n' # 0x0A -> CONTROL CHARACTER + u'\x0b' # 0x0B -> CONTROL CHARACTER + u'\x0c' # 0x0C -> CONTROL CHARACTER + u'\r' # 0x0D -> CONTROL CHARACTER + u'\x0e' # 0x0E -> CONTROL CHARACTER + u'\x0f' # 0x0F -> CONTROL CHARACTER + u'\x10' # 0x10 -> CONTROL CHARACTER + u'\x11' # 0x11 -> CONTROL CHARACTER + u'\x12' # 0x12 -> CONTROL CHARACTER + u'\x13' # 0x13 -> CONTROL CHARACTER + u'\x14' # 0x14 -> CONTROL CHARACTER + u'\x15' # 0x15 -> CONTROL CHARACTER + u'\x16' # 0x16 -> CONTROL CHARACTER + u'\x17' # 0x17 -> CONTROL CHARACTER + u'\x18' # 0x18 -> CONTROL CHARACTER + u'\x19' # 0x19 -> CONTROL CHARACTER + u'\x1a' # 0x1A -> CONTROL CHARACTER + u'\x1b' # 0x1B -> CONTROL CHARACTER + u'\x1c' # 0x1C -> CONTROL CHARACTER + u'\x1d' # 0x1D -> CONTROL CHARACTER + u'\x1e' # 0x1E -> CONTROL CHARACTER + u'\x1f' # 0x1F -> CONTROL CHARACTER + u' ' # 0x20 -> SPACE + u'!' # 0x21 -> EXCLAMATION MARK + u'"' # 0x22 -> QUOTATION MARK + u'#' # 0x23 -> NUMBER SIGN + u'$' # 0x24 -> DOLLAR SIGN + u'%' # 0x25 -> PERCENT SIGN + u'&' # 0x26 -> AMPERSAND + u"'" # 0x27 -> APOSTROPHE + u'(' # 0x28 -> LEFT PARENTHESIS + u')' # 0x29 -> RIGHT PARENTHESIS + u'*' # 0x2A -> ASTERISK + u'+' # 0x2B -> PLUS SIGN + u',' # 0x2C -> COMMA + u'-' # 0x2D -> HYPHEN-MINUS + u'.' # 0x2E -> FULL STOP + u'/' # 0x2F -> SOLIDUS + u'0' # 0x30 -> DIGIT ZERO + u'1' # 0x31 -> DIGIT ONE + u'2' # 0x32 -> DIGIT TWO + u'3' # 0x33 -> DIGIT THREE + u'4' # 0x34 -> DIGIT FOUR + u'5' # 0x35 -> DIGIT FIVE + u'6' # 0x36 -> DIGIT SIX + u'7' # 0x37 -> DIGIT SEVEN + u'8' # 0x38 -> DIGIT EIGHT + u'9' # 0x39 -> DIGIT NINE + u':' # 0x3A -> COLON + u';' # 0x3B -> SEMICOLON + u'<' # 0x3C -> LESS-THAN SIGN + u'=' # 0x3D -> EQUALS SIGN + u'>' # 0x3E -> GREATER-THAN SIGN + u'?' # 0x3F -> QUESTION MARK + u'@' # 0x40 -> COMMERCIAL AT + u'A' # 0x41 -> LATIN CAPITAL LETTER A + u'B' # 0x42 -> LATIN CAPITAL LETTER B + u'C' # 0x43 -> LATIN CAPITAL LETTER C + u'D' # 0x44 -> LATIN CAPITAL LETTER D + u'E' # 0x45 -> LATIN CAPITAL LETTER E + u'F' # 0x46 -> LATIN CAPITAL LETTER F + u'G' # 0x47 -> LATIN CAPITAL LETTER G + u'H' # 0x48 -> LATIN CAPITAL LETTER H + u'I' # 0x49 -> LATIN CAPITAL LETTER I + u'J' # 0x4A -> LATIN CAPITAL LETTER J + u'K' # 0x4B -> LATIN CAPITAL LETTER K + u'L' # 0x4C -> LATIN CAPITAL LETTER L + u'M' # 0x4D -> LATIN CAPITAL LETTER M + u'N' # 0x4E -> LATIN CAPITAL LETTER N + u'O' # 0x4F -> LATIN CAPITAL LETTER O + u'P' # 0x50 -> LATIN CAPITAL LETTER P + u'Q' # 0x51 -> LATIN CAPITAL LETTER Q + u'R' # 0x52 -> LATIN CAPITAL LETTER R + u'S' # 0x53 -> LATIN CAPITAL LETTER S + u'T' # 0x54 -> LATIN CAPITAL LETTER T + u'U' # 0x55 -> LATIN CAPITAL LETTER U + u'V' # 0x56 -> LATIN CAPITAL LETTER V + u'W' # 0x57 -> LATIN CAPITAL LETTER W + u'X' # 0x58 -> LATIN CAPITAL LETTER X + u'Y' # 0x59 -> LATIN CAPITAL LETTER Y + u'Z' # 0x5A -> LATIN CAPITAL LETTER Z + u'[' # 0x5B -> LEFT SQUARE BRACKET + u'\\' # 0x5C -> REVERSE SOLIDUS + u']' # 0x5D -> RIGHT SQUARE BRACKET + u'^' # 0x5E -> CIRCUMFLEX ACCENT + u'_' # 0x5F -> LOW LINE + u'`' # 0x60 -> GRAVE ACCENT + u'a' # 0x61 -> LATIN SMALL LETTER A + u'b' # 0x62 -> LATIN SMALL LETTER B + u'c' # 0x63 -> LATIN SMALL LETTER C + u'd' # 0x64 -> LATIN SMALL LETTER D + u'e' # 0x65 -> LATIN SMALL LETTER E + u'f' # 0x66 -> LATIN SMALL LETTER F + u'g' # 0x67 -> LATIN SMALL LETTER G + u'h' # 0x68 -> LATIN SMALL LETTER H + u'i' # 0x69 -> LATIN SMALL LETTER I + u'j' # 0x6A -> LATIN SMALL LETTER J + u'k' # 0x6B -> LATIN SMALL LETTER K + u'l' # 0x6C -> LATIN SMALL LETTER L + u'm' # 0x6D -> LATIN SMALL LETTER M + u'n' # 0x6E -> LATIN SMALL LETTER N + u'o' # 0x6F -> LATIN SMALL LETTER O + u'p' # 0x70 -> LATIN SMALL LETTER P + u'q' # 0x71 -> LATIN SMALL LETTER Q + u'r' # 0x72 -> LATIN SMALL LETTER R + u's' # 0x73 -> LATIN SMALL LETTER S + u't' # 0x74 -> LATIN SMALL LETTER T + u'u' # 0x75 -> LATIN SMALL LETTER U + u'v' # 0x76 -> LATIN SMALL LETTER V + u'w' # 0x77 -> LATIN SMALL LETTER W + u'x' # 0x78 -> LATIN SMALL LETTER X + u'y' # 0x79 -> LATIN SMALL LETTER Y + u'z' # 0x7A -> LATIN SMALL LETTER Z + u'{' # 0x7B -> LEFT CURLY BRACKET + u'|' # 0x7C -> VERTICAL LINE + u'}' # 0x7D -> RIGHT CURLY BRACKET + u'~' # 0x7E -> TILDE + u'\x7f' # 0x7F -> CONTROL CHARACTER + u'\x80' + u'\x81' + u'\xe9' # 0x82 -> LATIN SMALL LETTER E WITH ACUTE + u'\xe2' # 0x83 -> LATIN SMALL LETTER A WITH CIRCUMFLEX + u'\x84' + u'\xe0' # 0x85 -> LATIN SMALL LETTER A WITH GRAVE + u'\x86' + u'\xe7' # 0x87 -> LATIN SMALL LETTER C WITH CEDILLA + u'\xea' # 0x88 -> LATIN SMALL LETTER E WITH CIRCUMFLEX + u'\xeb' # 0x89 -> LATIN SMALL LETTER E WITH DIAERESIS + u'\xe8' # 0x8A -> LATIN SMALL LETTER E WITH GRAVE + u'\xef' # 0x8B -> LATIN SMALL LETTER I WITH DIAERESIS + u'\xee' # 0x8C -> LATIN SMALL LETTER I WITH CIRCUMFLEX + u'\x8d' + u'\x8e' + u'\x8f' + u'\x90' + u'\u0651' # 0x91 -> ARABIC SHADDA + u'\u0652' # 0x92 -> ARABIC SUKUN + u'\xf4' # 0x93 -> LATIN SMALL LETTER O WITH CIRCUMFLEX + u'\xa4' # 0x94 -> CURRENCY SIGN + u'\u0640' # 0x95 -> ARABIC TATWEEL + u'\xfb' # 0x96 -> LATIN SMALL LETTER U WITH CIRCUMFLEX + u'\xf9' # 0x97 -> LATIN SMALL LETTER U WITH GRAVE + u'\u0621' # 0x98 -> ARABIC LETTER HAMZA + u'\u0622' # 0x99 -> ARABIC LETTER ALEF WITH MADDA ABOVE + u'\u0623' # 0x9A -> ARABIC LETTER ALEF WITH HAMZA ABOVE + u'\u0624' # 0x9B -> ARABIC LETTER WAW WITH HAMZA ABOVE + u'\xa3' # 0x9C -> POUND SIGN + u'\u0625' # 0x9D -> ARABIC LETTER ALEF WITH HAMZA BELOW + u'\u0626' # 0x9E -> ARABIC LETTER YEH WITH HAMZA ABOVE + u'\u0627' # 0x9F -> ARABIC LETTER ALEF + u'\u0628' # 0xA0 -> ARABIC LETTER BEH + u'\u0629' # 0xA1 -> ARABIC LETTER TEH MARBUTA + u'\u062a' # 0xA2 -> ARABIC LETTER TEH + u'\u062b' # 0xA3 -> ARABIC LETTER THEH + u'\u062c' # 0xA4 -> ARABIC LETTER JEEM + u'\u062d' # 0xA5 -> ARABIC LETTER HAH + u'\u062e' # 0xA6 -> ARABIC LETTER KHAH + u'\u062f' # 0xA7 -> ARABIC LETTER DAL + u'\u0630' # 0xA8 -> ARABIC LETTER THAL + u'\u0631' # 0xA9 -> ARABIC LETTER REH + u'\u0632' # 0xAA -> ARABIC LETTER ZAIN + u'\u0633' # 0xAB -> ARABIC LETTER SEEN + u'\u0634' # 0xAC -> ARABIC LETTER SHEEN + u'\u0635' # 0xAD -> ARABIC LETTER SAD + u'\xab' # 0xAE -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + u'\xbb' # 0xAF -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + u'\u2591' # 0xB0 -> LIGHT SHADE + u'\u2592' # 0xB1 -> MEDIUM SHADE + u'\u2593' # 0xB2 -> DARK SHADE + u'\u2502' # 0xB3 -> BOX DRAWINGS LIGHT VERTICAL + u'\u2524' # 0xB4 -> BOX DRAWINGS LIGHT VERTICAL AND LEFT + u'\u2561' # 0xB5 -> BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + u'\u2562' # 0xB6 -> BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE + u'\u2556' # 0xB7 -> BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE + u'\u2555' # 0xB8 -> BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE + u'\u2563' # 0xB9 -> BOX DRAWINGS DOUBLE VERTICAL AND LEFT + u'\u2551' # 0xBA -> BOX DRAWINGS DOUBLE VERTICAL + u'\u2557' # 0xBB -> BOX DRAWINGS DOUBLE DOWN AND LEFT + u'\u255d' # 0xBC -> BOX DRAWINGS DOUBLE UP AND LEFT + u'\u255c' # 0xBD -> BOX DRAWINGS UP DOUBLE AND LEFT SINGLE + u'\u255b' # 0xBE -> BOX DRAWINGS UP SINGLE AND LEFT DOUBLE + u'\u2510' # 0xBF -> BOX DRAWINGS LIGHT DOWN AND LEFT + u'\u2514' # 0xC0 -> BOX DRAWINGS LIGHT UP AND RIGHT + u'\u2534' # 0xC1 -> BOX DRAWINGS LIGHT UP AND HORIZONTAL + u'\u252c' # 0xC2 -> BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + u'\u251c' # 0xC3 -> BOX DRAWINGS LIGHT VERTICAL AND RIGHT + u'\u2500' # 0xC4 -> BOX DRAWINGS LIGHT HORIZONTAL + u'\u253c' # 0xC5 -> BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + u'\u255e' # 0xC6 -> BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + u'\u255f' # 0xC7 -> BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE + u'\u255a' # 0xC8 -> BOX DRAWINGS DOUBLE UP AND RIGHT + u'\u2554' # 0xC9 -> BOX DRAWINGS DOUBLE DOWN AND RIGHT + u'\u2569' # 0xCA -> BOX DRAWINGS DOUBLE UP AND HORIZONTAL + u'\u2566' # 0xCB -> BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + u'\u2560' # 0xCC -> BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + u'\u2550' # 0xCD -> BOX DRAWINGS DOUBLE HORIZONTAL + u'\u256c' # 0xCE -> BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL + u'\u2567' # 0xCF -> BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE + u'\u2568' # 0xD0 -> BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE + u'\u2564' # 0xD1 -> BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE + u'\u2565' # 0xD2 -> BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE + u'\u2559' # 0xD3 -> BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE + u'\u2558' # 0xD4 -> BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE + u'\u2552' # 0xD5 -> BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE + u'\u2553' # 0xD6 -> BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE + u'\u256b' # 0xD7 -> BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE + u'\u256a' # 0xD8 -> BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + u'\u2518' # 0xD9 -> BOX DRAWINGS LIGHT UP AND LEFT + u'\u250c' # 0xDA -> BOX DRAWINGS LIGHT DOWN AND RIGHT + u'\u2588' # 0xDB -> FULL BLOCK + u'\u2584' # 0xDC -> LOWER HALF BLOCK + u'\u258c' # 0xDD -> LEFT HALF BLOCK + u'\u2590' # 0xDE -> RIGHT HALF BLOCK + u'\u2580' # 0xDF -> UPPER HALF BLOCK + u'\u0636' # 0xE0 -> ARABIC LETTER DAD + u'\u0637' # 0xE1 -> ARABIC LETTER TAH + u'\u0638' # 0xE2 -> ARABIC LETTER ZAH + u'\u0639' # 0xE3 -> ARABIC LETTER AIN + u'\u063a' # 0xE4 -> ARABIC LETTER GHAIN + u'\u0641' # 0xE5 -> ARABIC LETTER FEH + u'\xb5' # 0xE6 -> MICRO SIGN + u'\u0642' # 0xE7 -> ARABIC LETTER QAF + u'\u0643' # 0xE8 -> ARABIC LETTER KAF + u'\u0644' # 0xE9 -> ARABIC LETTER LAM + u'\u0645' # 0xEA -> ARABIC LETTER MEEM + u'\u0646' # 0xEB -> ARABIC LETTER NOON + u'\u0647' # 0xEC -> ARABIC LETTER HEH + u'\u0648' # 0xED -> ARABIC LETTER WAW + u'\u0649' # 0xEE -> ARABIC LETTER ALEF MAKSURA + u'\u064a' # 0xEF -> ARABIC LETTER YEH + u'\u2261' # 0xF0 -> IDENTICAL TO + u'\u064b' # 0xF1 -> ARABIC FATHATAN + u'\u064c' # 0xF2 -> ARABIC DAMMATAN + u'\u064d' # 0xF3 -> ARABIC KASRATAN + u'\u064e' # 0xF4 -> ARABIC FATHA + u'\u064f' # 0xF5 -> ARABIC DAMMA + u'\u0650' # 0xF6 -> ARABIC KASRA + u'\u2248' # 0xF7 -> ALMOST EQUAL TO + u'\xb0' # 0xF8 -> DEGREE SIGN + u'\u2219' # 0xF9 -> BULLET OPERATOR + u'\xb7' # 0xFA -> MIDDLE DOT + u'\u221a' # 0xFB -> SQUARE ROOT + u'\u207f' # 0xFC -> SUPERSCRIPT LATIN SMALL LETTER N + u'\xb2' # 0xFD -> SUPERSCRIPT TWO + u'\u25a0' # 0xFE -> BLACK SQUARE + u'\xa0' # 0xFF -> NO-BREAK SPACE +) + +### Encoding table +encoding_table=codecs.charmap_build(decoding_table) + + Added: python/trunk/Tools/unicode/genwincodec.py ============================================================================== --- (empty file) +++ python/trunk/Tools/unicode/genwincodec.py Mon Jul 13 22:01:11 2009 @@ -0,0 +1,61 @@ +"""This script generates a Python codec module from a Windows Code Page. + +It uses the function MultiByteToWideChar to generate a decoding table. +""" + +import ctypes +from ctypes import wintypes +from gencodec import codegen +import unicodedata + +def genwinmap(codepage): + MultiByteToWideChar = ctypes.windll.kernel32.MultiByteToWideChar + MultiByteToWideChar.argtypes = [wintypes.UINT, wintypes.DWORD, + wintypes.LPCSTR, ctypes.c_int, + wintypes.LPWSTR, ctypes.c_int] + MultiByteToWideChar.restype = ctypes.c_int + + enc2uni = {} + + for i in range(32) + [127]: + enc2uni[i] = (i, 'CONTROL CHARACTER') + + for i in range(256): + buf = ctypes.create_unicode_buffer(2) + ret = MultiByteToWideChar( + codepage, 0, + chr(i), 1, + buf, 2) + assert ret == 1, "invalid code page" + assert buf[1] == '\x00' + try: + name = unicodedata.name(buf[0]) + except ValueError: + try: + name = enc2uni[i][1] + except KeyError: + name = '' + + enc2uni[i] = (ord(buf[0]), name) + + return enc2uni + +def genwincodec(codepage): + import platform + map = genwinmap(codepage) + encodingname = 'cp%d' % codepage + code = codegen("", map, encodingname) + # Replace first lines with our own docstring + code = '''\ +"""Python Character Mapping Codec %s generated on Windows: +%s with the command: + python Tools/unicode/genwincodec.py %s +"""#" +''' % (encodingname, ' '.join(platform.win32_ver()), codepage + ) + code.split('"""#"', 1)[1] + + print code + +if __name__ == '__main__': + import sys + genwincodec(int(sys.argv[1])) Added: python/trunk/Tools/unicode/genwincodecs.bat ============================================================================== --- (empty file) +++ python/trunk/Tools/unicode/genwincodecs.bat Mon Jul 13 22:01:11 2009 @@ -0,0 +1,7 @@ + at rem Recreate some python charmap codecs from the Windows function + at rem MultiByteToWideChar. + + at cd /d %~dp0 + at mkdir build + at rem Arabic DOS code page +c:\python26\python genwincodec.py 720 > build/cp720.py From python-checkins at python.org Mon Jul 13 22:03:21 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Mon, 13 Jul 2009 20:03:21 -0000 Subject: [Python-checkins] r74001 - python/trunk/Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Mon Jul 13 22:03:21 2009 New Revision: 74001 Log: NEWS entry for r74000. Modified: python/trunk/Misc/NEWS Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jul 13 22:03:21 2009 @@ -12,7 +12,9 @@ Core and Builtins ----------------- -- Issue 6070: On posix platforms import no longer copies the execute bit +- Issue #1616979: Added the cp720 (Arabic DOS) encoding. + +- Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set. Patch by Marco N. - Issue #4618: When unicode arguments are passed to print(), the default From python-checkins at python.org Mon Jul 13 22:23:49 2009 From: python-checkins at python.org (marc-andre.lemburg) Date: Mon, 13 Jul 2009 20:23:49 -0000 Subject: [Python-checkins] r74002 - python/trunk/Lib/platform.py Message-ID: Author: marc-andre.lemburg Date: Mon Jul 13 22:23:49 2009 New Revision: 74002 Log: Use a new global DEV_NULL instead of hard-coding /dev/null into the system command helper functions. See #6479 for some motivation. Modified: python/trunk/Lib/platform.py Modified: python/trunk/Lib/platform.py ============================================================================== --- python/trunk/Lib/platform.py (original) +++ python/trunk/Lib/platform.py Mon Jul 13 22:23:49 2009 @@ -34,6 +34,7 @@ # # # +# 1.0.7 - added DEV_NULL # 1.0.6 - added linux_distribution() # 1.0.5 - fixed Java support to allow running the module on Jython # 1.0.4 - added IronPython support @@ -91,7 +92,7 @@ __copyright__ = """ Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal at lemburg.com - Copyright (c) 2000-2008, eGenix.com Software GmbH; mailto:info at egenix.com + Copyright (c) 2000-2009, eGenix.com Software GmbH; mailto:info at egenix.com Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee or royalty is hereby granted, @@ -110,10 +111,25 @@ """ -__version__ = '1.0.6' +__version__ = '1.0.7' import sys,string,os,re +### Globals & Constants + +# Determine the platform's /dev/null device +try: + DEV_NULL = os.devnull +except AttributeError: + # os.devnull was added in Python 2.4, so emulate it for earlier + # Python versions + if sys.platform in ('dos','win32','win16','os2'): + # Use the old CP/M NUL as device name + DEV_NULL = 'NUL' + else: + # Standard Unix uses /dev/null + DEV_NULL = '/dev/null' + ### Platform specific APIs _libc_search = re.compile(r'(__libc_init)' @@ -926,7 +942,7 @@ # XXX Others too ? return default try: - f = os.popen('uname %s 2> /dev/null' % option) + f = os.popen('uname %s 2> %s' % (option, DEV_NULL)) except (AttributeError,os.error): return default output = string.strip(f.read()) @@ -951,7 +967,7 @@ return default target = _follow_symlinks(target) try: - f = os.popen('file "%s" 2> /dev/null' % target) + f = os.popen('file "%s" 2> %s' % (target, DEV_NULL)) except (AttributeError,os.error): return default output = string.strip(f.read()) From python-checkins at python.org Mon Jul 13 22:38:22 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Mon, 13 Jul 2009 20:38:22 -0000 Subject: [Python-checkins] r74003 - in python/branches/py3k: Lib/encodings/cp720.py Misc/NEWS Tools/unicode/gencodec.py Tools/unicode/genwincodec.py Tools/unicode/genwincodecs.bat Message-ID: Author: amaury.forgeotdarc Date: Mon Jul 13 22:38:21 2009 New Revision: 74003 Log: Merged revisions 74000-74001 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74000 | amaury.forgeotdarc | 2009-07-13 22:01:11 +0200 (lun., 13 juil. 2009) | 4 lines #1616979: Add the cp720 (Arabic DOS) encoding. Since there is no official mapping file from unicode.org, the codec file is generated on Windows with the new genwincodec.py script. ........ r74001 | amaury.forgeotdarc | 2009-07-13 22:03:21 +0200 (lun., 13 juil. 2009) | 2 lines NEWS entry for r74000. ........ Added: python/branches/py3k/Lib/encodings/cp720.py - copied, changed from r74001, /python/trunk/Lib/encodings/cp720.py python/branches/py3k/Tools/unicode/genwincodec.py - copied, changed from r74001, /python/trunk/Tools/unicode/genwincodec.py python/branches/py3k/Tools/unicode/genwincodecs.bat - copied, changed from r74001, /python/trunk/Tools/unicode/genwincodecs.bat Modified: python/branches/py3k/ (props changed) python/branches/py3k/Misc/NEWS python/branches/py3k/Tools/unicode/gencodec.py Copied: python/branches/py3k/Lib/encodings/cp720.py (from r74001, /python/trunk/Lib/encodings/cp720.py) ============================================================================== --- /python/trunk/Lib/encodings/cp720.py (original) +++ python/branches/py3k/Lib/encodings/cp720.py Mon Jul 13 22:38:21 2009 @@ -47,262 +47,262 @@ ### Decoding Table decoding_table = ( - u'\x00' # 0x00 -> CONTROL CHARACTER - u'\x01' # 0x01 -> CONTROL CHARACTER - u'\x02' # 0x02 -> CONTROL CHARACTER - u'\x03' # 0x03 -> CONTROL CHARACTER - u'\x04' # 0x04 -> CONTROL CHARACTER - u'\x05' # 0x05 -> CONTROL CHARACTER - u'\x06' # 0x06 -> CONTROL CHARACTER - u'\x07' # 0x07 -> CONTROL CHARACTER - u'\x08' # 0x08 -> CONTROL CHARACTER - u'\t' # 0x09 -> CONTROL CHARACTER - u'\n' # 0x0A -> CONTROL CHARACTER - u'\x0b' # 0x0B -> CONTROL CHARACTER - u'\x0c' # 0x0C -> CONTROL CHARACTER - u'\r' # 0x0D -> CONTROL CHARACTER - u'\x0e' # 0x0E -> CONTROL CHARACTER - u'\x0f' # 0x0F -> CONTROL CHARACTER - u'\x10' # 0x10 -> CONTROL CHARACTER - u'\x11' # 0x11 -> CONTROL CHARACTER - u'\x12' # 0x12 -> CONTROL CHARACTER - u'\x13' # 0x13 -> CONTROL CHARACTER - u'\x14' # 0x14 -> CONTROL CHARACTER - u'\x15' # 0x15 -> CONTROL CHARACTER - u'\x16' # 0x16 -> CONTROL CHARACTER - u'\x17' # 0x17 -> CONTROL CHARACTER - u'\x18' # 0x18 -> CONTROL CHARACTER - u'\x19' # 0x19 -> CONTROL CHARACTER - u'\x1a' # 0x1A -> CONTROL CHARACTER - u'\x1b' # 0x1B -> CONTROL CHARACTER - u'\x1c' # 0x1C -> CONTROL CHARACTER - u'\x1d' # 0x1D -> CONTROL CHARACTER - u'\x1e' # 0x1E -> CONTROL CHARACTER - u'\x1f' # 0x1F -> CONTROL CHARACTER - u' ' # 0x20 -> SPACE - u'!' # 0x21 -> EXCLAMATION MARK - u'"' # 0x22 -> QUOTATION MARK - u'#' # 0x23 -> NUMBER SIGN - u'$' # 0x24 -> DOLLAR SIGN - u'%' # 0x25 -> PERCENT SIGN - u'&' # 0x26 -> AMPERSAND - u"'" # 0x27 -> APOSTROPHE - u'(' # 0x28 -> LEFT PARENTHESIS - u')' # 0x29 -> RIGHT PARENTHESIS - u'*' # 0x2A -> ASTERISK - u'+' # 0x2B -> PLUS SIGN - u',' # 0x2C -> COMMA - u'-' # 0x2D -> HYPHEN-MINUS - u'.' # 0x2E -> FULL STOP - u'/' # 0x2F -> SOLIDUS - u'0' # 0x30 -> DIGIT ZERO - u'1' # 0x31 -> DIGIT ONE - u'2' # 0x32 -> DIGIT TWO - u'3' # 0x33 -> DIGIT THREE - u'4' # 0x34 -> DIGIT FOUR - u'5' # 0x35 -> DIGIT FIVE - u'6' # 0x36 -> DIGIT SIX - u'7' # 0x37 -> DIGIT SEVEN - u'8' # 0x38 -> DIGIT EIGHT - u'9' # 0x39 -> DIGIT NINE - u':' # 0x3A -> COLON - u';' # 0x3B -> SEMICOLON - u'<' # 0x3C -> LESS-THAN SIGN - u'=' # 0x3D -> EQUALS SIGN - u'>' # 0x3E -> GREATER-THAN SIGN - u'?' # 0x3F -> QUESTION MARK - u'@' # 0x40 -> COMMERCIAL AT - u'A' # 0x41 -> LATIN CAPITAL LETTER A - u'B' # 0x42 -> LATIN CAPITAL LETTER B - u'C' # 0x43 -> LATIN CAPITAL LETTER C - u'D' # 0x44 -> LATIN CAPITAL LETTER D - u'E' # 0x45 -> LATIN CAPITAL LETTER E - u'F' # 0x46 -> LATIN CAPITAL LETTER F - u'G' # 0x47 -> LATIN CAPITAL LETTER G - u'H' # 0x48 -> LATIN CAPITAL LETTER H - u'I' # 0x49 -> LATIN CAPITAL LETTER I - u'J' # 0x4A -> LATIN CAPITAL LETTER J - u'K' # 0x4B -> LATIN CAPITAL LETTER K - u'L' # 0x4C -> LATIN CAPITAL LETTER L - u'M' # 0x4D -> LATIN CAPITAL LETTER M - u'N' # 0x4E -> LATIN CAPITAL LETTER N - u'O' # 0x4F -> LATIN CAPITAL LETTER O - u'P' # 0x50 -> LATIN CAPITAL LETTER P - u'Q' # 0x51 -> LATIN CAPITAL LETTER Q - u'R' # 0x52 -> LATIN CAPITAL LETTER R - u'S' # 0x53 -> LATIN CAPITAL LETTER S - u'T' # 0x54 -> LATIN CAPITAL LETTER T - u'U' # 0x55 -> LATIN CAPITAL LETTER U - u'V' # 0x56 -> LATIN CAPITAL LETTER V - u'W' # 0x57 -> LATIN CAPITAL LETTER W - u'X' # 0x58 -> LATIN CAPITAL LETTER X - u'Y' # 0x59 -> LATIN CAPITAL LETTER Y - u'Z' # 0x5A -> LATIN CAPITAL LETTER Z - u'[' # 0x5B -> LEFT SQUARE BRACKET - u'\\' # 0x5C -> REVERSE SOLIDUS - u']' # 0x5D -> RIGHT SQUARE BRACKET - u'^' # 0x5E -> CIRCUMFLEX ACCENT - u'_' # 0x5F -> LOW LINE - u'`' # 0x60 -> GRAVE ACCENT - u'a' # 0x61 -> LATIN SMALL LETTER A - u'b' # 0x62 -> LATIN SMALL LETTER B - u'c' # 0x63 -> LATIN SMALL LETTER C - u'd' # 0x64 -> LATIN SMALL LETTER D - u'e' # 0x65 -> LATIN SMALL LETTER E - u'f' # 0x66 -> LATIN SMALL LETTER F - u'g' # 0x67 -> LATIN SMALL LETTER G - u'h' # 0x68 -> LATIN SMALL LETTER H - u'i' # 0x69 -> LATIN SMALL LETTER I - u'j' # 0x6A -> LATIN SMALL LETTER J - u'k' # 0x6B -> LATIN SMALL LETTER K - u'l' # 0x6C -> LATIN SMALL LETTER L - u'm' # 0x6D -> LATIN SMALL LETTER M - u'n' # 0x6E -> LATIN SMALL LETTER N - u'o' # 0x6F -> LATIN SMALL LETTER O - u'p' # 0x70 -> LATIN SMALL LETTER P - u'q' # 0x71 -> LATIN SMALL LETTER Q - u'r' # 0x72 -> LATIN SMALL LETTER R - u's' # 0x73 -> LATIN SMALL LETTER S - u't' # 0x74 -> LATIN SMALL LETTER T - u'u' # 0x75 -> LATIN SMALL LETTER U - u'v' # 0x76 -> LATIN SMALL LETTER V - u'w' # 0x77 -> LATIN SMALL LETTER W - u'x' # 0x78 -> LATIN SMALL LETTER X - u'y' # 0x79 -> LATIN SMALL LETTER Y - u'z' # 0x7A -> LATIN SMALL LETTER Z - u'{' # 0x7B -> LEFT CURLY BRACKET - u'|' # 0x7C -> VERTICAL LINE - u'}' # 0x7D -> RIGHT CURLY BRACKET - u'~' # 0x7E -> TILDE - u'\x7f' # 0x7F -> CONTROL CHARACTER - u'\x80' - u'\x81' - u'\xe9' # 0x82 -> LATIN SMALL LETTER E WITH ACUTE - u'\xe2' # 0x83 -> LATIN SMALL LETTER A WITH CIRCUMFLEX - u'\x84' - u'\xe0' # 0x85 -> LATIN SMALL LETTER A WITH GRAVE - u'\x86' - u'\xe7' # 0x87 -> LATIN SMALL LETTER C WITH CEDILLA - u'\xea' # 0x88 -> LATIN SMALL LETTER E WITH CIRCUMFLEX - u'\xeb' # 0x89 -> LATIN SMALL LETTER E WITH DIAERESIS - u'\xe8' # 0x8A -> LATIN SMALL LETTER E WITH GRAVE - u'\xef' # 0x8B -> LATIN SMALL LETTER I WITH DIAERESIS - u'\xee' # 0x8C -> LATIN SMALL LETTER I WITH CIRCUMFLEX - u'\x8d' - u'\x8e' - u'\x8f' - u'\x90' - u'\u0651' # 0x91 -> ARABIC SHADDA - u'\u0652' # 0x92 -> ARABIC SUKUN - u'\xf4' # 0x93 -> LATIN SMALL LETTER O WITH CIRCUMFLEX - u'\xa4' # 0x94 -> CURRENCY SIGN - u'\u0640' # 0x95 -> ARABIC TATWEEL - u'\xfb' # 0x96 -> LATIN SMALL LETTER U WITH CIRCUMFLEX - u'\xf9' # 0x97 -> LATIN SMALL LETTER U WITH GRAVE - u'\u0621' # 0x98 -> ARABIC LETTER HAMZA - u'\u0622' # 0x99 -> ARABIC LETTER ALEF WITH MADDA ABOVE - u'\u0623' # 0x9A -> ARABIC LETTER ALEF WITH HAMZA ABOVE - u'\u0624' # 0x9B -> ARABIC LETTER WAW WITH HAMZA ABOVE - u'\xa3' # 0x9C -> POUND SIGN - u'\u0625' # 0x9D -> ARABIC LETTER ALEF WITH HAMZA BELOW - u'\u0626' # 0x9E -> ARABIC LETTER YEH WITH HAMZA ABOVE - u'\u0627' # 0x9F -> ARABIC LETTER ALEF - u'\u0628' # 0xA0 -> ARABIC LETTER BEH - u'\u0629' # 0xA1 -> ARABIC LETTER TEH MARBUTA - u'\u062a' # 0xA2 -> ARABIC LETTER TEH - u'\u062b' # 0xA3 -> ARABIC LETTER THEH - u'\u062c' # 0xA4 -> ARABIC LETTER JEEM - u'\u062d' # 0xA5 -> ARABIC LETTER HAH - u'\u062e' # 0xA6 -> ARABIC LETTER KHAH - u'\u062f' # 0xA7 -> ARABIC LETTER DAL - u'\u0630' # 0xA8 -> ARABIC LETTER THAL - u'\u0631' # 0xA9 -> ARABIC LETTER REH - u'\u0632' # 0xAA -> ARABIC LETTER ZAIN - u'\u0633' # 0xAB -> ARABIC LETTER SEEN - u'\u0634' # 0xAC -> ARABIC LETTER SHEEN - u'\u0635' # 0xAD -> ARABIC LETTER SAD - u'\xab' # 0xAE -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - u'\xbb' # 0xAF -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - u'\u2591' # 0xB0 -> LIGHT SHADE - u'\u2592' # 0xB1 -> MEDIUM SHADE - u'\u2593' # 0xB2 -> DARK SHADE - u'\u2502' # 0xB3 -> BOX DRAWINGS LIGHT VERTICAL - u'\u2524' # 0xB4 -> BOX DRAWINGS LIGHT VERTICAL AND LEFT - u'\u2561' # 0xB5 -> BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE - u'\u2562' # 0xB6 -> BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE - u'\u2556' # 0xB7 -> BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE - u'\u2555' # 0xB8 -> BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE - u'\u2563' # 0xB9 -> BOX DRAWINGS DOUBLE VERTICAL AND LEFT - u'\u2551' # 0xBA -> BOX DRAWINGS DOUBLE VERTICAL - u'\u2557' # 0xBB -> BOX DRAWINGS DOUBLE DOWN AND LEFT - u'\u255d' # 0xBC -> BOX DRAWINGS DOUBLE UP AND LEFT - u'\u255c' # 0xBD -> BOX DRAWINGS UP DOUBLE AND LEFT SINGLE - u'\u255b' # 0xBE -> BOX DRAWINGS UP SINGLE AND LEFT DOUBLE - u'\u2510' # 0xBF -> BOX DRAWINGS LIGHT DOWN AND LEFT - u'\u2514' # 0xC0 -> BOX DRAWINGS LIGHT UP AND RIGHT - u'\u2534' # 0xC1 -> BOX DRAWINGS LIGHT UP AND HORIZONTAL - u'\u252c' # 0xC2 -> BOX DRAWINGS LIGHT DOWN AND HORIZONTAL - u'\u251c' # 0xC3 -> BOX DRAWINGS LIGHT VERTICAL AND RIGHT - u'\u2500' # 0xC4 -> BOX DRAWINGS LIGHT HORIZONTAL - u'\u253c' # 0xC5 -> BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL - u'\u255e' # 0xC6 -> BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE - u'\u255f' # 0xC7 -> BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE - u'\u255a' # 0xC8 -> BOX DRAWINGS DOUBLE UP AND RIGHT - u'\u2554' # 0xC9 -> BOX DRAWINGS DOUBLE DOWN AND RIGHT - u'\u2569' # 0xCA -> BOX DRAWINGS DOUBLE UP AND HORIZONTAL - u'\u2566' # 0xCB -> BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL - u'\u2560' # 0xCC -> BOX DRAWINGS DOUBLE VERTICAL AND RIGHT - u'\u2550' # 0xCD -> BOX DRAWINGS DOUBLE HORIZONTAL - u'\u256c' # 0xCE -> BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL - u'\u2567' # 0xCF -> BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE - u'\u2568' # 0xD0 -> BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE - u'\u2564' # 0xD1 -> BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE - u'\u2565' # 0xD2 -> BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE - u'\u2559' # 0xD3 -> BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE - u'\u2558' # 0xD4 -> BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE - u'\u2552' # 0xD5 -> BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE - u'\u2553' # 0xD6 -> BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE - u'\u256b' # 0xD7 -> BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE - u'\u256a' # 0xD8 -> BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE - u'\u2518' # 0xD9 -> BOX DRAWINGS LIGHT UP AND LEFT - u'\u250c' # 0xDA -> BOX DRAWINGS LIGHT DOWN AND RIGHT - u'\u2588' # 0xDB -> FULL BLOCK - u'\u2584' # 0xDC -> LOWER HALF BLOCK - u'\u258c' # 0xDD -> LEFT HALF BLOCK - u'\u2590' # 0xDE -> RIGHT HALF BLOCK - u'\u2580' # 0xDF -> UPPER HALF BLOCK - u'\u0636' # 0xE0 -> ARABIC LETTER DAD - u'\u0637' # 0xE1 -> ARABIC LETTER TAH - u'\u0638' # 0xE2 -> ARABIC LETTER ZAH - u'\u0639' # 0xE3 -> ARABIC LETTER AIN - u'\u063a' # 0xE4 -> ARABIC LETTER GHAIN - u'\u0641' # 0xE5 -> ARABIC LETTER FEH - u'\xb5' # 0xE6 -> MICRO SIGN - u'\u0642' # 0xE7 -> ARABIC LETTER QAF - u'\u0643' # 0xE8 -> ARABIC LETTER KAF - u'\u0644' # 0xE9 -> ARABIC LETTER LAM - u'\u0645' # 0xEA -> ARABIC LETTER MEEM - u'\u0646' # 0xEB -> ARABIC LETTER NOON - u'\u0647' # 0xEC -> ARABIC LETTER HEH - u'\u0648' # 0xED -> ARABIC LETTER WAW - u'\u0649' # 0xEE -> ARABIC LETTER ALEF MAKSURA - u'\u064a' # 0xEF -> ARABIC LETTER YEH - u'\u2261' # 0xF0 -> IDENTICAL TO - u'\u064b' # 0xF1 -> ARABIC FATHATAN - u'\u064c' # 0xF2 -> ARABIC DAMMATAN - u'\u064d' # 0xF3 -> ARABIC KASRATAN - u'\u064e' # 0xF4 -> ARABIC FATHA - u'\u064f' # 0xF5 -> ARABIC DAMMA - u'\u0650' # 0xF6 -> ARABIC KASRA - u'\u2248' # 0xF7 -> ALMOST EQUAL TO - u'\xb0' # 0xF8 -> DEGREE SIGN - u'\u2219' # 0xF9 -> BULLET OPERATOR - u'\xb7' # 0xFA -> MIDDLE DOT - u'\u221a' # 0xFB -> SQUARE ROOT - u'\u207f' # 0xFC -> SUPERSCRIPT LATIN SMALL LETTER N - u'\xb2' # 0xFD -> SUPERSCRIPT TWO - u'\u25a0' # 0xFE -> BLACK SQUARE - u'\xa0' # 0xFF -> NO-BREAK SPACE + '\x00' # 0x00 -> CONTROL CHARACTER + '\x01' # 0x01 -> CONTROL CHARACTER + '\x02' # 0x02 -> CONTROL CHARACTER + '\x03' # 0x03 -> CONTROL CHARACTER + '\x04' # 0x04 -> CONTROL CHARACTER + '\x05' # 0x05 -> CONTROL CHARACTER + '\x06' # 0x06 -> CONTROL CHARACTER + '\x07' # 0x07 -> CONTROL CHARACTER + '\x08' # 0x08 -> CONTROL CHARACTER + '\t' # 0x09 -> CONTROL CHARACTER + '\n' # 0x0A -> CONTROL CHARACTER + '\x0b' # 0x0B -> CONTROL CHARACTER + '\x0c' # 0x0C -> CONTROL CHARACTER + '\r' # 0x0D -> CONTROL CHARACTER + '\x0e' # 0x0E -> CONTROL CHARACTER + '\x0f' # 0x0F -> CONTROL CHARACTER + '\x10' # 0x10 -> CONTROL CHARACTER + '\x11' # 0x11 -> CONTROL CHARACTER + '\x12' # 0x12 -> CONTROL CHARACTER + '\x13' # 0x13 -> CONTROL CHARACTER + '\x14' # 0x14 -> CONTROL CHARACTER + '\x15' # 0x15 -> CONTROL CHARACTER + '\x16' # 0x16 -> CONTROL CHARACTER + '\x17' # 0x17 -> CONTROL CHARACTER + '\x18' # 0x18 -> CONTROL CHARACTER + '\x19' # 0x19 -> CONTROL CHARACTER + '\x1a' # 0x1A -> CONTROL CHARACTER + '\x1b' # 0x1B -> CONTROL CHARACTER + '\x1c' # 0x1C -> CONTROL CHARACTER + '\x1d' # 0x1D -> CONTROL CHARACTER + '\x1e' # 0x1E -> CONTROL CHARACTER + '\x1f' # 0x1F -> CONTROL CHARACTER + ' ' # 0x20 -> SPACE + '!' # 0x21 -> EXCLAMATION MARK + '"' # 0x22 -> QUOTATION MARK + '#' # 0x23 -> NUMBER SIGN + '$' # 0x24 -> DOLLAR SIGN + '%' # 0x25 -> PERCENT SIGN + '&' # 0x26 -> AMPERSAND + "'" # 0x27 -> APOSTROPHE + '(' # 0x28 -> LEFT PARENTHESIS + ')' # 0x29 -> RIGHT PARENTHESIS + '*' # 0x2A -> ASTERISK + '+' # 0x2B -> PLUS SIGN + ',' # 0x2C -> COMMA + '-' # 0x2D -> HYPHEN-MINUS + '.' # 0x2E -> FULL STOP + '/' # 0x2F -> SOLIDUS + '0' # 0x30 -> DIGIT ZERO + '1' # 0x31 -> DIGIT ONE + '2' # 0x32 -> DIGIT TWO + '3' # 0x33 -> DIGIT THREE + '4' # 0x34 -> DIGIT FOUR + '5' # 0x35 -> DIGIT FIVE + '6' # 0x36 -> DIGIT SIX + '7' # 0x37 -> DIGIT SEVEN + '8' # 0x38 -> DIGIT EIGHT + '9' # 0x39 -> DIGIT NINE + ':' # 0x3A -> COLON + ';' # 0x3B -> SEMICOLON + '<' # 0x3C -> LESS-THAN SIGN + '=' # 0x3D -> EQUALS SIGN + '>' # 0x3E -> GREATER-THAN SIGN + '?' # 0x3F -> QUESTION MARK + '@' # 0x40 -> COMMERCIAL AT + 'A' # 0x41 -> LATIN CAPITAL LETTER A + 'B' # 0x42 -> LATIN CAPITAL LETTER B + 'C' # 0x43 -> LATIN CAPITAL LETTER C + 'D' # 0x44 -> LATIN CAPITAL LETTER D + 'E' # 0x45 -> LATIN CAPITAL LETTER E + 'F' # 0x46 -> LATIN CAPITAL LETTER F + 'G' # 0x47 -> LATIN CAPITAL LETTER G + 'H' # 0x48 -> LATIN CAPITAL LETTER H + 'I' # 0x49 -> LATIN CAPITAL LETTER I + 'J' # 0x4A -> LATIN CAPITAL LETTER J + 'K' # 0x4B -> LATIN CAPITAL LETTER K + 'L' # 0x4C -> LATIN CAPITAL LETTER L + 'M' # 0x4D -> LATIN CAPITAL LETTER M + 'N' # 0x4E -> LATIN CAPITAL LETTER N + 'O' # 0x4F -> LATIN CAPITAL LETTER O + 'P' # 0x50 -> LATIN CAPITAL LETTER P + 'Q' # 0x51 -> LATIN CAPITAL LETTER Q + 'R' # 0x52 -> LATIN CAPITAL LETTER R + 'S' # 0x53 -> LATIN CAPITAL LETTER S + 'T' # 0x54 -> LATIN CAPITAL LETTER T + 'U' # 0x55 -> LATIN CAPITAL LETTER U + 'V' # 0x56 -> LATIN CAPITAL LETTER V + 'W' # 0x57 -> LATIN CAPITAL LETTER W + 'X' # 0x58 -> LATIN CAPITAL LETTER X + 'Y' # 0x59 -> LATIN CAPITAL LETTER Y + 'Z' # 0x5A -> LATIN CAPITAL LETTER Z + '[' # 0x5B -> LEFT SQUARE BRACKET + '\\' # 0x5C -> REVERSE SOLIDUS + ']' # 0x5D -> RIGHT SQUARE BRACKET + '^' # 0x5E -> CIRCUMFLEX ACCENT + '_' # 0x5F -> LOW LINE + '`' # 0x60 -> GRAVE ACCENT + 'a' # 0x61 -> LATIN SMALL LETTER A + 'b' # 0x62 -> LATIN SMALL LETTER B + 'c' # 0x63 -> LATIN SMALL LETTER C + 'd' # 0x64 -> LATIN SMALL LETTER D + 'e' # 0x65 -> LATIN SMALL LETTER E + 'f' # 0x66 -> LATIN SMALL LETTER F + 'g' # 0x67 -> LATIN SMALL LETTER G + 'h' # 0x68 -> LATIN SMALL LETTER H + 'i' # 0x69 -> LATIN SMALL LETTER I + 'j' # 0x6A -> LATIN SMALL LETTER J + 'k' # 0x6B -> LATIN SMALL LETTER K + 'l' # 0x6C -> LATIN SMALL LETTER L + 'm' # 0x6D -> LATIN SMALL LETTER M + 'n' # 0x6E -> LATIN SMALL LETTER N + 'o' # 0x6F -> LATIN SMALL LETTER O + 'p' # 0x70 -> LATIN SMALL LETTER P + 'q' # 0x71 -> LATIN SMALL LETTER Q + 'r' # 0x72 -> LATIN SMALL LETTER R + 's' # 0x73 -> LATIN SMALL LETTER S + 't' # 0x74 -> LATIN SMALL LETTER T + 'u' # 0x75 -> LATIN SMALL LETTER U + 'v' # 0x76 -> LATIN SMALL LETTER V + 'w' # 0x77 -> LATIN SMALL LETTER W + 'x' # 0x78 -> LATIN SMALL LETTER X + 'y' # 0x79 -> LATIN SMALL LETTER Y + 'z' # 0x7A -> LATIN SMALL LETTER Z + '{' # 0x7B -> LEFT CURLY BRACKET + '|' # 0x7C -> VERTICAL LINE + '}' # 0x7D -> RIGHT CURLY BRACKET + '~' # 0x7E -> TILDE + '\x7f' # 0x7F -> CONTROL CHARACTER + '?' # 0x80 -> QUESTION MARK + '\x81' + '?' # 0x82 -> QUESTION MARK + '?' # 0x83 -> QUESTION MARK + '?' # 0x84 -> QUESTION MARK + '?' # 0x85 -> QUESTION MARK + '?' # 0x86 -> QUESTION MARK + '?' # 0x87 -> QUESTION MARK + '?' # 0x88 -> QUESTION MARK + '?' # 0x89 -> QUESTION MARK + '?' # 0x8A -> QUESTION MARK + '?' # 0x8B -> QUESTION MARK + '?' # 0x8C -> QUESTION MARK + '\x8d' + '?' # 0x8E -> QUESTION MARK + '\x8f' + '\x90' + '?' # 0x91 -> QUESTION MARK + '?' # 0x92 -> QUESTION MARK + '?' # 0x93 -> QUESTION MARK + '?' # 0x94 -> QUESTION MARK + '?' # 0x95 -> QUESTION MARK + '?' # 0x96 -> QUESTION MARK + '?' # 0x97 -> QUESTION MARK + '?' # 0x98 -> QUESTION MARK + '?' # 0x99 -> QUESTION MARK + '?' # 0x9A -> QUESTION MARK + '?' # 0x9B -> QUESTION MARK + '?' # 0x9C -> QUESTION MARK + '\u0625' # 0x9D -> ARABIC LETTER ALEF WITH HAMZA BELOW + '?' # 0x9E -> QUESTION MARK + '?' # 0x9F -> QUESTION MARK + '\u0628' # 0xA0 -> ARABIC LETTER BEH + '\u0629' # 0xA1 -> ARABIC LETTER TEH MARBUTA + '\u062a' # 0xA2 -> ARABIC LETTER TEH + '\u062b' # 0xA3 -> ARABIC LETTER THEH + '\u062c' # 0xA4 -> ARABIC LETTER JEEM + '\u062d' # 0xA5 -> ARABIC LETTER HAH + '\u062e' # 0xA6 -> ARABIC LETTER KHAH + '\u062f' # 0xA7 -> ARABIC LETTER DAL + '\u0630' # 0xA8 -> ARABIC LETTER THAL + '\u0631' # 0xA9 -> ARABIC LETTER REH + '\u0632' # 0xAA -> ARABIC LETTER ZAIN + '\u0633' # 0xAB -> ARABIC LETTER SEEN + '\u0634' # 0xAC -> ARABIC LETTER SHEEN + '\u0635' # 0xAD -> ARABIC LETTER SAD + '\xab' # 0xAE -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + '\xbb' # 0xAF -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + '\u2591' # 0xB0 -> LIGHT SHADE + '\u2592' # 0xB1 -> MEDIUM SHADE + '\u2593' # 0xB2 -> DARK SHADE + '\u2502' # 0xB3 -> BOX DRAWINGS LIGHT VERTICAL + '\u2524' # 0xB4 -> BOX DRAWINGS LIGHT VERTICAL AND LEFT + '\u2561' # 0xB5 -> BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + '\u2562' # 0xB6 -> BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE + '\u2556' # 0xB7 -> BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE + '\u2555' # 0xB8 -> BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE + '\u2563' # 0xB9 -> BOX DRAWINGS DOUBLE VERTICAL AND LEFT + '\u2551' # 0xBA -> BOX DRAWINGS DOUBLE VERTICAL + '\u2557' # 0xBB -> BOX DRAWINGS DOUBLE DOWN AND LEFT + '\u255d' # 0xBC -> BOX DRAWINGS DOUBLE UP AND LEFT + '\u255c' # 0xBD -> BOX DRAWINGS UP DOUBLE AND LEFT SINGLE + '\u255b' # 0xBE -> BOX DRAWINGS UP SINGLE AND LEFT DOUBLE + '\u2510' # 0xBF -> BOX DRAWINGS LIGHT DOWN AND LEFT + '\u2514' # 0xC0 -> BOX DRAWINGS LIGHT UP AND RIGHT + '\u2534' # 0xC1 -> BOX DRAWINGS LIGHT UP AND HORIZONTAL + '\u252c' # 0xC2 -> BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + '\u251c' # 0xC3 -> BOX DRAWINGS LIGHT VERTICAL AND RIGHT + '\u2500' # 0xC4 -> BOX DRAWINGS LIGHT HORIZONTAL + '\u253c' # 0xC5 -> BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + '\u255e' # 0xC6 -> BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + '\u255f' # 0xC7 -> BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE + '\u255a' # 0xC8 -> BOX DRAWINGS DOUBLE UP AND RIGHT + '\u2554' # 0xC9 -> BOX DRAWINGS DOUBLE DOWN AND RIGHT + '\u2569' # 0xCA -> BOX DRAWINGS DOUBLE UP AND HORIZONTAL + '\u2566' # 0xCB -> BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + '\u2560' # 0xCC -> BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + '\u2550' # 0xCD -> BOX DRAWINGS DOUBLE HORIZONTAL + '\u256c' # 0xCE -> BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL + '\u2567' # 0xCF -> BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE + '\u2568' # 0xD0 -> BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE + '\u2564' # 0xD1 -> BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE + '\u2565' # 0xD2 -> BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE + '\u2559' # 0xD3 -> BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE + '\u2558' # 0xD4 -> BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE + '\u2552' # 0xD5 -> BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE + '\u2553' # 0xD6 -> BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE + '\u256b' # 0xD7 -> BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE + '\u256a' # 0xD8 -> BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + '\u2518' # 0xD9 -> BOX DRAWINGS LIGHT UP AND LEFT + '\u250c' # 0xDA -> BOX DRAWINGS LIGHT DOWN AND RIGHT + '\u2588' # 0xDB -> FULL BLOCK + '\u2584' # 0xDC -> LOWER HALF BLOCK + '\u258c' # 0xDD -> LEFT HALF BLOCK + '\u2590' # 0xDE -> RIGHT HALF BLOCK + '\u2580' # 0xDF -> UPPER HALF BLOCK + '\u0636' # 0xE0 -> ARABIC LETTER DAD + '\u0637' # 0xE1 -> ARABIC LETTER TAH + '\u0638' # 0xE2 -> ARABIC LETTER ZAH + '\u0639' # 0xE3 -> ARABIC LETTER AIN + '\u063a' # 0xE4 -> ARABIC LETTER GHAIN + '\u0641' # 0xE5 -> ARABIC LETTER FEH + '\xb5' # 0xE6 -> MICRO SIGN + '\u0642' # 0xE7 -> ARABIC LETTER QAF + '\u0643' # 0xE8 -> ARABIC LETTER KAF + '\u0644' # 0xE9 -> ARABIC LETTER LAM + '\u0645' # 0xEA -> ARABIC LETTER MEEM + '\u0646' # 0xEB -> ARABIC LETTER NOON + '\u0647' # 0xEC -> ARABIC LETTER HEH + '\u0648' # 0xED -> ARABIC LETTER WAW + '\u0649' # 0xEE -> ARABIC LETTER ALEF MAKSURA + '\u064a' # 0xEF -> ARABIC LETTER YEH + '\u2261' # 0xF0 -> IDENTICAL TO + '\u064b' # 0xF1 -> ARABIC FATHATAN + '\u064c' # 0xF2 -> ARABIC DAMMATAN + '\u064d' # 0xF3 -> ARABIC KASRATAN + '\u064e' # 0xF4 -> ARABIC FATHA + '\u064f' # 0xF5 -> ARABIC DAMMA + '\u0650' # 0xF6 -> ARABIC KASRA + '\u2248' # 0xF7 -> ALMOST EQUAL TO + '\xb0' # 0xF8 -> DEGREE SIGN + '\u2219' # 0xF9 -> BULLET OPERATOR + '\xb7' # 0xFA -> MIDDLE DOT + '\u221a' # 0xFB -> SQUARE ROOT + '\u207f' # 0xFC -> SUPERSCRIPT LATIN SMALL LETTER N + '\xb2' # 0xFD -> SUPERSCRIPT TWO + '\u25a0' # 0xFE -> BLACK SQUARE + '\xa0' # 0xFF -> NO-BREAK SPACE ) ### Encoding table Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Jul 13 22:38:21 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #1616979: Added the cp720 (Arabic DOS) encoding. + - Issue #6428: Since Python 3.0, the __bool__ method must return a bool object, and not an int. Fix the corresponding error message, and the documentation. Modified: python/branches/py3k/Tools/unicode/gencodec.py ============================================================================== --- python/branches/py3k/Tools/unicode/gencodec.py (original) +++ python/branches/py3k/Tools/unicode/gencodec.py Mon Jul 13 22:38:21 2009 @@ -237,11 +237,11 @@ else: mapchar = chr(mapvalue) if mapcomment and comments: - append(' %r\t# %s -> %s' % (mapchar, + append(' %a \t# %s -> %s' % (mapchar, hexrepr(key, key_precision), mapcomment)) else: - append(' %r' % mapchar) + append(' %a' % mapchar) append(')') return l Copied: python/branches/py3k/Tools/unicode/genwincodec.py (from r74001, /python/trunk/Tools/unicode/genwincodec.py) ============================================================================== --- /python/trunk/Tools/unicode/genwincodec.py (original) +++ python/branches/py3k/Tools/unicode/genwincodec.py Mon Jul 13 22:38:21 2009 @@ -17,7 +17,7 @@ enc2uni = {} - for i in range(32) + [127]: + for i in list(range(32)) + [127]: enc2uni[i] = (i, 'CONTROL CHARACTER') for i in range(256): @@ -54,7 +54,7 @@ ''' % (encodingname, ' '.join(platform.win32_ver()), codepage ) + code.split('"""#"', 1)[1] - print code + print(code) if __name__ == '__main__': import sys Copied: python/branches/py3k/Tools/unicode/genwincodecs.bat (from r74001, /python/trunk/Tools/unicode/genwincodecs.bat) ============================================================================== --- /python/trunk/Tools/unicode/genwincodecs.bat (original) +++ python/branches/py3k/Tools/unicode/genwincodecs.bat Mon Jul 13 22:38:21 2009 @@ -4,4 +4,4 @@ @cd /d %~dp0 @mkdir build @rem Arabic DOS code page -c:\python26\python genwincodec.py 720 > build/cp720.py +c:\python30\python genwincodec.py 720 > build/cp720.py From python-checkins at python.org Mon Jul 13 22:48:08 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Mon, 13 Jul 2009 20:48:08 -0000 Subject: [Python-checkins] r74004 - in python/branches/py3k: Lib/encodings/cp720.py Tools/unicode/genwincodec.py Message-ID: Author: amaury.forgeotdarc Date: Mon Jul 13 22:48:07 2009 New Revision: 74004 Log: Oops, really pass a bytes string to the ctypes function. Modified: python/branches/py3k/Lib/encodings/cp720.py python/branches/py3k/Tools/unicode/genwincodec.py Modified: python/branches/py3k/Lib/encodings/cp720.py ============================================================================== --- python/branches/py3k/Lib/encodings/cp720.py (original) +++ python/branches/py3k/Lib/encodings/cp720.py Mon Jul 13 22:48:07 2009 @@ -175,38 +175,38 @@ '}' # 0x7D -> RIGHT CURLY BRACKET '~' # 0x7E -> TILDE '\x7f' # 0x7F -> CONTROL CHARACTER - '?' # 0x80 -> QUESTION MARK + '\x80' '\x81' - '?' # 0x82 -> QUESTION MARK - '?' # 0x83 -> QUESTION MARK - '?' # 0x84 -> QUESTION MARK - '?' # 0x85 -> QUESTION MARK - '?' # 0x86 -> QUESTION MARK - '?' # 0x87 -> QUESTION MARK - '?' # 0x88 -> QUESTION MARK - '?' # 0x89 -> QUESTION MARK - '?' # 0x8A -> QUESTION MARK - '?' # 0x8B -> QUESTION MARK - '?' # 0x8C -> QUESTION MARK + '\xe9' # 0x82 -> LATIN SMALL LETTER E WITH ACUTE + '\xe2' # 0x83 -> LATIN SMALL LETTER A WITH CIRCUMFLEX + '\x84' + '\xe0' # 0x85 -> LATIN SMALL LETTER A WITH GRAVE + '\x86' + '\xe7' # 0x87 -> LATIN SMALL LETTER C WITH CEDILLA + '\xea' # 0x88 -> LATIN SMALL LETTER E WITH CIRCUMFLEX + '\xeb' # 0x89 -> LATIN SMALL LETTER E WITH DIAERESIS + '\xe8' # 0x8A -> LATIN SMALL LETTER E WITH GRAVE + '\xef' # 0x8B -> LATIN SMALL LETTER I WITH DIAERESIS + '\xee' # 0x8C -> LATIN SMALL LETTER I WITH CIRCUMFLEX '\x8d' - '?' # 0x8E -> QUESTION MARK + '\x8e' '\x8f' '\x90' - '?' # 0x91 -> QUESTION MARK - '?' # 0x92 -> QUESTION MARK - '?' # 0x93 -> QUESTION MARK - '?' # 0x94 -> QUESTION MARK - '?' # 0x95 -> QUESTION MARK - '?' # 0x96 -> QUESTION MARK - '?' # 0x97 -> QUESTION MARK - '?' # 0x98 -> QUESTION MARK - '?' # 0x99 -> QUESTION MARK - '?' # 0x9A -> QUESTION MARK - '?' # 0x9B -> QUESTION MARK - '?' # 0x9C -> QUESTION MARK + '\u0651' # 0x91 -> ARABIC SHADDA + '\u0652' # 0x92 -> ARABIC SUKUN + '\xf4' # 0x93 -> LATIN SMALL LETTER O WITH CIRCUMFLEX + '\xa4' # 0x94 -> CURRENCY SIGN + '\u0640' # 0x95 -> ARABIC TATWEEL + '\xfb' # 0x96 -> LATIN SMALL LETTER U WITH CIRCUMFLEX + '\xf9' # 0x97 -> LATIN SMALL LETTER U WITH GRAVE + '\u0621' # 0x98 -> ARABIC LETTER HAMZA + '\u0622' # 0x99 -> ARABIC LETTER ALEF WITH MADDA ABOVE + '\u0623' # 0x9A -> ARABIC LETTER ALEF WITH HAMZA ABOVE + '\u0624' # 0x9B -> ARABIC LETTER WAW WITH HAMZA ABOVE + '\xa3' # 0x9C -> POUND SIGN '\u0625' # 0x9D -> ARABIC LETTER ALEF WITH HAMZA BELOW - '?' # 0x9E -> QUESTION MARK - '?' # 0x9F -> QUESTION MARK + '\u0626' # 0x9E -> ARABIC LETTER YEH WITH HAMZA ABOVE + '\u0627' # 0x9F -> ARABIC LETTER ALEF '\u0628' # 0xA0 -> ARABIC LETTER BEH '\u0629' # 0xA1 -> ARABIC LETTER TEH MARBUTA '\u062a' # 0xA2 -> ARABIC LETTER TEH Modified: python/branches/py3k/Tools/unicode/genwincodec.py ============================================================================== --- python/branches/py3k/Tools/unicode/genwincodec.py (original) +++ python/branches/py3k/Tools/unicode/genwincodec.py Mon Jul 13 22:48:07 2009 @@ -24,7 +24,7 @@ buf = ctypes.create_unicode_buffer(2) ret = MultiByteToWideChar( codepage, 0, - chr(i), 1, + bytes([i]), 1, buf, 2) assert ret == 1, "invalid code page" assert buf[1] == '\x00' From buildbot at python.org Mon Jul 13 23:06:53 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 13 Jul 2009 21:06:53 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5158 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: marc-andre.lemburg BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From buildbot at python.org Mon Jul 13 23:08:04 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 13 Jul 2009 21:08:04 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/955 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_mailbox make: *** [buildbottest] Error 1 sincerely, -The Buildbot From pjenvey at underboss.org Mon Jul 13 22:52:23 2009 From: pjenvey at underboss.org (Philip Jenvey) Date: Mon, 13 Jul 2009 13:52:23 -0700 Subject: [Python-checkins] r74000 - in python/trunk: Lib/encodings/cp720.py Tools/unicode/genwincodec.py Tools/unicode/genwincodecs.bat Message-ID: <5BA9B1FF-A602-441E-8215-2C98FD09B76C@underboss.org> On Jul 13, 2009, at 1:02 PM, amaury.forgeotdarc wrote: > Author: amaury.forgeotdarc > Date: Mon Jul 13 22:01:11 2009 > New Revision: 74000 > > Log: > #1616979: Add the cp720 (Arabic DOS) encoding. This needs an entry in Docs/library/codecs.rst -- Philip Jenvey From python-checkins at python.org Mon Jul 13 23:28:33 2009 From: python-checkins at python.org (marc-andre.lemburg) Date: Mon, 13 Jul 2009 21:28:33 -0000 Subject: [Python-checkins] r74005 - python/trunk/Lib/platform.py Message-ID: Author: marc-andre.lemburg Date: Mon Jul 13 23:28:33 2009 New Revision: 74005 Log: Use a different VER command output parser to address the localization issues mentioned in #3410. Prepare for Windows 7 (still commented out). Modified: python/trunk/Lib/platform.py Modified: python/trunk/Lib/platform.py ============================================================================== --- python/trunk/Lib/platform.py (original) +++ python/trunk/Lib/platform.py Mon Jul 13 23:28:33 2009 @@ -464,7 +464,16 @@ _ver_output = re.compile(r'(?:([\w ]+) ([\w.]+) ' '.*' - 'Version ([\d.]+))') + '\[.* ([\d.]+)\])') + +# Examples of VER command output: +# +# Windows 2000: Microsoft Windows 2000 [Version 5.00.2195] +# Windows XP: Microsoft Windows XP [Version 5.1.2600] +# Windows Vista: Microsoft Windows [Version 6.0.6002] +# +# Note that the "Version" string gets localized on different +# Windows versions. def _syscmd_ver(system='', release='', version='', @@ -596,6 +605,7 @@ version = '%i.%i.%i' % (maj,min,buildno & 0xFFFF) if csd[:13] == 'Service Pack ': csd = 'SP' + csd[13:] + if plat == VER_PLATFORM_WIN32_WINDOWS: regkey = 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion' # Try to guess the release name @@ -610,6 +620,7 @@ release = 'postMe' elif maj == 5: release = '2000' + elif plat == VER_PLATFORM_WIN32_NT: regkey = 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion' if maj <= 4: @@ -638,8 +649,12 @@ release = 'Vista' else: release = '2008Server' + #elif min == 1: + # # Windows 7 release candidate uses version 6.1.7100 + # release = '7RC' else: release = 'post2008Server' + else: if not release: # E.g. Win3.1 with win32s @@ -1114,7 +1129,7 @@ node = _node() machine = '' - use_syscmd_ver = 01 + use_syscmd_ver = 1 # Try win32_ver() on win32 platforms if system == 'win32': From python-checkins at python.org Tue Jul 14 01:11:54 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Mon, 13 Jul 2009 23:11:54 -0000 Subject: [Python-checkins] r74006 - python/trunk/Doc/library/codecs.rst Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 14 01:11:54 2009 New Revision: 74006 Log: Document the newly added codec Modified: python/trunk/Doc/library/codecs.rst Modified: python/trunk/Doc/library/codecs.rst ============================================================================== --- python/trunk/Doc/library/codecs.rst (original) +++ python/trunk/Doc/library/codecs.rst Tue Jul 14 01:11:54 2009 @@ -897,6 +897,8 @@ | cp500 | EBCDIC-CP-BE, EBCDIC-CP-CH, | Western Europe | | | IBM500 | | +-----------------+--------------------------------+--------------------------------+ +| cp720 | | Arabic | ++-----------------+--------------------------------+--------------------------------+ | cp737 | | Greek | +-----------------+--------------------------------+--------------------------------+ | cp775 | IBM775 | Baltic languages | From python-checkins at python.org Tue Jul 14 19:58:18 2009 From: python-checkins at python.org (michael.foord) Date: Tue, 14 Jul 2009 17:58:18 -0000 Subject: [Python-checkins] r74007 - in python/trunk/Lib: test/test_unittest.py unittest.py Message-ID: Author: michael.foord Date: Tue Jul 14 19:58:12 2009 New Revision: 74007 Log: Move TestRunner initialisation into unittest.TestProgram.runTests. Fixes issue 6418. Modified: python/trunk/Lib/test/test_unittest.py python/trunk/Lib/unittest.py Modified: python/trunk/Lib/test/test_unittest.py ============================================================================== --- python/trunk/Lib/test/test_unittest.py (original) +++ python/trunk/Lib/test/test_unittest.py Tue Jul 14 19:58:12 2009 @@ -3324,15 +3324,6 @@ self.assertEqual(runner.test, test) self.assertEqual(program.verbosity, 2) - - def testTestProgram_testRunnerArgument(self): - program = object.__new__(TestProgram) - program.parseArgs = lambda _: None - program.runTests = lambda: None - program.__init__(testRunner=None) - self.assertEqual(program.testRunner, unittest.TextTestRunner) - - class FooBar(unittest.TestCase): def testPass(self): assert True Modified: python/trunk/Lib/unittest.py ============================================================================== --- python/trunk/Lib/unittest.py (original) +++ python/trunk/Lib/unittest.py Tue Jul 14 19:58:12 2009 @@ -1643,8 +1643,6 @@ argv=None, testRunner=None, testLoader=defaultTestLoader, exit=True, verbosity=1): - if testRunner is None: - testRunner = TextTestRunner if isinstance(module, basestring): self.module = __import__(module) for part in module.split('.')[1:]: @@ -1734,6 +1732,8 @@ self.test = loader.discover(start_dir, pattern, top_level_dir) def runTests(self): + if self.testRunner is None: + self.testRunner = TextTestRunner if isinstance(self.testRunner, (type, types.ClassType)): try: testRunner = self.testRunner(verbosity=self.verbosity) From python-checkins at python.org Wed Jul 15 02:46:42 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 15 Jul 2009 00:46:42 -0000 Subject: [Python-checkins] r74008 - python/trunk/Doc/copyright.rst Message-ID: Author: benjamin.peterson Date: Wed Jul 15 02:46:42 2009 New Revision: 74008 Log: update year Modified: python/trunk/Doc/copyright.rst Modified: python/trunk/Doc/copyright.rst ============================================================================== --- python/trunk/Doc/copyright.rst (original) +++ python/trunk/Doc/copyright.rst Wed Jul 15 02:46:42 2009 @@ -4,7 +4,7 @@ Python and this documentation is: -Copyright ? 2001-2008 Python Software Foundation. All rights reserved. +Copyright ? 2001-2009 Python Software Foundation. All rights reserved. Copyright ? 2000 BeOpen.com. All rights reserved. From python-checkins at python.org Wed Jul 15 06:08:33 2009 From: python-checkins at python.org (brett.cannon) Date: Wed, 15 Jul 2009 04:08:33 -0000 Subject: [Python-checkins] r74009 - in python/branches/py3k: Lib/importlib/test/__init__.py Lib/importlib/test/__main__.py Lib/test/test_importlib.py Misc/NEWS Message-ID: Author: brett.cannon Date: Wed Jul 15 06:08:33 2009 New Revision: 74009 Log: Importlib was using custom code to discover all test modules in importlib.test. This has now been removed in favor of using unittest's test discovery code in TestLoader.discover(). Added: python/branches/py3k/Lib/importlib/test/__main__.py Modified: python/branches/py3k/Lib/importlib/test/__init__.py python/branches/py3k/Lib/test/test_importlib.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/importlib/test/__init__.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/__init__.py (original) +++ python/branches/py3k/Lib/importlib/test/__init__.py Wed Jul 15 06:08:33 2009 @@ -1,31 +0,0 @@ -import os.path -import sys -import unittest - - -def test_suite(package=__package__, directory=os.path.dirname(__file__)): - suite = unittest.TestSuite() - for name in os.listdir(directory): - if name.startswith('.'): - continue - path = os.path.join(directory, name) - if (os.path.isfile(path) and name.startswith('test_') and - name.endswith('.py')): - submodule_name = os.path.splitext(name)[0] - module_name = "{0}.{1}".format(package, submodule_name) - __import__(module_name, level=0) - module_tests = unittest.findTestCases(sys.modules[module_name]) - suite.addTest(module_tests) - elif os.path.isdir(path): - package_name = "{0}.{1}".format(package, name) - __import__(package_name, level=0) - package_tests = getattr(sys.modules[package_name], 'test_suite')() - suite.addTest(package_tests) - else: - continue - return suite - - -if __name__ == '__main__': - from test.support import run_unittest - run_unittest(test_suite('importlib.test')) Added: python/branches/py3k/Lib/importlib/test/__main__.py ============================================================================== --- (empty file) +++ python/branches/py3k/Lib/importlib/test/__main__.py Wed Jul 15 06:08:33 2009 @@ -0,0 +1,14 @@ +import os.path +from test.support import run_unittest +import unittest + + +def test_main(): + start_dir = os.path.dirname(__file__) + top_dir = os.path.dirname(os.path.dirname(start_dir)) + test_loader = unittest.TestLoader() + run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir)) + + +if __name__ == '__main__': + test_main() Modified: python/branches/py3k/Lib/test/test_importlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_importlib.py (original) +++ python/branches/py3k/Lib/test/test_importlib.py Wed Jul 15 06:08:33 2009 @@ -1,9 +1,4 @@ -from test.support import run_unittest -import importlib.test - - -def test_main(): - run_unittest(importlib.test.test_suite('importlib.test')) +from importlib.test.__main__ import test_main if __name__ == '__main__': Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 15 06:08:33 2009 @@ -74,6 +74,12 @@ - Issue 5390: Add uninstall icon independent of whether file extensions are installed. +Tests +----- + +- Removed importlib's custom test discovery code and switched to + unittest.TestLoader.discover(). + What's New in Python 3.1? ========================= From buildbot at python.org Wed Jul 15 06:41:11 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 15 Jul 2009 04:41:11 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1170 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: brett.cannon BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_asynchat make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Wed Jul 15 16:16:54 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 15 Jul 2009 14:16:54 -0000 Subject: [Python-checkins] r74010 - python/branches/py3k/Lib/doctest.py Message-ID: Author: r.david.murray Date: Wed Jul 15 16:16:54 2009 New Revision: 74010 Log: PEP-8-ify r73389. Modified: python/branches/py3k/Lib/doctest.py Modified: python/branches/py3k/Lib/doctest.py ============================================================================== --- python/branches/py3k/Lib/doctest.py (original) +++ python/branches/py3k/Lib/doctest.py Wed Jul 15 16:16:54 2009 @@ -821,7 +821,8 @@ # (see __patched_linecache_getlines). file = inspect.getfile(obj) if not file[0]+file[-2:] == '<]>': file = None - if file is None: source_lines = None + if file is None: + source_lines = None else: if module is not None: # Supply the module globals in case the module was From buildbot at python.org Wed Jul 15 17:42:09 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 15 Jul 2009 15:42:09 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.x Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.x/builds/772 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: r.david.murray BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest.py", line 543, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test_1064_tmp Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test_1064_tmp' 1 test failed: test_import ====================================================================== ERROR: testImport (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 60, in test_with_extension mod = __import__(TESTFN) ImportError: No module named @test_1064_tmp Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest.py", line 543, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test_1064_tmp Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test_1064_tmp' Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest.py", line 543, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test_1064_tmp Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test_1064_tmp' sincerely, -The Buildbot From python-checkins at python.org Wed Jul 15 19:07:04 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 15 Jul 2009 17:07:04 -0000 Subject: [Python-checkins] r74011 - python/trunk/Lib/test/test_zipfile.py Message-ID: Author: ezio.melotti Date: Wed Jul 15 19:07:04 2009 New Revision: 74011 Log: methods' names pep8ification Modified: python/trunk/Lib/test/test_zipfile.py Modified: python/trunk/Lib/test/test_zipfile.py ============================================================================== --- python/trunk/Lib/test/test_zipfile.py (original) +++ python/trunk/Lib/test/test_zipfile.py Wed Jul 15 19:07:04 2009 @@ -39,7 +39,7 @@ fp.write(self.data) fp.close() - def makeTestArchive(self, f, compression): + def make_test_archive(self, f, compression): # Create the ZIP archive zipfp = zipfile.ZipFile(f, "w", compression) zipfp.write(TESTFN, "another"+os.extsep+"name") @@ -47,8 +47,8 @@ zipfp.writestr("strfile", self.data) zipfp.close() - def zipTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -105,12 +105,12 @@ zipfp.testzip() zipfp.close() - def test_Stored(self): + def test_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipTest(f, zipfile.ZIP_STORED) + self.zip_test(f, zipfile.ZIP_STORED) - def zipOpenTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_open_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -134,11 +134,11 @@ self.assertEqual(''.join(zipdata2), self.data) zipfp.close() - def test_OpenStored(self): + def test_open_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipOpenTest(f, zipfile.ZIP_STORED) + self.zip_open_test(f, zipfile.ZIP_STORED) - def test_OpenViaZipInfo(self): + def test_open_via_zip_info(self): # Create the ZIP archive zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.writestr("name", "foo") @@ -157,8 +157,8 @@ self.assertTrue(data == "foobar" or data == "barfoo") zipfp.close() - def zipRandomOpenTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_random_open_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -173,12 +173,12 @@ self.assertEqual(''.join(zipdata1), self.data) zipfp.close() - def test_RandomOpenStored(self): + def test_random_open_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipRandomOpenTest(f, zipfile.ZIP_STORED) + self.zip_random_open_test(f, zipfile.ZIP_STORED) - def zipReadlineTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_readline_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -189,8 +189,8 @@ zipfp.close() - def zipReadlinesTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_readlines_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -200,8 +200,8 @@ zipfp.close() - def zipIterlinesTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_iterlines_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -210,50 +210,50 @@ zipfp.close() - def test_ReadlineStored(self): + def test_readline_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipReadlineTest(f, zipfile.ZIP_STORED) + self.zip_readline_test(f, zipfile.ZIP_STORED) - def test_ReadlinesStored(self): + def test_readlines_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipReadlinesTest(f, zipfile.ZIP_STORED) + self.zip_readlines_test(f, zipfile.ZIP_STORED) - def test_IterlinesStored(self): + def test_iterlines_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipIterlinesTest(f, zipfile.ZIP_STORED) + self.zip_iterlines_test(f, zipfile.ZIP_STORED) @skipUnless(zlib, "requires zlib") - def test_Deflated(self): + def test_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipTest(f, zipfile.ZIP_DEFLATED) + self.zip_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_OpenDeflated(self): + def test_open_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipOpenTest(f, zipfile.ZIP_DEFLATED) + self.zip_open_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_RandomOpenDeflated(self): + def test_random_open_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipRandomOpenTest(f, zipfile.ZIP_DEFLATED) + self.zip_random_open_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_ReadlineDeflated(self): + def test_readline_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipReadlineTest(f, zipfile.ZIP_DEFLATED) + self.zip_readline_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_ReadlinesDeflated(self): + def test_readlines_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipReadlinesTest(f, zipfile.ZIP_DEFLATED) + self.zip_readlines_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_IterlinesDeflated(self): + def test_iterlines_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipIterlinesTest(f, zipfile.ZIP_DEFLATED) + self.zip_iterlines_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_LowCompression(self): + def test_low_compression(self): # Checks for cases where compressed data is larger than original # Create the ZIP archive zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) @@ -266,7 +266,7 @@ self.assertEqual(openobj.read(1), '1') self.assertEqual(openobj.read(1), '2') - def test_AbsoluteArcnames(self): + def test_absolute_arcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.write(TESTFN, "/absolute") zipfp.close() @@ -275,7 +275,7 @@ self.assertEqual(zipfp.namelist(), ["absolute"]) zipfp.close() - def test_AppendToZipFile(self): + def test_append_to_zip_file(self): # Test appending to an existing zipfile zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.write(TESTFN, TESTFN) @@ -285,7 +285,7 @@ self.assertEqual(zipfp.namelist(), [TESTFN, "strfile"]) zipfp.close() - def test_AppendToNonZipFile(self): + def test_append_to_non_zip_file(self): # Test appending to an existing file that is not a zipfile # NOTE: this test fails if len(d) < 22 because of the first # line "fpin.seek(-22, 2)" in _EndRecData @@ -304,14 +304,14 @@ zipfp.close() f.close() - def test_WriteDefaultName(self): + def test_write_default_name(self): # Check that calling ZipFile.write without arcname specified produces the expected result zipfp = zipfile.ZipFile(TESTFN2, "w") zipfp.write(TESTFN) self.assertEqual(zipfp.read(TESTFN), file(TESTFN).read()) zipfp.close() - def test_PerFileCompression(self): + def test_per_file_compression(self): # Check that files within a Zip archive can have different compression options zipfp = zipfile.ZipFile(TESTFN2, "w") zipfp.write(TESTFN, 'storeme', zipfile.ZIP_STORED) @@ -322,7 +322,7 @@ self.assertEqual(dinfo.compress_type, zipfile.ZIP_DEFLATED) zipfp.close() - def test_WriteToReadonly(self): + def test_write_to_readonly(self): # Check that trying to call write() on a readonly ZipFile object # raises a RuntimeError zipf = zipfile.ZipFile(TESTFN2, mode="w") @@ -332,7 +332,7 @@ self.assertRaises(RuntimeError, zipf.write, TESTFN) zipf.close() - def test_Extract(self): + def test_extract(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata) @@ -361,7 +361,7 @@ # remove the test file subdirectories shutil.rmtree(os.path.join(os.getcwd(), 'ziptest2dir')) - def test_ExtractAll(self): + def test_extract_all(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata) @@ -388,12 +388,12 @@ # Make sure that writestr creates files with mode 0600, # when it is passed a name rather than a ZipInfo instance. - self.makeTestArchive(f, compression) + self.make_test_archive(f, compression) zipfp = zipfile.ZipFile(f, "r") zinfo = zipfp.getinfo('strfile') self.assertEqual(zinfo.external_attr, 0600 << 16) - def test_WritestrPermissions(self): + def test_writestr_permissions(self): for f in (TESTFN2, TemporaryFile(), StringIO()): self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED) @@ -418,24 +418,24 @@ fp.write(self.data) fp.close() - def largeFileExceptionTest(self, f, compression): + def large_file_exception_test(self, f, compression): zipfp = zipfile.ZipFile(f, "w", compression) self.assertRaises(zipfile.LargeZipFile, zipfp.write, TESTFN, "another"+os.extsep+"name") zipfp.close() - def largeFileExceptionTest2(self, f, compression): + def large_file_exception_test2(self, f, compression): zipfp = zipfile.ZipFile(f, "w", compression) self.assertRaises(zipfile.LargeZipFile, zipfp.writestr, "another"+os.extsep+"name", self.data) zipfp.close() - def test_LargeFileException(self): + def test_large_file_exception(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.largeFileExceptionTest(f, zipfile.ZIP_STORED) - self.largeFileExceptionTest2(f, zipfile.ZIP_STORED) + self.large_file_exception_test(f, zipfile.ZIP_STORED) + self.large_file_exception_test2(f, zipfile.ZIP_STORED) - def zipTest(self, f, compression): + def zip_test(self, f, compression): # Create the ZIP archive zipfp = zipfile.ZipFile(f, "w", compression, allowZip64=True) zipfp.write(TESTFN, "another"+os.extsep+"name") @@ -500,16 +500,16 @@ zipfp.close() - def test_Stored(self): + def test_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipTest(f, zipfile.ZIP_STORED) + self.zip_test(f, zipfile.ZIP_STORED) @skipUnless(zlib, "requires zlib") - def test_Deflated(self): + def test_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipTest(f, zipfile.ZIP_DEFLATED) + self.zip_test(f, zipfile.ZIP_DEFLATED) - def test_AbsoluteArcnames(self): + def test_absolute_arcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED, allowZip64=True) zipfp.write(TESTFN, "/absolute") zipfp.close() @@ -525,7 +525,7 @@ class PyZipFileTests(unittest.TestCase): - def test_WritePyfile(self): + def test_write_pyfile(self): zipfp = zipfile.PyZipFile(TemporaryFile(), "w") fn = __file__ if fn.endswith('.pyc') or fn.endswith('.pyo'): @@ -550,7 +550,7 @@ self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() - def test_WritePythonPackage(self): + def test_write_python_package(self): import email packagedir = os.path.dirname(email.__file__) @@ -562,7 +562,7 @@ self.assertTrue('email/__init__.pyo' in names or 'email/__init__.pyc' in names) self.assertTrue('email/mime/text.pyo' in names or 'email/mime/text.pyc' in names) - def test_WritePythonDirectory(self): + def test_write_python_directory(self): os.mkdir(TESTFN2) try: fp = open(os.path.join(TESTFN2, "mod1.py"), "w") @@ -588,7 +588,7 @@ finally: shutil.rmtree(TESTFN2) - def test_WriteNonPyfile(self): + def test_write_non_pyfile(self): zipfp = zipfile.PyZipFile(TemporaryFile(), "w") file(TESTFN, 'w').write('most definitely not a python file') self.assertRaises(RuntimeError, zipfp.writepy, TESTFN) @@ -596,7 +596,7 @@ class OtherTests(unittest.TestCase): - def test_UnicodeFilenames(self): + def test_unicode_filenames(self): zf = zipfile.ZipFile(TESTFN, "w") zf.writestr(u"foo.txt", "Test for unicode filename") zf.writestr(u"\xf6.txt", "Test for unicode filename") @@ -607,7 +607,7 @@ self.assertEqual(zf.filelist[1].filename, u"\xf6.txt") zf.close() - def test_CreateNonExistentFileForAppend(self): + def test_create_non_existent_file_for_append(self): if os.path.exists(TESTFN): os.unlink(TESTFN) @@ -627,7 +627,7 @@ self.assertEqual(zf.read(filename), content) zf.close() - def test_CloseErroneousFile(self): + def test_close_erroneous_file(self): # This test checks that the ZipFile constructor closes the file object # it opens if there's an error in the file. If it doesn't, the traceback # holds a reference to the ZipFile object and, indirectly, the file object. @@ -642,7 +642,7 @@ except zipfile.BadZipfile: pass - def test_IsZipErroneousFile(self): + def test_is_zip_erroneous_file(self): # This test checks that the is_zipfile function correctly identifies # a file that is not a zip file @@ -664,7 +664,7 @@ chk = zipfile.is_zipfile(fp) self.assertTrue(not chk) - def test_IsZipValidFile(self): + def test_is_zip_valid_file(self): # This test checks that the is_zipfile function correctly identifies # a file that is a zip file @@ -689,7 +689,7 @@ chk = zipfile.is_zipfile(fp) self.assertTrue(chk) - def test_NonExistentFileRaisesIOError(self): + def test_non_existent_file_raises_IOError(self): # make sure we don't raise an AttributeError when a partially-constructed # ZipFile instance is finalized; this tests for regression on SF tracker # bug #403871. @@ -703,7 +703,7 @@ # quickly. self.assertRaises(IOError, zipfile.ZipFile, TESTFN) - def test_ClosedZipRaisesRuntimeError(self): + def test_closed_zip_raises_RuntimeError(self): # Verify that testzip() doesn't swallow inappropriate exceptions. data = StringIO() zipf = zipfile.ZipFile(data, mode="w") @@ -721,11 +721,11 @@ file(TESTFN, 'w').write('zipfile test data') self.assertRaises(RuntimeError, zipf.write, TESTFN) - def test_BadConstructorMode(self): + def test_bad_constructor_mode(self): # Check that bad modes passed to ZipFile constructor are caught self.assertRaises(RuntimeError, zipfile.ZipFile, TESTFN, "q") - def test_BadOpenMode(self): + def test_bad_open_mode(self): # Check that bad modes passed to ZipFile.open are caught zipf = zipfile.ZipFile(TESTFN, mode="w") zipf.writestr("foo.txt", "O, for a Muse of Fire!") @@ -736,7 +736,7 @@ self.assertRaises(RuntimeError, zipf.open, "foo.txt", "q") zipf.close() - def test_Read0(self): + def test_read0(self): # Check that calling read(0) on a ZipExtFile object returns an empty # string and doesn't advance file pointer zipf = zipfile.ZipFile(TESTFN, mode="w") @@ -749,30 +749,30 @@ self.assertEqual(f.read(), "O, for a Muse of Fire!") zipf.close() - def test_OpenNonexistentItem(self): + def test_open_non_existent_item(self): # Check that attempting to call open() for an item that doesn't # exist in the archive raises a RuntimeError zipf = zipfile.ZipFile(TESTFN, mode="w") self.assertRaises(KeyError, zipf.open, "foo.txt", "r") - def test_BadCompressionMode(self): + def test_bad_compression_mode(self): # Check that bad compression methods passed to ZipFile.open are caught self.assertRaises(RuntimeError, zipfile.ZipFile, TESTFN, "w", -1) - def test_NullByteInFilename(self): + def test_null_byte_in_filename(self): # Check that a filename containing a null byte is properly terminated zipf = zipfile.ZipFile(TESTFN, mode="w") zipf.writestr("foo.txt\x00qqq", "O, for a Muse of Fire!") self.assertEqual(zipf.namelist(), ['foo.txt']) - def test_StructSizes(self): + def test_struct_sizes(self): # check that ZIP internal structure sizes are calculated correctly self.assertEqual(zipfile.sizeEndCentDir, 22) self.assertEqual(zipfile.sizeCentralDir, 46) self.assertEqual(zipfile.sizeEndCentDir64, 56) self.assertEqual(zipfile.sizeEndCentDir64Locator, 20) - def test_Comments(self): + def test_comments(self): # This test checks that comments on the archive are handled properly # check default comment is empty @@ -860,19 +860,19 @@ self.zip2.close() os.unlink(TESTFN2) - def test_NoPassword(self): + def test_no_password(self): # Reading the encrypted file without password # must generate a RunTime exception self.assertRaises(RuntimeError, self.zip.read, "test.txt") self.assertRaises(RuntimeError, self.zip2.read, "zero") - def test_BadPassword(self): + def test_bad_password(self): self.zip.setpassword("perl") self.assertRaises(RuntimeError, self.zip.read, "test.txt") self.zip2.setpassword("perl") self.assertRaises(RuntimeError, self.zip2.read, "zero") - def test_GoodPassword(self): + def test_good_password(self): self.zip.setpassword("python") self.assertEquals(self.zip.read("test.txt"), self.plain) self.zip2.setpassword("12345") @@ -893,15 +893,15 @@ unlink(TESTFN) unlink(TESTFN2) - def makeTestArchive(self, f, compression): + def make_test_archive(self, f, compression): # Create the ZIP archive zipfp = zipfile.ZipFile(f, "w", compression) zipfp.write(TESTFN, "another"+os.extsep+"name") zipfp.write(TESTFN, TESTFN) zipfp.close() - def zipTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -911,12 +911,12 @@ self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data) zipfp.close() - def test_Stored(self): + def test_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipTest(f, zipfile.ZIP_STORED) + self.zip_test(f, zipfile.ZIP_STORED) - def zipOpenTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_open_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -945,12 +945,12 @@ self.assertEqual(testdata1, self.data) zipfp.close() - def test_OpenStored(self): + def test_open_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipOpenTest(f, zipfile.ZIP_STORED) + self.zip_open_test(f, zipfile.ZIP_STORED) - def zipRandomOpenTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_random_open_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -967,9 +967,9 @@ self.assertEqual(testdata, self.data) zipfp.close() - def test_RandomOpenStored(self): + def test_random_open_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.zipRandomOpenTest(f, zipfile.ZIP_STORED) + self.zip_random_open_test(f, zipfile.ZIP_STORED) class TestsWithMultipleOpens(unittest.TestCase): @@ -980,7 +980,7 @@ zipfp.writestr('twos', '2'*FIXEDTEST_SIZE) zipfp.close() - def test_SameFile(self): + def test_same_file(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -993,7 +993,7 @@ self.assertEqual(data1, data2) zipf.close() - def test_DifferentFile(self): + def test_different_file(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -1007,7 +1007,7 @@ self.assertEqual(data2, '2'*FIXEDTEST_SIZE) zipf.close() - def test_Interleaved(self): + def test_interleaved(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -1029,19 +1029,19 @@ def setUp(self): os.mkdir(TESTFN2) - def test_ExtractDir(self): + def test_extract_dir(self): zipf = zipfile.ZipFile(findfile("zipdir.zip")) zipf.extractall(TESTFN2) self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a"))) self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a", "b"))) self.assertTrue(os.path.exists(os.path.join(TESTFN2, "a", "b", "c"))) - def test_Bug6050(self): + def test_bug_6050(self): # Extraction should succeed if directories already exist os.mkdir(os.path.join(TESTFN2, "a")) - self.test_ExtractDir() + self.test_extract_dir() - def test_StoreDir(self): + def test_store_dir(self): os.mkdir(os.path.join(TESTFN2, "x")) zipf = zipfile.ZipFile(TESTFN, "w") zipf.write(os.path.join(TESTFN2, "x"), "x") @@ -1063,15 +1063,15 @@ self.arcfiles[s] = '%s-%d' % (TESTFN, n) open(self.arcfiles[s], "wb").write(self.arcdata[s]) - def makeTestArchive(self, f, compression): + def make_test_archive(self, f, compression): # Create the ZIP archive zipfp = zipfile.ZipFile(f, "w", compression) for fn in self.arcfiles.values(): zipfp.write(fn, fn) zipfp.close() - def readTest(self, f, compression): - self.makeTestArchive(f, compression) + def read_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -1081,8 +1081,8 @@ zipfp.close() - def readlineTest(self, f, compression): - self.makeTestArchive(f, compression) + def readline_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -1094,8 +1094,8 @@ zipfp.close() - def readlinesTest(self, f, compression): - self.makeTestArchive(f, compression) + def readlines_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -1106,8 +1106,8 @@ zipfp.close() - def iterlinesTest(self, f, compression): - self.makeTestArchive(f, compression) + def iterlines_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -1117,41 +1117,41 @@ zipfp.close() - def test_ReadStored(self): + def test_read_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readTest(f, zipfile.ZIP_STORED) + self.read_test(f, zipfile.ZIP_STORED) - def test_ReadlineStored(self): + def test_readline_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readlineTest(f, zipfile.ZIP_STORED) + self.readline_test(f, zipfile.ZIP_STORED) - def test_ReadlinesStored(self): + def test_readlines_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readlinesTest(f, zipfile.ZIP_STORED) + self.readlines_test(f, zipfile.ZIP_STORED) - def test_IterlinesStored(self): + def test_iterlines_stored(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.iterlinesTest(f, zipfile.ZIP_STORED) + self.iterlines_test(f, zipfile.ZIP_STORED) @skipUnless(zlib, "requires zlib") - def test_ReadDeflated(self): + def test_read_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readTest(f, zipfile.ZIP_DEFLATED) + self.read_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_ReadlineDeflated(self): + def test_readline_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readlineTest(f, zipfile.ZIP_DEFLATED) + self.readline_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_ReadlinesDeflated(self): + def test_readlines_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.readlinesTest(f, zipfile.ZIP_DEFLATED) + self.readlines_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_IterlinesDeflated(self): + def test_iterlines_deflated(self): for f in (TESTFN2, TemporaryFile(), StringIO()): - self.iterlinesTest(f, zipfile.ZIP_DEFLATED) + self.iterlines_test(f, zipfile.ZIP_DEFLATED) def tearDown(self): for sep, fn in self.arcfiles.items(): From python-checkins at python.org Wed Jul 15 19:17:17 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 15 Jul 2009 17:17:17 -0000 Subject: [Python-checkins] r74012 - python/branches/py3k/Lib/test/test_zipfile.py Message-ID: Author: ezio.melotti Date: Wed Jul 15 19:17:17 2009 New Revision: 74012 Log: Merged revisions 74011 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74011 | ezio.melotti | 2009-07-15 20:07:04 +0300 (Wed, 15 Jul 2009) | 1 line methods' names pep8ification ........ Modified: python/branches/py3k/Lib/test/test_zipfile.py Modified: python/branches/py3k/Lib/test/test_zipfile.py ============================================================================== --- python/branches/py3k/Lib/test/test_zipfile.py (original) +++ python/branches/py3k/Lib/test/test_zipfile.py Wed Jul 15 19:17:17 2009 @@ -40,7 +40,7 @@ fp.write(self.data) fp.close() - def makeTestArchive(self, f, compression): + def make_test_archive(self, f, compression): # Create the ZIP archive zipfp = zipfile.ZipFile(f, "w", compression) zipfp.write(TESTFN, "another.name") @@ -48,8 +48,8 @@ zipfp.writestr("strfile", self.data) zipfp.close() - def zipTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -100,12 +100,12 @@ zipfp.testzip() zipfp.close() - def test_Stored(self): + def test_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipTest(f, zipfile.ZIP_STORED) + self.zip_test(f, zipfile.ZIP_STORED) - def zipOpenTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_open_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -129,11 +129,11 @@ self.assertEqual(b''.join(zipdata2), self.data) zipfp.close() - def test_OpenStored(self): + def test_open_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipOpenTest(f, zipfile.ZIP_STORED) + self.zip_open_test(f, zipfile.ZIP_STORED) - def test_OpenViaZipInfo(self): + def test_open_via_zip_info(self): # Create the ZIP archive zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.writestr("name", "foo") @@ -152,8 +152,8 @@ self.assertTrue(data == b"foobar" or data == b"barfoo") zipfp.close() - def zipRandomOpenTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_random_open_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -168,12 +168,12 @@ self.assertEqual(b''.join(zipdata1), self.data) zipfp.close() - def test_RandomOpenStored(self): + def test_random_open_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipRandomOpenTest(f, zipfile.ZIP_STORED) + self.zip_random_open_test(f, zipfile.ZIP_STORED) - def zipReadlineTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_readline_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -184,8 +184,8 @@ zipfp.close() - def zipReadlinesTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_readlines_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -195,8 +195,8 @@ zipfp.close() - def zipIterlinesTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_iterlines_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -205,51 +205,51 @@ zipfp.close() - def test_ReadlineStored(self): + def test_readline_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipReadlineTest(f, zipfile.ZIP_STORED) + self.zip_readline_test(f, zipfile.ZIP_STORED) - def test_ReadlinesStored(self): + def test_readlines_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipReadlinesTest(f, zipfile.ZIP_STORED) + self.zip_readlines_test(f, zipfile.ZIP_STORED) - def test_IterlinesStored(self): + def test_iterlines_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipIterlinesTest(f, zipfile.ZIP_STORED) + self.zip_iterlines_test(f, zipfile.ZIP_STORED) @skipUnless(zlib, "requires zlib") - def test_Deflated(self): + def test_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipTest(f, zipfile.ZIP_DEFLATED) + self.zip_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_OpenDeflated(self): + def test_open_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipOpenTest(f, zipfile.ZIP_DEFLATED) + self.zip_open_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_RandomOpenDeflated(self): + def test_random_open_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipRandomOpenTest(f, zipfile.ZIP_DEFLATED) + self.zip_random_open_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_ReadlineDeflated(self): + def test_readline_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipReadlineTest(f, zipfile.ZIP_DEFLATED) + self.zip_readline_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_ReadlinesDeflated(self): + def test_readlines_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipReadlinesTest(f, zipfile.ZIP_DEFLATED) + self.zip_readlines_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_IterlinesDeflated(self): + def test_iterlines_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipIterlinesTest(f, zipfile.ZIP_DEFLATED) + self.zip_iterlines_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_LowCompression(self): + def test_low_compression(self): # Checks for cases where compressed data is larger than original # Create the ZIP archive zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) @@ -262,7 +262,7 @@ self.assertEqual(openobj.read(1), b'1') self.assertEqual(openobj.read(1), b'2') - def test_AbsoluteArcnames(self): + def test_absolute_arcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.write(TESTFN, "/absolute") zipfp.close() @@ -271,7 +271,7 @@ self.assertEqual(zipfp.namelist(), ["absolute"]) zipfp.close() - def test_AppendToZipFile(self): + def test_append_to_zip_file(self): # Test appending to an existing zipfile zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) zipfp.write(TESTFN, TESTFN) @@ -281,7 +281,7 @@ self.assertEqual(zipfp.namelist(), [TESTFN, "strfile"]) zipfp.close() - def test_AppendToNonZipFile(self): + def test_append_to_non_zip_file(self): # Test appending to an existing file that is not a zipfile # NOTE: this test fails if len(d) < 22 because of the first # line "fpin.seek(-22, 2)" in _EndRecData @@ -300,14 +300,14 @@ zipfp.close() f.close() - def test_WriteDefaultName(self): + def test_write_default_name(self): # Check that calling ZipFile.write without arcname specified produces the expected result zipfp = zipfile.ZipFile(TESTFN2, "w") zipfp.write(TESTFN) self.assertEqual(zipfp.read(TESTFN), open(TESTFN, "rb").read()) zipfp.close() - def test_PerFileCompression(self): + def test_per_file_compression(self): # Check that files within a Zip archive can have different compression options zipfp = zipfile.ZipFile(TESTFN2, "w") zipfp.write(TESTFN, 'storeme', zipfile.ZIP_STORED) @@ -318,7 +318,7 @@ self.assertEqual(dinfo.compress_type, zipfile.ZIP_DEFLATED) zipfp.close() - def test_WriteToReadonly(self): + def test_write_to_readonly(self): # Check that trying to call write() on a readonly ZipFile object # raises a RuntimeError zipf = zipfile.ZipFile(TESTFN2, mode="w") @@ -328,7 +328,7 @@ self.assertRaises(RuntimeError, zipf.write, TESTFN) zipf.close() - def test_Extract(self): + def test_extract(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata) @@ -357,7 +357,7 @@ # remove the test file subdirectories shutil.rmtree(os.path.join(os.getcwd(), 'ziptest2dir')) - def test_ExtractAll(self): + def test_extract_all(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) for fpath, fdata in SMALL_TEST_DATA: zipfp.writestr(fpath, fdata) @@ -384,12 +384,12 @@ # Make sure that writestr creates files with mode 0600, # when it is passed a name rather than a ZipInfo instance. - self.makeTestArchive(f, compression) + self.make_test_archive(f, compression) zipfp = zipfile.ZipFile(f, "r") zinfo = zipfp.getinfo('strfile') self.assertEqual(zinfo.external_attr, 0o600 << 16) - def test_WritestrPermissions(self): + def test_writestr_permissions(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED) @@ -423,24 +423,24 @@ fp.write(self.data) fp.close() - def largeFileExceptionTest(self, f, compression): + def large_file_exception_test(self, f, compression): zipfp = zipfile.ZipFile(f, "w", compression) self.assertRaises(zipfile.LargeZipFile, zipfp.write, TESTFN, "another.name") zipfp.close() - def largeFileExceptionTest2(self, f, compression): + def large_file_exception_test2(self, f, compression): zipfp = zipfile.ZipFile(f, "w", compression) self.assertRaises(zipfile.LargeZipFile, zipfp.writestr, "another.name", self.data) zipfp.close() - def test_LargeFileException(self): + def test_large_file_exception(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.largeFileExceptionTest(f, zipfile.ZIP_STORED) - self.largeFileExceptionTest2(f, zipfile.ZIP_STORED) + self.large_file_exception_test(f, zipfile.ZIP_STORED) + self.large_file_exception_test2(f, zipfile.ZIP_STORED) - def zipTest(self, f, compression): + def zip_test(self, f, compression): # Create the ZIP archive zipfp = zipfile.ZipFile(f, "w", compression, allowZip64=True) zipfp.write(TESTFN, "another.name") @@ -499,16 +499,16 @@ zipfp.close() - def test_Stored(self): + def test_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipTest(f, zipfile.ZIP_STORED) + self.zip_test(f, zipfile.ZIP_STORED) @skipUnless(zlib, "requires zlib") - def test_Deflated(self): + def test_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipTest(f, zipfile.ZIP_DEFLATED) + self.zip_test(f, zipfile.ZIP_DEFLATED) - def test_AbsoluteArcnames(self): + def test_absolute_arcnames(self): zipfp = zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED, allowZip64=True) zipfp.write(TESTFN, "/absolute") zipfp.close() @@ -524,7 +524,7 @@ class PyZipFileTests(unittest.TestCase): - def test_WritePyfile(self): + def test_write_pyfile(self): zipfp = zipfile.PyZipFile(TemporaryFile(), "w") fn = __file__ if fn.endswith('.pyc') or fn.endswith('.pyo'): @@ -549,7 +549,7 @@ self.assertTrue(bn + 'o' in zipfp.namelist() or bn + 'c' in zipfp.namelist()) zipfp.close() - def test_WritePythonPackage(self): + def test_write_python_package(self): import email packagedir = os.path.dirname(email.__file__) @@ -561,7 +561,7 @@ self.assertTrue('email/__init__.pyo' in names or 'email/__init__.pyc' in names) self.assertTrue('email/mime/text.pyo' in names or 'email/mime/text.pyc' in names) - def test_WritePythonDirectory(self): + def test_write_python_directory(self): os.mkdir(TESTFN2) try: fp = open(os.path.join(TESTFN2, "mod1.py"), "w") @@ -587,7 +587,7 @@ finally: shutil.rmtree(TESTFN2) - def test_WriteNonPyfile(self): + def test_write_non_pyfile(self): zipfp = zipfile.PyZipFile(TemporaryFile(), "w") open(TESTFN, 'w').write('most definitely not a python file') self.assertRaises(RuntimeError, zipfp.writepy, TESTFN) @@ -595,7 +595,7 @@ class OtherTests(unittest.TestCase): - def test_UnicodeFilenames(self): + def test_unicode_filenames(self): zf = zipfile.ZipFile(TESTFN, "w") zf.writestr("foo.txt", "Test for unicode filename") zf.writestr("\xf6.txt", "Test for unicode filename") @@ -605,7 +605,7 @@ self.assertEqual(zf.filelist[1].filename, "\xf6.txt") zf.close() - def test_CreateNonExistentFileForAppend(self): + def test_create_non_existent_file_for_append(self): if os.path.exists(TESTFN): os.unlink(TESTFN) @@ -625,7 +625,7 @@ self.assertEqual(zf.read(filename), content) zf.close() - def test_CloseErroneousFile(self): + def test_close_erroneous_file(self): # This test checks that the ZipFile constructor closes the file object # it opens if there's an error in the file. If it doesn't, the traceback # holds a reference to the ZipFile object and, indirectly, the file object. @@ -640,7 +640,7 @@ except zipfile.BadZipfile: pass - def test_IsZipErroneousFile(self): + def test_is_zip_erroneous_file(self): # This test checks that the is_zipfile function correctly identifies # a file that is not a zip file @@ -662,7 +662,7 @@ chk = zipfile.is_zipfile(fp) self.assertTrue(not chk) - def test_IsZipValidFile(self): + def test_is_zip_valid_file(self): # This test checks that the is_zipfile function correctly identifies # a file that is a zip file @@ -687,7 +687,7 @@ chk = zipfile.is_zipfile(fp) self.assertTrue(chk) - def test_NonExistentFileRaisesIOError(self): + def test_non_existent_file_raises_IOError(self): # make sure we don't raise an AttributeError when a partially-constructed # ZipFile instance is finalized; this tests for regression on SF tracker # bug #403871. @@ -701,7 +701,7 @@ # quickly. self.assertRaises(IOError, zipfile.ZipFile, TESTFN) - def test_ClosedZipRaisesRuntimeError(self): + def test_closed_zip_raises_RuntimeError(self): # Verify that testzip() doesn't swallow inappropriate exceptions. data = io.BytesIO() zipf = zipfile.ZipFile(data, mode="w") @@ -719,11 +719,11 @@ open(TESTFN, 'w').write('zipfile test data') self.assertRaises(RuntimeError, zipf.write, TESTFN) - def test_BadConstructorMode(self): + def test_bad_constructor_mode(self): # Check that bad modes passed to ZipFile constructor are caught self.assertRaises(RuntimeError, zipfile.ZipFile, TESTFN, "q") - def test_BadOpenMode(self): + def test_bad_open_mode(self): # Check that bad modes passed to ZipFile.open are caught zipf = zipfile.ZipFile(TESTFN, mode="w") zipf.writestr("foo.txt", "O, for a Muse of Fire!") @@ -734,7 +734,7 @@ self.assertRaises(RuntimeError, zipf.open, "foo.txt", "q") zipf.close() - def test_Read0(self): + def test_read0(self): # Check that calling read(0) on a ZipExtFile object returns an empty # string and doesn't advance file pointer zipf = zipfile.ZipFile(TESTFN, mode="w") @@ -747,30 +747,30 @@ self.assertEqual(f.read(), b"O, for a Muse of Fire!") zipf.close() - def test_OpenNonexistentItem(self): + def test_open_non_existent_item(self): # Check that attempting to call open() for an item that doesn't # exist in the archive raises a RuntimeError zipf = zipfile.ZipFile(TESTFN, mode="w") self.assertRaises(KeyError, zipf.open, "foo.txt", "r") - def test_BadCompressionMode(self): + def test_bad_compression_mode(self): # Check that bad compression methods passed to ZipFile.open are caught self.assertRaises(RuntimeError, zipfile.ZipFile, TESTFN, "w", -1) - def test_NullByteInFilename(self): + def test_null_byte_in_filename(self): # Check that a filename containing a null byte is properly terminated zipf = zipfile.ZipFile(TESTFN, mode="w") zipf.writestr("foo.txt\x00qqq", b"O, for a Muse of Fire!") self.assertEqual(zipf.namelist(), ['foo.txt']) - def test_StructSizes(self): + def test_struct_sizes(self): # check that ZIP internal structure sizes are calculated correctly self.assertEqual(zipfile.sizeEndCentDir, 22) self.assertEqual(zipfile.sizeCentralDir, 46) self.assertEqual(zipfile.sizeEndCentDir64, 56) self.assertEqual(zipfile.sizeEndCentDir64Locator, 20) - def test_Comments(self): + def test_comments(self): # This test checks that comments on the archive are handled properly # check default comment is empty @@ -859,19 +859,19 @@ self.zip2.close() os.unlink(TESTFN2) - def test_NoPassword(self): + def test_no_password(self): # Reading the encrypted file without password # must generate a RunTime exception self.assertRaises(RuntimeError, self.zip.read, "test.txt") self.assertRaises(RuntimeError, self.zip2.read, "zero") - def test_BadPassword(self): + def test_bad_password(self): self.zip.setpassword(b"perl") self.assertRaises(RuntimeError, self.zip.read, "test.txt") self.zip2.setpassword(b"perl") self.assertRaises(RuntimeError, self.zip2.read, "zero") - def test_GoodPassword(self): + def test_good_password(self): self.zip.setpassword(b"python") self.assertEquals(self.zip.read("test.txt"), self.plain) self.zip2.setpassword(b"12345") @@ -893,15 +893,15 @@ unlink(TESTFN) unlink(TESTFN2) - def makeTestArchive(self, f, compression): + def make_test_archive(self, f, compression): # Create the ZIP archive zipfp = zipfile.ZipFile(f, "w", compression) zipfp.write(TESTFN, "another.name") zipfp.write(TESTFN, TESTFN) zipfp.close() - def zipTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -911,12 +911,12 @@ self.assertEqual(zipfp.read("another.name"), self.data) zipfp.close() - def test_Stored(self): + def test_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipTest(f, zipfile.ZIP_STORED) + self.zip_test(f, zipfile.ZIP_STORED) - def zipOpenTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_open_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -945,12 +945,12 @@ self.assertEqual(testdata1, self.data) zipfp.close() - def test_OpenStored(self): + def test_open_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipOpenTest(f, zipfile.ZIP_STORED) + self.zip_open_test(f, zipfile.ZIP_STORED) - def zipRandomOpenTest(self, f, compression): - self.makeTestArchive(f, compression) + def zip_random_open_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r", compression) @@ -967,9 +967,9 @@ self.assertEqual(testdata, self.data) zipfp.close() - def test_RandomOpenStored(self): + def test_random_open_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.zipRandomOpenTest(f, zipfile.ZIP_STORED) + self.zip_random_open_test(f, zipfile.ZIP_STORED) class TestsWithMultipleOpens(unittest.TestCase): @@ -980,7 +980,7 @@ zipfp.writestr('twos', '2'*FIXEDTEST_SIZE) zipfp.close() - def test_SameFile(self): + def test_same_file(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -993,7 +993,7 @@ self.assertEqual(data1, data2) zipf.close() - def test_DifferentFile(self): + def test_different_file(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -1007,7 +1007,7 @@ self.assertEqual(data2, b'2'*FIXEDTEST_SIZE) zipf.close() - def test_Interleaved(self): + def test_interleaved(self): # Verify that (when the ZipFile is in control of creating file objects) # multiple open() calls can be made without interfering with each other. zipf = zipfile.ZipFile(TESTFN2, mode="r") @@ -1029,19 +1029,19 @@ def setUp(self): os.mkdir(TESTFN2) - def test_ExtractDir(self): + def test_extract_dir(self): zipf = zipfile.ZipFile(findfile("zipdir.zip")) zipf.extractall(TESTFN2) self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a"))) self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a", "b"))) self.assertTrue(os.path.exists(os.path.join(TESTFN2, "a", "b", "c"))) - def test_Bug6050(self): + def test_bug_6050(self): # Extraction should succeed if directories already exist os.mkdir(os.path.join(TESTFN2, "a")) - self.test_ExtractDir() + self.test_extract_dir() - def test_StoreDir(self): + def test_store_dir(self): os.mkdir(os.path.join(TESTFN2, "x")) zipf = zipfile.ZipFile(TESTFN, "w") zipf.write(os.path.join(TESTFN2, "x"), "x") @@ -1069,15 +1069,15 @@ finally: f.close() - def makeTestArchive(self, f, compression): + def make_test_archive(self, f, compression): # Create the ZIP archive zipfp = zipfile.ZipFile(f, "w", compression) for fn in self.arcfiles.values(): zipfp.write(fn, fn) zipfp.close() - def readTest(self, f, compression): - self.makeTestArchive(f, compression) + def read_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -1087,8 +1087,8 @@ zipfp.close() - def readlineTest(self, f, compression): - self.makeTestArchive(f, compression) + def readline_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -1100,8 +1100,8 @@ zipfp.close() - def readlinesTest(self, f, compression): - self.makeTestArchive(f, compression) + def readlines_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -1112,8 +1112,8 @@ zipfp.close() - def iterlinesTest(self, f, compression): - self.makeTestArchive(f, compression) + def iterlines_test(self, f, compression): + self.make_test_archive(f, compression) # Read the ZIP archive zipfp = zipfile.ZipFile(f, "r") @@ -1123,41 +1123,41 @@ zipfp.close() - def test_ReadStored(self): + def test_read_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readTest(f, zipfile.ZIP_STORED) + self.read_test(f, zipfile.ZIP_STORED) - def test_ReadlineStored(self): + def test_readline_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readlineTest(f, zipfile.ZIP_STORED) + self.readline_test(f, zipfile.ZIP_STORED) - def test_ReadlinesStored(self): + def test_readlines_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readlinesTest(f, zipfile.ZIP_STORED) + self.readlines_test(f, zipfile.ZIP_STORED) - def test_IterlinesStored(self): + def test_iterlines_stored(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.iterlinesTest(f, zipfile.ZIP_STORED) + self.iterlines_test(f, zipfile.ZIP_STORED) @skipUnless(zlib, "requires zlib") - def test_ReadDeflated(self): + def test_read_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readTest(f, zipfile.ZIP_DEFLATED) + self.read_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_ReadlineDeflated(self): + def test_readline_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readlineTest(f, zipfile.ZIP_DEFLATED) + self.readline_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_ReadlinesDeflated(self): + def test_readlines_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.readlinesTest(f, zipfile.ZIP_DEFLATED) + self.readlines_test(f, zipfile.ZIP_DEFLATED) @skipUnless(zlib, "requires zlib") - def test_IterlinesDeflated(self): + def test_iterlines_deflated(self): for f in (TESTFN2, TemporaryFile(), io.BytesIO()): - self.iterlinesTest(f, zipfile.ZIP_DEFLATED) + self.iterlines_test(f, zipfile.ZIP_DEFLATED) def tearDown(self): for sep, fn in self.arcfiles.items(): From python-checkins at python.org Wed Jul 15 19:49:24 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 15 Jul 2009 17:49:24 -0000 Subject: [Python-checkins] r74013 - in python/branches/py3k: Lib/test/test_array.py Misc/NEWS Modules/arraymodule.c Message-ID: Author: alexandre.vassalotti Date: Wed Jul 15 19:49:23 2009 New Revision: 74013 Log: Issue #2389: Implement a portable mechanism for pickling array objects. Reviewed by: Martin v. L?wis Modified: python/branches/py3k/Lib/test/test_array.py python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/arraymodule.c Modified: python/branches/py3k/Lib/test/test_array.py ============================================================================== --- python/branches/py3k/Lib/test/test_array.py (original) +++ python/branches/py3k/Lib/test/test_array.py Wed Jul 15 19:49:23 2009 @@ -5,10 +5,16 @@ import unittest from test import support -from weakref import proxy -import array, io, math -from pickle import loads, dumps, HIGHEST_PROTOCOL +import weakref +import pickle import operator +import io +import math +import struct + +import array +from array import _array_reconstructor as array_reconstructor + class ArraySubclass(array.array): pass @@ -30,6 +36,123 @@ tests.append(BadConstructorTest) +# Machine format codes. +# +# Search for "enum machine_format_code" in Modules/arraymodule.c to get the +# authoritative values. +UNKNOWN_FORMAT = -1 +UNSIGNED_INT8 = 0 +SIGNED_INT8 = 1 +UNSIGNED_INT16_LE = 2 +UNSIGNED_INT16_BE = 3 +SIGNED_INT16_LE = 4 +SIGNED_INT16_BE = 5 +UNSIGNED_INT32_LE = 6 +UNSIGNED_INT32_BE = 7 +SIGNED_INT32_LE = 8 +SIGNED_INT32_BE = 9 +UNSIGNED_INT64_LE = 10 +UNSIGNED_INT64_BE = 11 +SIGNED_INT64_LE = 12 +SIGNED_INT64_BE = 13 +IEEE_754_FLOAT_LE = 14 +IEEE_754_FLOAT_BE = 15 +IEEE_754_DOUBLE_LE = 16 +IEEE_754_DOUBLE_BE = 17 +UTF16_LE = 18 +UTF16_BE = 19 +UTF32_LE = 20 +UTF32_BE = 21 + +class ArrayReconstructorTest(unittest.TestCase): + + def test_error(self): + self.assertRaises(TypeError, array_reconstructor, + "", "b", 0, b"") + self.assertRaises(TypeError, array_reconstructor, + str, "b", 0, b"") + self.assertRaises(TypeError, array_reconstructor, + array.array, "b", '', b"") + self.assertRaises(TypeError, array_reconstructor, + array.array, "b", 0, "") + self.assertRaises(ValueError, array_reconstructor, + array.array, "?", 0, b"") + self.assertRaises(ValueError, array_reconstructor, + array.array, "b", UNKNOWN_FORMAT, b"") + self.assertRaises(ValueError, array_reconstructor, + array.array, "b", 22, b"") + self.assertRaises(ValueError, array_reconstructor, + array.array, "d", 16, b"a") + + def test_numbers(self): + testcases = ( + (['B', 'H', 'I', 'L'], UNSIGNED_INT8, '=BBBB', + [0x80, 0x7f, 0, 0xff]), + (['b', 'h', 'i', 'l'], SIGNED_INT8, '=bbb', + [-0x80, 0x7f, 0]), + (['H', 'I', 'L'], UNSIGNED_INT16_LE, 'HHHH', + [0x8000, 0x7fff, 0, 0xffff]), + (['h', 'i', 'l'], SIGNED_INT16_LE, 'hhh', + [-0x8000, 0x7fff, 0]), + (['I', 'L'], UNSIGNED_INT32_LE, 'IIII', + [1<<31, (1<<31)-1, 0, (1<<32)-1]), + (['i', 'l'], SIGNED_INT32_LE, 'iii', + [-1<<31, (1<<31)-1, 0]), + (['L'], UNSIGNED_INT64_LE, 'QQQQ', + [1<<63, (1<<63)-1, 0, (1<<64)-1]), + (['l'], SIGNED_INT64_LE, 'qqq', + [-1<<63, (1<<63)-1, 0]), + (['f'], IEEE_754_FLOAT_LE, 'ffff', + [16711938.0, float('inf'), float('-inf'), -0.0]), + (['d'], IEEE_754_DOUBLE_LE, 'dddd', + [9006104071832581.0, float('inf'), float('-inf'), -0.0]) + ) + for testcase in testcases: + valid_typecodes, mformat_code, struct_fmt, values = testcase + arraystr = struct.pack(struct_fmt, *values) + for typecode in valid_typecodes: + a = array.array(typecode, values) + b = array_reconstructor( + array.array, typecode, mformat_code, arraystr) + self.assertEqual(a, b, + msg="{0!r} != {1!r}; testcase={2!r}".format(a, b, testcase)) + + def test_unicode(self): + teststr = "Bonne Journ\xe9e \U0002030a\U00020347" + testcases = ( + (UTF16_LE, "UTF-16-LE"), + (UTF16_BE, "UTF-16-BE"), + (UTF32_LE, "UTF-32-LE"), + (UTF32_BE, "UTF-32-BE") + ) + for testcase in testcases: + mformat_code, encoding = testcase + a = array.array('u', teststr) + b = array_reconstructor( + array.array, 'u', mformat_code, teststr.encode(encoding)) + self.assertEqual(a, b, + msg="{0!r} != {1!r}; testcase={2!r}".format(a, b, testcase)) + + +tests.append(ArrayReconstructorTest) + + class BaseTest(unittest.TestCase): # Required class attributes (provided by subclasses # typecode: the typecode to test @@ -97,31 +220,38 @@ self.assertNotEqual(id(a), id(b)) self.assertEqual(a, b) + def test_reduce_ex(self): + a = array.array(self.typecode, self.example) + for protocol in range(3): + self.assert_(a.__reduce_ex__(protocol)[0] is array.array) + for protocol in range(3, pickle.HIGHEST_PROTOCOL): + self.assert_(a.__reduce_ex__(protocol)[0] is array_reconstructor) + def test_pickle(self): - for protocol in range(HIGHEST_PROTOCOL + 1): + for protocol in range(pickle.HIGHEST_PROTOCOL + 1): a = array.array(self.typecode, self.example) - b = loads(dumps(a, protocol)) + b = pickle.loads(pickle.dumps(a, protocol)) self.assertNotEqual(id(a), id(b)) self.assertEqual(a, b) a = ArraySubclass(self.typecode, self.example) a.x = 10 - b = loads(dumps(a, protocol)) + b = pickle.loads(pickle.dumps(a, protocol)) self.assertNotEqual(id(a), id(b)) self.assertEqual(a, b) self.assertEqual(a.x, b.x) self.assertEqual(type(a), type(b)) def test_pickle_for_empty_array(self): - for protocol in range(HIGHEST_PROTOCOL + 1): + for protocol in range(pickle.HIGHEST_PROTOCOL + 1): a = array.array(self.typecode) - b = loads(dumps(a, protocol)) + b = pickle.loads(pickle.dumps(a, protocol)) self.assertNotEqual(id(a), id(b)) self.assertEqual(a, b) a = ArraySubclass(self.typecode) a.x = 10 - b = loads(dumps(a, protocol)) + b = pickle.loads(pickle.dumps(a, protocol)) self.assertNotEqual(id(a), id(b)) self.assertEqual(a, b) self.assertEqual(a.x, b.x) @@ -757,7 +887,7 @@ def test_weakref(self): s = array.array(self.typecode, self.example) - p = proxy(s) + p = weakref.proxy(s) self.assertEqual(p.tostring(), s.tostring()) s = None self.assertRaises(ReferenceError, len, p) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 15 19:49:23 2009 @@ -61,10 +61,12 @@ Extension Modules ----------------- -- Issue #4509: array.array objects are no longer modified after an operation +- Issue #4509: Array objects are no longer modified after an operation failing due to the resize restriction in-place when the object has exported buffers. +- Issue #2389: Array objects are now pickled in a portable manner. + Build ----- Modified: python/branches/py3k/Modules/arraymodule.c ============================================================================== --- python/branches/py3k/Modules/arraymodule.c (original) +++ python/branches/py3k/Modules/arraymodule.c Wed Jul 15 19:49:23 2009 @@ -27,6 +27,8 @@ PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); char *formats; + int is_integer_type; + int is_signed; }; typedef struct arrayobject { @@ -389,20 +391,24 @@ } -/* Description of types */ +/* Description of types. + * + * Don't forget to update typecode_to_mformat_code() if you add a new + * typecode. + */ static struct arraydescr descriptors[] = { - {'b', 1, b_getitem, b_setitem, "b"}, - {'B', 1, BB_getitem, BB_setitem, "B"}, - {'u', sizeof(Py_UNICODE), u_getitem, u_setitem, "u"}, - {'h', sizeof(short), h_getitem, h_setitem, "h"}, - {'H', sizeof(short), HH_getitem, HH_setitem, "H"}, - {'i', sizeof(int), i_getitem, i_setitem, "i"}, - {'I', sizeof(int), II_getitem, II_setitem, "I"}, - {'l', sizeof(long), l_getitem, l_setitem, "l"}, - {'L', sizeof(long), LL_getitem, LL_setitem, "L"}, - {'f', sizeof(float), f_getitem, f_setitem, "f"}, - {'d', sizeof(double), d_getitem, d_setitem, "d"}, - {'\0', 0, 0, 0, 0} /* Sentinel */ + {'b', 1, b_getitem, b_setitem, "b", 1, 1}, + {'B', 1, BB_getitem, BB_setitem, "B", 1, 0}, + {'u', sizeof(Py_UNICODE), u_getitem, u_setitem, "u", 0, 0}, + {'h', sizeof(short), h_getitem, h_setitem, "h", 1, 1}, + {'H', sizeof(short), HH_getitem, HH_setitem, "H", 1, 0}, + {'i', sizeof(int), i_getitem, i_setitem, "i", 1, 1}, + {'I', sizeof(int), II_getitem, II_setitem, "I", 1, 0}, + {'l', sizeof(long), l_getitem, l_setitem, "l", 1, 1}, + {'L', sizeof(long), LL_getitem, LL_setitem, "L", 1, 0}, + {'f', sizeof(float), f_getitem, f_setitem, "f", 0, 0}, + {'d', sizeof(double), d_getitem, d_setitem, "d", 0, 0}, + {'\0', 0, 0, 0, 0, 0, 0} /* Sentinel */ }; /**************************************************************************** @@ -1136,40 +1142,6 @@ 4, or 8 bytes in size, RuntimeError is raised."); static PyObject * -array_reduce(arrayobject *array) -{ - PyObject *dict, *result; - - dict = PyObject_GetAttrString((PyObject *)array, "__dict__"); - if (dict == NULL) { - PyErr_Clear(); - dict = Py_None; - Py_INCREF(dict); - } - if (Py_SIZE(array) > 0) { - if (array->ob_descr->itemsize - > PY_SSIZE_T_MAX / Py_SIZE(array)) { - return PyErr_NoMemory(); - } - result = Py_BuildValue("O(Cy#)O", - Py_TYPE(array), - array->ob_descr->typecode, - array->ob_item, - Py_SIZE(array) * array->ob_descr->itemsize, - dict); - } else { - result = Py_BuildValue("O(C)O", - Py_TYPE(array), - array->ob_descr->typecode, - dict); - } - Py_DECREF(dict); - return result; -} - -PyDoc_STRVAR(array_doc, "Return state information for pickling."); - -static PyObject * array_reverse(arrayobject *self, PyObject *unused) { register Py_ssize_t itemsize = self->ob_descr->itemsize; @@ -1475,6 +1447,498 @@ +/*********************** Pickling support ************************/ + +enum machine_format_code { + UNKNOWN_FORMAT = -1, + /* UNKNOWN_FORMAT is used to indicate that the machine format for an + * array type code cannot be interpreted. When this occurs, a list of + * Python objects is used to represent the content of the array + * instead of using the memory content of the array directly. In that + * case, the array_reconstructor mechanism is bypassed completely, and + * the standard array constructor is used instead. + * + * This is will most likely occur when the machine doesn't use IEEE + * floating-point numbers. + */ + + UNSIGNED_INT8 = 0, + SIGNED_INT8 = 1, + UNSIGNED_INT16_LE = 2, + UNSIGNED_INT16_BE = 3, + SIGNED_INT16_LE = 4, + SIGNED_INT16_BE = 5, + UNSIGNED_INT32_LE = 6, + UNSIGNED_INT32_BE = 7, + SIGNED_INT32_LE = 8, + SIGNED_INT32_BE = 9, + UNSIGNED_INT64_LE = 10, + UNSIGNED_INT64_BE = 11, + SIGNED_INT64_LE = 12, + SIGNED_INT64_BE = 13, + IEEE_754_FLOAT_LE = 14, + IEEE_754_FLOAT_BE = 15, + IEEE_754_DOUBLE_LE = 16, + IEEE_754_DOUBLE_BE = 17, + UTF16_LE = 18, + UTF16_BE = 19, + UTF32_LE = 20, + UTF32_BE = 21 +}; +#define MACHINE_FORMAT_CODE_MIN 0 +#define MACHINE_FORMAT_CODE_MAX 21 + +static const struct mformatdescr { + size_t size; + int is_signed; + int is_big_endian; +} mformat_descriptors[] = { + {1, 0, 0}, /* 0: UNSIGNED_INT8 */ + {1, 1, 0}, /* 1: SIGNED_INT8 */ + {2, 0, 0}, /* 2: UNSIGNED_INT16_LE */ + {2, 0, 1}, /* 3: UNSIGNED_INT16_BE */ + {2, 1, 0}, /* 4: SIGNED_INT16_LE */ + {2, 1, 1}, /* 5: SIGNED_INT16_BE */ + {4, 0, 0}, /* 6: UNSIGNED_INT32_LE */ + {4, 0, 1}, /* 7: UNSIGNED_INT32_BE */ + {4, 1, 0}, /* 8: SIGNED_INT32_LE */ + {4, 1, 1}, /* 9: SIGNED_INT32_BE */ + {8, 0, 0}, /* 10: UNSIGNED_INT64_LE */ + {8, 0, 1}, /* 11: UNSIGNED_INT64_BE */ + {8, 1, 0}, /* 12: SIGNED_INT64_LE */ + {8, 1, 1}, /* 13: SIGNED_INT64_BE */ + {4, 0, 0}, /* 14: IEEE_754_FLOAT_LE */ + {4, 0, 1}, /* 15: IEEE_754_FLOAT_BE */ + {8, 0, 0}, /* 16: IEEE_754_DOUBLE_LE */ + {8, 0, 1}, /* 17: IEEE_754_DOUBLE_BE */ + {4, 0, 0}, /* 18: UTF16_LE */ + {4, 0, 1}, /* 19: UTF16_BE */ + {8, 0, 0}, /* 20: UTF32_LE */ + {8, 0, 1} /* 21: UTF32_BE */ +}; + + +/* + * Internal: This function is used to find the machine format of a given + * array type code. This returns UNKNOWN_FORMAT when the machine format cannot + * be found. + */ +static enum machine_format_code +typecode_to_mformat_code(int typecode) +{ +#ifdef BYTEORDER_IS_BIG_ENDIAN + const int is_big_endian = 1; +#else + const int is_big_endian = 0; +#endif + size_t intsize; + int is_signed; + + switch (typecode) { + case 'b': + return SIGNED_INT8; + case 'B': + return UNSIGNED_INT8; + + case 'u': + if (sizeof(Py_UNICODE) == 2) { + return UTF16_LE + is_big_endian; + } + if (sizeof(Py_UNICODE) == 4) { + return UTF32_LE + is_big_endian; + } + return UNKNOWN_FORMAT; + + case 'f': + if (sizeof(float) == 4) { + const float y = 16711938.0; + if (memcmp(&y, "\x4b\x7f\x01\x02", 4) == 0) + return IEEE_754_FLOAT_BE; + if (memcmp(&y, "\x02\x01\x7f\x4b", 4) == 0) + return IEEE_754_FLOAT_LE; + } + return UNKNOWN_FORMAT; + + case 'd': + if (sizeof(double) == 8) { + const double x = 9006104071832581.0; + if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0) + return IEEE_754_DOUBLE_BE; + if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0) + return IEEE_754_DOUBLE_LE; + } + return UNKNOWN_FORMAT; + + /* Integers */ + case 'h': + intsize = sizeof(short); + is_signed = 1; + break; + case 'H': + intsize = sizeof(short); + is_signed = 0; + break; + case 'i': + intsize = sizeof(int); + is_signed = 1; + break; + case 'I': + intsize = sizeof(int); + is_signed = 0; + break; + case 'l': + intsize = sizeof(long); + is_signed = 1; + break; + case 'L': + intsize = sizeof(long); + is_signed = 0; + break; + default: + return UNKNOWN_FORMAT; + } + switch (intsize) { + case 2: + return UNSIGNED_INT16_LE + is_big_endian + (2 * is_signed); + case 4: + return UNSIGNED_INT32_LE + is_big_endian + (2 * is_signed); + case 8: + return UNSIGNED_INT64_LE + is_big_endian + (2 * is_signed); + default: + return UNKNOWN_FORMAT; + } +} + +/* Forward declaration. */ +static PyObject *array_new(PyTypeObject *type, PyObject *args, PyObject *kwds); + +/* + * Internal: This function wraps the array constructor--i.e., array_new()--to + * allow the creation of array objects from C code without having to deal + * directly the tuple argument of array_new(). The typecode argument is a + * Unicode character value, like 'i' or 'f' for example, representing an array + * type code. The items argument is a bytes or a list object from which + * contains the initial value of the array. + * + * On success, this functions returns the array object created. Otherwise, + * NULL is returned to indicate a failure. + */ +static PyObject * +make_array(PyTypeObject *arraytype, int typecode, PyObject *items) +{ + PyObject *new_args; + PyObject *array_obj; + PyObject *typecode_obj; + Py_UNICODE typecode_str[1] = {typecode}; + + assert(arraytype != NULL); + assert(items != NULL); + + typecode_obj = PyUnicode_FromUnicode(typecode_str, 1); + if (typecode_obj == NULL) + return NULL; + + new_args = PyTuple_New(2); + if (new_args == NULL) + return NULL; + Py_INCREF(items); + PyTuple_SET_ITEM(new_args, 0, typecode_obj); + PyTuple_SET_ITEM(new_args, 1, items); + + array_obj = array_new(arraytype, new_args, NULL); + Py_DECREF(new_args); + if (array_obj == NULL) + return NULL; + + return array_obj; +} + +/* + * This functions is a special constructor used when unpickling an array. It + * provides a portable way to rebuild an array from its memory representation. + */ +static PyObject * +array_reconstructor(PyObject *self, PyObject *args) +{ + PyTypeObject *arraytype; + PyObject *items; + PyObject *converted_items; + PyObject *result; + int typecode; + enum machine_format_code mformat_code; + struct arraydescr *descr; + + if (!PyArg_ParseTuple(args, "OCiO:array._array_reconstructor", + &arraytype, &typecode, &mformat_code, &items)) + return NULL; + + if (!PyType_Check(arraytype)) { + PyErr_Format(PyExc_TypeError, + "first argument must a type object, not %.200s", + Py_TYPE(arraytype)->tp_name); + return NULL; + } + if (!PyType_IsSubtype(arraytype, &Arraytype)) { + PyErr_Format(PyExc_TypeError, + "%.200s is not a subtype of %.200s", + arraytype->tp_name, Arraytype.tp_name); + return NULL; + } + for (descr = descriptors; descr->typecode != '\0'; descr++) { + if (descr->typecode == typecode) + break; + } + if (descr->typecode == '\0') { + PyErr_SetString(PyExc_ValueError, + "second argument must be a valid type code"); + return NULL; + } + if (mformat_code < MACHINE_FORMAT_CODE_MIN || + mformat_code > MACHINE_FORMAT_CODE_MAX) { + PyErr_SetString(PyExc_ValueError, + "third argument must be a valid machine format code."); + return NULL; + } + if (!PyBytes_Check(items)) { + PyErr_Format(PyExc_TypeError, + "fourth argument should be bytes, not %.200s", + Py_TYPE(items)->tp_name); + return NULL; + } + + /* Fast path: No decoding has to be done. */ + if (mformat_code == typecode_to_mformat_code(typecode) || + mformat_code == UNKNOWN_FORMAT) { + return make_array(arraytype, typecode, items); + } + + /* Slow path: Decode the byte string according to the given machine + * format code. This occurs when the computer unpickling the array + * object is architecturally different from the one that pickled the + * array. + */ + if (Py_SIZE(items) % mformat_descriptors[mformat_code].size != 0) { + PyErr_SetString(PyExc_ValueError, + "string length not a multiple of item size"); + return NULL; + } + switch (mformat_code) { + case IEEE_754_FLOAT_LE: + case IEEE_754_FLOAT_BE: { + int i; + int le = (mformat_code == IEEE_754_FLOAT_LE) ? 1 : 0; + Py_ssize_t itemcount = Py_SIZE(items) / 4; + const unsigned char *memstr = + (unsigned char *)PyBytes_AS_STRING(items); + + converted_items = PyList_New(itemcount); + if (converted_items == NULL) + return NULL; + for (i = 0; i < itemcount; i++) { + PyObject *pyfloat = PyFloat_FromDouble( + _PyFloat_Unpack4(&memstr[i * 4], le)); + if (pyfloat == NULL) { + Py_DECREF(converted_items); + return NULL; + } + PyList_SET_ITEM(converted_items, i, pyfloat); + } + break; + } + case IEEE_754_DOUBLE_LE: + case IEEE_754_DOUBLE_BE: { + int i; + int le = (mformat_code == IEEE_754_DOUBLE_LE) ? 1 : 0; + Py_ssize_t itemcount = Py_SIZE(items) / 8; + const unsigned char *memstr = + (unsigned char *)PyBytes_AS_STRING(items); + + converted_items = PyList_New(itemcount); + if (converted_items == NULL) + return NULL; + for (i = 0; i < itemcount; i++) { + PyObject *pyfloat = PyFloat_FromDouble( + _PyFloat_Unpack8(&memstr[i * 8], le)); + if (pyfloat == NULL) { + Py_DECREF(converted_items); + return NULL; + } + PyList_SET_ITEM(converted_items, i, pyfloat); + } + break; + } + case UTF16_LE: + case UTF16_BE: { + int byteorder = (mformat_code == UTF16_LE) ? -1 : 1; + converted_items = PyUnicode_DecodeUTF16( + PyBytes_AS_STRING(items), Py_SIZE(items), + "strict", &byteorder); + if (converted_items == NULL) + return NULL; + break; + } + case UTF32_LE: + case UTF32_BE: { + int byteorder = (mformat_code == UTF32_LE) ? -1 : 1; + converted_items = PyUnicode_DecodeUTF32( + PyBytes_AS_STRING(items), Py_SIZE(items), + "strict", &byteorder); + if (converted_items == NULL) + return NULL; + break; + } + + case UNSIGNED_INT8: + case SIGNED_INT8: + case UNSIGNED_INT16_LE: + case UNSIGNED_INT16_BE: + case SIGNED_INT16_LE: + case SIGNED_INT16_BE: + case UNSIGNED_INT32_LE: + case UNSIGNED_INT32_BE: + case SIGNED_INT32_LE: + case SIGNED_INT32_BE: + case UNSIGNED_INT64_LE: + case UNSIGNED_INT64_BE: + case SIGNED_INT64_LE: + case SIGNED_INT64_BE: { + int i; + const struct mformatdescr mf_descr = + mformat_descriptors[mformat_code]; + Py_ssize_t itemcount = Py_SIZE(items) / mf_descr.size; + const unsigned char *memstr = + (unsigned char *)PyBytes_AS_STRING(items); + struct arraydescr *descr; + + /* If possible, try to pack array's items using a data type + * that fits better. This may result in an array with narrower + * or wider elements. + * + * For example, if a 32-bit machine pickles a L-code array of + * unsigned longs, then the array will be unpickled by 64-bit + * machine as an I-code array of unsigned ints. + * + * XXX: Is it possible to write a unit test for this? + */ + for (descr = descriptors; descr->typecode != '\0'; descr++) { + if (descr->is_integer_type && + descr->itemsize == mf_descr.size && + descr->is_signed == mf_descr.is_signed) + typecode = descr->typecode; + } + + converted_items = PyList_New(itemcount); + if (converted_items == NULL) + return NULL; + for (i = 0; i < itemcount; i++) { + PyObject *pylong; + + pylong = _PyLong_FromByteArray( + &memstr[i * mf_descr.size], + mf_descr.size, + !mf_descr.is_big_endian, + mf_descr.is_signed); + if (pylong == NULL) { + Py_DECREF(converted_items); + return NULL; + } + PyList_SET_ITEM(converted_items, i, pylong); + } + break; + } + case UNKNOWN_FORMAT: + /* Impossible, but needed to shut up GCC about the unhandled + * enumeration value. + */ + return NULL; + } + + result = make_array(arraytype, typecode, converted_items); + Py_DECREF(converted_items); + return result; +} + +static PyObject * +array_reduce_ex(arrayobject *array, PyObject *value) +{ + PyObject *dict; + PyObject *result; + PyObject *array_str; + int typecode = array->ob_descr->typecode; + int mformat_code; + static PyObject *array_reconstructor = NULL; + long protocol; + + if (array_reconstructor == NULL) { + PyObject *array_module = PyImport_ImportModule("array"); + if (array_module == NULL) + return NULL; + array_reconstructor = PyObject_GetAttrString( + array_module, + "_array_reconstructor"); + Py_DECREF(array_module); + if (array_reconstructor == NULL) + return NULL; + } + + if (!PyLong_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__reduce_ex__ argument should an integer"); + return NULL; + } + protocol = PyLong_AsLong(value); + if (protocol == -1 && PyErr_Occurred()) + return NULL; + + dict = PyObject_GetAttrString((PyObject *)array, "__dict__"); + if (dict == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return NULL; + PyErr_Clear(); + dict = Py_None; + Py_INCREF(dict); + } + + mformat_code = typecode_to_mformat_code(typecode); + if (mformat_code == UNKNOWN_FORMAT || protocol < 3) { + /* Convert the array to a list if we got something weird + * (e.g., non-IEEE floats), or we are pickling the array using + * a Python 2.x compatible protocol. + * + * It is necessary to a list representation for Python 2.x + * compatible pickle protocol, since Python 2's str objects + * are unpickled as unicode by Python 3. Thus it is impossible + * to make arrays unpicklable by Python 3 by using their memory + * representation, unless we resort to ugly hacks such as + * coercing unicode objects to bytes in array_reconstructor. + */ + PyObject *list; + list = array_tolist(array, NULL); + if (list == NULL) { + Py_DECREF(dict); + return NULL; + } + result = Py_BuildValue( + "O(CO)O", Py_TYPE(array), typecode, list, dict); + Py_DECREF(list); + Py_DECREF(dict); + return result; + } + + array_str = array_tostring(array, NULL); + if (array_str == NULL) { + Py_DECREF(dict); + return NULL; + } + result = Py_BuildValue( + "O(OCiN)O", array_reconstructor, Py_TYPE(array), typecode, + mformat_code, array_str, dict); + Py_DECREF(dict); + return result; +} + +PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); + static PyObject * array_get_typecode(arrayobject *a, void *closure) { @@ -1525,8 +1989,8 @@ insert_doc}, {"pop", (PyCFunction)array_pop, METH_VARARGS, pop_doc}, - {"__reduce__", (PyCFunction)array_reduce, METH_NOARGS, - array_doc}, + {"__reduce_ex__", (PyCFunction)array_reduce_ex, METH_O, + reduce_doc}, {"remove", (PyCFunction)array_remove, METH_O, remove_doc}, {"reverse", (PyCFunction)array_reverse, METH_NOARGS, @@ -2167,6 +2631,8 @@ /* No functions in array module. */ static PyMethodDef a_methods[] = { + {"_array_reconstructor", array_reconstructor, METH_VARARGS, + PyDoc_STR("Internal. Used for pickling support.")}, {NULL, NULL, 0, NULL} /* Sentinel */ }; From python-checkins at python.org Wed Jul 15 20:19:52 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 15 Jul 2009 18:19:52 -0000 Subject: [Python-checkins] r74014 - in python/trunk: Misc/NEWS Modules/arraymodule.c Message-ID: Author: alexandre.vassalotti Date: Wed Jul 15 20:19:47 2009 New Revision: 74014 Log: Issue #2389: Pickle array objects using a list representation for portability across different machine architectures and compatibility with Python 3.x. Modified: python/trunk/Misc/NEWS python/trunk/Modules/arraymodule.c Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Jul 15 20:19:47 2009 @@ -1262,6 +1262,8 @@ support.EnvironmentVarGuard objects restored the environment variables incorrectly on __exit__. +- Issue #2389: Array objects are now pickled in a portable manner. + What's New in Python 2.6 final ============================== Modified: python/trunk/Modules/arraymodule.c ============================================================================== --- python/trunk/Modules/arraymodule.c (original) +++ python/trunk/Modules/arraymodule.c Wed Jul 15 20:19:47 2009 @@ -1157,40 +1157,6 @@ 4, or 8 bytes in size, RuntimeError is raised."); static PyObject * -array_reduce(arrayobject *array) -{ - PyObject *dict, *result; - - dict = PyObject_GetAttrString((PyObject *)array, "__dict__"); - if (dict == NULL) { - PyErr_Clear(); - dict = Py_None; - Py_INCREF(dict); - } - if (Py_SIZE(array) > 0) { - if (array->ob_descr->itemsize - > PY_SSIZE_T_MAX / array->ob_size) { - return PyErr_NoMemory(); - } - result = Py_BuildValue("O(cs#)O", - Py_TYPE(array), - array->ob_descr->typecode, - array->ob_item, - Py_SIZE(array) * array->ob_descr->itemsize, - dict); - } else { - result = Py_BuildValue("O(c)O", - Py_TYPE(array), - array->ob_descr->typecode, - dict); - } - Py_DECREF(dict); - return result; -} - -PyDoc_STRVAR(array_doc, "Return state information for pickling."); - -static PyObject * array_reverse(arrayobject *self, PyObject *unused) { register Py_ssize_t itemsize = self->ob_descr->itemsize; @@ -1527,6 +1493,38 @@ #endif /* Py_USING_UNICODE */ +static PyObject * +array_reduce(arrayobject *array) +{ + PyObject *dict, *result, *list; + + dict = PyObject_GetAttrString((PyObject *)array, "__dict__"); + if (dict == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return NULL; + PyErr_Clear(); + dict = Py_None; + Py_INCREF(dict); + } + /* Unlike in Python 3.x, we never use the more efficient memory + * representation of an array for pickling. This is unfortunately + * necessary to allow array objects to be unpickled by Python 3.x, + * since str objects from 2.x are always decoded to unicode in + * Python 3.x. + */ + list = array_tolist(array, NULL); + if (list == NULL) { + Py_DECREF(dict); + return NULL; + } + result = Py_BuildValue( + "O(cO)O", Py_TYPE(array), array->ob_descr->typecode, list, dict); + Py_DECREF(list); + Py_DECREF(dict); + return result; +} + +PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static PyObject * array_get_typecode(arrayobject *a, void *closure) @@ -1583,7 +1581,7 @@ {"read", (PyCFunction)array_fromfile_as_read, METH_VARARGS, fromfile_doc}, {"__reduce__", (PyCFunction)array_reduce, METH_NOARGS, - array_doc}, + reduce_doc}, {"remove", (PyCFunction)array_remove, METH_O, remove_doc}, {"reverse", (PyCFunction)array_reverse, METH_NOARGS, From python-checkins at python.org Wed Jul 15 20:31:07 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 15 Jul 2009 18:31:07 -0000 Subject: [Python-checkins] r74015 - python/branches/py3k/Modules/arraymodule.c Message-ID: Author: alexandre.vassalotti Date: Wed Jul 15 20:31:06 2009 New Revision: 74015 Log: Fix omission in a comment. Modified: python/branches/py3k/Modules/arraymodule.c Modified: python/branches/py3k/Modules/arraymodule.c ============================================================================== --- python/branches/py3k/Modules/arraymodule.c (original) +++ python/branches/py3k/Modules/arraymodule.c Wed Jul 15 20:31:06 2009 @@ -1905,7 +1905,7 @@ * (e.g., non-IEEE floats), or we are pickling the array using * a Python 2.x compatible protocol. * - * It is necessary to a list representation for Python 2.x + * It is necessary to use a list representation for Python 2.x * compatible pickle protocol, since Python 2's str objects * are unpickled as unicode by Python 3. Thus it is impossible * to make arrays unpicklable by Python 3 by using their memory From python-checkins at python.org Wed Jul 15 20:32:09 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 15 Jul 2009 18:32:09 -0000 Subject: [Python-checkins] r74016 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Wed Jul 15 20:32:08 2009 New Revision: 74016 Log: Blocked revisions 74014 via svnmerge ........ r74014 | alexandre.vassalotti | 2009-07-15 14:19:47 -0400 (Wed, 15 Jul 2009) | 3 lines Issue #2389: Pickle array objects using a list representation for portability across different machine architectures and compatibility with Python 3.x. ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Wed Jul 15 21:05:06 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 15 Jul 2009 19:05:06 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1173 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Wed Jul 15 21:21:19 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Wed, 15 Jul 2009 19:21:19 -0000 Subject: [Python-checkins] r74017 - in python/branches/py3k: Doc/library/codecs.rst Message-ID: Author: amaury.forgeotdarc Date: Wed Jul 15 21:21:18 2009 New Revision: 74017 Log: Merged revisions 74006 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74006 | amaury.forgeotdarc | 2009-07-14 01:11:54 +0200 (mar., 14 juil. 2009) | 2 lines Document the newly added codec ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/codecs.rst Modified: python/branches/py3k/Doc/library/codecs.rst ============================================================================== --- python/branches/py3k/Doc/library/codecs.rst (original) +++ python/branches/py3k/Doc/library/codecs.rst Wed Jul 15 21:21:18 2009 @@ -924,6 +924,8 @@ | cp500 | EBCDIC-CP-BE, EBCDIC-CP-CH, | Western Europe | | | IBM500 | | +-----------------+--------------------------------+--------------------------------+ +| cp720 | | Arabic | ++-----------------+--------------------------------+--------------------------------+ | cp737 | | Greek | +-----------------+--------------------------------+--------------------------------+ | cp775 | IBM775 | Baltic languages | From buildbot at python.org Wed Jul 15 21:48:19 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 15 Jul 2009 19:48:19 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2327 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,ezio.melotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() Author: alexandre.vassalotti Date: Wed Jul 15 22:53:55 2009 New Revision: 74018 Log: Don't check 64-bit test cases on 32-bit machine. Modified: python/branches/py3k/Lib/test/test_array.py Modified: python/branches/py3k/Lib/test/test_array.py ============================================================================== --- python/branches/py3k/Lib/test/test_array.py (original) +++ python/branches/py3k/Lib/test/test_array.py Wed Jul 15 22:53:55 2009 @@ -107,6 +107,17 @@ (['i', 'l'], SIGNED_INT32_BE, '>iii', [-1<<31, (1<<31)-1, 0]), (['L'], UNSIGNED_INT64_LE, 'QQQQ', + [1<<31, (1<<31)-1, 0, (1<<32)-1]), + (['l'], SIGNED_INT64_LE, 'qqq', + [-1<<31, (1<<31)-1, 0]), + # The following tests for INT64 will raise an OverflowError + # when run on a 32-bit machine. The tests are simply skipped + # in that case. + (['L'], UNSIGNED_INT64_LE, 'QQQQ', [1<<63, (1<<63)-1, 0, (1<<64)-1]), @@ -127,7 +138,10 @@ valid_typecodes, mformat_code, struct_fmt, values = testcase arraystr = struct.pack(struct_fmt, *values) for typecode in valid_typecodes: - a = array.array(typecode, values) + try: + a = array.array(typecode, values) + except OverflowError: + continue # Skip this test case. b = array_reconstructor( array.array, typecode, mformat_code, arraystr) self.assertEqual(a, b, From buildbot at python.org Wed Jul 15 23:07:15 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 15 Jul 2009 21:07:15 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.x Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.x/builds/944 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_array ====================================================================== FAIL: test_numbers (test.test_array.ArrayReconstructorTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_array.py", line 134, in test_numbers msg="{0!r} != {1!r}; testcase={2!r}".format(a, b, testcase)) AssertionError: array('H', [32768, 32767, 0, 65535]) != array('H', [128, 65407, 0, 65535]); testcase=(['H', 'I', 'L'], 2, ' Author: amaury.forgeotdarc Date: Wed Jul 15 23:29:27 2009 New Revision: 74019 Log: #6076 Add a title to the IDLE Preferences window. Modified: python/trunk/Lib/idlelib/configDialog.py Modified: python/trunk/Lib/idlelib/configDialog.py ============================================================================== --- python/trunk/Lib/idlelib/configDialog.py (original) +++ python/trunk/Lib/idlelib/configDialog.py Wed Jul 15 23:29:27 2009 @@ -28,6 +28,7 @@ self.wm_withdraw() self.configure(borderwidth=5) + self.title('IDLE Preferences') self.geometry("+%d+%d" % (parent.winfo_rootx()+20, parent.winfo_rooty()+30)) #Theme Elements. Each theme element key is its display name. From buildbot at python.org Thu Jul 16 01:27:20 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 15 Jul 2009 23:27:20 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.x Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.x/builds/774 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti,amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest.py", line 543, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test_2516_tmp Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test_2516_tmp' 1 test failed: test_import sincerely, -The Buildbot From python-checkins at python.org Thu Jul 16 09:18:07 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 16 Jul 2009 07:18:07 -0000 Subject: [Python-checkins] r74020 - in python/trunk: Lib/test/test_kqueue.py Modules/selectmodule.c Message-ID: Author: georg.brandl Date: Thu Jul 16 09:18:07 2009 New Revision: 74020 Log: #5910: fix kqueue for calls with more than one event. Modified: python/trunk/Lib/test/test_kqueue.py python/trunk/Modules/selectmodule.c Modified: python/trunk/Lib/test/test_kqueue.py ============================================================================== --- python/trunk/Lib/test/test_kqueue.py (original) +++ python/trunk/Lib/test/test_kqueue.py Thu Jul 16 09:18:07 2009 @@ -162,6 +162,22 @@ server.close() serverSocket.close() + def testPair(self): + kq = select.kqueue() + a, b = socket.socketpair() + + a.send(b'foo') + event1 = select.kevent(a, select.KQ_FILTER_READ, select.KQ_EV_ADD | select.KQ_EV_ENABLE) + event2 = select.kevent(b, select.KQ_FILTER_READ, select.KQ_EV_ADD | select.KQ_EV_ENABLE) + r = kq.control([event1, event2], 1, 1) + self.assertTrue(r) + self.assertFalse(r[0].flags & select.KQ_EV_ERROR) + self.assertEquals(b.recv(r[0].data), b'foo') + + a.close() + b.close() + kq.close() + def test_main(): test_support.run_unittest(TestKQueue) Modified: python/trunk/Modules/selectmodule.c ============================================================================== --- python/trunk/Modules/selectmodule.c (original) +++ python/trunk/Modules/selectmodule.c Thu Jul 16 09:18:07 2009 @@ -1487,7 +1487,7 @@ if (nevents < 0) { PyErr_Format(PyExc_ValueError, "Length of eventlist must be 0 or positive, got %d", - nchanges); + nevents); return NULL; } @@ -1545,6 +1545,7 @@ PyErr_NoMemory(); return NULL; } + i = 0; while ((ei = PyIter_Next(it)) != NULL) { if (!kqueue_event_Check(ei)) { Py_DECREF(ei); @@ -1553,7 +1554,7 @@ "select.kevent objects"); goto error; } else { - chl[i] = ((kqueue_event_Object *)ei)->e; + chl[i++] = ((kqueue_event_Object *)ei)->e; } Py_DECREF(ei); } @@ -1584,7 +1585,7 @@ goto error; } - for (i=0; i < gotevents; i++) { + for (i = 0; i < gotevents; i++) { kqueue_event_Object *ch; ch = PyObject_New(kqueue_event_Object, &kqueue_event_Type); From python-checkins at python.org Thu Jul 16 09:33:04 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 16 Jul 2009 07:33:04 -0000 Subject: [Python-checkins] r74021 - python/trunk/Doc/library/intro.rst Message-ID: Author: georg.brandl Date: Thu Jul 16 09:33:04 2009 New Revision: 74021 Log: #6486: start with built in functions rather than "built in objects". Modified: python/trunk/Doc/library/intro.rst Modified: python/trunk/Doc/library/intro.rst ============================================================================== --- python/trunk/Doc/library/intro.rst (original) +++ python/trunk/Doc/library/intro.rst Thu Jul 16 09:33:04 2009 @@ -44,8 +44,9 @@ function, module or term in the index (in the back). And finally, if you enjoy learning about random subjects, you choose a random page number (see module :mod:`random`) and read a section or two. Regardless of the order in which you -read the sections of this manual, it helps to start with chapter :ref:`builtin`, -as the remainder of the manual assumes familiarity with this material. +read the sections of this manual, it helps to start with chapter +:ref:`built-in-funcs`, as the remainder of the manual assumes familiarity with +this material. Let the show begin! From python-checkins at python.org Thu Jul 16 09:38:35 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 16 Jul 2009 07:38:35 -0000 Subject: [Python-checkins] r74022 - python/trunk/Doc/library/subprocess.rst Message-ID: Author: georg.brandl Date: Thu Jul 16 09:38:35 2009 New Revision: 74022 Log: #6481: fix typo in os.system() replacement. Modified: python/trunk/Doc/library/subprocess.rst Modified: python/trunk/Doc/library/subprocess.rst ============================================================================== --- python/trunk/Doc/library/subprocess.rst (original) +++ python/trunk/Doc/library/subprocess.rst Thu Jul 16 09:38:35 2009 @@ -404,7 +404,7 @@ sts = os.system("mycmd" + " myarg") ==> p = Popen("mycmd" + " myarg", shell=True) - sts = os.waitpid(p.pid, 0) + sts = os.waitpid(p.pid, 0)[1] Notes: From python-checkins at python.org Thu Jul 16 16:23:04 2009 From: python-checkins at python.org (jesse.noller) Date: Thu, 16 Jul 2009 14:23:04 -0000 Subject: [Python-checkins] r74023 - in python/trunk: Lib/multiprocessing/pool.py Lib/test/test_multiprocessing.py Misc/ACKS Misc/NEWS Message-ID: Author: jesse.noller Date: Thu Jul 16 16:23:04 2009 New Revision: 74023 Log: Issue 6433: multiprocessing.pool.map hangs on empty list Modified: python/trunk/Lib/multiprocessing/pool.py python/trunk/Lib/test/test_multiprocessing.py python/trunk/Misc/ACKS python/trunk/Misc/NEWS Modified: python/trunk/Lib/multiprocessing/pool.py ============================================================================== --- python/trunk/Lib/multiprocessing/pool.py (original) +++ python/trunk/Lib/multiprocessing/pool.py Thu Jul 16 16:23:04 2009 @@ -207,6 +207,8 @@ chunksize, extra = divmod(len(iterable), len(self._pool) * 4) if extra: chunksize += 1 + if len(iterable) == 0: + chunksize = 0 task_batches = Pool._get_tasks(func, iterable, chunksize) result = MapResult(self._cache, chunksize, len(iterable), callback) Modified: python/trunk/Lib/test/test_multiprocessing.py ============================================================================== --- python/trunk/Lib/test/test_multiprocessing.py (original) +++ python/trunk/Lib/test/test_multiprocessing.py Thu Jul 16 16:23:04 2009 @@ -990,6 +990,12 @@ self.assertEqual(pmap(sqr, range(100), chunksize=20), map(sqr, range(100))) + def test_map_chunksize(self): + try: + self.pool.map_async(sqr, [], chunksize=1).get(timeout=TIMEOUT1) + except multiprocessing.TimeoutError: + self.fail("pool.map_async with chunksize stalled on null list") + def test_async(self): res = self.pool.apply_async(sqr, (7, TIMEOUT1,)) get = TimingWrapper(res.get) Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Thu Jul 16 16:23:04 2009 @@ -199,6 +199,7 @@ Hans Eckardt Grant Edwards John Ehresman +Eric Eisner Andrew Eland Lance Ellinghaus David Ely Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Jul 16 16:23:04 2009 @@ -352,6 +352,8 @@ Library ------- +- Issue #6433: fixed issues with multiprocessing.pool.map hanging on empty list + - Issue #6314: logging: Extra checks on the "level" argument in more places. - Issue #2622: Fixed an ImportError when importing email.messsage from a From buildbot at python.org Thu Jul 16 17:17:31 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 16 Jul 2009 15:17:31 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5165 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: georg.brandl,jesse.noller BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Thu Jul 16 17:35:45 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 16 Jul 2009 15:35:45 -0000 Subject: [Python-checkins] r74024 - in python/trunk: Lib/distutils/cygwinccompiler.py Lib/distutils/emxccompiler.py Lib/distutils/tests/test_cygwinccompiler.py Lib/distutils/tests/test_emxccompiler.py Lib/distutils/tests/test_util.py Lib/distutils/util.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Thu Jul 16 17:35:45 2009 New Revision: 74024 Log: #6466 refactored distutils duplicate get_versions() functions (used to get gcc/ld/dllwrap versions) Added: python/trunk/Lib/distutils/tests/test_emxccompiler.py (contents, props changed) Modified: python/trunk/Lib/distutils/cygwinccompiler.py python/trunk/Lib/distutils/emxccompiler.py python/trunk/Lib/distutils/tests/test_cygwinccompiler.py python/trunk/Lib/distutils/tests/test_util.py python/trunk/Lib/distutils/util.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/distutils/cygwinccompiler.py ============================================================================== --- python/trunk/Lib/distutils/cygwinccompiler.py (original) +++ python/trunk/Lib/distutils/cygwinccompiler.py Thu Jul 16 17:35:45 2009 @@ -50,16 +50,15 @@ import os import sys import copy -from subprocess import Popen, PIPE import re +from warnings import warn from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log -from distutils.version import LooseVersion -from distutils.spawn import find_executable +from distutils.util import get_compiler_versions def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built @@ -110,7 +109,7 @@ % details) self.gcc_version, self.ld_version, self.dllwrap_version = \ - get_versions() + get_compiler_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, self.ld_version, @@ -359,31 +358,26 @@ return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +class _Deprecated_SRE_Pattern(object): + def __init__(self, pattern): + self.pattern = pattern + + def __getattr__(self, name): + if name in ('findall', 'finditer', 'match', 'scanner', 'search', + 'split', 'sub', 'subn'): + warn("'distutils.cygwinccompiler.RE_VERSION' is deprecated " + "and will be removed in the next version", DeprecationWarning) + return getattr(self.pattern, name) -def _find_exe_version(cmd): - """Find the version of an executable by running `cmd` in the shell. - - If the command is not found, or the output does not match - `RE_VERSION`, returns None. - """ - executable = cmd.split()[0] - if find_executable(executable) is None: - return None - out = Popen(cmd, shell=True, stdout=PIPE).stdout - try: - out_string = out.read() - finally: - out.close() - result = RE_VERSION.search(out_string) - if result is None: - return None - return LooseVersion(result.group(1)) +RE_VERSION = _Deprecated_SRE_Pattern(re.compile('(\d+\.\d+(\.\d+)*)')) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] - return tuple([_find_exe_version(cmd) for cmd in commands]) + warn("'distutils.cygwinccompiler.get_versions' is deprecated " + "use 'distutils.util.get_compiler_versions' instead", + DeprecationWarning) + + return get_compiler_versions() Modified: python/trunk/Lib/distutils/emxccompiler.py ============================================================================== --- python/trunk/Lib/distutils/emxccompiler.py (original) +++ python/trunk/Lib/distutils/emxccompiler.py Thu Jul 16 17:35:45 2009 @@ -21,12 +21,15 @@ __revision__ = "$Id$" -import os,sys,copy +import os, sys, copy +from warnings import warn + from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log +from distutils.util import get_compiler_versions class EMXCCompiler (UnixCCompiler): @@ -55,8 +58,8 @@ ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") - (self.gcc_version, self.ld_version) = \ - get_versions() + gcc_version, ld_version, dllwrap_version = get_compiler_versions() + self.gcc_version, self.ld_version = gcc_version, ld_version self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % (self.gcc_version, self.ld_version) ) @@ -293,23 +296,11 @@ """ Try to find out the versions of gcc and ld. If not possible it returns None for it. """ - from distutils.version import StrictVersion - from distutils.spawn import find_executable - import re - - gcc_exe = find_executable('gcc') - if gcc_exe: - out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() - result = re.search('(\d+\.\d+\.\d+)',out_string) - if result: - gcc_version = StrictVersion(result.group(1)) - else: - gcc_version = None - else: - gcc_version = None + warn("'distutils.emxccompiler.get_versions' is deprecated " + "use 'distutils.util.get_compiler_versions' instead", + DeprecationWarning) + # EMX ld has no way of reporting version number, and we use GCC # anyway - so we can link OMF DLLs - ld_version = None - return (gcc_version, ld_version) + gcc_version, ld_version, dllwrap_version = get_compiler_versions() + return gcc_version, None Modified: python/trunk/Lib/distutils/tests/test_cygwinccompiler.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_cygwinccompiler.py (original) +++ python/trunk/Lib/distutils/tests/test_cygwinccompiler.py Thu Jul 16 17:35:45 2009 @@ -2,28 +2,19 @@ import unittest import sys import os -from StringIO import StringIO -import subprocess +import warnings + +from test.test_support import check_warnings +from test.test_support import captured_stdout from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK, CONFIG_H_NOTOK, CONFIG_H_UNCERTAIN, get_versions, - get_msvcr) + get_msvcr, RE_VERSION) +from distutils.util import get_compiler_versions from distutils.tests import support -class FakePopen(object): - test_class = None - - def __init__(self, cmd, shell, stdout): - self.cmd = cmd.split()[0] - exes = self.test_class._exes - if self.cmd in exes: - self.stdout = StringIO(exes[self.cmd]) - else: - self.stdout = os.popen(cmd, 'r') - - class CygwinCCompilerTestCase(support.TempdirManager, unittest.TestCase): @@ -34,29 +25,16 @@ from distutils import sysconfig self.old_get_config_h_filename = sysconfig.get_config_h_filename sysconfig.get_config_h_filename = self._get_config_h_filename - self.old_find_executable = cygwinccompiler.find_executable - cygwinccompiler.find_executable = self._find_executable - self._exes = {} - self.old_popen = cygwinccompiler.Popen - FakePopen.test_class = self - cygwinccompiler.Popen = FakePopen def tearDown(self): sys.version = self.version from distutils import sysconfig sysconfig.get_config_h_filename = self.old_get_config_h_filename - cygwinccompiler.find_executable = self.old_find_executable - cygwinccompiler.Popen = self.old_popen super(CygwinCCompilerTestCase, self).tearDown() def _get_config_h_filename(self): return self.python_h - def _find_executable(self, name): - if name in self._exes: - return name - return None - def test_check_config_h(self): # check_config_h looks for "GCC" in sys.version first @@ -80,40 +58,6 @@ self.write_file(self.python_h, 'xxx __GNUC__ xxx') self.assertEquals(check_config_h()[0], CONFIG_H_OK) - def test_get_versions(self): - - # get_versions calls distutils.spawn.find_executable on - # 'gcc', 'ld' and 'dllwrap' - self.assertEquals(get_versions(), (None, None, None)) - - # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' - res = get_versions() - self.assertEquals(str(res[0]), '3.4.5') - - # and let's see what happens when the version - # doesn't match the regular expression - # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = 'very strange output' - res = get_versions() - self.assertEquals(res[0], None) - - # same thing for ld - self._exes['ld'] = 'GNU ld version 2.17.50 20060824' - res = get_versions() - self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' - res = get_versions() - self.assertEquals(res[1], None) - - # and dllwrap - self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' - res = get_versions() - self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = 'Cheese Wrap' - res = get_versions() - self.assertEquals(res[2], None) - def test_get_msvcr(self): # none @@ -146,6 +90,21 @@ '[MSC v.1999 32 bits (Intel)]') self.assertRaises(ValueError, get_msvcr) + + def test_get_version_deprecated(self): + with check_warnings() as w: + warnings.simplefilter("always") + # make sure get_compiler_versions and get_versions + # returns the same thing + self.assertEquals(get_compiler_versions(), get_versions()) + # make sure using get_version() generated a warning + self.assertEquals(len(w.warnings), 1) + # make sure any usage of RE_VERSION will also + # generate a warning, but till works + version = RE_VERSION.search('1.2').group(1) + self.assertEquals(version, '1.2') + self.assertEquals(len(w.warnings), 2) + def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) Added: python/trunk/Lib/distutils/tests/test_emxccompiler.py ============================================================================== --- (empty file) +++ python/trunk/Lib/distutils/tests/test_emxccompiler.py Thu Jul 16 17:35:45 2009 @@ -0,0 +1,33 @@ +"""Tests for distutils.emxccompiler.""" +import unittest +import sys +import os +import warnings + +from test.test_support import check_warnings +from test.test_support import captured_stdout + +from distutils.emxccompiler import get_versions +from distutils.util import get_compiler_versions +from distutils.tests import support + +class EmxCCompilerTestCase(support.TempdirManager, + unittest.TestCase): + + def test_get_version_deprecated(self): + with check_warnings() as w: + warnings.simplefilter("always") + # make sure get_compiler_versions and get_versions + # returns the same gcc + gcc, ld, dllwrap = get_compiler_versions() + emx_gcc, emx_ld = get_versions() + self.assertEquals(gcc, emx_gcc) + + # make sure using get_version() generated a warning + self.assertEquals(len(w.warnings), 1) + +def test_suite(): + return unittest.makeSuite(EmxCCompilerTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) Modified: python/trunk/Lib/distutils/tests/test_util.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_util.py (original) +++ python/trunk/Lib/distutils/tests/test_util.py Thu Jul 16 17:35:45 2009 @@ -6,15 +6,33 @@ import sys import unittest from copy import copy +from StringIO import StringIO +import subprocess from distutils.errors import DistutilsPlatformError from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, - rfc822_escape) -from distutils import util # used to patch _environ_checked + rfc822_escape, get_compiler_versions, + _find_exe_version, _MAC_OS_X_LD_VERSION) +from distutils import util from distutils.sysconfig import get_config_vars from distutils import sysconfig from distutils.tests import support +from distutils.version import LooseVersion + +class FakePopen(object): + test_class = None + def __init__(self, cmd, shell, stdout, stderr): + self.cmd = cmd.split()[0] + exes = self.test_class._exes + if self.cmd not in exes: + # we don't want to call the system, returning an empty + # output so it doesn't match + self.stdout = StringIO() + self.stderr = StringIO() + else: + self.stdout = StringIO(exes[self.cmd]) + self.stderr = StringIO() class UtilTestCase(support.EnvironGuard, unittest.TestCase): @@ -37,9 +55,16 @@ else: self.uname = None self._uname = None - os.uname = self._get_uname + # patching POpen + self.old_find_executable = util.find_executable + util.find_executable = self._find_executable + self._exes = {} + self.old_popen = subprocess.Popen + FakePopen.test_class = self + subprocess.Popen = FakePopen + def tearDown(self): # getting back the environment os.name = self.name @@ -54,6 +79,8 @@ else: del os.uname sysconfig._config_vars = copy(self._config_vars) + util.find_executable = self.old_find_executable + subprocess.Popen = self.old_popen super(UtilTestCase, self).tearDown() def _set_uname(self, uname): @@ -237,6 +264,70 @@ 'header%(8s)s') % {'8s': '\n'+8*' '} self.assertEquals(res, wanted) + def test_find_exe_version(self): + # the ld version scheme under MAC OS is: + # ^@(#)PROGRAM:ld PROJECT:ld64-VERSION + # + # where VERSION is a 2-digit number for major + # revisions. For instance under Leopard, it's + # currently 77 + # + # Dots are used when branching is done. + # + # The SnowLeopard ld64 is currently 95.2.12 + + for output, version in (('@(#)PROGRAM:ld PROJECT:ld64-77', '77'), + ('@(#)PROGRAM:ld PROJECT:ld64-95.2.12', + '95.2.12')): + result = _MAC_OS_X_LD_VERSION.search(output) + self.assertEquals(result.group(1), version) + + def _find_executable(self, name): + if name in self._exes: + return name + return None + + def test_get_compiler_versions(self): + # get_versions calls distutils.spawn.find_executable on + # 'gcc', 'ld' and 'dllwrap' + self.assertEquals(get_compiler_versions(), (None, None, None)) + + # Let's fake we have 'gcc' and it returns '3.4.5' + self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' + res = get_compiler_versions() + self.assertEquals(str(res[0]), '3.4.5') + + # and let's see what happens when the version + # doesn't match the regular expression + # (\d+\.\d+(\.\d+)*) + self._exes['gcc'] = 'very strange output' + res = get_compiler_versions() + self.assertEquals(res[0], None) + + # same thing for ld + if sys.platform != 'darwin': + self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + res = get_compiler_versions() + self.assertEquals(str(res[1]), '2.17.50') + self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_compiler_versions() + self.assertEquals(res[1], None) + else: + self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + res = get_compiler_versions() + self.assertEquals(res[1], None) + self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_compiler_versions() + self.assertEquals(str(res[1]), '77') + + # and dllwrap + self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' + res = get_compiler_versions() + self.assertEquals(str(res[2]), '2.17.50') + self._exes['dllwrap'] = 'Cheese Wrap' + res = get_compiler_versions() + self.assertEquals(res[2], None) + def test_suite(): return unittest.makeSuite(UtilTestCase) Modified: python/trunk/Lib/distutils/util.py ============================================================================== --- python/trunk/Lib/distutils/util.py (original) +++ python/trunk/Lib/distutils/util.py Thu Jul 16 17:35:45 2009 @@ -7,10 +7,12 @@ __revision__ = "$Id$" import sys, os, string, re + from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer -from distutils.spawn import spawn +from distutils.spawn import spawn, find_executable from distutils import log +from distutils.version import LooseVersion def get_platform(): """Return a string that identifies the current platform. @@ -539,3 +541,53 @@ lines = [x.strip() for x in header.split('\n')] sep = '\n' + 8*' ' return sep.join(lines) + +_RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +_MAC_OS_X_LD_VERSION = re.compile('^@\(#\)PROGRAM:ld PROJECT:ld64-((\d+)(\.\d+)*)') + +def _find_ld_version(): + """Finds the ld version. The version scheme differs under Mac OSX.""" + if sys.platform == 'darwin': + return _find_exe_version('ld -v', _MAC_OS_X_LD_VERSION) + else: + return _find_exe_version('ld -v') + +def _find_exe_version(cmd, pattern=_RE_VERSION): + """Find the version of an executable by running `cmd` in the shell. + + `pattern` is a compiled regular expression. If not provided, default + to _RE_VERSION. If the command is not found, or the output does not + match the mattern, returns None. + """ + from subprocess import Popen, PIPE + executable = cmd.split()[0] + if find_executable(executable) is None: + return None + pipe = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) + try: + stdout, stderr = pipe.stdout.read(), pipe.stderr.read() + finally: + pipe.stdout.close() + pipe.stderr.close() + # some commands like ld under MacOS X, will give the + # output in the stderr, rather than stdout. + if stdout != '': + out_string = stdout + else: + out_string = stderr + + result = pattern.search(out_string) + if result is None: + return None + return LooseVersion(result.group(1)) + +def get_compiler_versions(): + """Returns a tuple providing the versions of gcc, ld and dllwrap + + For each command, if a command is not found, None is returned. + Otherwise a LooseVersion instance is returned. + """ + gcc = _find_exe_version('gcc -dumpversion') + ld = _find_ld_version() + dllwrap = _find_exe_version('dllwrap --version') + return gcc, ld, dllwrap Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Jul 16 17:35:45 2009 @@ -352,6 +352,11 @@ Library ------- +- Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler + uses the same refactored function to get gcc/ld/dllwrap versions numbers. + It's `distutils.util.get_compiler_versions`. Added deprecation warnings + for the obsolete get_versions() functions. + - Issue #6433: fixed issues with multiprocessing.pool.map hanging on empty list - Issue #6314: logging: Extra checks on the "level" argument in more places. From python-checkins at python.org Thu Jul 16 17:39:24 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 16 Jul 2009 15:39:24 -0000 Subject: [Python-checkins] r74025 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Thu Jul 16 17:39:24 2009 New Revision: 74025 Log: Blocked revisions 74024 via svnmerge ........ r74024 | tarek.ziade | 2009-07-16 17:35:45 +0200 (Thu, 16 Jul 2009) | 1 line #6466 refactored distutils duplicate get_versions() functions (used to get gcc/ld/dllwrap versions) ........ Modified: python/branches/release26-maint/ (props changed) From buildbot at python.org Thu Jul 16 18:04:16 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 16 Jul 2009 16:04:16 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1323 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Abort trap sincerely, -The Buildbot From python-checkins at python.org Thu Jul 16 18:18:19 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 16 Jul 2009 16:18:19 -0000 Subject: [Python-checkins] r74026 - in python/branches/py3k: Lib/distutils/cygwinccompiler.py Lib/distutils/emxccompiler.py Lib/distutils/tests/test_cygwinccompiler.py Lib/distutils/tests/test_emxccompiler.py Lib/distutils/tests/test_util.py Lib/distutils/util.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Thu Jul 16 18:18:19 2009 New Revision: 74026 Log: Merged revisions 74024 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74024 | tarek.ziade | 2009-07-16 17:35:45 +0200 (Thu, 16 Jul 2009) | 1 line #6466 refactored distutils duplicate get_versions() functions (used to get gcc/ld/dllwrap versions) ........ Added: python/branches/py3k/Lib/distutils/tests/test_emxccompiler.py - copied, changed from r74024, /python/trunk/Lib/distutils/tests/test_emxccompiler.py Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/cygwinccompiler.py python/branches/py3k/Lib/distutils/emxccompiler.py python/branches/py3k/Lib/distutils/tests/test_cygwinccompiler.py python/branches/py3k/Lib/distutils/tests/test_util.py python/branches/py3k/Lib/distutils/util.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/distutils/cygwinccompiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/cygwinccompiler.py (original) +++ python/branches/py3k/Lib/distutils/cygwinccompiler.py Thu Jul 16 18:18:19 2009 @@ -50,16 +50,15 @@ import os import sys import copy -from subprocess import Popen, PIPE import re +from warnings import warn from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log -from distutils.version import LooseVersion -from distutils.spawn import find_executable +from distutils.util import get_compiler_versions def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built @@ -110,7 +109,7 @@ % details) self.gcc_version, self.ld_version, self.dllwrap_version = \ - get_versions() + get_compiler_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, self.ld_version, @@ -359,33 +358,27 @@ return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') +class _Deprecated_SRE_Pattern(object): + def __init__(self, pattern): + self.pattern = pattern + + def __getattr__(self, name): + if name in ('findall', 'finditer', 'match', 'scanner', 'search', + 'split', 'sub', 'subn'): + warn("'distutils.cygwinccompiler.RE_VERSION' is deprecated " + "and will be removed in the next version", DeprecationWarning) + return getattr(self.pattern, name) -def _find_exe_version(cmd): - """Find the version of an executable by running `cmd` in the shell. - If the command is not found, or the output does not match - `RE_VERSION`, returns None. - """ - executable = cmd.split()[0] - if find_executable(executable) is None: - return None - out = Popen(cmd, shell=True, stdout=PIPE).stdout - try: - out_string = out.read() - finally: - out.close() - result = RE_VERSION.search(out_string) - if result is None: - return None - # LooseVersion works with strings - # so we need to decode our bytes - return LooseVersion(result.group(1).decode()) +RE_VERSION = _Deprecated_SRE_Pattern(re.compile('(\d+\.\d+(\.\d+)*)')) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] - return tuple([_find_exe_version(cmd) for cmd in commands]) + warn("'distutils.cygwinccompiler.get_versions' is deprecated " + "use 'distutils.util.get_compiler_versions' instead", + DeprecationWarning) + + return get_compiler_versions() Modified: python/branches/py3k/Lib/distutils/emxccompiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/emxccompiler.py (original) +++ python/branches/py3k/Lib/distutils/emxccompiler.py Thu Jul 16 18:18:19 2009 @@ -21,12 +21,15 @@ __revision__ = "$Id$" -import os,sys,copy +import os, sys, copy +from warnings import warn + from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log +from distutils.util import get_compiler_versions class EMXCCompiler (UnixCCompiler): @@ -55,8 +58,8 @@ ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") - (self.gcc_version, self.ld_version) = \ - get_versions() + gcc_version, ld_version, dllwrap_version = get_compiler_versions() + self.gcc_version, self.ld_version = gcc_version, ld_version self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % (self.gcc_version, self.ld_version) ) @@ -291,23 +294,11 @@ """ Try to find out the versions of gcc and ld. If not possible it returns None for it. """ - from distutils.version import StrictVersion - from distutils.spawn import find_executable - import re - - gcc_exe = find_executable('gcc') - if gcc_exe: - out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() - result = re.search('(\d+\.\d+\.\d+)', out_string, re.ASCII) - if result: - gcc_version = StrictVersion(result.group(1)) - else: - gcc_version = None - else: - gcc_version = None + warn("'distutils.emxccompiler.get_versions' is deprecated " + "use 'distutils.util.get_compiler_versions' instead", + DeprecationWarning) + # EMX ld has no way of reporting version number, and we use GCC # anyway - so we can link OMF DLLs - ld_version = None - return (gcc_version, ld_version) + gcc_version, ld_version, dllwrap_version = get_compiler_versions() + return gcc_version, None Modified: python/branches/py3k/Lib/distutils/tests/test_cygwinccompiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_cygwinccompiler.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_cygwinccompiler.py Thu Jul 16 18:18:19 2009 @@ -2,29 +2,20 @@ import unittest import sys import os -from io import BytesIO import subprocess +import warnings + +from test.support import check_warnings +from test.support import captured_stdout from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK, CONFIG_H_NOTOK, CONFIG_H_UNCERTAIN, get_versions, - get_msvcr) + get_msvcr, RE_VERSION) +from distutils.util import get_compiler_versions from distutils.tests import support -class FakePopen(object): - test_class = None - - def __init__(self, cmd, shell, stdout): - self.cmd = cmd.split()[0] - exes = self.test_class._exes - if self.cmd in exes: - # issue #6438 in Python 3.x, Popen returns bytes - self.stdout = BytesIO(exes[self.cmd]) - else: - self.stdout = os.popen(cmd, 'r') - - class CygwinCCompilerTestCase(support.TempdirManager, unittest.TestCase): @@ -35,29 +26,16 @@ from distutils import sysconfig self.old_get_config_h_filename = sysconfig.get_config_h_filename sysconfig.get_config_h_filename = self._get_config_h_filename - self.old_find_executable = cygwinccompiler.find_executable - cygwinccompiler.find_executable = self._find_executable - self._exes = {} - self.old_popen = cygwinccompiler.Popen - FakePopen.test_class = self - cygwinccompiler.Popen = FakePopen def tearDown(self): sys.version = self.version from distutils import sysconfig sysconfig.get_config_h_filename = self.old_get_config_h_filename - cygwinccompiler.find_executable = self.old_find_executable - cygwinccompiler.Popen = self.old_popen super(CygwinCCompilerTestCase, self).tearDown() def _get_config_h_filename(self): return self.python_h - def _find_executable(self, name): - if name in self._exes: - return name - return None - def test_check_config_h(self): # check_config_h looks for "GCC" in sys.version first @@ -81,40 +59,6 @@ self.write_file(self.python_h, 'xxx __GNUC__ xxx') self.assertEquals(check_config_h()[0], CONFIG_H_OK) - def test_get_versions(self): - - # get_versions calls distutils.spawn.find_executable on - # 'gcc', 'ld' and 'dllwrap' - self.assertEquals(get_versions(), (None, None, None)) - - # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' - res = get_versions() - self.assertEquals(str(res[0]), '3.4.5') - - # and let's see what happens when the version - # doesn't match the regular expression - # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = b'very strange output' - res = get_versions() - self.assertEquals(res[0], None) - - # same thing for ld - self._exes['ld'] = b'GNU ld version 2.17.50 20060824' - res = get_versions() - self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' - res = get_versions() - self.assertEquals(res[1], None) - - # and dllwrap - self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' - res = get_versions() - self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = b'Cheese Wrap' - res = get_versions() - self.assertEquals(res[2], None) - def test_get_msvcr(self): # none @@ -147,6 +91,21 @@ '[MSC v.1999 32 bits (Intel)]') self.assertRaises(ValueError, get_msvcr) + + def test_get_version_deprecated(self): + with check_warnings() as w: + warnings.simplefilter("always") + # make sure get_compiler_versions and get_versions + # returns the same thing + self.assertEquals(get_compiler_versions(), get_versions()) + # make sure using get_version() generated a warning + self.assertEquals(len(w.warnings), 1) + # make sure any usage of RE_VERSION will also + # generate a warning, but till works + version = RE_VERSION.search('1.2').group(1) + self.assertEquals(version, '1.2') + self.assertEquals(len(w.warnings), 2) + def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) Copied: python/branches/py3k/Lib/distutils/tests/test_emxccompiler.py (from r74024, /python/trunk/Lib/distutils/tests/test_emxccompiler.py) ============================================================================== --- /python/trunk/Lib/distutils/tests/test_emxccompiler.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_emxccompiler.py Thu Jul 16 18:18:19 2009 @@ -4,8 +4,8 @@ import os import warnings -from test.test_support import check_warnings -from test.test_support import captured_stdout +from test.support import check_warnings +from test.support import captured_stdout from distutils.emxccompiler import get_versions from distutils.util import get_compiler_versions Modified: python/branches/py3k/Lib/distutils/tests/test_util.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_util.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_util.py Thu Jul 16 18:18:19 2009 @@ -6,15 +6,33 @@ import sys import unittest from copy import copy +from io import BytesIO +import subprocess from distutils.errors import DistutilsPlatformError from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, - rfc822_escape) -from distutils import util # used to patch _environ_checked + rfc822_escape, get_compiler_versions, + _find_exe_version, _MAC_OS_X_LD_VERSION) +from distutils import util from distutils.sysconfig import get_config_vars from distutils import sysconfig from distutils.tests import support +from distutils.version import LooseVersion + +class FakePopen(object): + test_class = None + def __init__(self, cmd, shell, stdout, stderr): + self.cmd = cmd.split()[0] + exes = self.test_class._exes + if self.cmd not in exes: + # we don't want to call the system, returning an empty + # output so it doesn't match + self.stdout = BytesIO() + self.stderr = BytesIO() + else: + self.stdout = BytesIO(exes[self.cmd]) + self.stderr = BytesIO() class UtilTestCase(support.EnvironGuard, unittest.TestCase): @@ -37,9 +55,16 @@ else: self.uname = None self._uname = None - os.uname = self._get_uname + # patching POpen + self.old_find_executable = util.find_executable + util.find_executable = self._find_executable + self._exes = {} + self.old_popen = subprocess.Popen + FakePopen.test_class = self + subprocess.Popen = FakePopen + def tearDown(self): # getting back the environment os.name = self.name @@ -54,6 +79,8 @@ else: del os.uname sysconfig._config_vars = copy(self._config_vars) + util.find_executable = self.old_find_executable + subprocess.Popen = self.old_popen super(UtilTestCase, self).tearDown() def _set_uname(self, uname): @@ -237,6 +264,70 @@ 'header%(8s)s') % {'8s': '\n'+8*' '} self.assertEquals(res, wanted) + def test_find_exe_version(self): + # the ld version scheme under MAC OS is: + # ^@(#)PROGRAM:ld PROJECT:ld64-VERSION + # + # where VERSION is a 2-digit number for major + # revisions. For instance under Leopard, it's + # currently 77 + # + # Dots are used when branching is done. + # + # The SnowLeopard ld64 is currently 95.2.12 + + for output, version in ((b'@(#)PROGRAM:ld PROJECT:ld64-77', '77'), + (b'@(#)PROGRAM:ld PROJECT:ld64-95.2.12', + '95.2.12')): + result = _MAC_OS_X_LD_VERSION.search(output) + self.assertEquals(result.group(1).decode(), version) + + def _find_executable(self, name): + if name in self._exes: + return name + return None + + def test_get_compiler_versions(self): + # get_versions calls distutils.spawn.find_executable on + # 'gcc', 'ld' and 'dllwrap' + self.assertEquals(get_compiler_versions(), (None, None, None)) + + # Let's fake we have 'gcc' and it returns '3.4.5' + self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' + res = get_compiler_versions() + self.assertEquals(str(res[0]), '3.4.5') + + # and let's see what happens when the version + # doesn't match the regular expression + # (\d+\.\d+(\.\d+)*) + self._exes['gcc'] = b'very strange output' + res = get_compiler_versions() + self.assertEquals(res[0], None) + + # same thing for ld + if sys.platform != 'darwin': + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' + res = get_compiler_versions() + self.assertEquals(str(res[1]), '2.17.50') + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_compiler_versions() + self.assertEquals(res[1], None) + else: + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' + res = get_compiler_versions() + self.assertEquals(res[1], None) + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_compiler_versions() + self.assertEquals(str(res[1]), '77') + + # and dllwrap + self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' + res = get_compiler_versions() + self.assertEquals(str(res[2]), '2.17.50') + self._exes['dllwrap'] = b'Cheese Wrap' + res = get_compiler_versions() + self.assertEquals(res[2], None) + def test_suite(): return unittest.makeSuite(UtilTestCase) Modified: python/branches/py3k/Lib/distutils/util.py ============================================================================== --- python/branches/py3k/Lib/distutils/util.py (original) +++ python/branches/py3k/Lib/distutils/util.py Thu Jul 16 18:18:19 2009 @@ -7,10 +7,12 @@ __revision__ = "$Id$" import sys, os, string, re + from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer -from distutils.spawn import spawn +from distutils.spawn import spawn, find_executable from distutils import log +from distutils.version import LooseVersion def get_platform(): """Return a string that identifies the current platform. @@ -539,6 +541,56 @@ sep = '\n' + 8*' ' return sep.join(lines) +_RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') +_MAC_OS_X_LD_VERSION = re.compile(b'^@\(#\)PROGRAM:ld PROJECT:ld64-((\d+)(\.\d+)*)') + +def _find_ld_version(): + """Finds the ld version. The version scheme differs under Mac OSX.""" + if sys.platform == 'darwin': + return _find_exe_version('ld -v', _MAC_OS_X_LD_VERSION) + else: + return _find_exe_version('ld -v') + +def _find_exe_version(cmd, pattern=_RE_VERSION): + """Find the version of an executable by running `cmd` in the shell. + + `pattern` is a compiled regular expression. If not provided, default + to _RE_VERSION. If the command is not found, or the output does not + match the mattern, returns None. + """ + from subprocess import Popen, PIPE + executable = cmd.split()[0] + if find_executable(executable) is None: + return None + pipe = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) + try: + stdout, stderr = pipe.stdout.read(), pipe.stderr.read() + finally: + pipe.stdout.close() + pipe.stderr.close() + # some commands like ld under MacOS X, will give the + # output in the stderr, rather than stdout. + if stdout != b'': + out_string = stdout + else: + out_string = stderr + + result = pattern.search(out_string) + if result is None: + return None + return LooseVersion(result.group(1).decode()) + +def get_compiler_versions(): + """Returns a tuple providing the versions of gcc, ld and dllwrap + + For each command, if a command is not found, None is returned. + Otherwise a LooseVersion instance is returned. + """ + gcc = _find_exe_version('gcc -dumpversion') + ld = _find_ld_version() + dllwrap = _find_exe_version('dllwrap --version') + return gcc, ld, dllwrap + # 2to3 support def run_2to3(files, fixer_names=None, options=None, explicit=None): Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Thu Jul 16 18:18:19 2009 @@ -901,6 +901,11 @@ Library ------- +- Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler + uses the same refactored function to get gcc/ld/dllwrap versions numbers. + It's `distutils.util.get_compiler_versions`. Added deprecation warnings + for the obsolete get_versions() functions. + - Issue #6459: distutils.command.build_ext.get_export_symbols now uses the "PyInit" prefix, rather than "init". From python-checkins at python.org Thu Jul 16 18:19:15 2009 From: python-checkins at python.org (tarek.ziade) Date: Thu, 16 Jul 2009 16:19:15 -0000 Subject: [Python-checkins] r74027 - python/branches/release31-maint Message-ID: Author: tarek.ziade Date: Thu Jul 16 18:19:14 2009 New Revision: 74027 Log: Blocked revisions 74026 via svnmerge ................ r74026 | tarek.ziade | 2009-07-16 18:18:19 +0200 (Thu, 16 Jul 2009) | 9 lines Merged revisions 74024 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74024 | tarek.ziade | 2009-07-16 17:35:45 +0200 (Thu, 16 Jul 2009) | 1 line #6466 refactored distutils duplicate get_versions() functions (used to get gcc/ld/dllwrap versions) ........ ................ Modified: python/branches/release31-maint/ (props changed) From buildbot at python.org Thu Jul 16 18:56:38 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 16 Jul 2009 16:56:38 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1177 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 3 tests failed: test_dbm_dumb test_sax test_tarfile make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Thu Jul 16 20:17:25 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 16 Jul 2009 18:17:25 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2332 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\threading.py", line 524, in __bootstrap_inner File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\threading.py", line 477, in run File "", line 7, in killer : 'NoneType' object is not callable 1 test failed: test_bsddb3 ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() Author: georg.brandl Date: Thu Jul 16 21:24:48 2009 New Revision: 74028 Log: #6482: simplify "except: raise" to "finally:". Modified: python/trunk/Lib/subprocess.py Modified: python/trunk/Lib/subprocess.py ============================================================================== --- python/trunk/Lib/subprocess.py (original) +++ python/trunk/Lib/subprocess.py Thu Jul 16 21:24:48 2009 @@ -1066,10 +1066,10 @@ gc.disable() try: self.pid = os.fork() - except: + finally: if gc_was_enabled: gc.enable() - raise + self._child_created = True if self.pid == 0: # Child From ncoghlan at gmail.com Thu Jul 16 23:29:58 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Fri, 17 Jul 2009 07:29:58 +1000 Subject: [Python-checkins] r74028 - python/trunk/Lib/subprocess.py In-Reply-To: <4a5f7e8a.1b67f10a.06bb.71daSMTPIN_ADDED@mx.google.com> References: <4a5f7e8a.1b67f10a.06bb.71daSMTPIN_ADDED@mx.google.com> Message-ID: <4A5F9BD6.4030002@gmail.com> georg.brandl wrote: > Log: > #6482: simplify "except: raise" to "finally:". > > Modified: > python/trunk/Lib/subprocess.py > > Modified: python/trunk/Lib/subprocess.py > ============================================================================== > --- python/trunk/Lib/subprocess.py (original) > +++ python/trunk/Lib/subprocess.py Thu Jul 16 21:24:48 2009 > @@ -1066,10 +1066,10 @@ > gc.disable() > try: > self.pid = os.fork() > - except: > + finally: > if gc_was_enabled: > gc.enable() > - raise > + > self._child_created = True > if self.pid == 0: > # Child Are you sure about that? This changes the semantics so that gc is re-enabled immediately even in the non-exceptional case. (I haven't checked whether that actually matters here, just commenting on the fact that there is a semantic difference between except/raise and a finally clause) Cheers, Nick. P.S. Just noticed that David Goodger made the same comment on the tracker issue. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From python-checkins at python.org Thu Jul 16 23:47:52 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 16 Jul 2009 21:47:52 -0000 Subject: [Python-checkins] r74029 - python/trunk/Lib/subprocess.py Message-ID: Author: georg.brandl Date: Thu Jul 16 23:47:51 2009 New Revision: 74029 Log: Revert r74028. Modified: python/trunk/Lib/subprocess.py Modified: python/trunk/Lib/subprocess.py ============================================================================== --- python/trunk/Lib/subprocess.py (original) +++ python/trunk/Lib/subprocess.py Thu Jul 16 23:47:51 2009 @@ -1066,10 +1066,10 @@ gc.disable() try: self.pid = os.fork() - finally: + except: if gc_was_enabled: gc.enable() - + raise self._child_created = True if self.pid == 0: # Child From g.brandl at gmx.net Thu Jul 16 23:49:27 2009 From: g.brandl at gmx.net (Georg Brandl) Date: Thu, 16 Jul 2009 23:49:27 +0200 Subject: [Python-checkins] r74028 - python/trunk/Lib/subprocess.py In-Reply-To: <4A5F9BD6.4030002@gmail.com> References: <4a5f7e8a.1b67f10a.06bb.71daSMTPIN_ADDED@mx.google.com> <4A5F9BD6.4030002@gmail.com> Message-ID: Nick Coghlan schrieb: > georg.brandl wrote: >> Log: >> #6482: simplify "except: raise" to "finally:". >> >> Modified: >> python/trunk/Lib/subprocess.py >> >> Modified: python/trunk/Lib/subprocess.py >> ============================================================================== >> --- python/trunk/Lib/subprocess.py (original) >> +++ python/trunk/Lib/subprocess.py Thu Jul 16 21:24:48 2009 >> @@ -1066,10 +1066,10 @@ >> gc.disable() >> try: >> self.pid = os.fork() >> - except: >> + finally: >> if gc_was_enabled: >> gc.enable() >> - raise >> + >> self._child_created = True >> if self.pid == 0: >> # Child > > Are you sure about that? This changes the semantics so that gc is > re-enabled immediately even in the non-exceptional case. > > (I haven't checked whether that actually matters here, just commenting > on the fact that there is a semantic difference between except/raise and > a finally clause) Thanks, I reverted it. Proves that I shouldn't do "easy" tracker items to relax from studying. Georg From buildbot at python.org Fri Jul 17 00:26:37 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 16 Jul 2009 22:26:37 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5168 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: georg.brandl BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 05:51:27 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 03:51:27 -0000 Subject: [Python-checkins] r74030 - python/branches/py3k/Modules/arraymodule.c Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 05:51:27 2009 New Revision: 74030 Log: Use the proper autoconf macro for checking byte order. The BYTEORDER_IS_BIG_ENDIAN macro is defined Objects/unicodeobject.c, thus the code always emitting the little-endian machine format codes. This should fix the failure seen on the SPARC buildbot. Modified: python/branches/py3k/Modules/arraymodule.c Modified: python/branches/py3k/Modules/arraymodule.c ============================================================================== --- python/branches/py3k/Modules/arraymodule.c (original) +++ python/branches/py3k/Modules/arraymodule.c Fri Jul 17 05:51:27 2009 @@ -1526,7 +1526,7 @@ static enum machine_format_code typecode_to_mformat_code(int typecode) { -#ifdef BYTEORDER_IS_BIG_ENDIAN +#ifdef WORDS_BIGENDIAN const int is_big_endian = 1; #else const int is_big_endian = 0; From python-checkins at python.org Fri Jul 17 05:53:04 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 03:53:04 -0000 Subject: [Python-checkins] r74030 - svn:log Message-ID: Author: alexandre.vassalotti Revision: 74030 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,7 +1,6 @@ Use the proper autoconf macro for checking byte order. The BYTEORDER_IS_BIG_ENDIAN macro is defined Objects/unicodeobject.c, -thus the code always emitting the little-endian machine format codes. +thus the code was always emitting the little-endian machine format codes. This should fix the failure seen on the SPARC buildbot. - From python-checkins at python.org Fri Jul 17 06:24:46 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 04:24:46 -0000 Subject: [Python-checkins] r74031 - python/trunk/configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 06:24:45 2009 New Revision: 74031 Log: Use AC_CHECK_SIZEOF to find the size of off_t, pthread_t and time_t. Modified: python/trunk/configure.in Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Fri Jul 17 06:24:45 2009 @@ -1428,26 +1428,10 @@ #include #endif]) - -# Hmph. AC_CHECK_SIZEOF() doesn't include . -AC_MSG_CHECKING(size of off_t) -AC_CACHE_VAL(ac_cv_sizeof_off_t, -[AC_TRY_RUN([#include -#include -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(off_t)); - exit(0); -}], -ac_cv_sizeof_off_t=`cat conftestval`, -ac_cv_sizeof_off_t=0, -ac_cv_sizeof_off_t=4) +AC_CHECK_SIZEOF(off_t, [] +[AC_INCLUDES_DEFAULT, + #include ]) -AC_MSG_RESULT($ac_cv_sizeof_off_t) -AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t, -[The number of bytes in an off_t.]) AC_MSG_CHECKING(whether to enable large file support) if test "$have_long_long" = yes -a \ @@ -1463,26 +1447,10 @@ AC_MSG_RESULT(no) fi -# AC_CHECK_SIZEOF() doesn't include . -AC_MSG_CHECKING(size of time_t) -AC_CACHE_VAL(ac_cv_sizeof_time_t, -[AC_TRY_RUN([#include -#include -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(time_t)); - exit(0); -}], -ac_cv_sizeof_time_t=`cat conftestval`, -ac_cv_sizeof_time_t=0, -ac_cv_sizeof_time_t=4) +AC_CHECK_SIZEOF(time_t, [] +[AC_INCLUDES_DEFAULT, + #include ]) -AC_MSG_RESULT($ac_cv_sizeof_time_t) -AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t, -[The number of bytes in a time_t.]) - # if have pthread_t then define SIZEOF_PTHREAD_T ac_save_cc="$CC" @@ -1498,25 +1466,10 @@ AC_TRY_COMPILE([#include ], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes) AC_MSG_RESULT($have_pthread_t) if test "$have_pthread_t" = yes ; then - # AC_CHECK_SIZEOF() doesn't include . - AC_MSG_CHECKING(size of pthread_t) - AC_CACHE_VAL(ac_cv_sizeof_pthread_t, - [AC_TRY_RUN([#include -#include - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(pthread_t)); - exit(0); - }], - ac_cv_sizeof_pthread_t=`cat conftestval`, - ac_cv_sizeof_pthread_t=0, - ac_cv_sizeof_pthread_t=4) + AC_CHECK_SIZEOF(pthread_t, [] + [AC_INCLUDES_DEFAULT, + #include ]) - AC_MSG_RESULT($ac_cv_sizeof_pthread_t) - AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t, - [The number of bytes in a pthread_t.]) fi CC="$ac_save_cc" From buildbot at python.org Fri Jul 17 06:29:58 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 04:29:58 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1326 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed svn sincerely, -The Buildbot From buildbot at python.org Fri Jul 17 06:30:19 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 04:30:19 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/309 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed svn sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 06:59:05 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 04:59:05 -0000 Subject: [Python-checkins] r74032 - python/trunk/configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 06:59:05 2009 New Revision: 74032 Log: Rename the useless AC_INCLUDES_DEFAULT and protect the includes. This is mostly an aesthetic change. Modified: python/trunk/configure.in Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Fri Jul 17 06:59:05 2009 @@ -1428,9 +1428,10 @@ #include #endif]) -AC_CHECK_SIZEOF(off_t, [] -[AC_INCLUDES_DEFAULT, - #include +AC_CHECK_SIZEOF(off_t, [], [ +#ifdef HAVE_SYS_TYPES_H +#include +#endif ]) AC_MSG_CHECKING(whether to enable large file support) @@ -1447,9 +1448,13 @@ AC_MSG_RESULT(no) fi -AC_CHECK_SIZEOF(time_t, [] -[AC_INCLUDES_DEFAULT, - #include +AC_CHECK_SIZEOF(time_t, [], [ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif ]) # if have pthread_t then define SIZEOF_PTHREAD_T @@ -1466,9 +1471,10 @@ AC_TRY_COMPILE([#include ], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes) AC_MSG_RESULT($have_pthread_t) if test "$have_pthread_t" = yes ; then - AC_CHECK_SIZEOF(pthread_t, [] - [AC_INCLUDES_DEFAULT, - #include + AC_CHECK_SIZEOF(pthread_t, [], [ +#ifdef HAVE_PTHREAD_H +#include +#endif ]) fi CC="$ac_save_cc" From python-checkins at python.org Fri Jul 17 07:26:40 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 05:26:40 -0000 Subject: [Python-checkins] r74033 - python/trunk/configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 07:26:39 2009 New Revision: 74033 Log: Cache the results of all runtime checks. This will be helpful to people who want to compile Python with a cross-compiler. Now you can upload the configure script on your host machine, run it with caching enabled, and download the cached results on your build machine. Modified: python/trunk/configure.in Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Fri Jul 17 07:26:39 2009 @@ -918,10 +918,11 @@ AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing) ac_save_cc="$CC" CC="$CC -fno-strict-aliasing" + AC_CACHE_VAL(ac_cv_no_strict_aliasing_ok, AC_TRY_RUN([int main() { return 0; }], ac_cv_no_strict_aliasing_ok=yes, ac_cv_no_strict_aliasing_ok=no, - ac_cv_no_strict_aliasing_ok=no) + ac_cv_no_strict_aliasing_ok=no)) CC="$ac_save_cc" AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok) if test $ac_cv_no_strict_aliasing_ok = yes @@ -2589,6 +2590,7 @@ # On Tru64, chflags seems to be present, but calling it will # exit Python AC_MSG_CHECKING(for chflags) +AC_CACHE_VAL(ac_cv_have_chflags, AC_TRY_RUN([ #include #include @@ -2598,12 +2600,18 @@ return 1; return 0; } -],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) +], ac_cv_have_chflags=yes, + ac_cv_have_chflags=no, + ac_cv_have_chflags=no) ) +AC_MSG_RESULT($ac_cv_have_chflags) +if test $ac_cv_have_chflags = yes +then + AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) +fi AC_MSG_CHECKING(for lchflags) +AC_CACHE_VAL(ac_cv_have_lchflags, AC_TRY_RUN([ #include #include @@ -2613,10 +2621,15 @@ return 1; return 0; } -],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) +], ac_cv_have_lchflags=yes, + ac_cv_have_lchflags=no, + ac_cv_have_lchflags=no) ) +AC_MSG_RESULT($ac_cv_have_lchflags) +if test $ac_cv_have_lchflags = yes +then + AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) +fi dnl Check if system zlib has *Copy() functions dnl @@ -2770,19 +2783,22 @@ #include #include #include -],[ -getaddrinfo(NULL, NULL, NULL, NULL); -], [ -AC_MSG_RESULT(yes) -AC_MSG_CHECKING(getaddrinfo bug) -AC_TRY_RUN([ +], [getaddrinfo(NULL, NULL, NULL, NULL);], +have_getaddrinfo=yes, +have_getaddrinfo=no) +AC_MSG_RESULT($have_getaddrinfo) +if test $have_getaddrinfo = yes +then + AC_MSG_CHECKING(getaddrinfo bug) + AC_CACHE_VAL(ac_cv_buggy_getaddrinfo, + AC_TRY_RUN([[ #include #include #include #include #include -main() +int main() { int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; @@ -2854,26 +2870,22 @@ if (aitop) freeaddrinfo(aitop); - exit(0); + return 0; bad: if (aitop) freeaddrinfo(aitop); - exit(1); + return 1; } -], -AC_MSG_RESULT(good) -buggygetaddrinfo=no, -AC_MSG_RESULT(buggy) -buggygetaddrinfo=yes, -AC_MSG_RESULT(buggy) -buggygetaddrinfo=yes)], [ -AC_MSG_RESULT(no) -buggygetaddrinfo=yes -]) +]], ac_cv_buggy_getaddrinfo=no, + ac_cv_buggy_getaddrinfo=yes, + ac_cv_buggy_getaddrinfo=yes)) +fi -if test "$buggygetaddrinfo" = "yes"; then - if test "$ipv6" = "yes"; then +if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes +then + if test $ipv6 = yes + then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 @@ -3205,6 +3217,7 @@ # Multiprocessing check for broken sem_getvalue AC_MSG_CHECKING(for broken sem_getvalue) +AC_CACHE_VAL(ac_cv_broken_sem_getvalue, AC_TRY_RUN([ #include #include @@ -3225,11 +3238,16 @@ sem_close(a); return res==-1 ? 1 : 0; } -] -,AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1, define to 1 if your sem_getvalue is broken.) +], ac_cv_broken_sem_getvalue=no, + ac_cv_broken_sem_getvalue=yes, + ac_cv_broken_sem_getvalue=yes) ) +AC_MSG_RESULT($ac_cv_broken_sem_getvalue) +if test $ac_cv_broken_sem_getvalue = yes +then + AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1, + [define to 1 if your sem_getvalue is broken.]) +fi # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of # -0. on some architectures. @@ -3534,6 +3552,7 @@ fi AC_MSG_CHECKING(for broken poll()) +AC_CACHE_VAL(ac_cv_broken_poll, AC_TRY_RUN([ #include @@ -3561,7 +3580,7 @@ ], ac_cv_broken_poll=yes, ac_cv_broken_poll=no, -ac_cv_broken_poll=no) +ac_cv_broken_poll=no)) AC_MSG_RESULT($ac_cv_broken_poll) if test "$ac_cv_broken_poll" = yes then @@ -3763,6 +3782,7 @@ fi AC_MSG_CHECKING(for %zd printf() format support) +AC_CACHE_VAL(ac_cv_have_size_t_format, AC_TRY_RUN([#include #include #include @@ -3796,10 +3816,17 @@ return 1; return 0; -}], -[AC_MSG_RESULT(yes) - AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], - AC_MSG_RESULT(no)) +} +], ac_cv_have_size_t_format=yes, + ac_cv_have_size_t_format=no, + ac_cv_have_size_t_format=no) +) +AC_MSG_RESULT($ac_cv_have_size_t_format) +if test $ac_cv_have_size_t_format = yes +then + AC_DEFINE(PY_FORMAT_SIZE_T, "z", + [Define to printf format modifier for Py_ssize_t]) +fi AC_CHECK_TYPE(socklen_t,, AC_DEFINE(socklen_t,int, From python-checkins at python.org Fri Jul 17 07:35:59 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 05:35:59 -0000 Subject: [Python-checkins] r74034 - python/branches/py3k/Parser/asdl.py Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 07:35:59 2009 New Revision: 74034 Log: The output() function takes only one string argument. Modified: python/branches/py3k/Parser/asdl.py Modified: python/branches/py3k/Parser/asdl.py ============================================================================== --- python/branches/py3k/Parser/asdl.py (original) +++ python/branches/py3k/Parser/asdl.py Fri Jul 17 07:35:59 2009 @@ -323,8 +323,8 @@ try: meth(object, *args) except Exception: - output("Error visiting", repr(object)) - output(sys.exc_info()[1]) + output("Error visiting" + repr(object)) + output(str(sys.exc_info()[1])) traceback.print_exc() # XXX hack if hasattr(self, 'file'): From python-checkins at python.org Fri Jul 17 07:41:49 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 05:41:49 -0000 Subject: [Python-checkins] r74035 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 07:41:49 2009 New Revision: 74035 Log: Blocked revisions 74031-74033 via svnmerge ........ r74031 | alexandre.vassalotti | 2009-07-17 00:24:45 -0400 (Fri, 17 Jul 2009) | 2 lines Use AC_CHECK_SIZEOF to find the size of off_t, pthread_t and time_t. ........ r74032 | alexandre.vassalotti | 2009-07-17 00:59:05 -0400 (Fri, 17 Jul 2009) | 4 lines Rename the useless AC_INCLUDES_DEFAULT and protect the includes. This is mostly an aesthetic change. ........ r74033 | alexandre.vassalotti | 2009-07-17 01:26:39 -0400 (Fri, 17 Jul 2009) | 8 lines Cache the results of all runtime checks. This will be helpful to people who want to compile Python with a cross-compiler. Now you can upload the configure script on your host machine, run it with caching enabled, and download the cached results on your build machine. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Fri Jul 17 07:47:33 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 05:47:33 -0000 Subject: [Python-checkins] r74036 - python/branches/py3k/configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 07:47:33 2009 New Revision: 74036 Log: Use AC_CHECK_SIZEOF to find the size of off_t, pthread_t and time_t. Modified: python/branches/py3k/configure.in Modified: python/branches/py3k/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Fri Jul 17 07:47:33 2009 @@ -1384,26 +1384,11 @@ #include #endif]) - -# Hmph. AC_CHECK_SIZEOF() doesn't include . -AC_MSG_CHECKING(size of off_t) -AC_CACHE_VAL(ac_cv_sizeof_off_t, -[AC_TRY_RUN([#include +AC_CHECK_SIZEOF(off_t, [], [ +#ifdef HAVE_SYS_TYPES_H #include -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(off_t)); - exit(0); -}], -ac_cv_sizeof_off_t=`cat conftestval`, -ac_cv_sizeof_off_t=0, -ac_cv_sizeof_off_t=4) +#endif ]) -AC_MSG_RESULT($ac_cv_sizeof_off_t) -AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t, -[The number of bytes in an off_t.]) AC_MSG_CHECKING(whether to enable large file support) if test "$have_long_long" = yes -a \ @@ -1419,26 +1404,14 @@ AC_MSG_RESULT(no) fi -# AC_CHECK_SIZEOF() doesn't include . -AC_MSG_CHECKING(size of time_t) -AC_CACHE_VAL(ac_cv_sizeof_time_t, -[AC_TRY_RUN([#include +AC_CHECK_SIZEOF(time_t, [], [ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H #include -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(time_t)); - exit(0); -}], -ac_cv_sizeof_time_t=`cat conftestval`, -ac_cv_sizeof_time_t=0, -ac_cv_sizeof_time_t=4) +#endif ]) -AC_MSG_RESULT($ac_cv_sizeof_time_t) -AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t, -[The number of bytes in a time_t.]) - # if have pthread_t then define SIZEOF_PTHREAD_T ac_save_cc="$CC" @@ -1449,35 +1422,20 @@ elif test "$ac_cv_pthread" = "yes" then CC="$CC -pthread" fi + AC_MSG_CHECKING(for pthread_t) have_pthread_t=no AC_TRY_COMPILE([#include ], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes) AC_MSG_RESULT($have_pthread_t) if test "$have_pthread_t" = yes ; then - # AC_CHECK_SIZEOF() doesn't include . - AC_MSG_CHECKING(size of pthread_t) - AC_CACHE_VAL(ac_cv_sizeof_pthread_t, - [AC_TRY_RUN([#include + AC_CHECK_SIZEOF(pthread_t, [], [ +#ifdef HAVE_PTHREAD_H #include - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(pthread_t)); - exit(0); - }], - ac_cv_sizeof_pthread_t=`cat conftestval`, - ac_cv_sizeof_pthread_t=0, - ac_cv_sizeof_pthread_t=4) +#endif ]) - AC_MSG_RESULT($ac_cv_sizeof_pthread_t) - AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t, - [The number of bytes in a pthread_t.]) fi CC="$ac_save_cc" - - AC_SUBST(OTHER_LIBTOOL_OPT) case $ac_sys_system/$ac_sys_release in Darwin/@<:@01567@:>@\..*) From python-checkins at python.org Fri Jul 17 08:00:34 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 06:00:34 -0000 Subject: [Python-checkins] r74037 - python/branches/py3k/configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 08:00:34 2009 New Revision: 74037 Log: Cache the results of all runtime checks. This will be helpful to people who want to compile Python with a cross-compiler. Now you can upload the configure script on your host machine, run it with caching enabled, and download the cached results on your build machine. Modified: python/branches/py3k/configure.in Modified: python/branches/py3k/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Fri Jul 17 08:00:34 2009 @@ -873,10 +873,11 @@ AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing) ac_save_cc="$CC" CC="$CC -fno-strict-aliasing" + AC_CACHE_VAL(ac_cv_no_strict_aliasing_ok, AC_TRY_RUN([int main() { return 0; }], ac_cv_no_strict_aliasing_ok=yes, ac_cv_no_strict_aliasing_ok=no, - ac_cv_no_strict_aliasing_ok=no) + ac_cv_no_strict_aliasing_ok=no)) CC="$ac_save_cc" AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok) if test $ac_cv_no_strict_aliasing_ok = yes @@ -2496,7 +2497,8 @@ # On Tru64, chflags seems to be present, but calling it will # exit Python AC_MSG_CHECKING(for chflags) -AC_TRY_RUN([ +AC_CACHE_VAL(ac_cv_have_chflags, +AC_TRY_RUN([[ #include #include int main(int argc, char*argv[]) @@ -2505,13 +2507,19 @@ return 1; return 0; } -],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) +]], ac_cv_have_chflags=yes, + ac_cv_have_chflags=no, + ac_cv_have_chflags=no) ) +AC_MSG_RESULT($ac_cv_have_chflags) +if test $ac_cv_have_chflags = yes +then + AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) +fi AC_MSG_CHECKING(for lchflags) -AC_TRY_RUN([ +AC_CACHE_VAL(ac_cv_have_lchflags, +AC_TRY_RUN([[ #include #include int main(int argc, char*argv[]) @@ -2520,10 +2528,15 @@ return 1; return 0; } -],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) +]], ac_cv_have_lchflags=yes, + ac_cv_have_lchflags=no, + ac_cv_have_lchflags=no) ) +AC_MSG_RESULT($ac_cv_have_lchflags) +if test $ac_cv_have_lchflags = yes +then + AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) +fi dnl Check if system zlib has *Copy() functions dnl @@ -2677,19 +2690,22 @@ #include #include #include -],[ -getaddrinfo(NULL, NULL, NULL, NULL); -], [ -AC_MSG_RESULT(yes) -AC_MSG_CHECKING(getaddrinfo bug) -AC_TRY_RUN([ +], [getaddrinfo(NULL, NULL, NULL, NULL);], +have_getaddrinfo=yes, +have_getaddrinfo=no) +AC_MSG_RESULT($have_getaddrinfo) +if test $have_getaddrinfo = yes +then + AC_MSG_CHECKING(getaddrinfo bug) + AC_CACHE_VAL(ac_cv_buggy_getaddrinfo, + AC_TRY_RUN([[ #include #include #include #include #include -main() +int main() { int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; @@ -2761,26 +2777,22 @@ if (aitop) freeaddrinfo(aitop); - exit(0); + return 0; bad: if (aitop) freeaddrinfo(aitop); - exit(1); + return 1; } -], -AC_MSG_RESULT(good) -buggygetaddrinfo=no, -AC_MSG_RESULT(buggy) -buggygetaddrinfo=yes, -AC_MSG_RESULT(buggy) -buggygetaddrinfo=yes)], [ -AC_MSG_RESULT(no) -buggygetaddrinfo=yes -]) +]], ac_cv_buggy_getaddrinfo=no, + ac_cv_buggy_getaddrinfo=yes, + ac_cv_buggy_getaddrinfo=yes)) +fi -if test "$buggygetaddrinfo" = "yes"; then - if test "$ipv6" = "yes"; then +if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes +then + if test $ipv6 = yes + then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 @@ -3247,6 +3259,7 @@ # Multiprocessing check for broken sem_getvalue AC_MSG_CHECKING(for broken sem_getvalue) +AC_CACHE_VAL(ac_cv_broken_sem_getvalue, AC_TRY_RUN([ #include #include @@ -3267,11 +3280,16 @@ sem_close(a); return res==-1 ? 1 : 0; } -] -,AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1, define to 1 if your sem_getvalue is broken.) +], ac_cv_broken_sem_getvalue=no, + ac_cv_broken_sem_getvalue=yes, + ac_cv_broken_sem_getvalue=yes) ) +AC_MSG_RESULT($ac_cv_broken_sem_getvalue) +if test $ac_cv_broken_sem_getvalue = yes +then + AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1, + [define to 1 if your sem_getvalue is broken.]) +fi # determine what size digit to use for Python's longs AC_MSG_CHECKING([digit size for Python's longs]) @@ -3528,6 +3546,7 @@ fi AC_MSG_CHECKING(for broken poll()) +AC_CACHE_VAL(ac_cv_broken_poll, AC_TRY_RUN([ #include @@ -3555,7 +3574,7 @@ ], ac_cv_broken_poll=yes, ac_cv_broken_poll=no, -ac_cv_broken_poll=no) +ac_cv_broken_poll=no)) AC_MSG_RESULT($ac_cv_broken_poll) if test "$ac_cv_broken_poll" = yes then @@ -3757,6 +3776,7 @@ fi AC_MSG_CHECKING(for %zd printf() format support) +AC_CACHE_VAL(ac_cv_have_size_t_format, AC_TRY_RUN([#include #include #include @@ -3790,10 +3810,17 @@ return 1; return 0; -}], -[AC_MSG_RESULT(yes) - AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], - AC_MSG_RESULT(no)) +} +], ac_cv_have_size_t_format=yes, + ac_cv_have_size_t_format=no, + ac_cv_have_size_t_format=no) +) +AC_MSG_RESULT($ac_cv_have_size_t_format) +if test $ac_cv_have_size_t_format = yes +then + AC_DEFINE(PY_FORMAT_SIZE_T, "z", + [Define to printf format modifier for Py_ssize_t]) +fi AC_CHECK_TYPE(socklen_t,, AC_DEFINE(socklen_t,int, @@ -3807,6 +3834,7 @@ ]) AC_MSG_CHECKING(for broken mbstowcs) +AC_CACHE_VAL(ac_cv_broken_mbstowcs, AC_TRY_RUN([ #include int main() { @@ -3818,7 +3846,7 @@ ], ac_cv_broken_mbstowcs=no, ac_cv_broken_mbstowcs=yes, -ac_cv_broken_mbstowcs=no) +ac_cv_broken_mbstowcs=no)) AC_MSG_RESULT($ac_cv_broken_mbstowcs) if test "$ac_cv_broken_mbstowcs" = yes then From python-checkins at python.org Fri Jul 17 08:10:06 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 06:10:06 -0000 Subject: [Python-checkins] r74038 - python/trunk/configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 08:10:06 2009 New Revision: 74038 Log: Double-quote the test cases for chflags() and lchflags() to ensure they don't get mangled. Modified: python/trunk/configure.in Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Fri Jul 17 08:10:06 2009 @@ -2591,7 +2591,7 @@ # exit Python AC_MSG_CHECKING(for chflags) AC_CACHE_VAL(ac_cv_have_chflags, -AC_TRY_RUN([ +AC_TRY_RUN([[ #include #include int main(int argc, char*argv[]) @@ -2600,7 +2600,7 @@ return 1; return 0; } -], ac_cv_have_chflags=yes, +]], ac_cv_have_chflags=yes, ac_cv_have_chflags=no, ac_cv_have_chflags=no) ) @@ -2612,7 +2612,7 @@ AC_MSG_CHECKING(for lchflags) AC_CACHE_VAL(ac_cv_have_lchflags, -AC_TRY_RUN([ +AC_TRY_RUN([[ #include #include int main(int argc, char*argv[]) @@ -2621,7 +2621,7 @@ return 1; return 0; } -], ac_cv_have_lchflags=yes, +]], ac_cv_have_lchflags=yes, ac_cv_have_lchflags=no, ac_cv_have_lchflags=no) ) From python-checkins at python.org Fri Jul 17 08:17:33 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 06:17:33 -0000 Subject: [Python-checkins] r74039 - python/trunk/configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 08:17:33 2009 New Revision: 74039 Log: Clean the broken poll() test case. Modified: python/trunk/configure.in Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Fri Jul 17 08:17:33 2009 @@ -3556,27 +3556,21 @@ AC_TRY_RUN([ #include -int main (void) - { +int main() +{ struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; - - close (42); + int poll_test; - int poll_test = poll (&poll_struct, 1, 0); + close (42); + poll_test = poll(&poll_struct, 1, 0); if (poll_test < 0) - { - exit(0); - } + return 0; else if (poll_test == 0 && poll_struct.revents != POLLNVAL) - { - exit(0); - } + return 0; else - { - exit(1); - } - } + return 1; +} ], ac_cv_broken_poll=yes, ac_cv_broken_poll=no, From python-checkins at python.org Fri Jul 17 08:19:22 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 06:19:22 -0000 Subject: [Python-checkins] r74039 - svn:log Message-ID: Author: alexandre.vassalotti Revision: 74039 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1 @@ -Clean the broken poll() test case. +Clean up the test case for broken poll(). From python-checkins at python.org Fri Jul 17 08:20:46 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Fri, 17 Jul 2009 06:20:46 -0000 Subject: [Python-checkins] r74040 - in python/trunk: Lib/test/test_warnings.py Python/_warnings.c Message-ID: Author: hirokazu.yamamoto Date: Fri Jul 17 08:20:46 2009 New Revision: 74040 Log: Issue #6415: Fixed warnings.warn sagfault on bad formatted string. Modified: python/trunk/Lib/test/test_warnings.py python/trunk/Python/_warnings.c Modified: python/trunk/Lib/test/test_warnings.py ============================================================================== --- python/trunk/Lib/test/test_warnings.py (original) +++ python/trunk/Lib/test/test_warnings.py Fri Jul 17 08:20:46 2009 @@ -327,6 +327,19 @@ self.module.warn_explicit, None, Warning, None, 1, registry=42) + def test_bad_str(self): + # issue 6415 + # Warnings instance with a bad format string for __str__ should not + # trigger a bus error. + class BadStrWarning(Warning): + """Warning with a bad format string for __str__.""" + def __str__(self): + return ("A bad formatted string %(err)" % + {"err" : "there is no %(err)s"}) + + with self.assertRaises(ValueError): + self.module.warn(BadStrWarning()) + class CWarnTests(BaseTest, WarnTests): module = c_warnings Modified: python/trunk/Python/_warnings.c ============================================================================== --- python/trunk/Python/_warnings.c (original) +++ python/trunk/Python/_warnings.c Fri Jul 17 08:20:46 2009 @@ -317,6 +317,8 @@ } if (rc == 1) { text = PyObject_Str(message); + if (text == NULL) + goto cleanup; category = (PyObject*)message->ob_type; } else { From python-checkins at python.org Fri Jul 17 08:24:33 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 06:24:33 -0000 Subject: [Python-checkins] r74041 - in python/branches/py3k: configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 08:24:33 2009 New Revision: 74041 Log: Merged revisions 74039 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74039 | alexandre.vassalotti | 2009-07-17 02:17:33 -0400 (Fri, 17 Jul 2009) | 2 lines Clean up the test case for broken poll(). ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/configure.in Modified: python/branches/py3k/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Fri Jul 17 08:24:33 2009 @@ -3550,27 +3550,21 @@ AC_TRY_RUN([ #include -int main (void) - { +int main() +{ struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; - - close (42); + int poll_test; - int poll_test = poll (&poll_struct, 1, 0); + close (42); + poll_test = poll(&poll_struct, 1, 0); if (poll_test < 0) - { - exit(0); - } + return 0; else if (poll_test == 0 && poll_struct.revents != POLLNVAL) - { - exit(0); - } + return 0; else - { - exit(1); - } - } + return 1; +} ], ac_cv_broken_poll=yes, ac_cv_broken_poll=no, From python-checkins at python.org Fri Jul 17 08:26:54 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Fri, 17 Jul 2009 06:26:54 -0000 Subject: [Python-checkins] r74042 - python/trunk/Misc/NEWS Message-ID: Author: hirokazu.yamamoto Date: Fri Jul 17 08:26:54 2009 New Revision: 74042 Log: NEWS about r74040. Modified: python/trunk/Misc/NEWS Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Jul 17 08:26:54 2009 @@ -352,6 +352,8 @@ Library ------- +- Issue #6415: Fixed warnings.warn sagfault on bad formatted string. + - Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler uses the same refactored function to get gcc/ld/dllwrap versions numbers. It's `distutils.util.get_compiler_versions`. Added deprecation warnings From buildbot at python.org Fri Jul 17 08:32:38 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 06:32:38 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/966 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_io ====================================================================== ERROR: test_basic_io (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1753, in test_basic_io self.assertEquals(f.read(), "abc") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1748, in test_basic_io self.assertEquals(f.write("abc"), 3) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_destructor (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1698, in test_destructor t.write("abc") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_detach (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1531, in test_detach t.write("howdy") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1796, in read decoder.decode(self.buffer.read(), final=True)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_writing (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1593, in test_encoding_errors_writing self.assertRaises(UnicodeError, t.write, "\xff") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 493, in readlines return list(self) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1811, in __next__ line = self.readline() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1888, in readline while self._read_chunk(): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_output (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1682, in test_newlines_output txt.write("AAA\nB") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 08:33:04 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Fri, 17 Jul 2009 06:33:04 -0000 Subject: [Python-checkins] r74043 - in python/branches/release26-maint: Lib/test/test_warnings.py Misc/NEWS Python/_warnings.c Message-ID: Author: hirokazu.yamamoto Date: Fri Jul 17 08:33:03 2009 New Revision: 74043 Log: Merged revisions 74040,74042 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74040 | hirokazu.yamamoto | 2009-07-17 15:20:46 +0900 | 1 line Issue #6415: Fixed warnings.warn sagfault on bad formatted string. ........ r74042 | hirokazu.yamamoto | 2009-07-17 15:26:54 +0900 | 1 line NEWS about r74040. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_warnings.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Python/_warnings.c Modified: python/branches/release26-maint/Lib/test/test_warnings.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_warnings.py (original) +++ python/branches/release26-maint/Lib/test/test_warnings.py Fri Jul 17 08:33:03 2009 @@ -337,6 +337,19 @@ self.module.warn_explicit, None, Warning, None, 1, registry=42) + def test_bad_str(self): + # issue 6415 + # Warnings instance with a bad format string for __str__ should not + # trigger a bus error. + class BadStrWarning(Warning): + """Warning with a bad format string for __str__.""" + def __str__(self): + return ("A bad formatted string %(err)" % + {"err" : "there is no %(err)s"}) + + with self.assertRaises(ValueError): + self.module.warn(BadStrWarning()) + class CWarnTests(BaseTest, WarnTests): module = c_warnings Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Fri Jul 17 08:33:03 2009 @@ -62,6 +62,8 @@ Library ------- +- Issue #6415: Fixed warnings.warn sagfault on bad formatted string. + - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. - Issue #5230: pydoc would report no documentation found if a module generated Modified: python/branches/release26-maint/Python/_warnings.c ============================================================================== --- python/branches/release26-maint/Python/_warnings.c (original) +++ python/branches/release26-maint/Python/_warnings.c Fri Jul 17 08:33:03 2009 @@ -304,6 +304,8 @@ } if (rc == 1) { text = PyObject_Str(message); + if (text == NULL) + goto cleanup; category = (PyObject*)message->ob_type; } else { From python-checkins at python.org Fri Jul 17 08:33:51 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 06:33:51 -0000 Subject: [Python-checkins] r74044 - python/trunk/configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 08:33:51 2009 New Revision: 74044 Log: Double-quote the test case for %zd printf() format support to avoid mangling the array declarations in it. Modified: python/trunk/configure.in Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Fri Jul 17 08:33:51 2009 @@ -3777,7 +3777,8 @@ AC_MSG_CHECKING(for %zd printf() format support) AC_CACHE_VAL(ac_cv_have_size_t_format, -AC_TRY_RUN([#include +AC_TRY_RUN([[ +#include #include #include @@ -3811,9 +3812,9 @@ return 0; } -], ac_cv_have_size_t_format=yes, - ac_cv_have_size_t_format=no, - ac_cv_have_size_t_format=no) +]], ac_cv_have_size_t_format=yes, + ac_cv_have_size_t_format=no, + ac_cv_have_size_t_format=no) ) AC_MSG_RESULT($ac_cv_have_size_t_format) if test $ac_cv_have_size_t_format = yes From python-checkins at python.org Fri Jul 17 08:41:02 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 06:41:02 -0000 Subject: [Python-checkins] r74045 - in python/branches/py3k: configure.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 08:41:02 2009 New Revision: 74045 Log: Merged revisions 74044 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74044 | alexandre.vassalotti | 2009-07-17 02:33:51 -0400 (Fri, 17 Jul 2009) | 3 lines Double-quote the test case for %zd printf() format support to avoid mangling the array declarations in it. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/configure.in Modified: python/branches/py3k/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Fri Jul 17 08:41:02 2009 @@ -3771,7 +3771,8 @@ AC_MSG_CHECKING(for %zd printf() format support) AC_CACHE_VAL(ac_cv_have_size_t_format, -AC_TRY_RUN([#include +AC_TRY_RUN([[ +#include #include #include @@ -3805,9 +3806,9 @@ return 0; } -], ac_cv_have_size_t_format=yes, - ac_cv_have_size_t_format=no, - ac_cv_have_size_t_format=no) +]], ac_cv_have_size_t_format=yes, + ac_cv_have_size_t_format=no, + ac_cv_have_size_t_format=no) ) AC_MSG_RESULT($ac_cv_have_size_t_format) if test $ac_cv_have_size_t_format = yes From buildbot at python.org Fri Jul 17 08:50:55 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 06:50:55 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1328 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_asynchat make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 08:55:42 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Fri, 17 Jul 2009 06:55:42 -0000 Subject: [Python-checkins] r74046 - in python/branches/py3k: Lib/test/test_warnings.py Misc/NEWS Python/_warnings.c Message-ID: Author: hirokazu.yamamoto Date: Fri Jul 17 08:55:42 2009 New Revision: 74046 Log: Merged revisions 74040,74042 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74040 | hirokazu.yamamoto | 2009-07-17 15:20:46 +0900 | 1 line Issue #6415: Fixed warnings.warn sagfault on bad formatted string. ........ r74042 | hirokazu.yamamoto | 2009-07-17 15:26:54 +0900 | 1 line NEWS about r74040. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_warnings.py python/branches/py3k/Misc/NEWS python/branches/py3k/Python/_warnings.c Modified: python/branches/py3k/Lib/test/test_warnings.py ============================================================================== --- python/branches/py3k/Lib/test/test_warnings.py (original) +++ python/branches/py3k/Lib/test/test_warnings.py Fri Jul 17 08:55:42 2009 @@ -338,6 +338,20 @@ self.module.warn_explicit, None, Warning, None, 1, registry=42) + def test_bad_str(self): + # issue 6415 + # Warnings instance with a bad format string for __str__ should not + # trigger a bus error. + class BadStrWarning(Warning): + """Warning with a bad format string for __str__.""" + def __str__(self): + return ("A bad formatted string %(err)" % + {"err" : "there is no %(err)s"}) + + with self.assertRaises(ValueError): + self.module.warn(BadStrWarning()) + + class CWarnTests(BaseTest, WarnTests): module = c_warnings Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 17 08:55:42 2009 @@ -40,6 +40,8 @@ Library ------- +- Issue #6415: Fixed warnings.warn sagfault on bad formatted string. + - Issue #6358: The exit status of a command started with os.popen() was reported differently than it did with python 2.x. Modified: python/branches/py3k/Python/_warnings.c ============================================================================== --- python/branches/py3k/Python/_warnings.c (original) +++ python/branches/py3k/Python/_warnings.c Fri Jul 17 08:55:42 2009 @@ -320,6 +320,8 @@ } if (rc == 1) { text = PyObject_Str(message); + if (text == NULL) + goto cleanup; category = (PyObject*)message->ob_type; } else { From python-checkins at python.org Fri Jul 17 09:02:19 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Fri, 17 Jul 2009 07:02:19 -0000 Subject: [Python-checkins] r74047 - in python/branches/release31-maint: Lib/test/test_warnings.py Misc/NEWS Python/_warnings.c Message-ID: Author: hirokazu.yamamoto Date: Fri Jul 17 09:02:18 2009 New Revision: 74047 Log: Merged revisions 74046 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74046 | hirokazu.yamamoto | 2009-07-17 15:55:42 +0900 | 13 lines Merged revisions 74040,74042 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74040 | hirokazu.yamamoto | 2009-07-17 15:20:46 +0900 | 1 line Issue #6415: Fixed warnings.warn sagfault on bad formatted string. ........ r74042 | hirokazu.yamamoto | 2009-07-17 15:26:54 +0900 | 1 line NEWS about r74040. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_warnings.py python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Python/_warnings.c Modified: python/branches/release31-maint/Lib/test/test_warnings.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_warnings.py (original) +++ python/branches/release31-maint/Lib/test/test_warnings.py Fri Jul 17 09:02:18 2009 @@ -338,6 +338,20 @@ self.module.warn_explicit, None, Warning, None, 1, registry=42) + def test_bad_str(self): + # issue 6415 + # Warnings instance with a bad format string for __str__ should not + # trigger a bus error. + class BadStrWarning(Warning): + """Warning with a bad format string for __str__.""" + def __str__(self): + return ("A bad formatted string %(err)" % + {"err" : "there is no %(err)s"}) + + with self.assertRaises(ValueError): + self.module.warn(BadStrWarning()) + + class CWarnTests(BaseTest, WarnTests): module = c_warnings Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Jul 17 09:02:18 2009 @@ -34,6 +34,8 @@ Library ------- +- Issue #6415: Fixed warnings.warn sagfault on bad formatted string. + - Issue #6358: The exit status of a command started with os.popen() was reported differently than it did with python 2.x. Modified: python/branches/release31-maint/Python/_warnings.c ============================================================================== --- python/branches/release31-maint/Python/_warnings.c (original) +++ python/branches/release31-maint/Python/_warnings.c Fri Jul 17 09:02:18 2009 @@ -320,6 +320,8 @@ } if (rc == 1) { text = PyObject_Str(message); + if (text == NULL) + goto cleanup; category = (PyObject*)message->ob_type; } else { From buildbot at python.org Fri Jul 17 09:20:38 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 07:20:38 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1180 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_thread.py", line 49, in task self.done_mutex.release() _thread.error: release unlocked lock Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_thread.py", line 49, in task self.done_mutex.release() _thread.error: release unlocked lock 1 test failed: test_urllib2 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 17 09:27:20 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 07:27:20 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 2.6 Message-ID: The Buildbot has detected a new failure of x86 gentoo 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%202.6/builds/416 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: hirokazu.yamamoto BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_warnings ====================================================================== ERROR: test_bad_str (test.test_warnings.CWarnTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildslave/python-trunk/2.6.norwitz-x86/build/Lib/test/test_warnings.py", line 350, in test_bad_str with self.assertRaises(ValueError): TypeError: failUnlessRaises() takes at least 3 arguments (2 given) ====================================================================== ERROR: test_bad_str (test.test_warnings.PyWarnTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildslave/python-trunk/2.6.norwitz-x86/build/Lib/test/test_warnings.py", line 350, in test_bad_str with self.assertRaises(ValueError): TypeError: failUnlessRaises() takes at least 3 arguments (2 given) make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 09:46:48 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 07:46:48 -0000 Subject: [Python-checkins] r74048 - in python/trunk: configure pyconfig.h.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 09:46:46 2009 New Revision: 74048 Log: Regenerate configure script. Modified: python/trunk/configure python/trunk/pyconfig.h.in Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Fri Jul 17 09:46:46 2009 @@ -1,12 +1,12 @@ #! /bin/sh -# From configure.in Revision: 72898 . +# From configure.in Revision: 74044 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for python 2.7. +# Generated by GNU Autoconf 2.63 for python 2.7. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -18,7 +18,7 @@ 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -40,17 +40,45 @@ 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=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -66,8 +94,6 @@ # 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. @@ -90,7 +116,7 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -103,17 +129,10 @@ PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - 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) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -135,7 +154,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -161,7 +180,7 @@ as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -243,7 +262,7 @@ 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -264,7 +283,7 @@ 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -344,10 +363,10 @@ 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+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -416,9 +435,10 @@ 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 + echo Please tell bug-autoconf at gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. } @@ -454,7 +474,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_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 @@ -482,7 +502,6 @@ *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -495,19 +514,22 @@ rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - 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 || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + 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' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -532,10 +554,10 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -616,128 +638,160 @@ # 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 -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 -ARCH_RUN_32BIT -PYTHONFRAMEWORK -PYTHONFRAMEWORKIDENTIFIER -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 -GNULD -RANLIB -AR -ARFLAGS -SVNVERSION -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -LN -OPT -BASECFLAGS -UNIVERSAL_ARCH_FLAGS -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 +ac_subst_vars='LTLIBOBJS SRCDIRS -LTLIBOBJS' +THREADHEADERS +UNICODE_OBJS +LIBC +LIBM +HAVE_GETHOSTBYNAME +HAVE_GETHOSTBYNAME_R +HAVE_GETHOSTBYNAME_R_3_ARG +HAVE_GETHOSTBYNAME_R_5_ARG +HAVE_GETHOSTBYNAME_R_6_ARG +LIBOBJS +TRUE +MACHDEP_OBJS +DYNLOADFILE +DLINCLDIR +THREADOBJ +LDLAST +USE_THREAD_MODULE +SIGNAL_OBJS +USE_SIGNAL_MODULE +SHLIBS +CFLAGSFORSHARED +LINKFORSHARED +CCSHARED +BLDSHARED +LDSHARED +SO +LIBTOOL_CRUFT +OTHER_LIBTOOL_OPT +UNIVERSAL_ARCH_FLAGS +BASECFLAGS +OPT +LN +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +SVNVERSION +ARFLAGS +AR +RANLIB +GNULD +LINKCC +RUNSHARED +INSTSONAME +LDLIBRARYDIR +BLDLIBRARY +DLLLIBRARY +LDLIBRARY +LIBRARY +BUILDEXEEXT +EGREP +GREP +CPP +MAINCC +CXX +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +EXPORT_MACOSX_DEPLOYMENT_TARGET +CONFIGURE_MACOSX_DEPLOYMENT_TARGET +EXTRAMACHDEPPATH +EXTRAPLATDIR +SGI_ABI +MACHDEP +FRAMEWORKUNIXTOOLSPREFIX +FRAMEWORKALTINSTALLLAST +FRAMEWORKALTINSTALLFIRST +FRAMEWORKINSTALLLAST +FRAMEWORKINSTALLFIRST +PYTHONFRAMEWORKINSTALLDIR +PYTHONFRAMEWORKPREFIX +PYTHONFRAMEWORKDIR +PYTHONFRAMEWORKIDENTIFIER +PYTHONFRAMEWORK +ARCH_RUN_32BIT +UNIVERSALSDK +CONFIG_ARGS +SOVERSION +VERSION +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_universalsdk +with_universal_archs +with_framework_name +enable_framework +with_gcc +with_cxx_main +with_suffix +enable_shared +enable_profiling +with_pydebug +enable_toolbox_glue +with_libs +with_system_ffi +with_dbmliborder +with_signal_module +with_dec_threads +with_threads +with_thread +with_pth +enable_ipv6 +with_doc_strings +with_tsc +with_pymalloc +with_wctype_functions +with_fpectl +with_libm +with_libc +enable_big_digits +enable_unicode +' ac_precious_vars='build_alias host_alias target_alias @@ -752,6 +806,8 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -850,13 +906,21 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -869,13 +933,21 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1066,22 +1138,38 @@ ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1101,7 +1189,7 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1110,16 +1198,16 @@ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1128,22 +1216,38 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. 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=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) 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 + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1158,7 +1262,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1174,10 +1278,10 @@ 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 + { $as_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 + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1185,12 +1289,12 @@ if test -z "$srcdir"; then ac_srcdir_defaulted=yes # 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 || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1217,12 +1321,12 @@ fi 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 + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi 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 + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1271,9 +1375,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1283,25 +1387,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --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] - --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] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --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] + --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 @@ -1315,6 +1419,7 @@ cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-universalsdk[=SDKDIR] @@ -1388,15 +1493,17 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_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/ ;; @@ -1432,7 +1539,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1442,10 +1549,10 @@ if $ac_init_version; then cat <<\_ACEOF python configure 2.7 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1456,7 +1563,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by python $as_me 2.7, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -1492,7 +1599,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1527,7 +1634,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1579,11 +1686,12 @@ 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;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1613,9 +1721,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1630,9 +1738,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1648,8 +1756,8 @@ echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1691,21 +1799,24 @@ # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue 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;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1715,16 +1826,16 @@ # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1738,29 +1849,38 @@ 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 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # 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=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1770,10 +1890,12 @@ fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1915,20 +2037,20 @@ UNIVERSAL_ARCHS="32-bit" -{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5 -echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5 +$as_echo_n "checking for --with-universal-archs... " >&6; } # Check whether --with-universal-archs was given. if test "${with_universal_archs+set}" = set; then withval=$with_universal_archs; - { echo "$as_me:$LINENO: result: $withval" >&5 -echo "${ECHO_T}$withval" >&6; } + { $as_echo "$as_me:$LINENO: result: $withval" >&5 +$as_echo "$withval" >&6; } UNIVERSAL_ARCHS="$withval" else - { echo "$as_me:$LINENO: result: 32-bit" >&5 -echo "${ECHO_T}32-bit" >&6; } + { $as_echo "$as_me:$LINENO: result: 32-bit" >&5 +$as_echo "32-bit" >&6; } fi @@ -2052,8 +2174,8 @@ ## # Set name for machine-dependent library files -{ echo "$as_me:$LINENO: checking MACHDEP" >&5 -echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5 +$as_echo_n "checking MACHDEP... " >&6; } if test -z "$MACHDEP" then ac_sys_system=`uname -s` @@ -2216,14 +2338,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; } +{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5 +$as_echo "$MACHDEP" >&6; } # And add extra plat-mac for darwin -{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5 -echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5 +$as_echo_n "checking EXTRAPLATDIR... " >&6; } if test -z "$EXTRAPLATDIR" then case $MACHDEP in @@ -2237,8 +2359,8 @@ ;; esac fi -{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5 -echo "${ECHO_T}$EXTRAPLATDIR" >&6; } +{ $as_echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5 +$as_echo "$EXTRAPLATDIR" >&6; } # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, # it may influence the way we can build extensions, so distutils @@ -2248,11 +2370,11 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' -{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5 -echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5 +$as_echo_n "checking machine type as reported by uname -m... " >&6; } ac_sys_machine=`uname -m` -{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5 -echo "${ECHO_T}$ac_sys_machine" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5 +$as_echo "$ac_sys_machine" >&6; } # checks for alternative programs @@ -2264,8 +2386,8 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5 +$as_echo_n "checking for --without-gcc... " >&6; } # Check whether --with-gcc was given. if test "${with_gcc+set}" = set; then @@ -2298,8 +2420,8 @@ OPT="$OPT -O" ;; *) - { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5 -echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;} + { { $as_echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5 +$as_echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -2313,15 +2435,15 @@ esac fi -{ echo "$as_me:$LINENO: result: $without_gcc" >&5 -echo "${ECHO_T}$without_gcc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5 +$as_echo "$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" then - { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file + { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)" >&5 -echo "$as_me: error: cached CC is different -- throw away $cache_file +$as_echo "$as_me: error: cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)" >&2;} { (exit 1); exit 1; }; } fi @@ -2334,10 +2456,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2350,7 +2472,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2361,11 +2483,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2374,10 +2496,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2390,7 +2512,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2401,11 +2523,11 @@ 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; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2413,12 +2535,8 @@ 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;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2431,10 +2549,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2447,7 +2565,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2458,11 +2576,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2471,10 +2589,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2492,7 +2610,7 @@ continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2515,11 +2633,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2530,10 +2648,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2546,7 +2664,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2557,11 +2675,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2574,10 +2692,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2590,7 +2708,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2601,11 +2719,11 @@ 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; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2617,12 +2735,8 @@ 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;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2632,44 +2746,50 @@ fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2688,27 +2808,22 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # 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; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# 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. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2719,10 +2834,11 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # 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' @@ -2733,7 +2849,7 @@ do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2760,25 +2876,27 @@ ac_file='' fi -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables +$as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # 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; } +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&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 @@ -2787,49 +2905,53 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. +$as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # 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; } +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2838,31 +2960,33 @@ 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 | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2885,40 +3009,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then 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 | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2944,20 +3071,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -2967,15 +3095,19 @@ 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; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -3002,20 +3134,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -3040,20 +3173,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3079,20 +3213,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3107,8 +3242,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$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 @@ -3124,10 +3259,10 @@ CFLAGS= fi fi -{ 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; } +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3198,20 +3333,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3227,15 +3363,15 @@ # 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; } ;; + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) 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; } ;; + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3248,8 +3384,8 @@ -{ echo "$as_me:$LINENO: checking for --with-cxx-main=" >&5 -echo $ECHO_N "checking for --with-cxx-main=... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=" >&5 +$as_echo_n "checking for --with-cxx-main=... " >&6; } # Check whether --with-cxx_main was given. if test "${with_cxx_main+set}" = set; then @@ -3274,8 +3410,8 @@ fi -{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5 -echo "${ECHO_T}$with_cxx_main" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5 +$as_echo "$with_cxx_main" >&6; } preset_cxx="$CXX" if test -z "$CXX" @@ -3283,10 +3419,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CXX in [\\/]* | ?:[\\/]*) @@ -3301,7 +3437,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3314,20 +3450,20 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CXX in [\\/]* | ?:[\\/]*) @@ -3342,7 +3478,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3355,11 +3491,11 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi ;; @@ -3375,10 +3511,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -3391,7 +3527,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3402,11 +3538,11 @@ fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3421,12 +3557,12 @@ fi if test "$preset_cxx" != "$CXX" then - { echo "$as_me:$LINENO: WARNING: + { $as_echo "$as_me:$LINENO: WARNING: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. " >&5 -echo "$as_me: WARNING: +$as_echo "$as_me: WARNING: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. @@ -3441,15 +3577,15 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3481,20 +3617,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3518,13 +3655,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3532,7 +3670,7 @@ # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3557,8 +3695,8 @@ else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3586,20 +3724,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3623,13 +3762,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3637,7 +3777,7 @@ # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3653,11 +3793,13 @@ if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -3667,42 +3809,37 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ 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 +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then 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 + # 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. + 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" + $as_echo_n 0123456789 >"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" + $as_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` @@ -3717,74 +3854,60 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done 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;} + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else 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 + if test -z "$EGREP"; then 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 + # 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. + 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" + $as_echo_n 0123456789 >"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" + $as_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` @@ -3799,148 +3922,595 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done 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;} + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&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 +#include +#include +#include -{ echo "$as_me:$LINENO: checking for AIX" >&5 -echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +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. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef _AIX - yes -#endif +#include _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; } -cat >>confdefs.h <<\_ACEOF -#define _ALL_SOURCE 1 + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + ac_cv_header_stdc=no fi rm -f conftest* +fi +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -# Check for unsupported systems -case $ac_sys_system/$ac_sys_release in -atheos*|Linux*/1*) - echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. - echo See README for details. - exit 1;; +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +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 --with-suffix" >&5 -echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; } -# Check whether --with-suffix was given. -if test "${with_suffix+set}" = set; then - withval=$with_suffix; - case $withval in - no) EXEEXT=;; - yes) EXEEXT=.exe;; - *) EXEEXT=$withval;; - esac fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -{ 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 +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF -{ 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; } - BUILDEXEEXT=.exe -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - BUILDEXEEXT=$EXEEXT -fi -rmdir CaseSensitiveTestDir +# On IRIX 5.3, sys/types and inttypes.h are conflicting. -case $MACHDEP in -bsdos*) - case $CC in - gcc) CC="$CC -D_HAVE_BSDI";; - esac;; -esac -case $ac_sys_system in -hp*|HP*) - case $CC in - cc|*/cc) CC="$CC -Ae";; - esac;; -Monterey*) - case $CC in - cc) CC="$CC -Wl,-Bexport";; - esac;; -SunOS*) - # Some functions have a prototype only with that define, e.g. confstr -cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF - ;; -esac -{ echo "$as_me:$LINENO: checking LIBRARY" >&5 -echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; } -if test -z "$LIBRARY" -then - LIBRARY='libpython$(VERSION).a' + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + 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 + +#include <$ac_header> +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + if test "${ac_cv_header_minix_config_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 +$as_echo_n "checking minix/config.h usability... " >&6; } +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 +#include +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 +$as_echo_n "checking minix/config.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_minix_config_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } + +fi +if test "x$ac_cv_header_minix_config_h" = x""yes; then + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_1_SOURCE 2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _MINIX 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_safe_to_define___extensions__=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_safe_to_define___extensions__=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 +_ACEOF + + + +# Check for unsupported systems +case $ac_sys_system/$ac_sys_release in +atheos*|Linux*/1*) + echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. + echo See README for details. + exit 1;; +esac + + +{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5 +$as_echo_n "checking for --with-suffix... " >&6; } + +# Check whether --with-suffix was given. +if test "${with_suffix+set}" = set; then + withval=$with_suffix; + case $withval in + no) EXEEXT=;; + yes) EXEEXT=.exe;; + *) EXEEXT=$withval;; + esac +fi + +{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5 +$as_echo "$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 + +{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 +$as_echo_n "checking for case-insensitive build directory... " >&6; } +if test ! -d CaseSensitiveTestDir; then +mkdir CaseSensitiveTestDir +fi + +if test -d casesensitivetestdir +then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + BUILDEXEEXT=.exe +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + BUILDEXEEXT=$EXEEXT +fi +rmdir CaseSensitiveTestDir + +case $MACHDEP in +bsdos*) + case $CC in + gcc) CC="$CC -D_HAVE_BSDI";; + esac;; +esac + +case $ac_sys_system in +hp*|HP*) + case $CC in + cc|*/cc) CC="$CC -Ae";; + esac;; +Monterey*) + case $CC in + cc) CC="$CC -Wl,-Bexport";; + esac;; +SunOS*) + # Some functions have a prototype only with that define, e.g. confstr + +cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + ;; +esac + + + +{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5 +$as_echo_n "checking LIBRARY... " >&6; } +if test -z "$LIBRARY" +then + LIBRARY='libpython$(VERSION).a' fi -{ echo "$as_me:$LINENO: result: $LIBRARY" >&5 -echo "${ECHO_T}$LIBRARY" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5 +$as_echo "$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 @@ -3975,8 +4545,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; } +{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5 +$as_echo_n "checking LINKCC... " >&6; } if test -z "$LINKCC" then LINKCC='$(PURIFY) $(MAINCC)' @@ -3996,8 +4566,8 @@ LINKCC=qcc;; esac fi -{ echo "$as_me:$LINENO: result: $LINKCC" >&5 -echo "${ECHO_T}$LINKCC" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5 +$as_echo "$LINKCC" >&6; } # GNULD is set to "yes" if the GNU linker is used. If this goes wrong # make sure we default having it set to "no": this is used by @@ -4005,8 +4575,8 @@ # to linker command lines, and failing to detect GNU ld simply results # in the same bahaviour as before. -{ echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } ac_prog=ld if test "$GCC" = yes; then ac_prog=`$CC -print-prog-name=ld` @@ -4017,11 +4587,11 @@ *) GNULD=no;; esac -{ echo "$as_me:$LINENO: result: $GNULD" >&5 -echo "${ECHO_T}$GNULD" >&6; } +{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5 +$as_echo "$GNULD" >&6; } -{ echo "$as_me:$LINENO: checking for --enable-shared" >&5 -echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5 +$as_echo_n "checking for --enable-shared... " >&6; } # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; @@ -4037,11 +4607,11 @@ enable_shared="no";; esac fi -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } +{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } -{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5 -echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5 +$as_echo_n "checking for --enable-profiling... " >&6; } # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then enableval=$enable_profiling; ac_save_cc="$CC" @@ -4063,29 +4633,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_enable_profiling="yes" else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_enable_profiling="no" fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4093,8 +4666,8 @@ CC="$ac_save_cc" fi -{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 -echo "${ECHO_T}$ac_enable_profiling" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 +$as_echo "$ac_enable_profiling" >&6; } case "$ac_enable_profiling" in "yes") @@ -4103,8 +4676,8 @@ ;; esac -{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5 -echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5 +$as_echo_n "checking LDLIBRARY... " >&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 @@ -4191,16 +4764,16 @@ esac fi -{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 -echo "${ECHO_T}$LDLIBRARY" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -4213,7 +4786,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4224,11 +4797,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4237,10 +4810,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -4253,7 +4826,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4264,11 +4837,11 @@ 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; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -4276,12 +4849,8 @@ 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;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -4295,10 +4864,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -4311,7 +4880,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4322,11 +4891,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4345,10 +4914,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_SVNVERSION+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$SVNVERSION"; then ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test. @@ -4361,7 +4930,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4373,11 +4942,11 @@ fi SVNVERSION=$ac_cv_prog_SVNVERSION if test -n "$SVNVERSION"; then - { echo "$as_me:$LINENO: result: $SVNVERSION" >&5 -echo "${ECHO_T}$SVNVERSION" >&6; } + { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5 +$as_echo "$SVNVERSION" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4413,8 +4982,8 @@ 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;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi @@ -4440,11 +5009,12 @@ # 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; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4473,17 +5043,29 @@ # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -4496,8 +5078,8 @@ INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -4520,8 +5102,8 @@ fi # Check for --with-pydebug -{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5 -echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5 +$as_echo_n "checking for --with-pydebug... " >&6; } # Check whether --with-pydebug was given. if test "${with_pydebug+set}" = set; then @@ -4533,15 +5115,15 @@ #define Py_DEBUG 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; }; + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; }; Py_DEBUG='true' -else { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; }; Py_DEBUG='false' +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; }; Py_DEBUG='false' fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4619,11 +5201,14 @@ # 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; } + { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 +$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; } ac_save_cc="$CC" CC="$CC -fno-strict-aliasing" - if test "$cross_compiling" = yes; then + if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then ac_cv_no_strict_aliasing_ok=no else cat >conftest.$ac_ext <<_ACEOF @@ -4640,36 +5225,41 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_no_strict_aliasing_ok=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_no_strict_aliasing_ok=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +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; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5 +$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; } if test $ac_cv_no_strict_aliasing_ok = yes then BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" @@ -4708,8 +5298,8 @@ ARCH_RUN_32BIT="arch -i386 -ppc" else - { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 -echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} + { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 +$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} { (exit 1); exit 1; }; } fi @@ -4783,10 +5373,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5 +$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; } if test "${ac_cv_opt_olimit_ok+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -OPT:Olimit=0" @@ -4807,29 +5397,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_opt_olimit_ok=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_opt_olimit_ok=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4837,8 +5430,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5 +$as_echo "$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 @@ -4851,10 +5444,10 @@ ;; 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; } + { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 +$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; } if test "${ac_cv_olimit_ok+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -Olimit 1500" @@ -4875,29 +5468,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_olimit_ok=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_olimit_ok=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4905,8 +5501,8 @@ CC="$ac_save_cc" fi - { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 -echo "${ECHO_T}$ac_cv_olimit_ok" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 +$as_echo "$ac_cv_olimit_ok" >&6; } if test $ac_cv_olimit_ok = yes; then BASECFLAGS="$BASECFLAGS -Olimit 1500" fi @@ -4915,8 +5511,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; } + { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5 +$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; } save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -4942,13 +5538,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -4958,14 +5555,14 @@ #define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4978,10 +5575,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 +$as_echo_n "checking whether pthreads are available without options... " >&6; } if test "${ac_cv_pthread_is_default+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_pthread_is_default=no @@ -5012,19 +5609,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_pthread_is_default=yes @@ -5032,13 +5631,14 @@ ac_cv_pthread=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_pthread_is_default=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -5046,8 +5646,8 @@ fi -{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 -echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 +$as_echo "$ac_cv_pthread_is_default" >&6; } if test $ac_cv_pthread_is_default = yes @@ -5059,10 +5659,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 +$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } if test "${ac_cv_kpthread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -Kpthread" @@ -5095,29 +5695,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_kpthread=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_kpthread=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -5125,8 +5728,8 @@ CC="$ac_save_cc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 -echo "${ECHO_T}$ac_cv_kpthread" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 +$as_echo "$ac_cv_kpthread" >&6; } fi if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no @@ -5136,10 +5739,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 +$as_echo_n "checking whether $CC accepts -Kthread... " >&6; } if test "${ac_cv_kthread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -Kthread" @@ -5153,18 +5756,314 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); +#include + +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_kthread=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_kthread=no +fi +rm -rf conftest.dSYM +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 + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 +$as_echo "$ac_cv_kthread" >&6; } +fi + +if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no +then +# -pthread, if available, provides the right #defines +# and linker options to make pthread_create available +# 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. +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5 +$as_echo_n "checking whether $CC accepts -pthread... " >&6; } +if test "${ac_cv_thread+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_cc="$CC" +CC="$CC -pthread" +if test "$cross_compiling" = yes; then + ac_cv_pthread=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_pthread=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_pthread=no +fi +rm -rf conftest.dSYM +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 + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 +$as_echo "$ac_cv_pthread" >&6; } +fi + +# If we have set a CC compiler flag for thread support then +# check if it works for CXX, too. +ac_cv_cxx_thread=no +if test ! -z "$CXX" +then +{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5 +$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; } +ac_save_cxx="$CXX" + +if test "$ac_cv_kpthread" = "yes" +then + CXX="$CXX -Kpthread" + ac_cv_cxx_thread=yes +elif test "$ac_cv_kthread" = "yes" +then + CXX="$CXX -Kthread" + ac_cv_cxx_thread=yes +elif test "$ac_cv_pthread" = "yes" +then + CXX="$CXX -pthread" + ac_cv_cxx_thread=yes +fi + +if test $ac_cv_cxx_thread = yes +then + echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext + $CXX -c conftest.$ac_ext 2>&5 + if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ + && test -s conftest$ac_exeext && ./conftest$ac_exeext + then + ac_cv_cxx_thread=yes + else + ac_cv_cxx_thread=no + fi + rm -fr conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 +$as_echo "$ac_cv_cxx_thread" >&6; } +fi +CXX="$ac_save_cxx" + + +# checks for header files +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&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 +#include +#include +#include + +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } - _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -5172,164 +6071,275 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_kthread=yes + : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_kthread=no +ac_cv_header_stdc=no fi +rm -rf conftest.dSYM 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 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF -{ 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 -then -# -pthread, if available, provides the right #defines -# and linker options to make pthread_create available -# 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; } -if test "${ac_cv_thread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cc="$CC" -CC="$CC -pthread" -if test "$cross_compiling" = yes; then - ac_cv_pthread=no + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +fcntl.h grp.h \ +ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ +shadow.h signal.h stdint.h stropts.h termios.h thread.h \ +unistd.h utime.h \ +sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ +sys/lock.h sys/mkdev.h sys/modem.h \ +sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ +sys/termio.h sys/time.h \ +sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ +sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ +bluetooth/bluetooth.h linux/tipc.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - +$ac_includes_default +#include <$ac_header> _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_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 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_pthread=yes + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_header_compiler=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_pthread=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_header_compiler=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -CC="$ac_save_cc" -fi +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -echo "${ECHO_T}$ac_cv_pthread" >&6; } + ac_header_preproc=no fi -# If we have set a CC compiler flag for thread support then -# check if it works for CXX, too. -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; } -ac_save_cxx="$CXX" - -if test "$ac_cv_kpthread" = "yes" -then - CXX="$CXX -Kpthread" - ac_cv_cxx_thread=yes -elif test "$ac_cv_kthread" = "yes" -then - CXX="$CXX -Kthread" - ac_cv_cxx_thread=yes -elif test "$ac_cv_pthread" = "yes" -then - CXX="$CXX -pthread" - ac_cv_cxx_thread=yes -fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -if test $ac_cv_cxx_thread = yes -then - echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext - $CXX -c conftest.$ac_ext 2>&5 - if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ - && test -s conftest$ac_exeext && ./conftest$ac_exeext - then - ac_cv_cxx_thread=yes - else - ac_cv_cxx_thread=no - fi - rm -fr conftest* +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi -CXX="$ac_save_cxx" +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi -# 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; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +done + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5337,15 +6347,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include -#include +#include +#include <$ac_hdr> int main () { - +if ((DIR *) 0) +return 0; ; return 0; } @@ -5356,73 +6365,226 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_stdc=yes + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no + eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +/* 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 +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +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 +done +if test "${ac_cv_search_opendir+set}" = set; then : else - ac_cv_header_stdc=no + ac_cv_search_opendir=no fi -rm -f conftest* +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$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 -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF +else + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +/* 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 +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +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 +done +if test "${ac_cv_search_opendir+set}" = set; then : else - ac_cv_header_stdc=no + ac_cv_search_opendir=no fi -rm -f conftest* +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$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 -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : +fi + +{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 +$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } +if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5430,104 +6592,73 @@ cat confdefs.h >>conftest.$ac_ext 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)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +#include int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +return makedev(0, 0); + ; return 0; } _ACEOF -rm -f conftest$ac_exeext +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>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_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 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_header_sys_types_h_makedev=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_header_stdc=no -fi -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; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - + ac_cv_header_sys_types_h_makedev=no fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 +$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - 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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test $ac_cv_header_sys_types_h_makedev = no; then +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +$as_echo_n "checking for sys/mkdev.h... " >&6; } +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 +$as_echo_n "checking sys/mkdev.h usability... " >&6; } +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 - -#include <$ac_header> +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -5535,121 +6666,134 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - eval "$as_ac_Header=yes" + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 +$as_echo_n "checking sys/mkdev.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include _ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -done - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +$as_echo_n "checking for sys/mkdev.h... " >&6; } +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_sys_mkdev_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } +fi +if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define MAJOR_IN_MKDEV 1 +_ACEOF +fi -for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ -fcntl.h grp.h \ -ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ -shadow.h signal.h stdint.h stropts.h termios.h thread.h \ -unistd.h utime.h \ -sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ -sys/lock.h sys/mkdev.h sys/modem.h \ -sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ -sys/termio.h sys/time.h \ -sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ -sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ -bluetooth/bluetooth.h linux/tipc.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -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 + if test $ac_cv_header_sys_mkdev_h = no; then + if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +$as_echo_n "checking for sys/sysmacros.h... " >&6; } +if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +$as_echo "$ac_cv_header_sys_sysmacros_h" >&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; } +{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 +$as_echo_n "checking sys/sysmacros.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5657,7 +6801,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <$ac_header> +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -5665,90 +6809,92 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 +$as_echo_n "checking sys/sysmacros.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> +#include _ACEOF 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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -5757,39 +6903,107 @@ ) | 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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +$as_echo_n "checking for sys/sysmacros.h... " >&6; } +if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_header_sys_sysmacros_h=$ac_header_preproc fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define MAJOR_IN_SYSMACROS 1 _ACEOF fi -done + + fi +fi +# On Solaris, term.h requires curses.h +for ac_header in term.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_CURSES_H +#include +#endif -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; } +#include <$ac_header> +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# On Linux, netlink.h requires asm/types.h + +for ac_header in linux/netlink.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5797,17 +7011,16 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include <$ac_hdr> -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} +#ifdef HAVE_ASM_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -5815,276 +7028,285 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# checks for typedefs +was_it_defined=no +{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5 +$as_echo_n "checking for clock_t in time.h... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "clock_t" >/dev/null 2>&1; then + was_it_defined=yes +else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 +cat >>confdefs.h <<\_ACEOF +#define clock_t long _ACEOF -ac_header_dirent=$ac_hdr; break + fi +rm -f conftest* -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; } -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS +{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5 +$as_echo "$was_it_defined" >&6; } + +# Check whether using makedev requires defining _OSF_SOURCE +{ $as_echo "$as_me:$LINENO: checking for makedev" >&5 +$as_echo_n "checking for makedev... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* 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 -char opendir (); +#include int main () { -return opendir (); + makedev(0, 0) ; return 0; } _ACEOF -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 +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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_has_makedev=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_has_makedev=no fi +rm -rf conftest.dSYM 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 -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; } -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; } -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF + 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 + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* 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 -char opendir (); +#define _OSF_SOURCE 1 +#include + int main () { -return opendir (); + makedev(0, 0) ; return 0; } _ACEOF -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 +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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_has_makedev=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_has_makedev=no fi +rm -rf conftest.dSYM 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 -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; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + conftest$ac_exeext conftest.$ac_ext + if test "$ac_cv_has_makedev" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define _OSF_SOURCE 1 +_ACEOF + fi fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 +$as_echo "$ac_cv_has_makedev" >&6; } +if test "$ac_cv_has_makedev" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MAKEDEV 1 +_ACEOF 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; } -if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF +# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in +# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are +# defined, but the compiler does not support pragma redefine_extname, +# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit +# structures (such as rlimit64) without declaring them. As a +# work-around, disable LFS on such configurations + +use_lfs=yes +{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5 +$as_echo_n "checking Solaris LFS bug... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#define _LARGEFILE_SOURCE 1 +#define _FILE_OFFSET_BITS 64 +#include + int main () { -return makedev(0, 0); +struct rlimit foo; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest.$ac_objext; then + sol_lfs_bug=no else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_sys_types_h_makedev=no + sol_lfs_bug=yes fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5 +$as_echo "$sol_lfs_bug" >&6; } +if test "$sol_lfs_bug" = "yes"; then + use_lfs=no 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; } -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; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "$use_lfs" = "yes"; then +# Two defines needed to enable largefile support on various platforms +# These may affect some typedefs + +cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 64 +_ACEOF + fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } + +# Add some code to confdefs.h so that the test for off_t works on SCO +cat >> confdefs.h <<\EOF +#if defined(SCO_DS) +#undef _OFF_T +#endif +EOF + +# Type availability checks +{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 +$as_echo_n "checking for mode_t... " >&6; } +if test "${ac_cv_type_mode_t+set}" = set; then + $as_echo_n "(cached) " >&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; } + ac_cv_type_mode_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6092,7 +7314,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +int +main () +{ +if (sizeof (mode_t)) + return 0; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6100,132 +7329,88 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -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; } -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. */ -#include +$ac_includes_default +int +main () +{ +if (sizeof ((mode_t))) + return 0; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - 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; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 -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 -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | 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; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + } && test -s conftest.$ac_objext; then + : 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; } + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_mode_t=yes fi -if test $ac_cv_header_sys_mkdev_h = yes; then -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_MKDEV 1 -_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +$as_echo "$ac_cv_type_mode_t" >&6; } +if test "x$ac_cv_type_mode_t" = x""yes; then + : +else +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF - 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; } -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; } + +{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 +$as_echo_n "checking for off_t... " >&6; } +if test "${ac_cv_type_off_t+set}" = set; then + $as_echo_n "(cached) " >&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; } + ac_cv_type_off_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6233,7 +7418,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +int +main () +{ +if (sizeof (off_t)) + return 0; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6241,145 +7433,137 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -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; } -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. */ -#include +$ac_includes_default +int +main () +{ +if (sizeof ((off_t))) + return 0; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || test ! -s conftest.err - }; then - ac_header_preproc=yes + } && test -s conftest.$ac_objext; then + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + ac_cv_type_off_t=yes fi -rm -f conftest.err conftest.$ac_ext -{ 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 - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 -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 -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | 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; } -if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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; } - -fi -if test $ac_cv_header_sys_sysmacros_h = yes; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_SYSMACROS 1 -_ACEOF fi - - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +$as_echo "$ac_cv_type_off_t" >&6; } +if test "x$ac_cv_type_off_t" = x""yes; then + : +else +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF -# On Solaris, term.h requires curses.h +fi -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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 +$as_echo_n "checking for pid_t... " >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + $as_echo_n "(cached) " >&6 else + ac_cv_type_pid_t=no +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 +int +main () +{ +if (sizeof (pid_t)) + return 0; + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_CURSES_H -#include -#endif - - -#include <$ac_header> +$ac_includes_default +int +main () +{ +if (sizeof ((pid_t))) + return 0; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6387,49 +7571,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - eval "$as_ac_Header=yes" + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + ac_cv_type_pid_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 -_ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -done +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +$as_echo "$ac_cv_type_pid_t" >&6; } +if test "x$ac_cv_type_pid_t" = x""yes; then + : +else +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF -# On Linux, netlink.h requires asm/types.h +fi -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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6437,16 +7624,16 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +#include -#ifdef HAVE_ASM_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - - -#include <$ac_header> +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6454,286 +7641,200 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - eval "$as_ac_Header=yes" + ac_cv_type_signal=int else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -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 -_ACEOF - -fi - -done - - -# 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; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "clock_t" >/dev/null 2>&1; then - was_it_defined=yes -else - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } -cat >>confdefs.h <<\_ACEOF -#define clock_t long +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal _ACEOF -fi -rm -f conftest* - -{ 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; } +{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 +$as_echo_n "checking for size_t... " >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_size_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { - makedev(0, 0) +if (sizeof (size_t)) + return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 -fi - -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 - cat >conftest.$ac_ext <<_ACEOF + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#define _OSF_SOURCE 1 -#include - +$ac_includes_default int main () { - makedev(0, 0) +if (sizeof ((size_t))) + return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest.$ac_objext; then + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_has_makedev=no + ac_cv_type_size_t=yes fi -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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define _OSF_SOURCE 1 -_ACEOF - fi fi -{ 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 -#define HAVE_MAKEDEV 1 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +$as_echo "$ac_cv_type_size_t" >&6; } +if test "x$ac_cv_type_size_t" = x""yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int _ACEOF fi -# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in -# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are -# defined, but the compiler does not support pragma redefine_extname, -# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit -# structures (such as rlimit64) without declaring them. As a -# 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; } -cat >conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then + $as_echo_n "(cached) " >&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 -#define _LARGEFILE_SOURCE 1 -#define _FILE_OFFSET_BITS 64 -#include - -int -main () -{ -struct rlimit foo; - ; - 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 - sol_lfs_bug=no +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - sol_lfs_bug=yes + ac_cv_type_uid_t=no fi +rm -f conftest* -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 - -if test "$use_lfs" = "yes"; then -# Two defines needed to enable largefile support on various platforms -# These may affect some typedefs +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF -#define _LARGEFILE_SOURCE 1 +#define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF -#define _FILE_OFFSET_BITS 64 +#define gid_t int _ACEOF fi -# Add some code to confdefs.h so that the test for off_t works on SCO -cat >> confdefs.h <<\EOF -#if defined(SCO_DS) -#undef _OFF_T -#endif -EOF -# Type availability checks -{ 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 + { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 +$as_echo_n "checking for uint32_t... " >&6; } +if test "${ac_cv_c_uint32_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_uint32_t=no + for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; +test_array [0] = 0 + ; return 0; } @@ -6744,59 +7845,73 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_mode_t=yes + case $ac_type in + uint32_t) ac_cv_c_uint32_t=yes ;; + *) ac_cv_c_uint32_t=$ac_type ;; +esac + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_uint32_t" != no && break + done fi -{ 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 +$as_echo "$ac_cv_c_uint32_t" >&6; } + case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<\_ACEOF +#define _UINT32_T 1 +_ACEOF + cat >>confdefs.h <<_ACEOF -#define mode_t int +#define uint32_t $ac_cv_c_uint32_t _ACEOF +;; + esac -fi -{ 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 + { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 +$as_echo_n "checking for uint64_t... " >&6; } +if test "${ac_cv_c_uint64_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_uint64_t=no + for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 off_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; +test_array [0] = 0 + ; return 0; } @@ -6807,59 +7922,73 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_off_t=yes + case $ac_type in + uint64_t) ac_cv_c_uint64_t=yes ;; + *) ac_cv_c_uint64_t=$ac_type ;; +esac + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_off_t=no + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_uint64_t" != no && break + done fi -{ 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 +$as_echo "$ac_cv_c_uint64_t" >&6; } + case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<\_ACEOF +#define _UINT64_T 1 +_ACEOF + cat >>confdefs.h <<_ACEOF -#define off_t long int +#define uint64_t $ac_cv_c_uint64_t _ACEOF +;; + esac -fi -{ 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 + { $as_echo "$as_me:$LINENO: checking for int32_t" >&5 +$as_echo_n "checking for int32_t... " >&6; } +if test "${ac_cv_c_int32_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_int32_t=no + for ac_type in 'int32_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + 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 pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; +test_array [0] = 0 + ; return 0; } @@ -6870,57 +7999,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_pid_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=no -fi - -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; } -if test $ac_cv_type_pid_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include - +$ac_includes_default int main () { -return *(signal (0, 0)) (0) == 1; +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; +test_array [0] = 0 + ; return 0; } @@ -6931,40 +8035,98 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_signal=int + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signal=void + case $ac_type in + int32_t) ac_cv_c_int32_t=yes ;; + *) ac_cv_c_int32_t=$ac_type ;; +esac + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int32_t" != no && break + done fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 +$as_echo "$ac_cv_c_int32_t" >&6; } + case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal +#define int32_t $ac_cv_c_int32_t _ACEOF +;; + esac -{ 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 + { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 +$as_echo_n "checking for int64_t... " >&6; } +if test "${ac_cv_c_int64_t+set}" = set; then + $as_echo_n "(cached) " >&6 else + ac_cv_c_int64_t=no + for ac_type in 'int64_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + 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 +int +main () +{ +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; +test_array [0] = 0 + + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6972,14 +8134,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; +test_array [0] = 0 + ; return 0; } @@ -6990,87 +8151,61 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_size_t=yes + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no + case $ac_type in + int64_t) ac_cv_c_int64_t=yes ;; + *) ac_cv_c_int64_t=$ac_type ;; +esac + fi 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; } -if test $ac_cv_type_size_t = yes; then - : else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<_ACEOF -#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; } -if test "${ac_cv_type_uid_t+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 -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int64_t" != no && break + done fi -{ 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 -#define uid_t int -_ACEOF - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 +$as_echo "$ac_cv_c_int64_t" >&6; } + case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) -cat >>confdefs.h <<\_ACEOF -#define gid_t int +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t _ACEOF +;; + esac -fi - - - { echo "$as_me:$LINENO: checking for uint32_t" >&5 -echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; } -if test "${ac_cv_c_uint32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 +$as_echo_n "checking for ssize_t... " >&6; } +if test "${ac_cv_type_ssize_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_c_uint32_t=no - for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_ssize_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7080,9 +8215,8 @@ int main () { -static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; -test_array [0] = 0 - +if (sizeof (ssize_t)) + return 0; ; return 0; } @@ -7093,60 +8227,19 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - case $ac_type in - uint32_t) ac_cv_c_uint32_t=yes ;; - *) ac_cv_c_uint32_t=$ac_type ;; -esac - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint32_t" != no && break - done -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 -echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; } - case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<\_ACEOF -#define _UINT32_T 1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac - - - { echo "$as_me:$LINENO: checking for uint64_t" >&5 -echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; } -if test "${ac_cv_c_uint64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_uint64_t=no - for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7156,9 +8249,8 @@ int main () { -static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; -test_array [0] = 0 - +if (sizeof ((ssize_t))) + return 0; ; return 0; } @@ -7169,60 +8261,61 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - case $ac_type in - uint64_t) ac_cv_c_uint64_t=yes ;; - *) ac_cv_c_uint64_t=$ac_type ;; -esac + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_ssize_t=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint64_t" != no && break - done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 -echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; } - case $ac_cv_c_uint64_t in #( - no|yes) ;; #( - *) +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +$as_echo "$ac_cv_type_ssize_t" >&6; } +if test "x$ac_cv_type_ssize_t" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define _UINT64_T 1 +#define HAVE_SSIZE_T 1 _ACEOF - -cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t -_ACEOF -;; - esac +fi - { echo "$as_me:$LINENO: checking for int32_t" >&5 -echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; } -if test "${ac_cv_c_int32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Sizes of various common basic types +# ANSI C requires sizeof(char) == 1, so no need to check it +# 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. +{ $as_echo "$as_me:$LINENO: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_c_int32_t=no - for ac_type in 'int32_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7232,7 +8325,7 @@ int main () { -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; test_array [0] = 0 ; @@ -7245,18 +8338,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - cat >conftest.$ac_ext <<_ACEOF + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7266,8 +8362,7 @@ int main () { -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7280,63 +8375,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - case $ac_type in - int32_t) ac_cv_c_int32_t=yes ;; - *) ac_cv_c_int32_t=$ac_type ;; -esac - + 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 core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int32_t" != no && break - done -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 -echo "${ECHO_T}$ac_cv_c_int32_t" >&6; } - case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int32_t $ac_cv_c_int32_t -_ACEOF -;; - esac - - - { echo "$as_me:$LINENO: checking for int64_t" >&5 -echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } -if test "${ac_cv_c_int64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_int64_t=no - for ac_type in 'int64_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7346,7 +8416,7 @@ int main () { -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; test_array [0] = 0 ; @@ -7359,18 +8429,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - cat >conftest.$ac_ext <<_ACEOF + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7380,8 +8453,7 @@ int main () { -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7394,58 +8466,47 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - case $ac_type in - int64_t) ac_cv_c_int64_t=yes ;; - *) ac_cv_c_int64_t=$ac_type ;; -esac - + 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 core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int64_t" != no && break - done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 -echo "${ECHO_T}$ac_cv_c_int64_t" >&6; } - case $ac_cv_c_int64_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t -_ACEOF -;; - esac -{ 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 +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` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7453,14 +8514,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef ssize_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -7471,44 +8530,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_ssize_t=yes + ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_ssize_t=no -fi - -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; } -if test $ac_cv_type_ssize_t = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SSIZE_T 1 -_ACEOF + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi - -# 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; } -if test "${ac_cv_type_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7517,56 +8574,103 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef int ac__type_new_; +static long int longval () { return (long int) (sizeof (int)); } +static unsigned long int ulongval () { return (long int) (sizeof (int)); } +#include +#include int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (int))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f 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_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 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_type_int=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_int=no +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + # 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 +{ $as_echo "$as_me:$LINENO: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -7577,11 +8681,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; test_array [0] = 0 ; @@ -7594,13 +8697,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -7614,11 +8718,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7631,20 +8734,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -7658,7 +8762,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -7668,11 +8772,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; test_array [0] = 0 ; @@ -7685,13 +8788,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -7705,11 +8809,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7722,20 +8825,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -7749,7 +8853,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -7769,11 +8873,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7786,20 +8889,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -7808,15 +8912,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') if test "$ac_cv_type_int" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +?*) ac_cv_sizeof_long=$ac_lo;; +'') if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int) +$as_echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_int=0 + ac_cv_sizeof_long=0 fi ;; esac else @@ -7827,9 +8933,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long)); } #include #include int @@ -7839,20 +8944,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (long))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -7865,113 +8972,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` + ac_cv_sizeof_long=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_int" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int) +$as_echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_int=0 + ac_cv_sizeof_long=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&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; } -if test "${ac_cv_type_long+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. */ -$ac_includes_default -typedef long ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_LONG $ac_cv_sizeof_long _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_type_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_long=no -fi - -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -7982,11 +9040,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)]; test_array [0] = 0 ; @@ -7999,13 +9056,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8019,11 +9077,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8036,20 +9093,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -8063,7 +9121,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -8073,11 +9131,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)]; test_array [0] = 0 ; @@ -8090,13 +9147,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8110,11 +9168,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8127,20 +9184,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -8154,7 +9212,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -8174,11 +9232,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8191,20 +9248,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -8213,15 +9271,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long) +$as_echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long=0 + ac_cv_sizeof_void_p=0 fi ;; esac else @@ -8232,9 +9292,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (void *)); } +static unsigned long int ulongval () { return (long int) (sizeof (void *)); } #include #include int @@ -8244,20 +9303,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (void *))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (void *)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (void *)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -8270,113 +9331,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` + ac_cv_sizeof_void_p=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) +if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long) +$as_echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long=0 + ac_cv_sizeof_void_p=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&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; } -if test "${ac_cv_type_void_p+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. */ -$ac_includes_default -typedef void * ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p _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_type_void_p=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_void_p=no -fi - -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if test "${ac_cv_sizeof_short+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -8387,11 +9399,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)]; test_array [0] = 0 ; @@ -8404,13 +9415,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8424,11 +9436,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8441,20 +9452,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -8468,7 +9480,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -8478,11 +9490,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; test_array [0] = 0 ; @@ -8495,13 +9506,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8515,11 +9527,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8532,20 +9543,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -8559,7 +9571,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -8579,11 +9591,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8596,20 +9607,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -8618,15 +9630,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') if test "$ac_cv_type_void_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +?*) ac_cv_sizeof_short=$ac_lo;; +'') if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *) +$as_echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_void_p=0 + ac_cv_sizeof_short=0 fi ;; esac else @@ -8637,9 +9651,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (short)); } +static unsigned long int ulongval () { return (long int) (sizeof (short)); } #include #include int @@ -8649,20 +9662,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (short))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (short)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (short)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -8675,113 +9690,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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 - ac_cv_sizeof_void_p=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -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 *) -See \`config.log' for more details." >&2;} - { (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 -fi -{ 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; } -if test "${ac_cv_type_short+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. */ -$ac_includes_default -typedef short ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - 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_type_short=yes +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_short=no +( exit $ac_status ) +if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (short) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_short=0 + fi fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + # 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 +{ $as_echo "$as_me:$LINENO: checking size of float" >&5 +$as_echo_n "checking size of float... " >&6; } +if test "${ac_cv_sizeof_float+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -8792,11 +9758,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)]; test_array [0] = 0 ; @@ -8809,13 +9774,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8829,11 +9795,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8846,20 +9811,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -8873,7 +9839,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -8883,11 +9849,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)]; test_array [0] = 0 ; @@ -8900,13 +9865,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8920,11 +9886,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8937,20 +9902,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -8964,7 +9930,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -8984,11 +9950,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9001,20 +9966,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9023,15 +9989,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') if test "$ac_cv_type_short" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short) +$as_echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_float=0 fi ;; esac else @@ -9042,9 +10010,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (float)); } +static unsigned long int ulongval () { return (long int) (sizeof (float)); } #include #include int @@ -9054,20 +10021,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (float))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (float)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (float)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9080,113 +10049,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` + ac_cv_sizeof_float=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_short" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) +if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short) +$as_echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_float=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +$as_echo "$ac_cv_sizeof_float" >&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; } -if test "${ac_cv_type_float+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. */ -$ac_includes_default -typedef float ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_FLOAT $ac_cv_sizeof_float _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_type_float=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_float=no -fi - -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of double" >&5 +$as_echo_n "checking size of double... " >&6; } +if test "${ac_cv_sizeof_double+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9197,11 +10117,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)]; test_array [0] = 0 ; @@ -9214,13 +10133,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9234,11 +10154,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9251,20 +10170,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9278,7 +10198,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9288,11 +10208,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)]; test_array [0] = 0 ; @@ -9305,13 +10224,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9325,11 +10245,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9342,20 +10261,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9369,7 +10289,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9389,11 +10309,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9406,20 +10325,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9428,15 +10348,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_float=$ac_lo;; -'') if test "$ac_cv_type_float" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +?*) ac_cv_sizeof_double=$ac_lo;; +'') if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (float) +$as_echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_float=0 + ac_cv_sizeof_double=0 fi ;; esac else @@ -9447,9 +10369,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (double)); } +static unsigned long int ulongval () { return (long int) (sizeof (double)); } #include #include int @@ -9459,20 +10380,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (double))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (double)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (double)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9485,113 +10408,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_float=`cat conftest.val` + ac_cv_sizeof_double=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_float" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (float) +$as_echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_float=0 + ac_cv_sizeof_double=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 -echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&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; } -if test "${ac_cv_type_double+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. */ -$ac_includes_default -typedef double ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_DOUBLE $ac_cv_sizeof_double _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_type_double=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_double=no -fi - -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5 +$as_echo_n "checking size of fpos_t... " >&6; } +if test "${ac_cv_sizeof_fpos_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9602,11 +10476,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)]; test_array [0] = 0 ; @@ -9619,13 +10492,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9639,11 +10513,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9656,20 +10529,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9683,7 +10557,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9693,11 +10567,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)]; test_array [0] = 0 ; @@ -9710,13 +10583,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9730,11 +10604,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9747,20 +10620,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9774,7 +10648,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9794,11 +10668,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9811,20 +10684,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9833,15 +10707,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_double=$ac_lo;; -'') if test "$ac_cv_type_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) +?*) ac_cv_sizeof_fpos_t=$ac_lo;; +'') if test "$ac_cv_type_fpos_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (double) +$as_echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_double=0 + ac_cv_sizeof_fpos_t=0 fi ;; esac else @@ -9852,9 +10728,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (fpos_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); } #include #include int @@ -9864,20 +10739,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (fpos_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (fpos_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (fpos_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9890,113 +10767,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_double=`cat conftest.val` + ac_cv_sizeof_fpos_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) +if test "$ac_cv_type_fpos_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (double) +$as_echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_double=0 + ac_cv_sizeof_fpos_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 +$as_echo "$ac_cv_sizeof_fpos_t" >&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; } -if test "${ac_cv_type_fpos_t+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. */ -$ac_includes_default -typedef fpos_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t _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_type_fpos_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_fpos_t=no -fi - -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5 +$as_echo_n "checking size of size_t... " >&6; } +if test "${ac_cv_sizeof_size_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10007,11 +10835,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)]; test_array [0] = 0 ; @@ -10024,13 +10851,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10044,11 +10872,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10061,20 +10888,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10088,7 +10916,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10098,11 +10926,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)]; test_array [0] = 0 ; @@ -10115,13 +10942,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10135,11 +10963,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10152,20 +10979,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10179,7 +11007,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10199,11 +11027,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10216,20 +11043,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10238,15 +11066,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_fpos_t=$ac_lo;; -'') if test "$ac_cv_type_fpos_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (fpos_t) +$as_echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_fpos_t=0 + ac_cv_sizeof_size_t=0 fi ;; esac else @@ -10257,9 +11087,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (size_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (size_t)); } #include #include int @@ -10269,20 +11098,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (size_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (size_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (size_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10294,114 +11125,65 @@ case "(($ac_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' - { (case "(($ac_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 - ac_cv_sizeof_fpos_t=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -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) -See \`config.log' for more details." >&2;} - { (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 -fi -{ 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; } -if test "${ac_cv_type_size_t+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. */ -$ac_includes_default -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 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_type_size_t=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_size_t=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +( exit $ac_status ) +if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_size_t=0 + fi fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + # 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 +{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5 +$as_echo_n "checking size of pid_t... " >&6; } +if test "${ac_cv_sizeof_pid_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10412,11 +11194,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)]; test_array [0] = 0 ; @@ -10429,13 +11210,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10449,11 +11231,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10466,20 +11247,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10493,7 +11275,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10503,11 +11285,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)]; test_array [0] = 0 ; @@ -10520,13 +11301,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10540,11 +11322,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10557,20 +11338,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10584,7 +11366,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10604,11 +11386,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10621,20 +11402,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10643,15 +11425,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_size_t=$ac_lo;; -'') if test "$ac_cv_type_size_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +?*) ac_cv_sizeof_pid_t=$ac_lo;; +'') if test "$ac_cv_type_pid_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_t) +$as_echo "$as_me: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_size_t=0 + ac_cv_sizeof_pid_t=0 fi ;; esac else @@ -10662,9 +11446,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (pid_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); } #include #include int @@ -10674,20 +11457,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (pid_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (pid_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (pid_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10700,71 +11485,71 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_size_t=`cat conftest.val` + ac_cv_sizeof_pid_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_size_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +if test "$ac_cv_type_pid_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_t) +$as_echo "$as_me: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_size_t=0 + ac_cv_sizeof_pid_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 +$as_echo "$ac_cv_sizeof_pid_t" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +#define SIZEOF_PID_T $ac_cv_sizeof_pid_t _ACEOF -{ 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 - cat >conftest.$ac_ext <<_ACEOF + +{ $as_echo "$as_me:$LINENO: checking for long long support" >&5 +$as_echo_n "checking for long long support... " >&6; } +have_long_long=no +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 pid_t ac__type_new_; + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +long long x; x = (long long)0; ; return 0; } @@ -10775,38 +11560,45 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_pid_t=yes + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + + have_long_long=yes + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no -fi -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; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5 +$as_echo "$have_long_long" >&6; } +if test "$have_long_long" = yes ; then # 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 pid_t" >&5 -echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if test "${ac_cv_sizeof_long_long+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10817,11 +11609,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)]; test_array [0] = 0 ; @@ -10834,13 +11625,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10854,11 +11646,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10871,20 +11662,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10898,7 +11690,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10908,11 +11700,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)]; test_array [0] = 0 ; @@ -10925,13 +11716,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10945,11 +11737,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10962,20 +11753,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10989,7 +11781,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11009,11 +11801,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11026,20 +11817,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11048,15 +11840,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_pid_t=$ac_lo;; -'') if test "$ac_cv_type_pid_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (pid_t) +$as_echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_pid_t=0 + ac_cv_sizeof_long_long=0 fi ;; esac else @@ -11067,9 +11861,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_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_)); } +static long int longval () { return (long int) (sizeof (long long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long long)); } #include #include int @@ -11079,20 +11872,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (long long))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long long)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long long)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11105,55 +11900,61 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pid_t=`cat conftest.val` + ac_cv_sizeof_long_long=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_pid_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) +if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (pid_t) +$as_echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_pid_t=0 + ac_cv_sizeof_long_long=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_PID_T $ac_cv_sizeof_pid_t +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF +fi -{ 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 +{ $as_echo "$as_me:$LINENO: checking for long double support" >&5 +$as_echo_n "checking for long double support... " >&6; } +have_long_double=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11164,7 +11965,7 @@ int main () { -long long x; x = (long long)0; +long double x; x = (long double)0.; ; return 0; } @@ -11175,13 +11976,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11189,84 +11991,30 @@ cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_LONG 1 +#define HAVE_LONG_DOUBLE 1 _ACEOF - have_long_long=yes + have_long_double=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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; } -if test "${ac_cv_type_long_long+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. */ -$ac_includes_default -typedef long long ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - 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_type_long_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long_long=no -fi - -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; } - +{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5 +$as_echo "$have_long_double" >&6; } +if test "$have_long_double" = yes ; then # 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 +{ $as_echo "$as_me:$LINENO: checking size of long double" >&5 +$as_echo_n "checking size of long double... " >&6; } +if test "${ac_cv_sizeof_long_double+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11277,11 +12025,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)]; test_array [0] = 0 ; @@ -11294,13 +12041,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11314,11 +12062,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11331,20 +12078,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -11358,7 +12106,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -11368,11 +12116,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)]; test_array [0] = 0 ; @@ -11385,13 +12132,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11405,11 +12153,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11422,20 +12169,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11449,7 +12197,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11469,11 +12217,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11486,20 +12233,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11508,15 +12256,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') if test "$ac_cv_type_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +?*) ac_cv_sizeof_long_double=$ac_lo;; +'') if test "$ac_cv_type_long_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long) +$as_echo "$as_me: error: cannot compute sizeof (long double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_long_double=0 fi ;; esac else @@ -11527,9 +12277,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (long double)); } +static unsigned long int ulongval () { return (long int) (sizeof (long double)); } #include #include int @@ -11539,20 +12288,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (long double))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long double)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long double)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11565,56 +12316,61 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` + ac_cv_sizeof_long_double=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +if test "$ac_cv_type_long_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long) +$as_echo "$as_me: error: cannot compute sizeof (long double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_long_double=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 +$as_echo "$ac_cv_sizeof_long_double" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double _ACEOF fi -{ echo "$as_me:$LINENO: checking for long double support" >&5 -echo $ECHO_N "checking for long double support... $ECHO_C" >&6; } -have_long_double=no +{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5 +$as_echo_n "checking for _Bool support... " >&6; } +have_c99_bool=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11625,7 +12381,7 @@ int main () { -long double x; x = (long double)0.; +_Bool x; x = (_Bool)0; ; return 0; } @@ -11636,13 +12392,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11650,84 +12407,30 @@ cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_DOUBLE 1 +#define HAVE_C99_BOOL 1 _ACEOF - have_long_double=yes + have_c99_bool=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $have_long_double" >&5 -echo "${ECHO_T}$have_long_double" >&6; } -if test "$have_long_double" = yes ; then -{ echo "$as_me:$LINENO: checking for long double" >&5 -echo $ECHO_N "checking for long double... $ECHO_C" >&6; } -if test "${ac_cv_type_long_double+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. */ -$ac_includes_default -typedef long double ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - 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_type_long_double=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long_double=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5 -echo "${ECHO_T}$ac_cv_type_long_double" >&6; } - +{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5 +$as_echo "$have_c99_bool" >&6; } +if test "$have_c99_bool" = yes ; then # 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 double" >&5 -echo $ECHO_N "checking size of long double... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_long_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5 +$as_echo_n "checking size of _Bool... " >&6; } +if test "${ac_cv_sizeof__Bool+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11738,11 +12441,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)]; test_array [0] = 0 ; @@ -11755,13 +12457,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11775,11 +12478,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11792,20 +12494,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -11819,7 +12522,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -11829,11 +12532,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)]; test_array [0] = 0 ; @@ -11846,13 +12548,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11866,11 +12569,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11883,20 +12585,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11910,7 +12613,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11930,11 +12633,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11947,20 +12649,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11969,15 +12672,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_double=$ac_lo;; -'') if test "$ac_cv_type_long_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) +?*) ac_cv_sizeof__Bool=$ac_lo;; +'') if test "$ac_cv_type__Bool" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long double) +$as_echo "$as_me: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long_double=0 + ac_cv_sizeof__Bool=0 fi ;; esac else @@ -11988,9 +12693,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long 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_)); } +static long int longval () { return (long int) (sizeof (_Bool)); } +static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); } #include #include int @@ -12000,20 +12704,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (_Bool))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (_Bool)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (_Bool)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12026,67 +12732,79 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_double=`cat conftest.val` + ac_cv_sizeof__Bool=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) +if test "$ac_cv_type__Bool" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long double) +$as_echo "$as_me: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long_double=0 + ac_cv_sizeof__Bool=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 +$as_echo "$ac_cv_sizeof__Bool" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +#define SIZEOF__BOOL $ac_cv_sizeof__Bool _ACEOF fi -{ echo "$as_me:$LINENO: checking for _Bool support" >&5 -echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; } -have_c99_bool=no +{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5 +$as_echo_n "checking for uintptr_t... " >&6; } +if test "${ac_cv_type_uintptr_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_uintptr_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_STDINT_H + #include + #endif int main () { -_Bool x; x = (_Bool)0; +if (sizeof (uintptr_t)) + return 0; ; return 0; } @@ -12097,56 +12815,33 @@ *\"* | *\`* | *\\*) 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 - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_C99_BOOL 1 -_ACEOF - - have_c99_bool=yes - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -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; } -if test "${ac_cv_type__Bool+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 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_new_; +#ifdef HAVE_STDINT_H + #include + #endif + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +if (sizeof ((uintptr_t))) + return 0; ; return 0; } @@ -12157,38 +12852,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type__Bool=yes + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uintptr_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type__Bool=no + fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +$as_echo "$ac_cv_type_uintptr_t" >&6; } +if test "x$ac_cv_type_uintptr_t" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF # 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 +{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5 +$as_echo_n "checking size of uintptr_t... " >&6; } +if test "${ac_cv_sizeof_uintptr_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12199,11 +12908,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)]; test_array [0] = 0 ; @@ -12216,13 +12924,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12236,11 +12945,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12253,20 +12961,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12280,7 +12989,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12290,11 +12999,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)]; test_array [0] = 0 ; @@ -12307,13 +13015,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12327,11 +13036,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12344,20 +13052,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -12371,7 +13080,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -12391,11 +13100,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12408,20 +13116,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -12430,15 +13139,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof__Bool=$ac_lo;; -'') if test "$ac_cv_type__Bool" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +?*) ac_cv_sizeof_uintptr_t=$ac_lo;; +'') if test "$ac_cv_type_uintptr_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (_Bool) +$as_echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof__Bool=0 + ac_cv_sizeof_uintptr_t=0 fi ;; esac else @@ -12449,9 +13160,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (uintptr_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); } #include #include int @@ -12461,20 +13171,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (uintptr_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (uintptr_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (uintptr_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12487,76 +13199,300 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof__Bool=`cat conftest.val` + ac_cv_sizeof_uintptr_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type__Bool" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +if test "$ac_cv_type_uintptr_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (_Bool) +$as_echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof__Bool=0 + ac_cv_sizeof_uintptr_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 -echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 +$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF__BOOL $ac_cv_sizeof__Bool +#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t _ACEOF fi -{ 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 + +# 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. +{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if test "${ac_cv_sizeof_off_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_STDINT_H - #include - #endif -typedef uintptr_t ac__type_new_; +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)]; +test_array [0] = 0 + + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break +else + $as_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` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + int main () { -if ((ac__type_new_ *) 0) +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)]; +test_array [0] = 0 + + ; return 0; -if (sizeof (ac__type_new_)) +} +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break +else + $as_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` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +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` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -12567,39 +13503,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_uintptr_t=yes + ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no + ac_lo=`expr '(' $ac_mid ')' + 1` fi 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; } -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; } -if test "${ac_cv_type_uintptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +done +case $ac_lo in +?*) ac_cv_sizeof_off_t=$ac_lo;; +'') if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_off_t=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -12607,57 +13546,127 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -typedef uintptr_t ac__type_new_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +static long int longval () { return (long int) (sizeof (off_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (off_t)); } +#include +#include int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (off_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (off_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (off_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f 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_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 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_type_uintptr_t=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_off_t=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +( exit $ac_status ) +if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_off_t=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t +_ACEOF + + + +{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5 +$as_echo_n "checking whether to enable large file support... " >&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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LARGEFILE_SUPPORT 1 +_ACEOF + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&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 +{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if test "${ac_cv_sizeof_time_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12667,12 +13676,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= 0)]; test_array [0] = 0 ; @@ -12685,13 +13701,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12704,12 +13721,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12722,20 +13746,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12749,7 +13774,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12758,12 +13783,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) < 0)]; test_array [0] = 0 ; @@ -12776,13 +13808,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12795,12 +13828,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12813,20 +13853,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -12840,7 +13881,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -12859,12 +13900,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12877,20 +13925,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -12899,15 +13948,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_uintptr_t=$ac_lo;; -'') if test "$ac_cv_type_uintptr_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) +?*) ac_cv_sizeof_time_t=$ac_lo;; +'') if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (uintptr_t) +$as_echo "$as_me: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_uintptr_t=0 + ac_cv_sizeof_time_t=0 fi ;; esac else @@ -12917,10 +13968,17 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - 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_)); } + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + +static long int longval () { return (long int) (sizeof (time_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (time_t)); } #include #include int @@ -12930,20 +13988,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (time_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (time_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (time_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12956,234 +14016,355 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_uintptr_t=`cat conftest.val` + ac_cv_sizeof_time_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_uintptr_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) +if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (uintptr_t) +$as_echo "$as_me: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_uintptr_t=0 + ac_cv_sizeof_time_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t _ACEOF + +# if have pthread_t then define SIZEOF_PTHREAD_T +ac_save_cc="$CC" +if test "$ac_cv_kpthread" = "yes" +then CC="$CC -Kpthread" +elif test "$ac_cv_kthread" = "yes" +then CC="$CC -Kthread" +elif test "$ac_cv_pthread" = "yes" +then CC="$CC -pthread" fi +{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5 +$as_echo_n "checking for pthread_t... " >&6; } +have_pthread_t=no +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 () +{ +pthread_t x; x = *(pthread_t*)0; + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + have_pthread_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +fi -# 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; } -if test "${ac_cv_sizeof_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5 +$as_echo "$have_pthread_t" >&6; } +if test "$have_pthread_t" = yes ; then + # 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. +{ $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5 +$as_echo_n "checking size of pthread_t... " >&6; } +if test "${ac_cv_sizeof_pthread_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then - ac_cv_sizeof_off_t=4 -else - cat >conftest.$ac_ext <<_ACEOF + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -main() + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(off_t)); - exit(0); +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= 0)]; +test_array [0] = 0 + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_try") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_off_t=`cat conftestval` + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_hi=$ac_mid; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_sizeof_off_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - + 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 -{ 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; } -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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LARGEFILE_SUPPORT 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# 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; } -if test "${ac_cv_sizeof_time_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_time_t=4 -else - 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. */ -#include -#include -main() + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(time_t)); - exit(0); +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) < 0)]; +test_array [0] = 0 + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; + 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_try") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_time_t=`cat conftestval` + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_lo=$ac_mid; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_sizeof_time_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + 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 core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - + ac_lo= ac_hi= fi -{ 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 -_ACEOF - - - -# if have pthread_t then define SIZEOF_PTHREAD_T -ac_save_cc="$CC" -if test "$ac_cv_kpthread" = "yes" -then CC="$CC -Kpthread" -elif test "$ac_cv_kthread" = "yes" -then CC="$CC -Kthread" -elif test "$ac_cv_pthread" = "yes" -then CC="$CC -pthread" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ 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 + +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` + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H #include +#endif + + int main () { -pthread_t x; x = *(pthread_t*)0; +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -13194,37 +14375,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - have_pthread_t=yes + ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_lo=`expr '(' $ac_mid ')' + 1` fi 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; } - if test "${ac_cv_sizeof_pthread_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_pthread_t=4 +done +case $ac_lo in +?*) ac_cv_sizeof_pthread_t=$ac_lo;; +'') if test "$ac_cv_type_pthread_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_pthread_t=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -13232,15 +14418,44 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#ifdef HAVE_PTHREAD_H #include - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(pthread_t)); - exit(0); - } +#endif + + +static long int longval () { return (long int) (sizeof (pthread_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (pthread_t)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (pthread_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (pthread_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (pthread_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -13248,48 +14463,61 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pthread_t=`cat conftestval` + ac_cv_sizeof_pthread_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_sizeof_pthread_t=0 +if test "$ac_cv_type_pthread_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_pthread_t=0 + fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - - +rm -f conftest.val fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 +$as_echo "$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 _ACEOF + 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; } +{ $as_echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5 +$as_echo_n "checking for --enable-toolbox-glue... " >&6; } # Check whether --enable-toolbox-glue was given. if test "${enable_toolbox_glue+set}" = set; then enableval=$enable_toolbox_glue; @@ -13320,8 +14548,8 @@ extra_undefs="" ;; esac -{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5 -echo "${ECHO_T}$enable_toolbox_glue" >&6; } +{ $as_echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5 +$as_echo "$enable_toolbox_glue" >&6; } @@ -13358,8 +14586,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; } +{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5 +$as_echo_n "checking for --enable-framework... " >&6; } if test "$enable_framework" then BASECFLAGS="$BASECFLAGS -fno-common -dynamic" @@ -13370,21 +14598,21 @@ #define WITH_NEXT_FRAMEWORK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } if test $enable_shared = "yes" then - { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5 -echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;} + { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5 +$as_echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;} { (exit 1); exit 1; }; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for dyld" >&5 -echo $ECHO_N "checking for dyld... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for dyld" >&5 +$as_echo_n "checking for dyld... " >&6; } case $ac_sys_system/$ac_sys_release in Darwin/*) @@ -13392,12 +14620,12 @@ #define WITH_DYLD 1 _ACEOF - { echo "$as_me:$LINENO: result: always on for Darwin" >&5 -echo "${ECHO_T}always on for Darwin" >&6; } + { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5 +$as_echo "always on for Darwin" >&6; } ;; *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ;; esac @@ -13409,8 +14637,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; } +{ $as_echo "$as_me:$LINENO: checking SO" >&5 +$as_echo_n "checking SO... " >&6; } if test -z "$SO" then case $ac_sys_system in @@ -13435,8 +14663,8 @@ echo '=====================================================================' sleep 10 fi -{ echo "$as_me:$LINENO: result: $SO" >&5 -echo "${ECHO_T}$SO" >&6; } +{ $as_echo "$as_me:$LINENO: result: $SO" >&5 +$as_echo "$SO" >&6; } cat >>confdefs.h <<_ACEOF @@ -13447,8 +14675,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; } +{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5 +$as_echo_n "checking LDSHARED... " >&6; } if test -z "$LDSHARED" then case $ac_sys_system/$ac_sys_release in @@ -13554,13 +14782,13 @@ *) LDSHARED="ld";; esac fi -{ echo "$as_me:$LINENO: result: $LDSHARED" >&5 -echo "${ECHO_T}$LDSHARED" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5 +$as_echo_n "checking CCSHARED... " >&6; } if test -z "$CCSHARED" then case $ac_sys_system/$ac_sys_release in @@ -13595,12 +14823,12 @@ atheos*) CCSHARED="-fPIC";; esac fi -{ echo "$as_me:$LINENO: result: $CCSHARED" >&5 -echo "${ECHO_T}$CCSHARED" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5 +$as_echo_n "checking LINKFORSHARED... " >&6; } if test -z "$LINKFORSHARED" then case $ac_sys_system/$ac_sys_release in @@ -13655,13 +14883,13 @@ LINKFORSHARED='-Wl,-E -N 2048K';; esac fi -{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 -echo "${ECHO_T}$LINKFORSHARED" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 +$as_echo "$LINKFORSHARED" >&6; } -{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5 -echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5 +$as_echo_n "checking CFLAGSFORSHARED... " >&6; } if test ! "$LIBRARY" = "$LDLIBRARY" then case $ac_sys_system in @@ -13673,8 +14901,8 @@ CFLAGSFORSHARED='$(CCSHARED)' esac fi -{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5 -echo "${ECHO_T}$CFLAGSFORSHARED" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5 +$as_echo "$CFLAGSFORSHARED" >&6; } # SHLIBS are libraries (except -lc and -lm) to link to the python shared # library (with --enable-shared). @@ -13685,22 +14913,22 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5 +$as_echo_n "checking SHLIBS... " >&6; } case "$ac_sys_system" in *) SHLIBS='$(LIBS)';; esac -{ echo "$as_me:$LINENO: result: $SHLIBS" >&5 -echo "${ECHO_T}$SHLIBS" >&6; } +{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -13732,33 +14960,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -13768,10 +15000,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -13803,33 +15035,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_dld_shl_load = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDLD 1 _ACEOF @@ -13841,10 +15077,10 @@ # only check for sem_init 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; } + { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5 +$as_echo_n "checking for library containing sem_init... " >&6; } if test "${ac_cv_search_sem_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -13882,26 +15118,30 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_search_sem_init=$ac_res else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM 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 @@ -13916,8 +15156,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5 +$as_echo "$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" @@ -13929,10 +15169,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 +$as_echo_n "checking for textdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_textdomain+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" @@ -13964,33 +15204,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_intl_textdomain=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_textdomain=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_intl_textdomain = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5 +$as_echo "$ac_cv_lib_intl_textdomain" >&6; } +if test "x$ac_cv_lib_intl_textdomain" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_LIBINTL 1 @@ -14001,8 +15245,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*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5 +$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14024,33 +15268,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext;; *) ;; @@ -14058,10 +15306,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 +$as_echo_n "checking for t_open in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_t_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" @@ -14093,40 +15341,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_nsl_t_open=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_t_open=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_nsl_t_open = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 +$as_echo "$ac_cv_lib_nsl_t_open" >&6; } +if test "x$ac_cv_lib_nsl_t_open" = x""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; } +{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } if test "${ac_cv_lib_socket_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS $LIBS" @@ -14158,43 +15410,47 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_socket_socket=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_socket_socket = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = x""yes; then LIBS="-lsocket $LIBS" fi # SVR4 sockets 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; } +{ $as_echo "$as_me:$LINENO: checking for socket in -lnet" >&5 +$as_echo_n "checking for socket in -lnet... " >&6; } if test "${ac_cv_lib_net_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnet $LIBS $LIBS" @@ -14226,58 +15482,62 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_net_socket=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_net_socket=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_net_socket = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5 +$as_echo "$ac_cv_lib_net_socket" >&6; } +if test "x$ac_cv_lib_net_socket" = x""yes; then LIBS="-lnet $LIBS" fi # BeOS ;; esac -{ echo "$as_me:$LINENO: checking for --with-libs" >&5 -echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5 +$as_echo_n "checking for --with-libs... " >&6; } # 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; } +{ $as_echo "$as_me:$LINENO: result: $withval" >&5 +$as_echo "$withval" >&6; } LIBS="$withval $LIBS" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } +{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5 +$as_echo_n "checking for --with-system-ffi... " >&6; } # Check whether --with-system_ffi was given. if test "${with_system_ffi+set}" = set; then @@ -14285,41 +15545,41 @@ fi -{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5 -echo "${ECHO_T}$with_system_ffi" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5 +$as_echo "$with_system_ffi" >&6; } # Check for --with-dbmliborder -{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5 -echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5 +$as_echo_n "checking for --with-dbmliborder... " >&6; } # Check whether --with-dbmliborder was given. if test "${with_dbmliborder+set}" = set; then withval=$with_dbmliborder; if test x$with_dbmliborder = xyes then -{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 -echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} +{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 +$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} { (exit 1); exit 1; }; } else for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb then - { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 -echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} + { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 +$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} { (exit 1); exit 1; }; } fi done fi fi -{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5 -echo "${ECHO_T}$with_dbmliborder" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5 +$as_echo "$with_dbmliborder" >&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; } +{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5 +$as_echo_n "checking for --with-signal-module... " >&6; } # Check whether --with-signal-module was given. if test "${with_signal_module+set}" = set; then @@ -14330,8 +15590,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5 +$as_echo "$with_signal_module" >&6; } if test "${with_signal_module}" = "yes"; then USE_SIGNAL_MODULE="" @@ -14345,22 +15605,22 @@ USE_THREAD_MODULE="" -{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5 -echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5 +$as_echo_n "checking for --with-dec-threads... " >&6; } # 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; } +{ $as_echo "$as_me:$LINENO: result: $withval" >&5 +$as_echo "$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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -14373,8 +15633,8 @@ -{ echo "$as_me:$LINENO: checking for --with-threads" >&5 -echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5 +$as_echo_n "checking for --with-threads... " >&6; } # Check whether --with-threads was given. if test "${with_threads+set}" = set; then @@ -14393,8 +15653,8 @@ if test -z "$with_threads" then with_threads="yes" fi -{ echo "$as_me:$LINENO: result: $with_threads" >&5 -echo "${ECHO_T}$with_threads" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5 +$as_echo "$with_threads" >&6; } if test "$with_threads" = "no" @@ -14460,8 +15720,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; } + { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5 +$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14483,25 +15743,25 @@ fi rm -f conftest* - { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 -echo "${ECHO_T}$unistd_defines_pthreads" >&6; } + { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 +$as_echo "$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; } + { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5 +$as_echo_n "checking for cthreads.h... " >&6; } if test "${ac_cv_header_cthreads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 -echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5 +$as_echo_n "checking cthreads.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14517,32 +15777,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5 +$as_echo_n "checking cthreads.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14556,51 +15817,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -14609,18 +15871,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5 +$as_echo_n "checking for cthreads.h... " >&6; } if test "${ac_cv_header_cthreads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 +$as_echo "$ac_cv_header_cthreads_h" >&6; } fi -if test $ac_cv_header_cthreads_h = yes; then +if test "x$ac_cv_header_cthreads_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14639,17 +15901,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; } + { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 +$as_echo_n "checking for mach/cthreads.h... " >&6; } if test "${ac_cv_header_mach_cthreads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 -echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5 +$as_echo_n "checking mach/cthreads.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14665,32 +15927,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5 +$as_echo_n "checking mach/cthreads.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14704,51 +15967,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -14757,18 +16021,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 +$as_echo_n "checking for mach/cthreads.h... " >&6; } if test "${ac_cv_header_mach_cthreads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 +$as_echo "$ac_cv_header_mach_cthreads_h" >&6; } fi -if test $ac_cv_header_mach_cthreads_h = yes; then +if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14785,13 +16049,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; } + { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5 +$as_echo_n "checking for --with-pth... " >&6; } # 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; { $as_echo "$as_me:$LINENO: result: $withval" >&5 +$as_echo "$withval" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14804,16 +16068,16 @@ LIBS="-lpth $LIBS" THREADOBJ="Python/thread.o" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } + { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14838,21 +16102,24 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14860,15 +16127,15 @@ posix_threads=yes THREADOBJ="Python/thread.o" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$_libs - { echo "$as_me:$LINENO: checking for pthread_detach" >&5 -echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5 +$as_echo_n "checking for pthread_detach... " >&6; } if test "${ac_cv_func_pthread_detach+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14921,32 +16188,36 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_pthread_detach=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_pthread_detach=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_func_pthread_detach = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5 +$as_echo "$ac_cv_func_pthread_detach" >&6; } +if test "x$ac_cv_func_pthread_detach" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14956,17 +16227,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; } + { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 +$as_echo_n "checking for atheos/threads.h... " >&6; } if test "${ac_cv_header_atheos_threads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 -echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5 +$as_echo_n "checking atheos/threads.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14982,32 +16253,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5 +$as_echo_n "checking atheos/threads.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15021,51 +16293,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -15074,18 +16347,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 +$as_echo_n "checking for atheos/threads.h... " >&6; } if test "${ac_cv_header_atheos_threads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 +$as_echo "$ac_cv_header_atheos_threads_h" >&6; } fi -if test $ac_cv_header_atheos_threads_h = yes; then +if test "x$ac_cv_header_atheos_threads_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15099,17 +16372,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; } + { $as_echo "$as_me:$LINENO: checking for kernel/OS.h" >&5 +$as_echo_n "checking for kernel/OS.h... " >&6; } if test "${ac_cv_header_kernel_OS_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 -echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5 +$as_echo_n "checking kernel/OS.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15125,32 +16398,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5 +$as_echo_n "checking kernel/OS.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15164,51 +16438,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -15217,18 +16492,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for kernel/OS.h" >&5 +$as_echo_n "checking for kernel/OS.h... " >&6; } if test "${ac_cv_header_kernel_OS_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 +$as_echo "$ac_cv_header_kernel_OS_h" >&6; } fi -if test $ac_cv_header_kernel_OS_h = yes; then +if test "x$ac_cv_header_kernel_OS_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15241,10 +16516,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5 +$as_echo_n "checking for pthread_create in -lpthreads... " >&6; } if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthreads $LIBS" @@ -15276,33 +16551,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_pthreads_pthread_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthreads_pthread_create=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_pthreads_pthread_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } +if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15312,10 +16591,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 +$as_echo_n "checking for pthread_create in -lc_r... " >&6; } if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" @@ -15347,33 +16626,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_c_r_pthread_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_r_pthread_create=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_c_r_pthread_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } +if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15383,10 +16666,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5 +$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" @@ -15418,33 +16701,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_pthread___pthread_create_system=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread___pthread_create_system=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_pthread___pthread_create_system = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5 +$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } +if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15454,10 +16741,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5 +$as_echo_n "checking for pthread_create in -lcma... " >&6; } if test "${ac_cv_lib_cma_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcma $LIBS" @@ -15489,33 +16776,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_cma_pthread_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cma_pthread_create=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_cma_pthread_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5 +$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } +if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15545,6 +16836,7 @@ fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi @@ -15556,10 +16848,10 @@ - { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5 -echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5 +$as_echo_n "checking for usconfig in -lmpc... " >&6; } if test "${ac_cv_lib_mpc_usconfig+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpc $LIBS" @@ -15591,33 +16883,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpc_usconfig=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpc_usconfig=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_mpc_usconfig = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5 +$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } +if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15629,10 +16925,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 +$as_echo_n "checking for thr_create in -lthread... " >&6; } if test "${ac_cv_lib_thread_thr_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lthread $LIBS" @@ -15664,33 +16960,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_thread_thr_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_thread_thr_create=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_thread_thr_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 +$as_echo "$ac_cv_lib_thread_thr_create" >&6; } +if test "x$ac_cv_lib_thread_thr_create" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15743,10 +17043,10 @@ ;; 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; } + { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 +$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } if test "${ac_cv_pthread_system_supported+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_pthread_system_supported=no @@ -15776,29 +17076,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_pthread_system_supported=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_pthread_system_supported=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -15806,8 +17109,8 @@ fi - { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5 -echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5 +$as_echo "$ac_cv_pthread_system_supported" >&6; } if test "$ac_cv_pthread_system_supported" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -15818,11 +17121,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -15875,35 +17178,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF case $ac_sys_system in CYGWIN*) @@ -15923,18 +17233,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; } +{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5 +$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } # Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then enableval=$enable_ipv6; case "$enableval" in no) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ipv6=no ;; - *) { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + *) { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define ENABLE_IPV6 1 _ACEOF @@ -15945,8 +17255,8 @@ else if test "$cross_compiling" = yes; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ipv6=no else @@ -15974,41 +17284,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ipv6=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +{ $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ipv6=no fi +rm -rf conftest.dSYM 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; } + { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5 +$as_echo_n "checking if RFC2553 API is available... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16032,26 +17345,27 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ipv6=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ipv6=no fi @@ -16073,8 +17387,8 @@ 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; } + { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5 +$as_echo_n "checking ipv6 stack type... " >&6; } for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do case $i in @@ -16230,8 +17544,8 @@ break fi done - { echo "$as_me:$LINENO: result: $ipv6type" >&5 -echo "${ECHO_T}$ipv6type" >&6; } + { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5 +$as_echo "$ipv6type" >&6; } fi if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then @@ -16250,8 +17564,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5 -echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5 +$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16273,13 +17587,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16289,22 +17604,22 @@ #define HAVE_OSX105_SDK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # 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; } +{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5 +$as_echo_n "checking for --with-doc-strings... " >&6; } # Check whether --with-doc-strings was given. if test "${with_doc_strings+set}" = set; then @@ -16323,12 +17638,12 @@ _ACEOF fi -{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5 -echo "${ECHO_T}$with_doc_strings" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5 +$as_echo_n "checking for --with-tsc... " >&6; } # Check whether --with-tsc was given. if test "${with_tsc+set}" = set; then @@ -16340,20 +17655,20 @@ #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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } +{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5 +$as_echo_n "checking for --with-pymalloc... " >&6; } # Check whether --with-pymalloc was given. if test "${with_pymalloc+set}" = set; then @@ -16372,12 +17687,12 @@ _ACEOF fi -{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5 -echo "${ECHO_T}$with_pymalloc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5 +$as_echo_n "checking for --with-wctype-functions... " >&6; } # Check whether --with-wctype-functions was given. if test "${with_wctype_functions+set}" = set; then @@ -16389,14 +17704,14 @@ #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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16409,11 +17724,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16466,35 +17781,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -16504,8 +17826,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; } +{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5 +$as_echo_n "checking DYNLOADFILE... " >&6; } if test -z "$DYNLOADFILE" then case $ac_sys_system/$ac_sys_release in @@ -16530,8 +17852,8 @@ ;; esac fi -{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 -echo "${ECHO_T}$DYNLOADFILE" >&6; } +{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 +$as_echo "$DYNLOADFILE" >&6; } if test "$DYNLOADFILE" != "dynload_stub.o" then @@ -16544,16 +17866,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; } +{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5 +$as_echo_n "checking MACHDEP_OBJS... " >&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; } +{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5 +$as_echo "MACHDEP_OBJS" >&6; } # checks for library functions @@ -16655,11 +17977,11 @@ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16712,35 +18034,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -16749,8 +18078,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; } +{ $as_echo "$as_me:$LINENO: checking for chroot" >&5 +$as_echo_n "checking for chroot... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16772,13 +18101,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16788,20 +18118,20 @@ #define HAVE_CHROOT 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for link" >&5 +$as_echo_n "checking for link... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16823,13 +18153,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16839,20 +18170,20 @@ #define HAVE_LINK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for symlink" >&5 +$as_echo_n "checking for symlink... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16874,13 +18205,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16890,20 +18222,20 @@ #define HAVE_SYMLINK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5 +$as_echo_n "checking for fchdir... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16925,13 +18257,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16941,20 +18274,20 @@ #define HAVE_FCHDIR 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for fsync" >&5 +$as_echo_n "checking for fsync... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16976,13 +18309,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16992,20 +18326,20 @@ #define HAVE_FSYNC 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5 +$as_echo_n "checking for fdatasync... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17027,13 +18361,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17043,20 +18378,20 @@ #define HAVE_FDATASYNC 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking for epoll" >&5 -echo $ECHO_N "checking for epoll... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for epoll" >&5 +$as_echo_n "checking for epoll... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17078,13 +18413,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17094,20 +18430,20 @@ #define HAVE_EPOLL 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking for kqueue" >&5 -echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5 +$as_echo_n "checking for kqueue... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17132,13 +18468,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17148,14 +18485,14 @@ #define HAVE_KQUEUE 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17166,8 +18503,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; } +{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5 +$as_echo_n "checking for ctermid_r... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17192,13 +18529,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17208,21 +18546,21 @@ #define HAVE_CTERMID_R 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for flock" >&5 +$as_echo_n "checking for flock... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17247,13 +18585,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17263,21 +18602,21 @@ #define HAVE_FLOCK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5 +$as_echo_n "checking for getpagesize... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17302,13 +18641,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17318,14 +18658,14 @@ #define HAVE_GETPAGESIZE 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17335,10 +18675,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_TRUE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$TRUE"; then ac_cv_prog_TRUE="$TRUE" # Let the user override the test. @@ -17351,7 +18691,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17362,11 +18702,11 @@ fi TRUE=$ac_cv_prog_TRUE if test -n "$TRUE"; then - { echo "$as_me:$LINENO: result: $TRUE" >&5 -echo "${ECHO_T}$TRUE" >&6; } + { $as_echo "$as_me:$LINENO: result: $TRUE" >&5 +$as_echo "$TRUE" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17375,10 +18715,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5 +$as_echo_n "checking for inet_aton in -lc... " >&6; } if test "${ac_cv_lib_c_inet_aton+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" @@ -17410,40 +18750,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_c_inet_aton=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_inet_aton=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_c_inet_aton = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5 +$as_echo "$ac_cv_lib_c_inet_aton" >&6; } +if test "x$ac_cv_lib_c_inet_aton" = x""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; } +{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 +$as_echo_n "checking for inet_aton in -lresolv... " >&6; } if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" @@ -17475,33 +18819,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_resolv_inet_aton=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_resolv_inet_aton=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_resolv_inet_aton = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 +$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } +if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF @@ -17516,14 +18864,13 @@ # On Tru64, chflags seems to be present, but calling it will # exit Python -{ echo "$as_me:$LINENO: checking for chflags" >&5 -echo $ECHO_N "checking for chflags... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking for chflags" >&5 +$as_echo_n "checking for chflags... " >&6; } +if test "${ac_cv_have_chflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_chflags=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17548,50 +18895,57 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHFLAGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ac_cv_have_chflags=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - +ac_cv_have_chflags=no fi +rm -rf conftest.dSYM 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 lchflags" >&5 -echo $ECHO_N "checking for lchflags... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5 +$as_echo "$ac_cv_have_chflags" >&6; } +if test $ac_cv_have_chflags = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHFLAGS 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5 +$as_echo_n "checking for lchflags... " >&6; } +if test "${ac_cv_have_lchflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_lchflags=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17616,42 +18970,50 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LCHFLAGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ac_cv_have_lchflags=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - +ac_cv_have_lchflags=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5 +$as_echo "$ac_cv_have_lchflags" >&6; } +if test $ac_cv_have_lchflags = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LCHFLAGS 1 +_ACEOF + +fi + case $ac_sys_system/$ac_sys_release in Darwin/*) _CUR_CFLAGS="${CFLAGS}" @@ -17661,10 +19023,10 @@ ;; esac -{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5 -echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5 +$as_echo_n "checking for inflateCopy in -lz... " >&6; } if test "${ac_cv_lib_z_inflateCopy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -17696,33 +19058,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_z_inflateCopy=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_inflateCopy=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_z_inflateCopy = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5 +$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } +if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ZLIB_COPY 1 @@ -17738,8 +19104,8 @@ ;; esac -{ echo "$as_me:$LINENO: checking for hstrerror" >&5 -echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5 +$as_echo_n "checking for hstrerror... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17764,39 +19130,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5 +$as_echo_n "checking for inet_aton... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17824,39 +19194,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5 +$as_echo_n "checking for inet_pton... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17884,13 +19258,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17900,22 +19275,22 @@ #define HAVE_INET_PTON 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5 +$as_echo_n "checking for setgroups... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17943,13 +19318,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17959,14 +19335,14 @@ #define HAVE_SETGROUPS 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17977,11 +19353,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18034,42 +19410,49 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_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; } + { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 +$as_echo_n "checking for openpty in -lutil... " >&6; } if test "${ac_cv_lib_util_openpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" @@ -18101,42 +19484,46 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_util_openpty=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_openpty=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_util_openpty = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 +$as_echo "$ac_cv_lib_util_openpty" >&6; } +if test "x$ac_cv_lib_util_openpty" = x""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; } + { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5 +$as_echo_n "checking for openpty in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_openpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -18168,33 +19555,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_bsd_openpty=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_openpty=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_bsd_openpty = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5 +$as_echo "$ac_cv_lib_bsd_openpty" >&6; } +if test "x$ac_cv_lib_bsd_openpty" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OPENPTY 1 _ACEOF @@ -18211,11 +19602,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18268,42 +19659,49 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_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; } + { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5 +$as_echo_n "checking for forkpty in -lutil... " >&6; } if test "${ac_cv_lib_util_forkpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" @@ -18335,42 +19733,46 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_util_forkpty=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_forkpty=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_util_forkpty = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5 +$as_echo "$ac_cv_lib_util_forkpty" >&6; } +if test "x$ac_cv_lib_util_forkpty" = x""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; } + { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5 +$as_echo_n "checking for forkpty in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_forkpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -18402,33 +19804,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_bsd_forkpty=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_forkpty=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_bsd_forkpty = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5 +$as_echo "$ac_cv_lib_bsd_forkpty" >&6; } +if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FORKPTY 1 _ACEOF @@ -18447,11 +19853,11 @@ for ac_func in 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18504,35 +19910,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -18548,11 +19961,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18605,35 +20018,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -18645,11 +20065,11 @@ for ac_func in dup2 getcwd strdup 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18702,35 +20122,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else @@ -18747,11 +20174,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18804,35 +20231,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18855,13 +20289,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18873,7 +20308,7 @@ else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -18887,11 +20322,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18944,35 +20379,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18995,13 +20437,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -19013,7 +20456,7 @@ else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -19027,11 +20470,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19084,35 +20527,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19135,20 +20585,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -19165,8 +20616,8 @@ done -{ echo "$as_me:$LINENO: checking for major" >&5 -echo $ECHO_N "checking for major... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for major" >&5 +$as_echo_n "checking for major... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19198,44 +20649,48 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +$as_echo_n "checking for getaddrinfo... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19251,9 +20706,7 @@ int main () { - getaddrinfo(NULL, NULL, NULL, NULL); - ; return 0; } @@ -19264,27 +20717,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + have_getaddrinfo=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ 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; } -buggygetaddrinfo=yes + have_getaddrinfo=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 +$as_echo "$have_getaddrinfo" >&6; } +if test $have_getaddrinfo = yes +then + { $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 +$as_echo_n "checking getaddrinfo bug... " >&6; } + if test "${ac_cv_buggy_getaddrinfo+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_buggy_getaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19299,7 +20768,7 @@ #include #include -main() +int main() { int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; @@ -19371,12 +20840,12 @@ if (aitop) freeaddrinfo(aitop); - exit(0); + return 0; bad: if (aitop) freeaddrinfo(aitop); - exit(1); + return 1; } _ACEOF @@ -19386,53 +20855,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: good" >&5 -echo "${ECHO_T}good" >&6; } -buggygetaddrinfo=no + ac_cv_buggy_getaddrinfo=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: buggy" >&5 -echo "${ECHO_T}buggy" >&6; } -buggygetaddrinfo=yes +ac_cv_buggy_getaddrinfo=yes fi +rm -rf conftest.dSYM 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; } -buggygetaddrinfo=yes - fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +fi -if test "$buggygetaddrinfo" = "yes"; then - if test "$ipv6" = "yes"; then +if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes +then + if test $ipv6 = yes + then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 @@ -19447,11 +20907,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19504,35 +20964,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -19540,10 +21007,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19570,20 +21037,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_time=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no @@ -19591,8 +21059,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -19601,10 +21069,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test "${ac_cv_struct_tm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19620,7 +21088,7 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + return !p; ; return 0; } @@ -19631,20 +21099,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_struct_tm=time.h else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h @@ -19652,8 +21121,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -19662,10 +21131,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +$as_echo_n "checking for struct tm.tm_zone... " >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19693,20 +21162,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_tm_tm_zone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -19735,20 +21205,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_tm_tm_zone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no @@ -19759,9 +21230,9 @@ 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; } -if test $ac_cv_member_struct_tm_tm_zone = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -19777,10 +21248,10 @@ _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +$as_echo_n "checking whether tzname is declared... " >&6; } if test "${ac_cv_have_decl_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19807,20 +21278,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no @@ -19828,9 +21300,9 @@ 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +$as_echo "$ac_cv_have_decl_tzname" >&6; } +if test "x$ac_cv_have_decl_tzname" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TZNAME 1 @@ -19846,10 +21318,10 @@ fi - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19876,31 +21348,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_var_tzname=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -19910,10 +21386,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 +$as_echo_n "checking for struct stat.st_rdev... " >&6; } if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19938,20 +21414,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_rdev=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -19977,20 +21454,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_rdev=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_rdev=no @@ -20001,9 +21479,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_rdev = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 +$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; } +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_RDEV 1 @@ -20012,10 +21490,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +$as_echo_n "checking for struct stat.st_blksize... " >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20040,20 +21518,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_blksize=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20079,20 +21558,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_blksize=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blksize=no @@ -20103,9 +21583,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_blksize = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } +if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -20114,10 +21594,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 -echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 +$as_echo_n "checking for struct stat.st_flags... " >&6; } if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20142,20 +21622,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_flags=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20181,20 +21662,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_flags=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_flags=no @@ -20205,9 +21687,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_flags = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5 +$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; } +if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_FLAGS 1 @@ -20216,10 +21698,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 -echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 +$as_echo_n "checking for struct stat.st_gen... " >&6; } if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20244,20 +21726,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_gen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20283,20 +21766,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_gen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_gen=no @@ -20307,9 +21791,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_gen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5 +$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; } +if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_GEN 1 @@ -20318,10 +21802,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5 -echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5 +$as_echo_n "checking for struct stat.st_birthtime... " >&6; } if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20346,20 +21830,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_birthtime=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20385,20 +21870,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_birthtime=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_birthtime=no @@ -20409,9 +21895,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_birthtime = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5 +$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; } +if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 @@ -20420,10 +21906,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +$as_echo_n "checking for struct stat.st_blocks... " >&6; } if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20448,20 +21934,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_blocks=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20487,20 +21974,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_blocks=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blocks=no @@ -20511,9 +21999,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_blocks = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; } +if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -20535,10 +22023,10 @@ -{ 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; } +{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5 +$as_echo_n "checking for time.h that defines altzone... " >&6; } if test "${ac_cv_header_time_altzone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20561,20 +22049,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_time_altzone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time_altzone=no @@ -20583,8 +22072,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5 +$as_echo "$ac_cv_header_time_altzone" >&6; } if test $ac_cv_header_time_altzone = yes; then cat >>confdefs.h <<\_ACEOF @@ -20594,8 +22083,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; } +{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20621,13 +22110,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -20641,20 +22131,20 @@ was_it_defined=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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; } +{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5 +$as_echo "$was_it_defined" >&6; } -{ echo "$as_me:$LINENO: checking for addrinfo" >&5 -echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5 +$as_echo_n "checking for addrinfo... " >&6; } if test "${ac_cv_struct_addrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20678,20 +22168,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_struct_addrinfo=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_addrinfo=no @@ -20700,8 +22191,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5 +$as_echo "$ac_cv_struct_addrinfo" >&6; } if test $ac_cv_struct_addrinfo = yes; then cat >>confdefs.h <<\_ACEOF @@ -20710,10 +22201,10 @@ fi -{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 -echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 +$as_echo_n "checking for sockaddr_storage... " >&6; } if test "${ac_cv_struct_sockaddr_storage+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20738,20 +22229,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_struct_sockaddr_storage=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_sockaddr_storage=no @@ -20760,8 +22252,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5 +$as_echo "$ac_cv_struct_sockaddr_storage" >&6; } if test $ac_cv_struct_sockaddr_storage = yes; then cat >>confdefs.h <<\_ACEOF @@ -20773,10 +22265,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20801,20 +22293,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_c_char_unsigned=no else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_char_unsigned=yes @@ -20822,8 +22315,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$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 @@ -20831,10 +22324,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20906,20 +22399,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_c_const=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no @@ -20927,20 +22421,20 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF -#define const +#define const /**/ _ACEOF fi works=no -{ echo "$as_me:$LINENO: checking for working volatile" >&5 -echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5 +$as_echo_n "checking for working volatile... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20962,37 +22456,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 works=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF -#define volatile +#define volatile /**/ _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6; } +{ $as_echo "$as_me:$LINENO: result: $works" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5 +$as_echo_n "checking for working signed char... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21014,37 +22509,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 works=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF -#define signed +#define signed /**/ _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6; } +{ $as_echo "$as_me:$LINENO: result: $works" >&5 +$as_echo "$works" >&6; } have_prototypes=no -{ echo "$as_me:$LINENO: checking for prototypes" >&5 -echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5 +$as_echo_n "checking for prototypes... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21066,13 +22562,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21086,19 +22583,19 @@ have_prototypes=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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; } +{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5 +$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21130,13 +22627,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21150,19 +22648,19 @@ works=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6; } +{ $as_echo "$as_me:$LINENO: result: $works" >&5 +$as_echo "$works" >&6; } # check for socketpair -{ echo "$as_me:$LINENO: checking for socketpair" >&5 -echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5 +$as_echo_n "checking for socketpair... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21187,13 +22685,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21203,22 +22702,22 @@ #define HAVE_SOCKETPAIR 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5 +$as_echo_n "checking if sockaddr has sa_len member... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21242,37 +22741,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5 +$as_echo_n "checking whether va_list is an array... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21300,20 +22800,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -21327,17 +22828,17 @@ fi 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; } +{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +$as_echo_n "checking for gethostbyname_r... " >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21390,39 +22891,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_gethostbyname_r=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname_r=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_func_gethostbyname_r = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +$as_echo "$ac_cv_func_gethostbyname_r" >&6; } +if test "x$ac_cv_func_gethostbyname_r" = x""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; } + { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5 +$as_echo_n "checking gethostbyname_r with 6 args... " >&6; } OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" cat >conftest.$ac_ext <<_ACEOF @@ -21456,13 +22961,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21477,18 +22983,18 @@ #define HAVE_GETHOSTBYNAME_R_6_ARG 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5 +$as_echo_n "checking gethostbyname_r with 5 args... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21520,13 +23026,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21541,18 +23048,18 @@ #define HAVE_GETHOSTBYNAME_R_5_ARG 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5 +$as_echo_n "checking gethostbyname_r with 3 args... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21582,13 +23089,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21603,16 +23111,16 @@ #define HAVE_GETHOSTBYNAME_R_3_ARG 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -21632,11 +23140,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21689,35 +23197,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -21736,10 +23251,10 @@ # (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; } +{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5 +$as_echo_n "checking for __fpu_control... " >&6; } if test "${ac_cv_func___fpu_control+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21792,39 +23307,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func___fpu_control=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func___fpu_control=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_func___fpu_control = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5 +$as_echo "$ac_cv_func___fpu_control" >&6; } +if test "x$ac_cv_func___fpu_control" = x""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; } +{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5 +$as_echo_n "checking for __fpu_control in -lieee... " >&6; } if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" @@ -21856,33 +23375,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ieee___fpu_control=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ieee___fpu_control=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_ieee___fpu_control = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5 +$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } +if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBIEEE 1 _ACEOF @@ -21896,8 +23419,8 @@ # Check for --with-fpectl -{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5 -echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5 +$as_echo_n "checking for --with-fpectl... " >&6; } # Check whether --with-fpectl was given. if test "${with_fpectl+set}" = set; then @@ -21909,14 +23432,14 @@ #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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -21927,53 +23450,53 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5 +$as_echo_n "checking for --with-libm=STRING... " >&6; } # Check whether --with-libm was given. if test "${with_libm+set}" = set; then 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; } + { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5 +$as_echo "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; } -else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5 -echo "$as_me: error: proper usage is --with-libm=STRING" >&2;} + { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5 +$as_echo "set LIBM=\"$withval\"" >&6; } +else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5 +$as_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; } + { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5 +$as_echo "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; } +{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5 +$as_echo_n "checking for --with-libc=STRING... " >&6; } # Check whether --with-libc was given. if test "${with_libc+set}" = set; then 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; } + { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5 +$as_echo "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; } -else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5 -echo "$as_me: error: proper usage is --with-libc=STRING" >&2;} + { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5 +$as_echo "set LIBC=\"$withval\"" >&6; } +else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5 +$as_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; } + { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5 +$as_echo "default LIBC=\"$LIBC\"" >&6; } fi @@ -21989,10 +23512,10 @@ # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding # mode is round-to-nearest and double rounding issues are present, and # 0 otherwise. See http://bugs.python.org/issue2937 for more info. -{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5 -echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5 +$as_echo_n "checking for x87-style double rounding... " >&6; } if test "${ac_cv_x87_double_rounding+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -22031,37 +23554,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_x87_double_rounding=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_x87_double_rounding=yes fi +rm -rf conftest.dSYM 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_x87_double_rounding" >&5 -echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5 +$as_echo "$ac_cv_x87_double_rounding" >&6; } if test "$ac_cv_x87_double_rounding" = yes then @@ -22072,14 +23598,13 @@ fi # Multiprocessing check for broken sem_getvalue -{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 -echo $ECHO_N "checking for broken sem_getvalue... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 +$as_echo_n "checking for broken sem_getvalue... " >&6; } +if test "${ac_cv_broken_sem_getvalue+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_broken_sem_getvalue=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22108,7 +23633,6 @@ return res==-1 ? 1 : 0; } - _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -22116,48 +23640,56 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + ac_cv_broken_sem_getvalue=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +ac_cv_broken_sem_getvalue=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_BROKEN_SEM_GETVALUE 1 -_ACEOF fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5 +$as_echo "$ac_cv_broken_sem_getvalue" >&6; } +if test $ac_cv_broken_sem_getvalue = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BROKEN_SEM_GETVALUE 1 +_ACEOF +fi # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of # -0. on some architectures. -{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5 -echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5 +$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; } if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -22188,37 +23720,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_tanh_preserves_zero_sign=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_tanh_preserves_zero_sign=no fi +rm -rf conftest.dSYM 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_tanh_preserves_zero_sign" >&5 -echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5 +$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; } if test "$ac_cv_tanh_preserves_zero_sign" = yes then @@ -22239,11 +23774,11 @@ for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22296,44 +23831,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5 -echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5 +$as_echo_n "checking whether isinf is declared... " >&6; } if test "${ac_cv_have_decl_isinf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22360,20 +23902,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_isinf=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isinf=no @@ -22381,9 +23924,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5 -echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; } -if test $ac_cv_have_decl_isinf = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5 +$as_echo "$ac_cv_have_decl_isinf" >&6; } +if test "x$ac_cv_have_decl_isinf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISINF 1 @@ -22397,10 +23940,10 @@ fi -{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5 -echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5 +$as_echo_n "checking whether isnan is declared... " >&6; } if test "${ac_cv_have_decl_isnan+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22427,20 +23970,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_isnan=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isnan=no @@ -22448,9 +23992,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5 -echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; } -if test $ac_cv_have_decl_isnan = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5 +$as_echo "$ac_cv_have_decl_isnan" >&6; } +if test "x$ac_cv_have_decl_isnan" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISNAN 1 @@ -22464,10 +24008,10 @@ fi -{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5 -echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5 +$as_echo_n "checking whether isfinite is declared... " >&6; } if test "${ac_cv_have_decl_isfinite+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22494,20 +24038,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_isfinite=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isfinite=no @@ -22515,9 +24060,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5 -echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; } -if test $ac_cv_have_decl_isfinite = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5 +$as_echo "$ac_cv_have_decl_isfinite" >&6; } +if test "x$ac_cv_have_decl_isfinite" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISFINITE 1 @@ -22537,8 +24082,8 @@ LIBS=$LIBS_SAVE # determine what size digit to use for Python's longs -{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 -echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 +$as_echo_n "checking digit size for Python's longs... " >&6; } # Check whether --enable-big-digits was given. if test "${enable_big_digits+set}" = set; then enableval=$enable_big_digits; case $enable_big_digits in @@ -22549,12 +24094,12 @@ 15|30) ;; *) - { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5 -echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;} + { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5 +$as_echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;} { (exit 1); exit 1; }; } ;; esac -{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5 -echo "${ECHO_T}$enable_big_digits" >&6; } +{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5 +$as_echo "$enable_big_digits" >&6; } cat >>confdefs.h <<_ACEOF #define PYLONG_BITS_IN_DIGIT $enable_big_digits @@ -22562,24 +24107,24 @@ else - { echo "$as_me:$LINENO: result: no value specified" >&5 -echo "${ECHO_T}no value specified" >&6; } + { $as_echo "$as_me:$LINENO: result: no value specified" >&5 +$as_echo "no value specified" >&6; } fi # 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; } + { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5 +$as_echo_n "checking for wchar.h... " >&6; } if test "${ac_cv_header_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5 +$as_echo_n "checking wchar.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22595,32 +24140,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5 +$as_echo_n "checking wchar.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22634,51 +24180,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -22687,18 +24234,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5 +$as_echo_n "checking for wchar.h... " >&6; } if test "${ac_cv_header_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 +$as_echo "$ac_cv_header_wchar_h" >&6; } fi -if test $ac_cv_header_wchar_h = yes; then +if test "x$ac_cv_header_wchar_h" = x""yes; then cat >>confdefs.h <<\_ACEOF @@ -22717,69 +24264,14 @@ # 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; } -if test "${ac_cv_type_wchar_t+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 - -typedef wchar_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - 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_type_wchar_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_wchar_t=no -fi - -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; } - -# The cast to long int works around a bug in the HP C Compiler + # 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; } +{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5 +$as_echo_n "checking size of wchar_t... " >&6; } if test "${ac_cv_sizeof_wchar_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -22791,11 +24283,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)]; test_array [0] = 0 ; @@ -22808,13 +24299,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22829,11 +24321,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -22846,20 +24337,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -22873,7 +24365,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -22884,11 +24376,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)]; test_array [0] = 0 ; @@ -22901,13 +24392,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22922,11 +24414,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -22939,20 +24430,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -22966,7 +24458,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -22987,11 +24479,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -23004,20 +24495,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -23028,11 +24520,13 @@ case $ac_lo in ?*) ac_cv_sizeof_wchar_t=$ac_lo;; '') if test "$ac_cv_type_wchar_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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) +$as_echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_wchar_t=0 fi ;; @@ -23046,9 +24540,8 @@ /* end confdefs.h. */ #include - 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_)); } +static long int longval () { return (long int) (sizeof (wchar_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); } #include #include int @@ -23058,20 +24551,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (wchar_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (wchar_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (wchar_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -23084,43 +24579,48 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_wchar_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_wchar_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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) +$as_echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_wchar_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5 +$as_echo "$ac_cv_sizeof_wchar_t" >&6; } @@ -23131,8 +24631,8 @@ fi -{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 -echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 +$as_echo_n "checking for UCS-4 tcl... " >&6; } have_ucs4_tcl=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23159,13 +24659,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -23179,24 +24680,24 @@ have_ucs4_tcl=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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; } +{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5 +$as_echo "$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; } + { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5 +$as_echo_n "checking whether wchar_t is signed... " >&6; } if test "${ac_cv_wchar_t_signed+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -23223,41 +24724,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_wchar_t_signed=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_wchar_t_signed=no fi +rm -rf conftest.dSYM 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; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking what type to use for unicode" >&5 +$as_echo_n "checking what type to use for unicode... " >&6; } # Check whether --enable-unicode was given. if test "${enable_unicode+set}" = set; then enableval=$enable_unicode; @@ -23301,8 +24805,8 @@ if test "$enable_unicode" = "no" then UNICODE_OBJS="" - { echo "$as_me:$LINENO: result: not used" >&5 -echo "${ECHO_T}not used" >&6; } + { $as_echo "$as_me:$LINENO: result: not used" >&5 +$as_echo "not used" >&6; } else UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" @@ -23339,36 +24843,182 @@ #define PY_UNICODE_TYPE unsigned long _ACEOF - else - PY_UNICODE_TYPE="no type found" - fi - { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 -echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; } + else + PY_UNICODE_TYPE="no type found" + fi + { $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 +$as_echo "$PY_UNICODE_TYPE" >&6; } +fi + +# check for endianness + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + 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; } -if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +#include int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) - bogus endian macros -#endif +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif ; return 0; @@ -23380,33 +25030,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +#include int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif +#ifndef _BIG_ENDIAN + not big endian + #endif ; return 0; @@ -23418,20 +25068,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_c_bigendian=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no @@ -23439,29 +25090,44 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # 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 - cat >conftest.$ac_ext <<_ACEOF + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -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 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; } +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + int main () { - _ascii (); _ebcdic (); +return use_ascii (foo) == use_ebcdic (foo); ; return 0; } @@ -23472,30 +25138,31 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -23514,14 +25181,14 @@ main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; ; return 0; @@ -23533,63 +25200,70 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi - -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; } -case $ac_cv_c_bigendian in - yes) +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF +;; #( + no) + ;; #( + universal) cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 +#define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; -esac + esac # 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; } +{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5 +$as_echo_n "checking whether right shift extends the sign bit... " >&6; } if test "${ac_cv_rshift_extends_sign+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -23614,37 +25288,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_rshift_extends_sign=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_rshift_extends_sign=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5 +$as_echo "$ac_cv_rshift_extends_sign" >&6; } if test "$ac_cv_rshift_extends_sign" = no then @@ -23655,10 +25332,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5 +$as_echo_n "checking for getc_unlocked() and friends... " >&6; } if test "${ac_cv_have_getc_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -23687,32 +25364,36 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_have_getc_unlocked=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_getc_unlocked=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5 +$as_echo "$ac_cv_have_getc_unlocked" >&6; } if test "$ac_cv_have_getc_unlocked" = yes then @@ -23730,8 +25411,8 @@ # library. NOTE: Keep the precedence of listed libraries synchronised # with setup.py. py_cv_lib_readline=no -{ echo "$as_me:$LINENO: checking how to link readline libs" >&5 -echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5 +$as_echo_n "checking how to link readline libs... " >&6; } for py_libtermcap in "" ncursesw ncurses curses termcap; do if test -z "$py_libtermcap"; then READLINE_LIBS="-lreadline" @@ -23767,26 +25448,30 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then py_cv_lib_readline=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test $py_cv_lib_readline = yes; then @@ -23796,11 +25481,11 @@ # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts #AC_SUBST([READLINE_LIBS]) if test $py_cv_lib_readline = no; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } else - { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5 -echo "${ECHO_T}$READLINE_LIBS" >&6; } + { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5 +$as_echo "$READLINE_LIBS" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 @@ -23809,10 +25494,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5 +$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; } if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -23844,33 +25529,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_readline_rl_callback_handler_install=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_callback_handler_install=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 +$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; } +if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_CALLBACK 1 @@ -23893,20 +25582,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_readline=no @@ -23937,10 +25627,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5 +$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; } if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -23972,33 +25662,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_readline_rl_pre_input_hook=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_pre_input_hook=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5 +$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; } +if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_PRE_INPUT_HOOK 1 @@ -24008,10 +25702,10 @@ # also in 4.0 -{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5 -echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5 +$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; } if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -24043,33 +25737,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_readline_rl_completion_display_matches_hook=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_completion_display_matches_hook=no fi +rm -rf conftest.dSYM 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_display_matches_hook" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } -if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5 +$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } +if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1 @@ -24079,10 +25777,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5 +$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; } if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -24114,33 +25812,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_readline_rl_completion_matches=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_completion_matches=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_readline_rl_completion_matches = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5 +$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; } +if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_COMPLETION_MATCHES 1 @@ -24163,20 +25865,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_readline=no @@ -24209,10 +25912,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5 +$as_echo_n "checking for broken nice()... " >&6; } if test "${ac_cv_broken_nice+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -24240,37 +25943,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_nice=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_nice=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5 +$as_echo "$ac_cv_broken_nice" >&6; } if test "$ac_cv_broken_nice" = yes then @@ -24280,9 +25986,12 @@ fi -{ 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 +{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5 +$as_echo_n "checking for broken poll()... " >&6; } +if test "${ac_cv_broken_poll+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then ac_cv_broken_poll=no else cat >conftest.$ac_ext <<_ACEOF @@ -24294,27 +26003,21 @@ #include -int main (void) - { +int main() +{ struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; + int poll_test; close (42); - int poll_test = poll (&poll_struct, 1, 0); - + poll_test = poll(&poll_struct, 1, 0); if (poll_test < 0) - { - exit(0); - } + return 0; else if (poll_test == 0 && poll_struct.revents != POLLNVAL) - { - exit(0); - } + return 0; else - { - exit(1); - } - } + return 1; +} _ACEOF rm -f conftest$ac_exeext @@ -24323,35 +26026,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_poll=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_poll=no fi +rm -rf conftest.dSYM 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; } +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5 +$as_echo "$ac_cv_broken_poll" >&6; } if test "$ac_cv_broken_poll" = yes then @@ -24364,10 +26072,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +$as_echo_n "checking for struct tm.tm_zone... " >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24395,20 +26103,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_tm_tm_zone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -24437,20 +26146,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_tm_tm_zone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no @@ -24461,9 +26171,9 @@ 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; } -if test $ac_cv_member_struct_tm_tm_zone = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -24479,10 +26189,10 @@ _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +$as_echo_n "checking whether tzname is declared... " >&6; } if test "${ac_cv_have_decl_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24509,20 +26219,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no @@ -24530,9 +26241,9 @@ 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +$as_echo "$ac_cv_have_decl_tzname" >&6; } +if test "x$ac_cv_have_decl_tzname" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TZNAME 1 @@ -24548,10 +26259,10 @@ fi - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24578,31 +26289,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_var_tzname=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -24614,10 +26329,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5 +$as_echo_n "checking for working tzset()... " >&6; } if test "${ac_cv_working_tzset+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -24700,37 +26415,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_tzset=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_working_tzset=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5 +$as_echo "$ac_cv_working_tzset" >&6; } if test "$ac_cv_working_tzset" = yes then @@ -24741,10 +26459,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5 +$as_echo_n "checking for tv_nsec in struct stat... " >&6; } if test "${ac_cv_stat_tv_nsec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24770,20 +26488,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_stat_tv_nsec=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_stat_tv_nsec=no @@ -24792,8 +26511,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5 +$as_echo "$ac_cv_stat_tv_nsec" >&6; } if test "$ac_cv_stat_tv_nsec" = yes then @@ -24804,10 +26523,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5 +$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; } if test "${ac_cv_stat_tv_nsec2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24833,20 +26552,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_stat_tv_nsec2=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_stat_tv_nsec2=no @@ -24855,8 +26575,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5 +$as_echo "$ac_cv_stat_tv_nsec2" >&6; } if test "$ac_cv_stat_tv_nsec2" = yes then @@ -24867,10 +26587,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5 +$as_echo_n "checking whether mvwdelch is an expression... " >&6; } if test "${ac_cv_mvwdelch_is_expression+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24896,20 +26616,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_mvwdelch_is_expression=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_mvwdelch_is_expression=no @@ -24918,8 +26639,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5 +$as_echo "$ac_cv_mvwdelch_is_expression" >&6; } if test "$ac_cv_mvwdelch_is_expression" = yes then @@ -24930,10 +26651,10 @@ fi -{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5 -echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5 +$as_echo_n "checking whether WINDOW has _flags... " >&6; } if test "${ac_cv_window_has_flags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24959,20 +26680,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_window_has_flags=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_window_has_flags=no @@ -24981,8 +26703,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5 +$as_echo "$ac_cv_window_has_flags" >&6; } if test "$ac_cv_window_has_flags" = yes @@ -24994,8 +26716,8 @@ fi -{ echo "$as_me:$LINENO: checking for is_term_resized" >&5 -echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5 +$as_echo_n "checking for is_term_resized... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25017,13 +26739,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -25033,21 +26756,21 @@ #define HAVE_CURSES_IS_TERM_RESIZED 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5 +$as_echo_n "checking for resize_term... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25069,13 +26792,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -25085,21 +26809,21 @@ #define HAVE_CURSES_RESIZE_TERM 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5 +$as_echo_n "checking for resizeterm... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25121,13 +26845,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -25137,61 +26862,60 @@ #define HAVE_CURSES_RESIZETERM 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5 +$as_echo_n "checking for /dev/ptmx... " >&6; } if test -r /dev/ptmx then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5 -echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5 +$as_echo_n "checking for /dev/ptc... " >&6; } if test -r /dev/ptc then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } -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; }; } +{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 +$as_echo_n "checking for %zd printf() format support... " >&6; } +if test "${ac_cv_have_size_t_format+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_size_t_format=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25199,6 +26923,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include #include @@ -25233,6 +26958,7 @@ return 0; } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -25240,47 +26966,57 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define PY_FORMAT_SIZE_T "z" -_ACEOF - + ac_cv_have_size_t_format=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +ac_cv_have_size_t_format=no fi +rm -rf conftest.dSYM 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; } +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5 +$as_echo "$ac_cv_have_size_t_format" >&6; } +if test $ac_cv_have_size_t_format = yes +then + +cat >>confdefs.h <<\_ACEOF +#define PY_FORMAT_SIZE_T "z" +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 +$as_echo_n "checking for socklen_t... " >&6; } if test "${ac_cv_type_socklen_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_socklen_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -25295,14 +27031,53 @@ #endif -typedef socklen_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) +if (sizeof (socklen_t)) + return 0; + ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + + +int +main () +{ +if (sizeof ((socklen_t))) + return 0; ; return 0; } @@ -25313,30 +27088,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_socklen_t=yes + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_socklen_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_socklen_t=no + fi 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; } -if test $ac_cv_type_socklen_t = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +$as_echo "$ac_cv_type_socklen_t" >&6; } +if test "x$ac_cv_type_socklen_t" = x""yes; then : else @@ -25356,15 +27140,15 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for build directories" >&5 +$as_echo_n "checking for build directories... " >&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; } +{ $as_echo "$as_me:$LINENO: result: done" >&5 +$as_echo "done" >&6; } # generate output files ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc" @@ -25396,11 +27180,12 @@ 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;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -25433,12 +27218,12 @@ 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;} + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -25454,7 +27239,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_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" @@ -25466,12 +27251,14 @@ + : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -25484,7 +27271,7 @@ SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -25494,7 +27281,7 @@ 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -25516,17 +27303,45 @@ 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=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -25542,8 +27357,6 @@ # 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. @@ -25566,7 +27379,7 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -25579,17 +27392,10 @@ PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - 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) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -25611,7 +27417,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -25662,7 +27468,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_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 @@ -25690,7 +27496,6 @@ *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -25703,19 +27508,22 @@ rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - 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 || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + 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' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -25740,10 +27548,10 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -25766,7 +27574,7 @@ # values after options handling. ac_log=" This file was extended by python $as_me 2.7, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -25779,29 +27587,39 @@ _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -25812,24 +27630,24 @@ Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ python config.status 2.7 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -25851,30 +27669,36 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 + { $as_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 ;; + $as_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: error: unrecognized option: $1 + -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -25893,30 +27717,32 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -25932,8 +27758,8 @@ "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;; "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done @@ -25973,227 +27799,144 @@ (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# -# 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 +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF +ac_cr=`echo X | tr X '\015'` +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` 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 -ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim -PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim -PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$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 -GNULD!$GNULD$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -ARFLAGS!$ARFLAGS$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 -UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$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 -_ACEOF + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; 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;} + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_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 +rm -f conf$$subs.sh -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 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + print line +} -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -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 -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 +_ACAWK _ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; 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;} +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&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 @@ -26209,19 +27952,133 @@ }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # 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. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag 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;} + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; @@ -26250,26 +28107,38 @@ [\\/$]*) 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;} + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" done # 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." + configure_input='Generated from '` + $as_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;} + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; esac @@ -26279,7 +28148,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -26305,7 +28174,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -26314,7 +28183,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -26335,17 +28204,17 @@ test -d "$as_dir" && break done 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;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_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/ ;; @@ -26385,12 +28254,13 @@ esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -26399,13 +28269,14 @@ /@infodir@/p /@localedir@/p /@mandir@/p -' $ac_file_inputs` in +' +case `eval "sed -n \"\$ac_sed_dataroot\" $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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -26419,15 +28290,16 @@ # 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 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -26437,119 +28309,58 @@ 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 +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } 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' + { $as_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' +$as_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;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; :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=' ,' - -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 - -# 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. -# (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"' - -while : -do - # 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"' "$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 conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; 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;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - rm -f $ac_file - mv "$tmp/config.h" $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - echo "/* $configure_input */" - cat "$ac_result" + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi - rm -f "$tmp/out12" ;; @@ -26563,6 +28374,11 @@ chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -26584,6 +28400,10 @@ # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi echo "creating Modules/Setup" @@ -26605,12 +28425,12 @@ case $ac_sys_system in BeOS) - { echo "$as_me:$LINENO: WARNING: + { $as_echo "$as_me:$LINENO: WARNING: Support for BeOS is deprecated as of Python 2.6. See PEP 11 for the gory details. " >&5 -echo "$as_me: WARNING: +$as_echo "$as_me: WARNING: Support for BeOS is deprecated as of Python 2.6. See PEP 11 for the gory details. Modified: python/trunk/pyconfig.h.in ============================================================================== --- python/trunk/pyconfig.h.in (original) +++ python/trunk/pyconfig.h.in Fri Jul 17 09:46:46 2009 @@ -923,13 +923,13 @@ /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The number of bytes in an off_t. */ +/* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* The size of `pid_t', as computed by sizeof. */ #undef SIZEOF_PID_T -/* The number of bytes in a pthread_t. */ +/* The size of `pthread_t', as computed by sizeof. */ #undef SIZEOF_PTHREAD_T /* The size of `short', as computed by sizeof. */ @@ -938,7 +938,7 @@ /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* The number of bytes in a time_t. */ +/* The size of `time_t', as computed by sizeof. */ #undef SIZEOF_TIME_T /* The size of `uintptr_t', as computed by sizeof. */ From python-checkins at python.org Fri Jul 17 09:49:54 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 07:49:54 -0000 Subject: [Python-checkins] r74049 - in python/branches/py3k: configure pyconfig.h.in Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 09:49:53 2009 New Revision: 74049 Log: Regenerate configure script. Modified: python/branches/py3k/configure python/branches/py3k/pyconfig.h.in Modified: python/branches/py3k/configure ============================================================================== --- python/branches/py3k/configure (original) +++ python/branches/py3k/configure Fri Jul 17 09:49:53 2009 @@ -1,12 +1,12 @@ #! /bin/sh -# From configure.in Revision: 73307 . +# From configure.in Revision: 74045 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for python 3.2. +# Generated by GNU Autoconf 2.63 for python 3.2. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -18,7 +18,7 @@ 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -40,17 +40,45 @@ 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=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -66,8 +94,6 @@ # 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. @@ -90,7 +116,7 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -103,17 +129,10 @@ PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - 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) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -135,7 +154,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -161,7 +180,7 @@ as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -243,7 +262,7 @@ 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -264,7 +283,7 @@ 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -344,10 +363,10 @@ 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+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -416,9 +435,10 @@ 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 + echo Please tell bug-autoconf at gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. } @@ -454,7 +474,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_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 @@ -482,7 +502,6 @@ *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -495,19 +514,22 @@ rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - 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 || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + 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' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -532,10 +554,10 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -616,125 +638,157 @@ # 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 -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 -ARCH_RUN_32BIT -PYTHONFRAMEWORK -PYTHONFRAMEWORKIDENTIFIER -PYTHONFRAMEWORKDIR -PYTHONFRAMEWORKPREFIX -PYTHONFRAMEWORKINSTALLDIR -FRAMEWORKINSTALLFIRST -FRAMEWORKINSTALLLAST -FRAMEWORKALTINSTALLFIRST -FRAMEWORKALTINSTALLLAST -FRAMEWORKUNIXTOOLSPREFIX -MACHDEP -SGI_ABI -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 -GNULD -RANLIB -AR -ARFLAGS -SVNVERSION -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -LN -OPT -BASECFLAGS -UNIVERSAL_ARCH_FLAGS -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 -THREADHEADERS +ac_subst_vars='LTLIBOBJS SRCDIRS -LTLIBOBJS' +THREADHEADERS +LIBC +LIBM +HAVE_GETHOSTBYNAME +HAVE_GETHOSTBYNAME_R +HAVE_GETHOSTBYNAME_R_3_ARG +HAVE_GETHOSTBYNAME_R_5_ARG +HAVE_GETHOSTBYNAME_R_6_ARG +LIBOBJS +TRUE +MACHDEP_OBJS +DYNLOADFILE +DLINCLDIR +THREADOBJ +LDLAST +USE_THREAD_MODULE +SIGNAL_OBJS +USE_SIGNAL_MODULE +SHLIBS +CFLAGSFORSHARED +LINKFORSHARED +CCSHARED +BLDSHARED +LDSHARED +SO +LIBTOOL_CRUFT +OTHER_LIBTOOL_OPT +UNIVERSAL_ARCH_FLAGS +BASECFLAGS +OPT +LN +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +SVNVERSION +ARFLAGS +AR +RANLIB +GNULD +LINKCC +RUNSHARED +INSTSONAME +LDLIBRARYDIR +BLDLIBRARY +DLLLIBRARY +LDLIBRARY +LIBRARY +BUILDEXEEXT +EGREP +GREP +CPP +MAINCC +CXX +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +EXPORT_MACOSX_DEPLOYMENT_TARGET +CONFIGURE_MACOSX_DEPLOYMENT_TARGET +SGI_ABI +MACHDEP +FRAMEWORKUNIXTOOLSPREFIX +FRAMEWORKALTINSTALLLAST +FRAMEWORKALTINSTALLFIRST +FRAMEWORKINSTALLLAST +FRAMEWORKINSTALLFIRST +PYTHONFRAMEWORKINSTALLDIR +PYTHONFRAMEWORKPREFIX +PYTHONFRAMEWORKDIR +PYTHONFRAMEWORKIDENTIFIER +PYTHONFRAMEWORK +ARCH_RUN_32BIT +UNIVERSALSDK +CONFIG_ARGS +SOVERSION +VERSION +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_universalsdk +with_universal_archs +with_framework_name +enable_framework +with_gcc +with_cxx_main +with_suffix +enable_shared +enable_profiling +with_pydebug +with_libs +with_system_ffi +with_dbmliborder +with_signal_module +with_dec_threads +with_threads +with_thread +with_pth +enable_ipv6 +with_doc_strings +with_tsc +with_pymalloc +with_wctype_functions +with_fpectl +with_libm +with_libc +enable_big_digits +with_wide_unicode +with_computed_gotos +' ac_precious_vars='build_alias host_alias target_alias @@ -749,6 +803,8 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -847,13 +903,21 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -866,13 +930,21 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1063,22 +1135,38 @@ ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1098,7 +1186,7 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1107,16 +1195,16 @@ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1125,22 +1213,38 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +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=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) 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 + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1155,7 +1259,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1171,10 +1275,10 @@ 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 + { $as_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 + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1182,12 +1286,12 @@ if test -z "$srcdir"; then ac_srcdir_defaulted=yes # 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 || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1214,12 +1318,12 @@ fi 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 + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi 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 + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1268,9 +1372,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1280,25 +1384,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --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] - --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] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --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] + --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 @@ -1312,6 +1416,7 @@ cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-universalsdk[=SDKDIR] @@ -1385,15 +1490,17 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_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/ ;; @@ -1429,7 +1536,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1439,10 +1546,10 @@ if $ac_init_version; then cat <<\_ACEOF python configure 3.2 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1453,7 +1560,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by python $as_me 3.2, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -1489,7 +1596,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1524,7 +1631,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1576,11 +1683,12 @@ 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;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1610,9 +1718,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1627,9 +1735,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1645,8 +1753,8 @@ echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1688,21 +1796,24 @@ # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue 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;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1712,16 +1823,16 @@ # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1735,29 +1846,38 @@ 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 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # 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=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1767,10 +1887,12 @@ fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1912,20 +2034,20 @@ UNIVERSAL_ARCHS="32-bit" -{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5 -echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5 +$as_echo_n "checking for --with-universal-archs... " >&6; } # Check whether --with-universal-archs was given. if test "${with_universal_archs+set}" = set; then withval=$with_universal_archs; - { echo "$as_me:$LINENO: result: $withval" >&5 -echo "${ECHO_T}$withval" >&6; } + { $as_echo "$as_me:$LINENO: result: $withval" >&5 +$as_echo "$withval" >&6; } UNIVERSAL_ARCHS="$withval" else - { echo "$as_me:$LINENO: result: 32-bit" >&5 -echo "${ECHO_T}32-bit" >&6; } + { $as_echo "$as_me:$LINENO: result: 32-bit" >&5 +$as_echo "32-bit" >&6; } fi @@ -2047,8 +2169,8 @@ ## # Set name for machine-dependent library files -{ echo "$as_me:$LINENO: checking MACHDEP" >&5 -echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5 +$as_echo_n "checking MACHDEP... " >&6; } if test -z "$MACHDEP" then ac_sys_system=`uname -s` @@ -2211,8 +2333,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5 +$as_echo "$MACHDEP" >&6; } # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, # it may influence the way we can build extensions, so distutils @@ -2222,11 +2344,11 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' -{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5 -echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5 +$as_echo_n "checking machine type as reported by uname -m... " >&6; } ac_sys_machine=`uname -m` -{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5 -echo "${ECHO_T}$ac_sys_machine" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5 +$as_echo "$ac_sys_machine" >&6; } # checks for alternative programs @@ -2238,8 +2360,8 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5 +$as_echo_n "checking for --without-gcc... " >&6; } # Check whether --with-gcc was given. if test "${with_gcc+set}" = set; then @@ -2264,15 +2386,15 @@ esac fi -{ echo "$as_me:$LINENO: result: $without_gcc" >&5 -echo "${ECHO_T}$without_gcc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5 +$as_echo "$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" then - { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file + { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)" >&5 -echo "$as_me: error: cached CC is different -- throw away $cache_file +$as_echo "$as_me: error: cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)" >&2;} { (exit 1); exit 1; }; } fi @@ -2285,10 +2407,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2301,7 +2423,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2312,11 +2434,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2325,10 +2447,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2341,7 +2463,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2352,11 +2474,11 @@ 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; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2364,12 +2486,8 @@ 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;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2382,10 +2500,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2398,7 +2516,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2409,11 +2527,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2422,10 +2540,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2443,7 +2561,7 @@ continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2466,11 +2584,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2481,10 +2599,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2497,7 +2615,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2508,11 +2626,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2525,10 +2643,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2541,7 +2659,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2552,11 +2670,11 @@ 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; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2568,12 +2686,8 @@ 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;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2583,44 +2697,50 @@ fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2639,27 +2759,22 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # 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; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# 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. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2670,10 +2785,11 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # 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' @@ -2684,7 +2800,7 @@ do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2711,25 +2827,27 @@ ac_file='' fi -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables +$as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # 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; } +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&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 @@ -2738,49 +2856,53 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. +$as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # 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; } +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2789,31 +2911,33 @@ 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 | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2836,40 +2960,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then 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 | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2895,20 +3022,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -2918,15 +3046,19 @@ 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; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -2953,20 +3085,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -2991,20 +3124,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3030,20 +3164,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3058,8 +3193,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$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 @@ -3075,10 +3210,10 @@ CFLAGS= fi fi -{ 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; } +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3149,20 +3284,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3178,15 +3314,15 @@ # 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; } ;; + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) 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; } ;; + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3199,8 +3335,8 @@ -{ echo "$as_me:$LINENO: checking for --with-cxx-main=" >&5 -echo $ECHO_N "checking for --with-cxx-main=... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=" >&5 +$as_echo_n "checking for --with-cxx-main=... " >&6; } # Check whether --with-cxx_main was given. if test "${with_cxx_main+set}" = set; then @@ -3225,8 +3361,8 @@ fi -{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5 -echo "${ECHO_T}$with_cxx_main" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5 +$as_echo "$with_cxx_main" >&6; } preset_cxx="$CXX" if test -z "$CXX" @@ -3234,10 +3370,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CXX in [\\/]* | ?:[\\/]*) @@ -3252,7 +3388,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3265,20 +3401,20 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CXX in [\\/]* | ?:[\\/]*) @@ -3293,7 +3429,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3306,11 +3442,11 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi ;; @@ -3326,10 +3462,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -3342,7 +3478,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3353,11 +3489,11 @@ fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3372,12 +3508,12 @@ fi if test "$preset_cxx" != "$CXX" then - { echo "$as_me:$LINENO: WARNING: + { $as_echo "$as_me:$LINENO: WARNING: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. " >&5 -echo "$as_me: WARNING: +$as_echo "$as_me: WARNING: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. @@ -3392,15 +3528,15 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3432,20 +3568,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3469,13 +3606,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3483,7 +3621,7 @@ # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3508,8 +3646,8 @@ else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3537,20 +3675,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3574,13 +3713,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3588,7 +3728,7 @@ # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3604,11 +3744,13 @@ if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -3618,42 +3760,37 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ 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 +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then 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 + # 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. + 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" + $as_echo_n 0123456789 >"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" + $as_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` @@ -3668,74 +3805,60 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done 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;} + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else 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 + if test -z "$EGREP"; then 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 + # 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. + 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" + $as_echo_n 0123456789 >"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" + $as_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` @@ -3750,150 +3873,597 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done 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;} + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&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 +#include +#include +#include + +int +main () +{ -{ echo "$as_me:$LINENO: checking for AIX" >&5 -echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +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. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef _AIX - yes -#endif +#include _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; } -cat >>confdefs.h <<\_ACEOF -#define _ALL_SOURCE 1 + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + ac_cv_header_stdc=no fi rm -f conftest* +fi +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -# Check for unsupported systems -case $ac_sys_system/$ac_sys_release in -atheos*|Linux*/1*) - echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. - echo See README for details. - exit 1;; +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +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 --with-suffix" >&5 -echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; } -# Check whether --with-suffix was given. -if test "${with_suffix+set}" = set; then - withval=$with_suffix; - case $withval in - no) EXEEXT=;; - yes) EXEEXT=.exe;; - *) EXEEXT=$withval;; - esac fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -{ 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 +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF -{ 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; } - BUILDEXEEXT=.exe -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - BUILDEXEEXT=$EXEEXT -fi -rmdir CaseSensitiveTestDir +# On IRIX 5.3, sys/types and inttypes.h are conflicting. -case $MACHDEP in -bsdos*) - case $CC in - gcc) CC="$CC -D_HAVE_BSDI";; - esac;; -esac -case $ac_sys_system in -hp*|HP*) - case $CC in - cc|*/cc) CC="$CC -Ae";; - esac;; -Monterey*) - case $CC in - cc) CC="$CC -Wl,-Bexport";; - esac;; -SunOS*) - # Some functions have a prototype only with that define, e.g. confstr -cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF - ;; -esac -{ 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; } -# LDLIBRARY is the name of the library to link against (as opposed to the + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + 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 + +#include <$ac_header> +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + if test "${ac_cv_header_minix_config_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 +$as_echo_n "checking minix/config.h usability... " >&6; } +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 +#include +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 +$as_echo_n "checking minix/config.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_minix_config_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } + +fi +if test "x$ac_cv_header_minix_config_h" = x""yes; then + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_1_SOURCE 2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _MINIX 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_safe_to_define___extensions__=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_safe_to_define___extensions__=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 +_ACEOF + + + +# Check for unsupported systems +case $ac_sys_system/$ac_sys_release in +atheos*|Linux*/1*) + echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. + echo See README for details. + exit 1;; +esac + + +{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5 +$as_echo_n "checking for --with-suffix... " >&6; } + +# Check whether --with-suffix was given. +if test "${with_suffix+set}" = set; then + withval=$with_suffix; + case $withval in + no) EXEEXT=;; + yes) EXEEXT=.exe;; + *) EXEEXT=$withval;; + esac +fi + +{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5 +$as_echo "$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 + +{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 +$as_echo_n "checking for case-insensitive build directory... " >&6; } +if test ! -d CaseSensitiveTestDir; then +mkdir CaseSensitiveTestDir +fi + +if test -d casesensitivetestdir +then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + BUILDEXEEXT=.exe +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + BUILDEXEEXT=$EXEEXT +fi +rmdir CaseSensitiveTestDir + +case $MACHDEP in +bsdos*) + case $CC in + gcc) CC="$CC -D_HAVE_BSDI";; + esac;; +esac + +case $ac_sys_system in +hp*|HP*) + case $CC in + cc|*/cc) CC="$CC -Ae";; + esac;; +Monterey*) + case $CC in + cc) CC="$CC -Wl,-Bexport";; + esac;; +SunOS*) + # Some functions have a prototype only with that define, e.g. confstr + +cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + ;; +esac + + + +{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5 +$as_echo_n "checking LIBRARY... " >&6; } +if test -z "$LIBRARY" +then + LIBRARY='libpython$(VERSION).a' +fi +{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5 +$as_echo "$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 # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY # is blank as the main program is not linked directly against LDLIBRARY. @@ -3926,8 +4496,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; } +{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5 +$as_echo_n "checking LINKCC... " >&6; } if test -z "$LINKCC" then LINKCC='$(PURIFY) $(MAINCC)' @@ -3947,8 +4517,8 @@ LINKCC=qcc;; esac fi -{ echo "$as_me:$LINENO: result: $LINKCC" >&5 -echo "${ECHO_T}$LINKCC" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5 +$as_echo "$LINKCC" >&6; } # GNULD is set to "yes" if the GNU linker is used. If this goes wrong # make sure we default having it set to "no": this is used by @@ -3956,8 +4526,8 @@ # to linker command lines, and failing to detect GNU ld simply results # in the same bahaviour as before. -{ echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } ac_prog=ld if test "$GCC" = yes; then ac_prog=`$CC -print-prog-name=ld` @@ -3968,11 +4538,11 @@ *) GNULD=no;; esac -{ echo "$as_me:$LINENO: result: $GNULD" >&5 -echo "${ECHO_T}$GNULD" >&6; } +{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5 +$as_echo "$GNULD" >&6; } -{ echo "$as_me:$LINENO: checking for --enable-shared" >&5 -echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5 +$as_echo_n "checking for --enable-shared... " >&6; } # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; @@ -3988,11 +4558,11 @@ enable_shared="no";; esac fi -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } +{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } -{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5 -echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5 +$as_echo_n "checking for --enable-profiling... " >&6; } # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then enableval=$enable_profiling; ac_save_cc="$CC" @@ -4014,29 +4584,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_enable_profiling="yes" else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_enable_profiling="no" fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4044,8 +4617,8 @@ CC="$ac_save_cc" fi -{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 -echo "${ECHO_T}$ac_enable_profiling" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 +$as_echo "$ac_enable_profiling" >&6; } case "$ac_enable_profiling" in "yes") @@ -4054,8 +4627,8 @@ ;; esac -{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5 -echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5 +$as_echo_n "checking LDLIBRARY... " >&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 @@ -4139,16 +4712,16 @@ esac fi -{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 -echo "${ECHO_T}$LDLIBRARY" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -4161,7 +4734,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4172,11 +4745,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4185,10 +4758,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -4201,7 +4774,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4212,11 +4785,11 @@ 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; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -4224,12 +4797,8 @@ 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;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -4243,10 +4812,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -4259,7 +4828,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4270,11 +4839,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4293,10 +4862,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_SVNVERSION+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$SVNVERSION"; then ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test. @@ -4309,7 +4878,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4321,11 +4890,11 @@ fi SVNVERSION=$ac_cv_prog_SVNVERSION if test -n "$SVNVERSION"; then - { echo "$as_me:$LINENO: result: $SVNVERSION" >&5 -echo "${ECHO_T}$SVNVERSION" >&6; } + { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5 +$as_echo "$SVNVERSION" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4361,8 +4930,8 @@ 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;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi @@ -4388,11 +4957,12 @@ # 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; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4421,17 +4991,29 @@ # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -4444,8 +5026,8 @@ INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -4467,8 +5049,8 @@ fi # Check for --with-pydebug -{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5 -echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5 +$as_echo_n "checking for --with-pydebug... " >&6; } # Check whether --with-pydebug was given. if test "${with_pydebug+set}" = set; then @@ -4480,15 +5062,15 @@ #define Py_DEBUG 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; }; + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; }; Py_DEBUG='true' -else { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; }; Py_DEBUG='false' +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; }; Py_DEBUG='false' fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4566,11 +5148,14 @@ # 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; } + { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 +$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; } ac_save_cc="$CC" CC="$CC -fno-strict-aliasing" - if test "$cross_compiling" = yes; then + if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then ac_cv_no_strict_aliasing_ok=no else cat >conftest.$ac_ext <<_ACEOF @@ -4587,36 +5172,41 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_no_strict_aliasing_ok=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_no_strict_aliasing_ok=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +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; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5 +$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; } if test $ac_cv_no_strict_aliasing_ok = yes then BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" @@ -4655,8 +5245,8 @@ ARCH_RUN_32BIT="arch -i386 -ppc" else - { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 -echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} + { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 +$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} { (exit 1); exit 1; }; } fi @@ -4730,10 +5320,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5 +$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; } if test "${ac_cv_opt_olimit_ok+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -OPT:Olimit=0" @@ -4754,29 +5344,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_opt_olimit_ok=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_opt_olimit_ok=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4784,8 +5377,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5 +$as_echo "$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 @@ -4798,10 +5391,10 @@ ;; 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; } + { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 +$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; } if test "${ac_cv_olimit_ok+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -Olimit 1500" @@ -4822,29 +5415,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_olimit_ok=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_olimit_ok=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4852,8 +5448,8 @@ CC="$ac_save_cc" fi - { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 -echo "${ECHO_T}$ac_cv_olimit_ok" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 +$as_echo "$ac_cv_olimit_ok" >&6; } if test $ac_cv_olimit_ok = yes; then BASECFLAGS="$BASECFLAGS -Olimit 1500" fi @@ -4862,8 +5458,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; } + { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5 +$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; } save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -4889,13 +5485,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -4905,14 +5502,14 @@ #define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4925,10 +5522,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 +$as_echo_n "checking whether pthreads are available without options... " >&6; } if test "${ac_cv_pthread_is_default+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_pthread_is_default=no @@ -4959,19 +5556,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_pthread_is_default=yes @@ -4979,13 +5578,14 @@ ac_cv_pthread=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_pthread_is_default=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -4993,8 +5593,8 @@ fi -{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 -echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 +$as_echo "$ac_cv_pthread_is_default" >&6; } if test $ac_cv_pthread_is_default = yes @@ -5006,10 +5606,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 +$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } if test "${ac_cv_kpthread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -Kpthread" @@ -5042,29 +5642,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_kpthread=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_kpthread=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -5072,8 +5675,8 @@ CC="$ac_save_cc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 -echo "${ECHO_T}$ac_cv_kpthread" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 +$as_echo "$ac_cv_kpthread" >&6; } fi if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no @@ -5083,10 +5686,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 +$as_echo_n "checking whether $CC accepts -Kthread... " >&6; } if test "${ac_cv_kthread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -Kthread" @@ -5100,18 +5703,314 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); +#include + +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_kthread=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_kthread=no +fi +rm -rf conftest.dSYM +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 + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 +$as_echo "$ac_cv_kthread" >&6; } +fi + +if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no +then +# -pthread, if available, provides the right #defines +# and linker options to make pthread_create available +# 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. +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5 +$as_echo_n "checking whether $CC accepts -pthread... " >&6; } +if test "${ac_cv_thread+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_cc="$CC" +CC="$CC -pthread" +if test "$cross_compiling" = yes; then + ac_cv_pthread=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_pthread=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_pthread=no +fi +rm -rf conftest.dSYM +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 + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 +$as_echo "$ac_cv_pthread" >&6; } +fi + +# If we have set a CC compiler flag for thread support then +# check if it works for CXX, too. +ac_cv_cxx_thread=no +if test ! -z "$CXX" +then +{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5 +$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; } +ac_save_cxx="$CXX" + +if test "$ac_cv_kpthread" = "yes" +then + CXX="$CXX -Kpthread" + ac_cv_cxx_thread=yes +elif test "$ac_cv_kthread" = "yes" +then + CXX="$CXX -Kthread" + ac_cv_cxx_thread=yes +elif test "$ac_cv_pthread" = "yes" +then + CXX="$CXX -pthread" + ac_cv_cxx_thread=yes +fi + +if test $ac_cv_cxx_thread = yes +then + echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext + $CXX -c conftest.$ac_ext 2>&5 + if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ + && test -s conftest$ac_exeext && ./conftest$ac_exeext + then + ac_cv_cxx_thread=yes + else + ac_cv_cxx_thread=no + fi + rm -fr conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 +$as_echo "$ac_cv_cxx_thread" >&6; } +fi +CXX="$ac_save_cxx" + + +# checks for header files +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&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 +#include +#include +#include + +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } - _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -5119,164 +6018,275 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_kthread=yes + : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_kthread=no +ac_cv_header_stdc=no fi +rm -rf conftest.dSYM 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 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF -{ 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 -then -# -pthread, if available, provides the right #defines -# and linker options to make pthread_create available -# 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; } -if test "${ac_cv_thread+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cc="$CC" -CC="$CC -pthread" -if test "$cross_compiling" = yes; then - ac_cv_pthread=no + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +fcntl.h grp.h \ +ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ +shadow.h signal.h stdint.h stropts.h termios.h thread.h \ +unistd.h utime.h \ +sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ +sys/lock.h sys/mkdev.h sys/modem.h \ +sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ +sys/termio.h sys/time.h \ +sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ +sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ +bluetooth/bluetooth.h linux/tipc.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - +$ac_includes_default +#include <$ac_header> _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_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 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_pthread=yes + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_header_compiler=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_pthread=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_header_compiler=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -CC="$ac_save_cc" -fi +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -echo "${ECHO_T}$ac_cv_pthread" >&6; } + ac_header_preproc=no fi -# If we have set a CC compiler flag for thread support then -# check if it works for CXX, too. -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; } -ac_save_cxx="$CXX" - -if test "$ac_cv_kpthread" = "yes" -then - CXX="$CXX -Kpthread" - ac_cv_cxx_thread=yes -elif test "$ac_cv_kthread" = "yes" -then - CXX="$CXX -Kthread" - ac_cv_cxx_thread=yes -elif test "$ac_cv_pthread" = "yes" -then - CXX="$CXX -pthread" - ac_cv_cxx_thread=yes -fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -if test $ac_cv_cxx_thread = yes -then - echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext - $CXX -c conftest.$ac_ext 2>&5 - if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ - && test -s conftest$ac_exeext && ./conftest$ac_exeext - then - ac_cv_cxx_thread=yes - else - ac_cv_cxx_thread=no - fi - rm -fr conftest* +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi -CXX="$ac_save_cxx" +done -# 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; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5284,15 +6294,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include -#include +#include +#include <$ac_hdr> int main () { - +if ((DIR *) 0) +return 0; ; return 0; } @@ -5303,73 +6312,226 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_stdc=yes + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no + eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +/* 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 +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +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 +done +if test "${ac_cv_search_opendir+set}" = set; then : else - ac_cv_header_stdc=no + ac_cv_search_opendir=no fi -rm -f conftest* +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$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 -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF +else + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +/* 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 +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +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 +done +if test "${ac_cv_search_opendir+set}" = set; then : else - ac_cv_header_stdc=no + ac_cv_search_opendir=no fi -rm -f conftest* +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$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 -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : +fi + +{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 +$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } +if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5377,104 +6539,73 @@ cat confdefs.h >>conftest.$ac_ext 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)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +#include int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +return makedev(0, 0); + ; return 0; } _ACEOF -rm -f conftest$ac_exeext +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>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_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 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_header_sys_types_h_makedev=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_header_stdc=no -fi -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; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - + ac_cv_header_sys_types_h_makedev=no fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 +$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - 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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test $ac_cv_header_sys_types_h_makedev = no; then +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +$as_echo_n "checking for sys/mkdev.h... " >&6; } +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 +$as_echo_n "checking sys/mkdev.h usability... " >&6; } +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 - -#include <$ac_header> +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -5482,121 +6613,134 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - eval "$as_ac_Header=yes" + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 +$as_echo_n "checking sys/mkdev.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include _ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -done - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +$as_echo_n "checking for sys/mkdev.h... " >&6; } +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_sys_mkdev_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } +fi +if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define MAJOR_IN_MKDEV 1 +_ACEOF +fi -for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ -fcntl.h grp.h \ -ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ -shadow.h signal.h stdint.h stropts.h termios.h thread.h \ -unistd.h utime.h \ -sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ -sys/lock.h sys/mkdev.h sys/modem.h \ -sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ -sys/termio.h sys/time.h \ -sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ -sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ -bluetooth/bluetooth.h linux/tipc.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -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 + if test $ac_cv_header_sys_mkdev_h = no; then + if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +$as_echo_n "checking for sys/sysmacros.h... " >&6; } +if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +$as_echo "$ac_cv_header_sys_sysmacros_h" >&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; } +{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 +$as_echo_n "checking sys/sysmacros.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5604,7 +6748,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <$ac_header> +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -5612,90 +6756,92 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 +$as_echo_n "checking sys/sysmacros.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> +#include _ACEOF 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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -5704,39 +6850,107 @@ ) | 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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +$as_echo_n "checking for sys/sysmacros.h... " >&6; } +if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_header_sys_sysmacros_h=$ac_header_preproc fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define MAJOR_IN_SYSMACROS 1 _ACEOF fi -done + + fi +fi +# On Solaris, term.h requires curses.h +for ac_header in term.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_CURSES_H +#include +#endif -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; } +#include <$ac_header> +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# On Linux, netlink.h requires asm/types.h + +for ac_header in linux/netlink.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5744,17 +6958,16 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include <$ac_hdr> -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} +#ifdef HAVE_ASM_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -5762,276 +6975,285 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# checks for typedefs +was_it_defined=no +{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5 +$as_echo_n "checking for clock_t in time.h... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "clock_t" >/dev/null 2>&1; then + was_it_defined=yes +else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 +cat >>confdefs.h <<\_ACEOF +#define clock_t long _ACEOF -ac_header_dirent=$ac_hdr; break + fi +rm -f conftest* -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; } -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS +{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5 +$as_echo "$was_it_defined" >&6; } + +# Check whether using makedev requires defining _OSF_SOURCE +{ $as_echo "$as_me:$LINENO: checking for makedev" >&5 +$as_echo_n "checking for makedev... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* 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 -char opendir (); +#include int main () { -return opendir (); + makedev(0, 0) ; return 0; } _ACEOF -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 +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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_has_makedev=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_has_makedev=no fi +rm -rf conftest.dSYM 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 -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; } -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; } -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF + 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 + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* 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 -char opendir (); +#define _OSF_SOURCE 1 +#include + int main () { -return opendir (); + makedev(0, 0) ; return 0; } _ACEOF -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 +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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_has_makedev=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_has_makedev=no fi +rm -rf conftest.dSYM 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 -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; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + conftest$ac_exeext conftest.$ac_ext + if test "$ac_cv_has_makedev" = "yes"; then +cat >>confdefs.h <<\_ACEOF +#define _OSF_SOURCE 1 +_ACEOF + + fi fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 +$as_echo "$ac_cv_has_makedev" >&6; } +if test "$ac_cv_has_makedev" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MAKEDEV 1 +_ACEOF 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; } -if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF +# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in +# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are +# defined, but the compiler does not support pragma redefine_extname, +# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit +# structures (such as rlimit64) without declaring them. As a +# work-around, disable LFS on such configurations + +use_lfs=yes +{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5 +$as_echo_n "checking Solaris LFS bug... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#define _LARGEFILE_SOURCE 1 +#define _FILE_OFFSET_BITS 64 +#include + int main () { -return makedev(0, 0); +struct rlimit foo; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest.$ac_objext; then + sol_lfs_bug=no else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_sys_types_h_makedev=no + sol_lfs_bug=yes fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5 +$as_echo "$sol_lfs_bug" >&6; } +if test "$sol_lfs_bug" = "yes"; then + use_lfs=no 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; } -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; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "$use_lfs" = "yes"; then +# Two defines needed to enable largefile support on various platforms +# These may affect some typedefs + +cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 64 +_ACEOF + fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } + +# Add some code to confdefs.h so that the test for off_t works on SCO +cat >> confdefs.h <<\EOF +#if defined(SCO_DS) +#undef _OFF_T +#endif +EOF + +# Type availability checks +{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 +$as_echo_n "checking for mode_t... " >&6; } +if test "${ac_cv_type_mode_t+set}" = set; then + $as_echo_n "(cached) " >&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; } + ac_cv_type_mode_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6039,7 +7261,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +int +main () +{ +if (sizeof (mode_t)) + return 0; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6047,132 +7276,88 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -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; } -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. */ -#include +$ac_includes_default +int +main () +{ +if (sizeof ((mode_t))) + return 0; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +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_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 && { - 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 -sed 's/^/| /' conftest.$ac_ext >&5 - - 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; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 -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 -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | 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; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + : 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; } + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_mode_t=yes fi -if test $ac_cv_header_sys_mkdev_h = yes; then -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_MKDEV 1 -_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +$as_echo "$ac_cv_type_mode_t" >&6; } +if test "x$ac_cv_type_mode_t" = x""yes; then + : +else +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF - 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; } -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; } + +{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 +$as_echo_n "checking for off_t... " >&6; } +if test "${ac_cv_type_off_t+set}" = set; then + $as_echo_n "(cached) " >&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; } + ac_cv_type_off_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6180,7 +7365,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +int +main () +{ +if (sizeof (off_t)) + return 0; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6188,145 +7380,103 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -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; } -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. */ -#include +$ac_includes_default +int +main () +{ +if (sizeof ((off_t))) + return 0; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || test ! -s conftest.err - }; then - ac_header_preproc=yes + } && test -s conftest.$ac_objext; then + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + ac_cv_type_off_t=yes fi -rm -f conftest.err conftest.$ac_ext -{ 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 - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 -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 -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | 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; } -if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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; } - -fi -if test $ac_cv_header_sys_sysmacros_h = yes; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_SYSMACROS 1 -_ACEOF fi - - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +$as_echo "$ac_cv_type_off_t" >&6; } +if test "x$ac_cv_type_off_t" = x""yes; then + : +else +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF -# On Solaris, term.h requires curses.h +fi -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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 +$as_echo_n "checking for pid_t... " >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_pid_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_CURSES_H -#include -#endif - - -#include <$ac_header> +$ac_includes_default +int +main () +{ +if (sizeof (pid_t)) + return 0; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6334,66 +7484,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 -_ACEOF - -fi - -done - - -# On Linux, netlink.h requires asm/types.h - -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 { 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_ASM_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - - -#include <$ac_header> +$ac_includes_default +int +main () +{ +if (sizeof ((pid_t))) + return 0; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6401,207 +7518,158 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - eval "$as_ac_Header=yes" + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + ac_cv_type_pid_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 -_ACEOF - -fi - -done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# 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; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +fi -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "clock_t" >/dev/null 2>&1; then - was_it_defined=yes +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +$as_echo "$ac_cv_type_pid_t" >&6; } +if test "x$ac_cv_type_pid_t" = x""yes; then + : else - -cat >>confdefs.h <<\_ACEOF -#define clock_t long +cat >>confdefs.h <<_ACEOF +#define pid_t int _ACEOF - fi -rm -f conftest* - -{ 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; } -cat >conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then + $as_echo_n "(cached) " >&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 +#include + int main () { - makedev(0, 0) +return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_has_makedev=no + ac_cv_type_signal=void fi -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 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + +{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 +$as_echo_n "checking for size_t... " >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_size_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#define _OSF_SOURCE 1 -#include - +$ac_includes_default int main () { - makedev(0, 0) +if (sizeof (size_t)) + return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 -fi - -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 - -cat >>confdefs.h <<\_ACEOF -#define _OSF_SOURCE 1 -_ACEOF - - fi -fi -{ 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 -#define HAVE_MAKEDEV 1 -_ACEOF - -fi - -# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in -# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are -# defined, but the compiler does not support pragma redefine_extname, -# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit -# structures (such as rlimit64) without declaring them. As a -# 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; } -cat >conftest.$ac_ext <<_ACEOF + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#define _LARGEFILE_SOURCE 1 -#define _FILE_OFFSET_BITS 64 -#include - +$ac_includes_default int main () { -struct rlimit foo; +if (sizeof ((size_t))) + return 0; ; return 0; } @@ -6612,75 +7680,108 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - sol_lfs_bug=no + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - sol_lfs_bug=yes + ac_cv_type_size_t=yes fi 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 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -if test "$use_lfs" = "yes"; then -# Two defines needed to enable largefile support on various platforms -# These may affect some typedefs +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +$as_echo "$ac_cv_type_size_t" >&6; } +if test "x$ac_cv_type_size_t" = x""yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then + $as_echo_n "(cached) " >&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 + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF -#define _LARGEFILE_SOURCE 1 +#define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF -#define _FILE_OFFSET_BITS 64 +#define gid_t int _ACEOF fi -# Add some code to confdefs.h so that the test for off_t works on SCO -cat >> confdefs.h <<\EOF -#if defined(SCO_DS) -#undef _OFF_T -#endif -EOF -# Type availability checks -{ 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 + { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 +$as_echo_n "checking for uint32_t... " >&6; } +if test "${ac_cv_c_uint32_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_uint32_t=no + for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; +test_array [0] = 0 + ; return 0; } @@ -6691,59 +7792,73 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_mode_t=yes + case $ac_type in + uint32_t) ac_cv_c_uint32_t=yes ;; + *) ac_cv_c_uint32_t=$ac_type ;; +esac + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_uint32_t" != no && break + done fi -{ 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 +$as_echo "$ac_cv_c_uint32_t" >&6; } + case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<\_ACEOF +#define _UINT32_T 1 +_ACEOF + cat >>confdefs.h <<_ACEOF -#define mode_t int +#define uint32_t $ac_cv_c_uint32_t _ACEOF +;; + esac -fi -{ 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 + { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 +$as_echo_n "checking for uint64_t... " >&6; } +if test "${ac_cv_c_uint64_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_uint64_t=no + for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 off_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; +test_array [0] = 0 + ; return 0; } @@ -6754,59 +7869,73 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_off_t=yes + case $ac_type in + uint64_t) ac_cv_c_uint64_t=yes ;; + *) ac_cv_c_uint64_t=$ac_type ;; +esac + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_off_t=no + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_uint64_t" != no && break + done fi -{ 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 +$as_echo "$ac_cv_c_uint64_t" >&6; } + case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<\_ACEOF +#define _UINT64_T 1 +_ACEOF + cat >>confdefs.h <<_ACEOF -#define off_t long int +#define uint64_t $ac_cv_c_uint64_t _ACEOF +;; + esac -fi -{ 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 + { $as_echo "$as_me:$LINENO: checking for int32_t" >&5 +$as_echo_n "checking for int32_t... " >&6; } +if test "${ac_cv_c_int32_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_int32_t=no + for ac_type in 'int32_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + 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 pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; +test_array [0] = 0 + ; return 0; } @@ -6817,57 +7946,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_pid_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=no -fi - -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; } -if test $ac_cv_type_pid_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include - +$ac_includes_default int main () { -return *(signal (0, 0)) (0) == 1; +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; +test_array [0] = 0 + ; return 0; } @@ -6878,40 +7982,98 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_signal=int + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signal=void + case $ac_type in + int32_t) ac_cv_c_int32_t=yes ;; + *) ac_cv_c_int32_t=$ac_type ;; +esac + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int32_t" != no && break + done fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 +$as_echo "$ac_cv_c_int32_t" >&6; } + case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal +#define int32_t $ac_cv_c_int32_t _ACEOF +;; + esac -{ 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 + { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 +$as_echo_n "checking for int64_t... " >&6; } +if test "${ac_cv_c_int64_t+set}" = set; then + $as_echo_n "(cached) " >&6 else + ac_cv_c_int64_t=no + for ac_type in 'int64_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + 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 +int +main () +{ +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; +test_array [0] = 0 + + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6919,14 +8081,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; +test_array [0] = 0 + ; return 0; } @@ -6937,87 +8098,61 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_size_t=yes + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no + case $ac_type in + int64_t) ac_cv_c_int64_t=yes ;; + *) ac_cv_c_int64_t=$ac_type ;; +esac + fi 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; } -if test $ac_cv_type_size_t = yes; then - : else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<_ACEOF -#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; } -if test "${ac_cv_type_uid_t+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 -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int64_t" != no && break + done fi -{ 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 -#define uid_t int -_ACEOF - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 +$as_echo "$ac_cv_c_int64_t" >&6; } + case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) -cat >>confdefs.h <<\_ACEOF -#define gid_t int +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t _ACEOF +;; + esac -fi - - - { echo "$as_me:$LINENO: checking for uint32_t" >&5 -echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; } -if test "${ac_cv_c_uint32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 +$as_echo_n "checking for ssize_t... " >&6; } +if test "${ac_cv_type_ssize_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_c_uint32_t=no - for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_ssize_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7027,9 +8162,8 @@ int main () { -static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; -test_array [0] = 0 - +if (sizeof (ssize_t)) + return 0; ; return 0; } @@ -7040,60 +8174,19 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - case $ac_type in - uint32_t) ac_cv_c_uint32_t=yes ;; - *) ac_cv_c_uint32_t=$ac_type ;; -esac - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint32_t" != no && break - done -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 -echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; } - case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<\_ACEOF -#define _UINT32_T 1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac - - - { echo "$as_me:$LINENO: checking for uint64_t" >&5 -echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; } -if test "${ac_cv_c_uint64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_uint64_t=no - for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7103,9 +8196,8 @@ int main () { -static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; -test_array [0] = 0 - +if (sizeof ((ssize_t))) + return 0; ; return 0; } @@ -7116,60 +8208,61 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - case $ac_type in - uint64_t) ac_cv_c_uint64_t=yes ;; - *) ac_cv_c_uint64_t=$ac_type ;; -esac + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_ssize_t=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint64_t" != no && break - done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 -echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; } - case $ac_cv_c_uint64_t in #( - no|yes) ;; #( - *) +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +$as_echo "$ac_cv_type_ssize_t" >&6; } +if test "x$ac_cv_type_ssize_t" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define _UINT64_T 1 +#define HAVE_SSIZE_T 1 _ACEOF - -cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t -_ACEOF -;; - esac +fi - { echo "$as_me:$LINENO: checking for int32_t" >&5 -echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; } -if test "${ac_cv_c_int32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Sizes of various common basic types +# ANSI C requires sizeof(char) == 1, so no need to check it +# 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. +{ $as_echo "$as_me:$LINENO: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_c_int32_t=no - for ac_type in 'int32_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7179,7 +8272,7 @@ int main () { -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; test_array [0] = 0 ; @@ -7192,18 +8285,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - cat >conftest.$ac_ext <<_ACEOF + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7213,8 +8309,7 @@ int main () { -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7227,63 +8322,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - case $ac_type in - int32_t) ac_cv_c_int32_t=yes ;; - *) ac_cv_c_int32_t=$ac_type ;; -esac - + 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 core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int32_t" != no && break - done -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 -echo "${ECHO_T}$ac_cv_c_int32_t" >&6; } - case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int32_t $ac_cv_c_int32_t -_ACEOF -;; - esac - - - { echo "$as_me:$LINENO: checking for int64_t" >&5 -echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } -if test "${ac_cv_c_int64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_int64_t=no - for ac_type in 'int64_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7293,7 +8363,7 @@ int main () { -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; test_array [0] = 0 ; @@ -7306,18 +8376,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - cat >conftest.$ac_ext <<_ACEOF + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7327,8 +8400,7 @@ int main () { -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7341,58 +8413,47 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - case $ac_type in - int64_t) ac_cv_c_int64_t=yes ;; - *) ac_cv_c_int64_t=$ac_type ;; -esac - + 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 core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int64_t" != no && break - done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 -echo "${ECHO_T}$ac_cv_c_int64_t" >&6; } - case $ac_cv_c_int64_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t -_ACEOF -;; - esac -{ 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 +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` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7400,14 +8461,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef ssize_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -7418,44 +8477,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_ssize_t=yes + ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_ssize_t=no -fi - -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; } -if test $ac_cv_type_ssize_t = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SSIZE_T 1 -_ACEOF - + ac_lo=`expr '(' $ac_mid ')' + 1` fi - -# 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; } -if test "${ac_cv_type_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7464,56 +8521,103 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef int ac__type_new_; +static long int longval () { return (long int) (sizeof (int)); } +static unsigned long int ulongval () { return (long int) (sizeof (int)); } +#include +#include int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (int))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f 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_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 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_type_int=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_int=no +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + # 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 +{ $as_echo "$as_me:$LINENO: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -7524,11 +8628,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; test_array [0] = 0 ; @@ -7541,13 +8644,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -7561,11 +8665,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7578,20 +8681,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -7605,7 +8709,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -7615,11 +8719,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; test_array [0] = 0 ; @@ -7632,13 +8735,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -7652,11 +8756,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7669,20 +8772,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -7696,7 +8800,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -7716,11 +8820,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7733,20 +8836,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -7755,15 +8859,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') if test "$ac_cv_type_int" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +?*) ac_cv_sizeof_long=$ac_lo;; +'') if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int) +$as_echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_int=0 + ac_cv_sizeof_long=0 fi ;; esac else @@ -7774,9 +8880,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long)); } #include #include int @@ -7786,20 +8891,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (long))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -7812,113 +8919,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` + ac_cv_sizeof_long=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_int" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int) +$as_echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_int=0 + ac_cv_sizeof_long=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&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; } -if test "${ac_cv_type_long+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. */ -$ac_includes_default -typedef long ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_LONG $ac_cv_sizeof_long _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_type_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long=no -fi -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -7929,11 +8987,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)]; test_array [0] = 0 ; @@ -7946,13 +9003,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -7966,11 +9024,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7983,20 +9040,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -8010,7 +9068,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -8020,11 +9078,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)]; test_array [0] = 0 ; @@ -8037,13 +9094,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8057,11 +9115,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8074,20 +9131,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -8101,7 +9159,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -8121,11 +9179,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8138,20 +9195,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -8160,15 +9218,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long) +$as_echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long=0 + ac_cv_sizeof_void_p=0 fi ;; esac else @@ -8179,9 +9239,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (void *)); } +static unsigned long int ulongval () { return (long int) (sizeof (void *)); } #include #include int @@ -8191,20 +9250,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (void *))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (void *)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (void *)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -8217,113 +9278,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` + ac_cv_sizeof_void_p=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) +if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long) +$as_echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long=0 + ac_cv_sizeof_void_p=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&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; } -if test "${ac_cv_type_void_p+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. */ -$ac_includes_default -typedef void * ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p _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_type_void_p=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_void_p=no -fi -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if test "${ac_cv_sizeof_short+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -8334,11 +9346,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)]; test_array [0] = 0 ; @@ -8351,13 +9362,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8371,11 +9383,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8388,20 +9399,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -8415,7 +9427,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -8425,11 +9437,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; test_array [0] = 0 ; @@ -8442,13 +9453,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8462,11 +9474,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8479,20 +9490,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -8506,7 +9518,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -8526,11 +9538,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8543,20 +9554,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -8565,15 +9577,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') if test "$ac_cv_type_void_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +?*) ac_cv_sizeof_short=$ac_lo;; +'') if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *) +$as_echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_void_p=0 + ac_cv_sizeof_short=0 fi ;; esac else @@ -8584,9 +9598,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (short)); } +static unsigned long int ulongval () { return (long int) (sizeof (short)); } #include #include int @@ -8596,20 +9609,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (short))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (short)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (short)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -8622,113 +9637,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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 - ac_cv_sizeof_void_p=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -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 *) -See \`config.log' for more details." >&2;} - { (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 -fi -{ 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; } -if test "${ac_cv_type_short+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. */ -$ac_includes_default -typedef short ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - 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_type_short=yes + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_short=no +( exit $ac_status ) +if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (short) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_short=0 + fi fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +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_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&6; } +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + # 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 +{ $as_echo "$as_me:$LINENO: checking size of float" >&5 +$as_echo_n "checking size of float... " >&6; } +if test "${ac_cv_sizeof_float+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -8739,11 +9705,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)]; test_array [0] = 0 ; @@ -8756,13 +9721,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8776,11 +9742,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8793,20 +9758,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -8820,7 +9786,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -8830,11 +9796,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)]; test_array [0] = 0 ; @@ -8847,13 +9812,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -8867,11 +9833,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8884,20 +9849,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -8911,7 +9877,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -8931,11 +9897,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8948,20 +9913,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -8970,15 +9936,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') if test "$ac_cv_type_short" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short) +$as_echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_float=0 fi ;; esac else @@ -8989,9 +9957,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (float)); } +static unsigned long int ulongval () { return (long int) (sizeof (float)); } #include #include int @@ -9001,20 +9968,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (float))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (float)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (float)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9027,113 +9996,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` + ac_cv_sizeof_float=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_short" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) +if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short) +$as_echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_float=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +$as_echo "$ac_cv_sizeof_float" >&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; } -if test "${ac_cv_type_float+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. */ -$ac_includes_default -typedef float ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_FLOAT $ac_cv_sizeof_float _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_type_float=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_float=no -fi -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of double" >&5 +$as_echo_n "checking size of double... " >&6; } +if test "${ac_cv_sizeof_double+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9144,11 +10064,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)]; test_array [0] = 0 ; @@ -9161,13 +10080,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9181,11 +10101,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9198,20 +10117,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9225,7 +10145,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9235,11 +10155,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)]; test_array [0] = 0 ; @@ -9252,13 +10171,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9272,11 +10192,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9289,20 +10208,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9316,7 +10236,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9336,11 +10256,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9353,20 +10272,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9375,15 +10295,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_float=$ac_lo;; -'') if test "$ac_cv_type_float" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +?*) ac_cv_sizeof_double=$ac_lo;; +'') if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (float) +$as_echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_float=0 + ac_cv_sizeof_double=0 fi ;; esac else @@ -9394,9 +10316,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (double)); } +static unsigned long int ulongval () { return (long int) (sizeof (double)); } #include #include int @@ -9406,20 +10327,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (double))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (double)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (double)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9432,113 +10355,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_float=`cat conftest.val` + ac_cv_sizeof_double=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_float" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) +if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (float) +$as_echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_float=0 + ac_cv_sizeof_double=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 -echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&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; } -if test "${ac_cv_type_double+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. */ -$ac_includes_default -typedef double ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_DOUBLE $ac_cv_sizeof_double _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_type_double=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_double=no -fi -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5 +$as_echo_n "checking size of fpos_t... " >&6; } +if test "${ac_cv_sizeof_fpos_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9549,11 +10423,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)]; test_array [0] = 0 ; @@ -9566,13 +10439,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9586,11 +10460,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9603,20 +10476,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9630,7 +10504,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9640,11 +10514,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)]; test_array [0] = 0 ; @@ -9657,13 +10530,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9677,11 +10551,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9694,20 +10567,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9721,7 +10595,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9741,11 +10615,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9758,20 +10631,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9780,15 +10654,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_double=$ac_lo;; -'') if test "$ac_cv_type_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) +?*) ac_cv_sizeof_fpos_t=$ac_lo;; +'') if test "$ac_cv_type_fpos_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (double) +$as_echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_double=0 + ac_cv_sizeof_fpos_t=0 fi ;; esac else @@ -9799,9 +10675,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (fpos_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); } #include #include int @@ -9811,20 +10686,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (fpos_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (fpos_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (fpos_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9837,113 +10714,64 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_double=`cat conftest.val` + ac_cv_sizeof_fpos_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) +if test "$ac_cv_type_fpos_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (double) +$as_echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_double=0 + ac_cv_sizeof_fpos_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 +$as_echo "$ac_cv_sizeof_fpos_t" >&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; } -if test "${ac_cv_type_fpos_t+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. */ -$ac_includes_default -typedef fpos_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t _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_type_fpos_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_fpos_t=no -fi -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; } # 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 +{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5 +$as_echo_n "checking size of size_t... " >&6; } +if test "${ac_cv_sizeof_size_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9954,11 +10782,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)]; test_array [0] = 0 ; @@ -9971,13 +10798,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9991,11 +10819,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10008,20 +10835,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10035,7 +10863,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10045,11 +10873,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)]; test_array [0] = 0 ; @@ -10062,13 +10889,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10082,11 +10910,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10099,20 +10926,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10126,7 +10954,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10146,11 +10974,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10163,20 +10990,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10185,15 +11013,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_fpos_t=$ac_lo;; -'') if test "$ac_cv_type_fpos_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (fpos_t) +$as_echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_fpos_t=0 + ac_cv_sizeof_size_t=0 fi ;; esac else @@ -10204,9 +11034,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (size_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (size_t)); } #include #include int @@ -10216,20 +11045,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (size_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (size_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (size_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10242,113 +11073,64 @@ *\"* | *\`* | *\\*) 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' - { (case "(($ac_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 - ac_cv_sizeof_fpos_t=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -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) -See \`config.log' for more details." >&2;} - { (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 -fi -{ 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; } -if test "${ac_cv_type_size_t+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. */ -$ac_includes_default -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 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_type_size_t=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_size_t=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +( exit $ac_status ) +if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_size_t=0 + fi fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + # 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 +{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5 +$as_echo_n "checking size of pid_t... " >&6; } +if test "${ac_cv_sizeof_pid_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10359,11 +11141,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)]; test_array [0] = 0 ; @@ -10376,13 +11157,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10396,11 +11178,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10413,20 +11194,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10440,7 +11222,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10450,11 +11232,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)]; test_array [0] = 0 ; @@ -10467,13 +11248,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10487,11 +11269,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10504,20 +11285,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10531,7 +11313,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10551,11 +11333,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10568,20 +11349,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10590,15 +11372,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_size_t=$ac_lo;; -'') if test "$ac_cv_type_size_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +?*) ac_cv_sizeof_pid_t=$ac_lo;; +'') if test "$ac_cv_type_pid_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_t) +$as_echo "$as_me: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_size_t=0 + ac_cv_sizeof_pid_t=0 fi ;; esac else @@ -10609,9 +11393,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (pid_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); } #include #include int @@ -10621,20 +11404,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (pid_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (pid_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (pid_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10647,71 +11432,71 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_size_t=`cat conftest.val` + ac_cv_sizeof_pid_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_size_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +if test "$ac_cv_type_pid_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_t) +$as_echo "$as_me: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_size_t=0 + ac_cv_sizeof_pid_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 +$as_echo "$ac_cv_sizeof_pid_t" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +#define SIZEOF_PID_T $ac_cv_sizeof_pid_t _ACEOF -{ 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 - cat >conftest.$ac_ext <<_ACEOF + +{ $as_echo "$as_me:$LINENO: checking for long long support" >&5 +$as_echo_n "checking for long long support... " >&6; } +have_long_long=no +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 pid_t ac__type_new_; + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +long long x; x = (long long)0; ; return 0; } @@ -10722,38 +11507,45 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_pid_t=yes + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + + have_long_long=yes + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no -fi -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; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5 +$as_echo "$have_long_long" >&6; } +if test "$have_long_long" = yes ; then # 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 pid_t" >&5 -echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if test "${ac_cv_sizeof_long_long+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10764,11 +11556,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)]; test_array [0] = 0 ; @@ -10781,13 +11572,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10801,11 +11593,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10818,20 +11609,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10845,7 +11637,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10855,11 +11647,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)]; test_array [0] = 0 ; @@ -10872,13 +11663,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10892,11 +11684,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10909,20 +11700,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10936,7 +11728,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10956,11 +11748,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10973,20 +11764,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10995,15 +11787,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_pid_t=$ac_lo;; -'') if test "$ac_cv_type_pid_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (pid_t) +$as_echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_pid_t=0 + ac_cv_sizeof_long_long=0 fi ;; esac else @@ -11014,9 +11808,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef pid_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_)); } +static long int longval () { return (long int) (sizeof (long long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long long)); } #include #include int @@ -11026,20 +11819,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (long long))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long long)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long long)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11052,55 +11847,61 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pid_t=`cat conftest.val` + ac_cv_sizeof_long_long=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_pid_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) +if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (pid_t) +$as_echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_pid_t=0 + ac_cv_sizeof_long_long=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_PID_T $ac_cv_sizeof_pid_t +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF +fi -{ 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 +{ $as_echo "$as_me:$LINENO: checking for long double support" >&5 +$as_echo_n "checking for long double support... " >&6; } +have_long_double=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11111,7 +11912,7 @@ int main () { -long long x; x = (long long)0; +long double x; x = (long double)0; ; return 0; } @@ -11122,13 +11923,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11136,84 +11938,30 @@ cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_LONG 1 +#define HAVE_LONG_DOUBLE 1 _ACEOF - have_long_long=yes + have_long_double=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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; } -if test "${ac_cv_type_long_long+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. */ -$ac_includes_default -typedef long long ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - 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_type_long_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long_long=no -fi - -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; } - +{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5 +$as_echo "$have_long_double" >&6; } +if test "$have_long_double" = yes ; then # 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 +{ $as_echo "$as_me:$LINENO: checking size of long double" >&5 +$as_echo_n "checking size of long double... " >&6; } +if test "${ac_cv_sizeof_long_double+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11224,11 +11972,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)]; test_array [0] = 0 ; @@ -11241,13 +11988,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11261,11 +12009,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11278,20 +12025,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -11305,7 +12053,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -11315,11 +12063,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)]; test_array [0] = 0 ; @@ -11332,13 +12079,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11352,11 +12100,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11369,20 +12116,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11396,7 +12144,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11416,11 +12164,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11433,20 +12180,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11455,15 +12203,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') if test "$ac_cv_type_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +?*) ac_cv_sizeof_long_double=$ac_lo;; +'') if test "$ac_cv_type_long_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long) +$as_echo "$as_me: error: cannot compute sizeof (long double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_long_double=0 fi ;; esac else @@ -11474,9 +12224,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (long double)); } +static unsigned long int ulongval () { return (long int) (sizeof (long double)); } #include #include int @@ -11486,20 +12235,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (long double))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long double)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (long double)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11512,56 +12263,62 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` + ac_cv_sizeof_long_double=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +if test "$ac_cv_type_long_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long) +$as_echo "$as_me: error: cannot compute sizeof (long double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_long_double=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 +$as_echo "$ac_cv_sizeof_long_double" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double _ACEOF fi -{ echo "$as_me:$LINENO: checking for long double support" >&5 -echo $ECHO_N "checking for long double support... $ECHO_C" >&6; } -have_long_double=no + +{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5 +$as_echo_n "checking for _Bool support... " >&6; } +have_c99_bool=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11572,7 +12329,7 @@ int main () { -long double x; x = (long double)0; +_Bool x; x = (_Bool)0; ; return 0; } @@ -11583,13 +12340,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11597,84 +12355,30 @@ cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_DOUBLE 1 +#define HAVE_C99_BOOL 1 _ACEOF - have_long_double=yes + have_c99_bool=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $have_long_double" >&5 -echo "${ECHO_T}$have_long_double" >&6; } -if test "$have_long_double" = yes ; then -{ echo "$as_me:$LINENO: checking for long double" >&5 -echo $ECHO_N "checking for long double... $ECHO_C" >&6; } -if test "${ac_cv_type_long_double+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. */ -$ac_includes_default -typedef long double ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - 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_type_long_double=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long_double=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5 -echo "${ECHO_T}$ac_cv_type_long_double" >&6; } - +{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5 +$as_echo "$have_c99_bool" >&6; } +if test "$have_c99_bool" = yes ; then # 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 double" >&5 -echo $ECHO_N "checking size of long double... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_long_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5 +$as_echo_n "checking size of _Bool... " >&6; } +if test "${ac_cv_sizeof__Bool+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11685,11 +12389,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)]; test_array [0] = 0 ; @@ -11702,13 +12405,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11722,11 +12426,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11739,20 +12442,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -11766,7 +12470,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -11776,11 +12480,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)]; test_array [0] = 0 ; @@ -11793,13 +12496,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11813,11 +12517,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11830,20 +12533,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11857,7 +12561,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11877,11 +12581,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11894,20 +12597,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11916,15 +12620,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_double=$ac_lo;; -'') if test "$ac_cv_type_long_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) +?*) ac_cv_sizeof__Bool=$ac_lo;; +'') if test "$ac_cv_type__Bool" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long double) +$as_echo "$as_me: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long_double=0 + ac_cv_sizeof__Bool=0 fi ;; esac else @@ -11935,9 +12641,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long 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_)); } +static long int longval () { return (long int) (sizeof (_Bool)); } +static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); } #include #include int @@ -11947,20 +12652,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (_Bool))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (_Bool)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (_Bool)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11973,68 +12680,79 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_double=`cat conftest.val` + ac_cv_sizeof__Bool=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) +if test "$ac_cv_type__Bool" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long double) +$as_echo "$as_me: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_long_double=0 + ac_cv_sizeof__Bool=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 +$as_echo "$ac_cv_sizeof__Bool" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +#define SIZEOF__BOOL $ac_cv_sizeof__Bool _ACEOF fi - -{ echo "$as_me:$LINENO: checking for _Bool support" >&5 -echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; } -have_c99_bool=no +{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5 +$as_echo_n "checking for uintptr_t... " >&6; } +if test "${ac_cv_type_uintptr_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_uintptr_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_STDINT_H + #include + #endif int main () { -_Bool x; x = (_Bool)0; +if (sizeof (uintptr_t)) + return 0; ; return 0; } @@ -12045,56 +12763,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_C99_BOOL 1 -_ACEOF - - have_c99_bool=yes - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -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; } -if test "${ac_cv_type__Bool+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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 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_new_; +#ifdef HAVE_STDINT_H + #include + #endif + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +if (sizeof ((uintptr_t))) + return 0; ; return 0; } @@ -12105,38 +12800,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type__Bool=yes + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type__Bool=no + ac_cv_type_uintptr_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -echo "${ECHO_T}$ac_cv_type__Bool" >&6; } + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +$as_echo "$ac_cv_type_uintptr_t" >&6; } +if test "x$ac_cv_type_uintptr_t" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF # 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 +{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5 +$as_echo_n "checking size of uintptr_t... " >&6; } +if test "${ac_cv_sizeof_uintptr_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12147,11 +12856,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)]; test_array [0] = 0 ; @@ -12164,13 +12872,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12184,11 +12893,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12201,20 +12909,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12228,7 +12937,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12238,11 +12947,10 @@ 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 int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)]; test_array [0] = 0 ; @@ -12255,13 +12963,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12275,11 +12984,10 @@ 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 int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12292,20 +13000,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -12319,7 +13028,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -12339,11 +13048,10 @@ 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 int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12356,20 +13064,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -12378,15 +13087,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof__Bool=$ac_lo;; -'') if test "$ac_cv_type__Bool" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +?*) ac_cv_sizeof_uintptr_t=$ac_lo;; +'') if test "$ac_cv_type_uintptr_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (_Bool) +$as_echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof__Bool=0 + ac_cv_sizeof_uintptr_t=0 fi ;; esac else @@ -12397,9 +13108,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - 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_)); } +static long int longval () { return (long int) (sizeof (uintptr_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); } #include #include int @@ -12409,20 +13119,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (uintptr_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (uintptr_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (uintptr_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12435,76 +13147,300 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof__Bool=`cat conftest.val` + ac_cv_sizeof_uintptr_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type__Bool" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +if test "$ac_cv_type_uintptr_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (_Bool) +$as_echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof__Bool=0 + ac_cv_sizeof_uintptr_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 -echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 +$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF__BOOL $ac_cv_sizeof__Bool +#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t _ACEOF fi -{ 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 + +# 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. +{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if test "${ac_cv_sizeof_off_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_STDINT_H - #include - #endif -typedef uintptr_t ac__type_new_; +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)]; +test_array [0] = 0 + + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break +else + $as_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` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + int main () { -if ((ac__type_new_ *) 0) +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)]; +test_array [0] = 0 + + ; return 0; -if (sizeof (ac__type_new_)) +} +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break +else + $as_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` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +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` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -12515,39 +13451,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_uintptr_t=yes + ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no + ac_lo=`expr '(' $ac_mid ')' + 1` fi 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; } -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; } -if test "${ac_cv_type_uintptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +done +case $ac_lo in +?*) ac_cv_sizeof_off_t=$ac_lo;; +'') if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_off_t=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -12555,57 +13494,127 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -typedef uintptr_t ac__type_new_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + +static long int longval () { return (long int) (sizeof (off_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (off_t)); } +#include +#include int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (off_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (off_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (off_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f 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_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 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_type_uintptr_t=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_off_t=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +( exit $ac_status ) +if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_off_t=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t +_ACEOF + + + +{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5 +$as_echo_n "checking whether to enable large file support... " >&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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LARGEFILE_SUPPORT 1 +_ACEOF + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&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 +{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if test "${ac_cv_sizeof_time_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12615,12 +13624,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= 0)]; test_array [0] = 0 ; @@ -12633,13 +13649,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12652,12 +13669,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12670,20 +13694,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12697,7 +13722,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12706,12 +13731,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) < 0)]; test_array [0] = 0 ; @@ -12724,13 +13756,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12743,12 +13776,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12761,20 +13801,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -12788,7 +13829,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -12807,12 +13848,19 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef uintptr_t ac__type_sizeof_; + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12825,20 +13873,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -12847,15 +13896,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_uintptr_t=$ac_lo;; -'') if test "$ac_cv_type_uintptr_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) +?*) ac_cv_sizeof_time_t=$ac_lo;; +'') if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (uintptr_t) +$as_echo "$as_me: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_uintptr_t=0 + ac_cv_sizeof_time_t=0 fi ;; esac else @@ -12865,10 +13916,17 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - 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_)); } + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + +static long int longval () { return (long int) (sizeof (time_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (time_t)); } #include #include int @@ -12878,20 +13936,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (time_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (time_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (time_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12904,234 +13964,356 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_uintptr_t=`cat conftest.val` + ac_cv_sizeof_time_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_uintptr_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) +if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (uintptr_t) +$as_echo "$as_me: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else - ac_cv_sizeof_uintptr_t=0 + ac_cv_sizeof_time_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t _ACEOF + +# if have pthread_t then define SIZEOF_PTHREAD_T +ac_save_cc="$CC" +if test "$ac_cv_kpthread" = "yes" +then CC="$CC -Kpthread" +elif test "$ac_cv_kthread" = "yes" +then CC="$CC -Kthread" +elif test "$ac_cv_pthread" = "yes" +then CC="$CC -pthread" fi +{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5 +$as_echo_n "checking for pthread_t... " >&6; } +have_pthread_t=no +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 () +{ +pthread_t x; x = *(pthread_t*)0; + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + have_pthread_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi -# 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; } -if test "${ac_cv_sizeof_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5 +$as_echo "$have_pthread_t" >&6; } +if test "$have_pthread_t" = yes ; then + # 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. +{ $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5 +$as_echo_n "checking size of pthread_t... " >&6; } +if test "${ac_cv_sizeof_pthread_t+set}" = set; then + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then - ac_cv_sizeof_off_t=4 -else - cat >conftest.$ac_ext <<_ACEOF + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -main() + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(off_t)); - exit(0); +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= 0)]; +test_array [0] = 0 + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_try") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_off_t=`cat conftestval` + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_hi=$ac_mid; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_sizeof_off_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - + 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 -{ 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; } -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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LARGEFILE_SUPPORT 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# 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; } -if test "${ac_cv_sizeof_time_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_time_t=4 -else - 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. */ -#include -#include -main() + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(time_t)); - exit(0); +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) < 0)]; +test_array [0] = 0 + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; + 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_try") 2>&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_time_t=`cat conftestval` + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_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_lo=$ac_mid; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_sizeof_time_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + 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 core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - + ac_lo= ac_hi= fi -{ 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 -_ACEOF - - - -# if have pthread_t then define SIZEOF_PTHREAD_T -ac_save_cc="$CC" -if test "$ac_cv_kpthread" = "yes" -then CC="$CC -Kpthread" -elif test "$ac_cv_kthread" = "yes" -then CC="$CC -Kthread" -elif test "$ac_cv_pthread" = "yes" -then CC="$CC -pthread" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ 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 + +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` + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H #include +#endif + + int main () { -pthread_t x; x = *(pthread_t*)0; +static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -13142,37 +14324,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - have_pthread_t=yes + ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_lo=`expr '(' $ac_mid ')' + 1` fi 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; } - if test "${ac_cv_sizeof_pthread_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_pthread_t=4 +done +case $ac_lo in +?*) ac_cv_sizeof_pthread_t=$ac_lo;; +'') if test "$ac_cv_type_pthread_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_pthread_t=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -13180,15 +14367,44 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#ifdef HAVE_PTHREAD_H #include - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(pthread_t)); - exit(0); - } +#endif + + +static long int longval () { return (long int) (sizeof (pthread_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (pthread_t)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (pthread_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (pthread_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (pthread_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -13196,49 +14412,60 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pthread_t=`cat conftestval` + ac_cv_sizeof_pthread_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_sizeof_pthread_t=0 +if test "$ac_cv_type_pthread_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_pthread_t=0 + fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - - +rm -f conftest.val fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 +$as_echo "$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 _ACEOF + fi CC="$ac_save_cc" - - case $ac_sys_system/$ac_sys_release in Darwin/[01567]\..*) OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000" @@ -13272,8 +14499,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; } +{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5 +$as_echo_n "checking for --enable-framework... " >&6; } if test "$enable_framework" then BASECFLAGS="$BASECFLAGS -fno-common -dynamic" @@ -13284,21 +14511,21 @@ #define WITH_NEXT_FRAMEWORK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } if test $enable_shared = "yes" then - { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5 -echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;} + { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5 +$as_echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;} { (exit 1); exit 1; }; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for dyld" >&5 -echo $ECHO_N "checking for dyld... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for dyld" >&5 +$as_echo_n "checking for dyld... " >&6; } case $ac_sys_system/$ac_sys_release in Darwin/*) @@ -13306,12 +14533,12 @@ #define WITH_DYLD 1 _ACEOF - { echo "$as_me:$LINENO: result: always on for Darwin" >&5 -echo "${ECHO_T}always on for Darwin" >&6; } + { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5 +$as_echo "always on for Darwin" >&6; } ;; *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ;; esac @@ -13323,8 +14550,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; } +{ $as_echo "$as_me:$LINENO: checking SO" >&5 +$as_echo_n "checking SO... " >&6; } if test -z "$SO" then case $ac_sys_system in @@ -13349,8 +14576,8 @@ echo '=====================================================================' sleep 10 fi -{ echo "$as_me:$LINENO: result: $SO" >&5 -echo "${ECHO_T}$SO" >&6; } +{ $as_echo "$as_me:$LINENO: result: $SO" >&5 +$as_echo "$SO" >&6; } cat >>confdefs.h <<_ACEOF @@ -13361,8 +14588,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; } +{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5 +$as_echo_n "checking LDSHARED... " >&6; } if test -z "$LDSHARED" then case $ac_sys_system/$ac_sys_release in @@ -13464,13 +14691,13 @@ *) LDSHARED="ld";; esac fi -{ echo "$as_me:$LINENO: result: $LDSHARED" >&5 -echo "${ECHO_T}$LDSHARED" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5 +$as_echo_n "checking CCSHARED... " >&6; } if test -z "$CCSHARED" then case $ac_sys_system/$ac_sys_release in @@ -13505,12 +14732,12 @@ atheos*) CCSHARED="-fPIC";; esac fi -{ echo "$as_me:$LINENO: result: $CCSHARED" >&5 -echo "${ECHO_T}$CCSHARED" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5 +$as_echo_n "checking LINKFORSHARED... " >&6; } if test -z "$LINKFORSHARED" then case $ac_sys_system/$ac_sys_release in @@ -13557,13 +14784,13 @@ LINKFORSHARED='-Wl,-E -N 2048K';; esac fi -{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 -echo "${ECHO_T}$LINKFORSHARED" >&6; } +{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 +$as_echo "$LINKFORSHARED" >&6; } -{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5 -echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5 +$as_echo_n "checking CFLAGSFORSHARED... " >&6; } if test ! "$LIBRARY" = "$LDLIBRARY" then case $ac_sys_system in @@ -13575,8 +14802,8 @@ CFLAGSFORSHARED='$(CCSHARED)' esac fi -{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5 -echo "${ECHO_T}$CFLAGSFORSHARED" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5 +$as_echo "$CFLAGSFORSHARED" >&6; } # SHLIBS are libraries (except -lc and -lm) to link to the python shared # library (with --enable-shared). @@ -13587,22 +14814,22 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5 +$as_echo_n "checking SHLIBS... " >&6; } case "$ac_sys_system" in *) SHLIBS='$(LIBS)';; esac -{ echo "$as_me:$LINENO: result: $SHLIBS" >&5 -echo "${ECHO_T}$SHLIBS" >&6; } +{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -13634,33 +14861,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -13670,10 +14901,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -13705,33 +14936,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_dld_shl_load = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDLD 1 _ACEOF @@ -13743,10 +14978,10 @@ # only check for sem_init 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; } + { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5 +$as_echo_n "checking for library containing sem_init... " >&6; } if test "${ac_cv_search_sem_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -13784,26 +15019,30 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_search_sem_init=$ac_res else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM 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 @@ -13818,8 +15057,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5 +$as_echo "$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" @@ -13831,10 +15070,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 +$as_echo_n "checking for textdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_textdomain+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" @@ -13866,33 +15105,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_intl_textdomain=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_textdomain=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_intl_textdomain = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5 +$as_echo "$ac_cv_lib_intl_textdomain" >&6; } +if test "x$ac_cv_lib_intl_textdomain" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_LIBINTL 1 @@ -13904,8 +15147,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*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5 +$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13927,43 +15170,47 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM 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. -{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 -echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 +$as_echo_n "checking for t_open in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_t_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" @@ -13995,40 +15242,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_nsl_t_open=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_t_open=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_nsl_t_open = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 +$as_echo "$ac_cv_lib_nsl_t_open" >&6; } +if test "x$ac_cv_lib_nsl_t_open" = x""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; } +{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } if test "${ac_cv_lib_socket_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS $LIBS" @@ -14060,56 +15311,60 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_socket_socket=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_socket_socket = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = x""yes; then LIBS="-lsocket $LIBS" fi # SVR4 sockets -{ echo "$as_me:$LINENO: checking for --with-libs" >&5 -echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5 +$as_echo_n "checking for --with-libs... " >&6; } # 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; } +{ $as_echo "$as_me:$LINENO: result: $withval" >&5 +$as_echo "$withval" >&6; } LIBS="$withval $LIBS" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } +{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5 +$as_echo_n "checking for --with-system-ffi... " >&6; } # Check whether --with-system_ffi was given. if test "${with_system_ffi+set}" = set; then @@ -14117,41 +15372,41 @@ fi -{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5 -echo "${ECHO_T}$with_system_ffi" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5 +$as_echo "$with_system_ffi" >&6; } # Check for --with-dbmliborder -{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5 -echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5 +$as_echo_n "checking for --with-dbmliborder... " >&6; } # Check whether --with-dbmliborder was given. if test "${with_dbmliborder+set}" = set; then withval=$with_dbmliborder; if test x$with_dbmliborder = xyes then -{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 -echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} +{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 +$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} { (exit 1); exit 1; }; } else for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb then - { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 -echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} + { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 +$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} { (exit 1); exit 1; }; } fi done fi fi -{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5 -echo "${ECHO_T}$with_dbmliborder" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5 +$as_echo "$with_dbmliborder" >&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; } +{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5 +$as_echo_n "checking for --with-signal-module... " >&6; } # Check whether --with-signal-module was given. if test "${with_signal_module+set}" = set; then @@ -14162,8 +15417,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5 +$as_echo "$with_signal_module" >&6; } if test "${with_signal_module}" = "yes"; then USE_SIGNAL_MODULE="" @@ -14177,22 +15432,22 @@ USE_THREAD_MODULE="" -{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5 -echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5 +$as_echo_n "checking for --with-dec-threads... " >&6; } # 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; } +{ $as_echo "$as_me:$LINENO: result: $withval" >&5 +$as_echo "$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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -14205,8 +15460,8 @@ -{ echo "$as_me:$LINENO: checking for --with-threads" >&5 -echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5 +$as_echo_n "checking for --with-threads... " >&6; } # Check whether --with-threads was given. if test "${with_threads+set}" = set; then @@ -14225,8 +15480,8 @@ if test -z "$with_threads" then with_threads="yes" fi -{ echo "$as_me:$LINENO: result: $with_threads" >&5 -echo "${ECHO_T}$with_threads" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5 +$as_echo "$with_threads" >&6; } if test "$with_threads" = "no" @@ -14292,8 +15547,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; } + { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5 +$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14315,25 +15570,25 @@ fi rm -f conftest* - { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 -echo "${ECHO_T}$unistd_defines_pthreads" >&6; } + { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 +$as_echo "$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; } + { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5 +$as_echo_n "checking for cthreads.h... " >&6; } if test "${ac_cv_header_cthreads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 -echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5 +$as_echo_n "checking cthreads.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14349,32 +15604,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5 +$as_echo_n "checking cthreads.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14388,51 +15644,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -14441,18 +15698,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5 +$as_echo_n "checking for cthreads.h... " >&6; } if test "${ac_cv_header_cthreads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 +$as_echo "$ac_cv_header_cthreads_h" >&6; } fi -if test $ac_cv_header_cthreads_h = yes; then +if test "x$ac_cv_header_cthreads_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14471,17 +15728,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; } + { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 +$as_echo_n "checking for mach/cthreads.h... " >&6; } if test "${ac_cv_header_mach_cthreads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 -echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5 +$as_echo_n "checking mach/cthreads.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14497,32 +15754,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5 +$as_echo_n "checking mach/cthreads.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14536,51 +15794,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -14589,18 +15848,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 +$as_echo_n "checking for mach/cthreads.h... " >&6; } if test "${ac_cv_header_mach_cthreads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 +$as_echo "$ac_cv_header_mach_cthreads_h" >&6; } fi -if test $ac_cv_header_mach_cthreads_h = yes; then +if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14617,13 +15876,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; } + { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5 +$as_echo_n "checking for --with-pth... " >&6; } # 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; { $as_echo "$as_me:$LINENO: result: $withval" >&5 +$as_echo "$withval" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14636,16 +15895,16 @@ LIBS="-lpth $LIBS" THREADOBJ="Python/thread.o" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } + { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14670,21 +15929,24 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14692,15 +15954,15 @@ posix_threads=yes THREADOBJ="Python/thread.o" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$_libs - { echo "$as_me:$LINENO: checking for pthread_detach" >&5 -echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5 +$as_echo_n "checking for pthread_detach... " >&6; } if test "${ac_cv_func_pthread_detach+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14753,32 +16015,36 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_pthread_detach=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_pthread_detach=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_func_pthread_detach = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5 +$as_echo "$ac_cv_func_pthread_detach" >&6; } +if test "x$ac_cv_func_pthread_detach" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14788,17 +16054,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; } + { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 +$as_echo_n "checking for atheos/threads.h... " >&6; } if test "${ac_cv_header_atheos_threads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 -echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5 +$as_echo_n "checking atheos/threads.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14814,32 +16080,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5 +$as_echo_n "checking atheos/threads.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14853,51 +16120,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -14906,18 +16174,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 +$as_echo_n "checking for atheos/threads.h... " >&6; } if test "${ac_cv_header_atheos_threads_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 +$as_echo "$ac_cv_header_atheos_threads_h" >&6; } fi -if test $ac_cv_header_atheos_threads_h = yes; then +if test "x$ac_cv_header_atheos_threads_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -14930,10 +16198,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5 +$as_echo_n "checking for pthread_create in -lpthreads... " >&6; } if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthreads $LIBS" @@ -14965,33 +16233,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_pthreads_pthread_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthreads_pthread_create=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_pthreads_pthread_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } +if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15001,10 +16273,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 +$as_echo_n "checking for pthread_create in -lc_r... " >&6; } if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" @@ -15036,33 +16308,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_c_r_pthread_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_r_pthread_create=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_c_r_pthread_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } +if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15072,10 +16348,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5 +$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" @@ -15107,33 +16383,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_pthread___pthread_create_system=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread___pthread_create_system=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_pthread___pthread_create_system = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5 +$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } +if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15143,10 +16423,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5 +$as_echo_n "checking for pthread_create in -lcma... " >&6; } if test "${ac_cv_lib_cma_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcma $LIBS" @@ -15178,33 +16458,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_cma_pthread_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cma_pthread_create=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_cma_pthread_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5 +$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } +if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15231,6 +16515,7 @@ fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi @@ -15242,10 +16527,10 @@ - { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5 -echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5 +$as_echo_n "checking for usconfig in -lmpc... " >&6; } if test "${ac_cv_lib_mpc_usconfig+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpc $LIBS" @@ -15277,33 +16562,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpc_usconfig=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpc_usconfig=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_mpc_usconfig = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5 +$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } +if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15315,10 +16604,10 @@ 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; } + { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 +$as_echo_n "checking for thr_create in -lthread... " >&6; } if test "${ac_cv_lib_thread_thr_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lthread $LIBS" @@ -15350,33 +16639,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_thread_thr_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_thread_thr_create=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_thread_thr_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 +$as_echo "$ac_cv_lib_thread_thr_create" >&6; } +if test "x$ac_cv_lib_thread_thr_create" = x""yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15429,10 +16722,10 @@ ;; 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; } + { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 +$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } if test "${ac_cv_pthread_system_supported+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_pthread_system_supported=no @@ -15462,29 +16755,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_pthread_system_supported=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_pthread_system_supported=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -15492,8 +16788,8 @@ fi - { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5 -echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5 +$as_echo "$ac_cv_pthread_system_supported" >&6; } if test "$ac_cv_pthread_system_supported" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -15504,11 +16800,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -15561,35 +16857,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF case $ac_sys_system in CYGWIN*) @@ -15609,18 +16912,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; } +{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5 +$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } # Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then enableval=$enable_ipv6; case "$enableval" in no) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ipv6=no ;; - *) { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + *) { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define ENABLE_IPV6 1 _ACEOF @@ -15631,8 +16934,8 @@ else if test "$cross_compiling" = yes; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ipv6=no else @@ -15660,41 +16963,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ipv6=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +{ $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ipv6=no fi +rm -rf conftest.dSYM 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; } + { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5 +$as_echo_n "checking if RFC2553 API is available... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15718,26 +17024,27 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ipv6=yes else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ipv6=no fi @@ -15759,8 +17066,8 @@ 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; } + { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5 +$as_echo_n "checking ipv6 stack type... " >&6; } for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do case $i in @@ -15916,8 +17223,8 @@ break fi done - { echo "$as_me:$LINENO: result: $ipv6type" >&5 -echo "${ECHO_T}$ipv6type" >&6; } + { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5 +$as_echo "$ipv6type" >&6; } fi if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then @@ -15936,8 +17243,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5 -echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5 +$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15959,13 +17266,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -15975,22 +17283,22 @@ #define HAVE_OSX105_SDK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # 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; } +{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5 +$as_echo_n "checking for --with-doc-strings... " >&6; } # Check whether --with-doc-strings was given. if test "${with_doc_strings+set}" = set; then @@ -16009,12 +17317,12 @@ _ACEOF fi -{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5 -echo "${ECHO_T}$with_doc_strings" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5 +$as_echo_n "checking for --with-tsc... " >&6; } # Check whether --with-tsc was given. if test "${with_tsc+set}" = set; then @@ -16026,20 +17334,20 @@ #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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } +{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5 +$as_echo_n "checking for --with-pymalloc... " >&6; } # Check whether --with-pymalloc was given. if test "${with_pymalloc+set}" = set; then @@ -16058,12 +17366,12 @@ _ACEOF fi -{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5 -echo "${ECHO_T}$with_pymalloc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5 +$as_echo_n "checking for --with-wctype-functions... " >&6; } # Check whether --with-wctype-functions was given. if test "${with_wctype_functions+set}" = set; then @@ -16075,14 +17383,14 @@ #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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16095,11 +17403,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16152,35 +17460,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -16190,8 +17505,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; } +{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5 +$as_echo_n "checking DYNLOADFILE... " >&6; } if test -z "$DYNLOADFILE" then case $ac_sys_system/$ac_sys_release in @@ -16215,8 +17530,8 @@ ;; esac fi -{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 -echo "${ECHO_T}$DYNLOADFILE" >&6; } +{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 +$as_echo "$DYNLOADFILE" >&6; } if test "$DYNLOADFILE" != "dynload_stub.o" then @@ -16229,16 +17544,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; } +{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5 +$as_echo_n "checking MACHDEP_OBJS... " >&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; } +{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5 +$as_echo "MACHDEP_OBJS" >&6; } # checks for library functions @@ -16345,11 +17660,11 @@ truncate uname unsetenv utimes waitpid wait3 wait4 \ wcscoll wcsftime wcsxfrm _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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16402,35 +17717,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -16439,8 +17761,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; } +{ $as_echo "$as_me:$LINENO: checking for chroot" >&5 +$as_echo_n "checking for chroot... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16462,13 +17784,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16478,20 +17801,20 @@ #define HAVE_CHROOT 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for link" >&5 +$as_echo_n "checking for link... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16513,13 +17836,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16529,20 +17853,20 @@ #define HAVE_LINK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for symlink" >&5 +$as_echo_n "checking for symlink... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16564,13 +17888,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16580,20 +17905,20 @@ #define HAVE_SYMLINK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5 +$as_echo_n "checking for fchdir... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16615,13 +17940,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16631,20 +17957,20 @@ #define HAVE_FCHDIR 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for fsync" >&5 +$as_echo_n "checking for fsync... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16666,13 +17992,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16682,20 +18009,20 @@ #define HAVE_FSYNC 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5 +$as_echo_n "checking for fdatasync... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16717,13 +18044,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16733,20 +18061,20 @@ #define HAVE_FDATASYNC 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking for epoll" >&5 -echo $ECHO_N "checking for epoll... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for epoll" >&5 +$as_echo_n "checking for epoll... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16768,13 +18096,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16784,20 +18113,20 @@ #define HAVE_EPOLL 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking for kqueue" >&5 -echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5 +$as_echo_n "checking for kqueue... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16822,13 +18151,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16838,14 +18168,14 @@ #define HAVE_KQUEUE 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -16856,8 +18186,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; } +{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5 +$as_echo_n "checking for ctermid_r... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16882,13 +18212,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16898,21 +18229,21 @@ #define HAVE_CTERMID_R 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for flock" >&5 +$as_echo_n "checking for flock... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16937,13 +18268,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -16953,21 +18285,21 @@ #define HAVE_FLOCK 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5 +$as_echo_n "checking for getpagesize... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16992,13 +18324,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17008,14 +18341,14 @@ #define HAVE_GETPAGESIZE 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17025,10 +18358,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_TRUE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$TRUE"; then ac_cv_prog_TRUE="$TRUE" # Let the user override the test. @@ -17041,7 +18374,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17052,11 +18385,11 @@ fi TRUE=$ac_cv_prog_TRUE if test -n "$TRUE"; then - { echo "$as_me:$LINENO: result: $TRUE" >&5 -echo "${ECHO_T}$TRUE" >&6; } + { $as_echo "$as_me:$LINENO: result: $TRUE" >&5 +$as_echo "$TRUE" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17065,10 +18398,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5 +$as_echo_n "checking for inet_aton in -lc... " >&6; } if test "${ac_cv_lib_c_inet_aton+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" @@ -17100,40 +18433,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_c_inet_aton=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_inet_aton=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_c_inet_aton = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5 +$as_echo "$ac_cv_lib_c_inet_aton" >&6; } +if test "x$ac_cv_lib_c_inet_aton" = x""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; } +{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 +$as_echo_n "checking for inet_aton in -lresolv... " >&6; } if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" @@ -17165,33 +18502,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_resolv_inet_aton=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_resolv_inet_aton=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_resolv_inet_aton = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 +$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } +if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF @@ -17206,14 +18547,13 @@ # On Tru64, chflags seems to be present, but calling it will # exit Python -{ echo "$as_me:$LINENO: checking for chflags" >&5 -echo $ECHO_N "checking for chflags... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking for chflags" >&5 +$as_echo_n "checking for chflags... " >&6; } +if test "${ac_cv_have_chflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_chflags=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17238,50 +18578,57 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHFLAGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ac_cv_have_chflags=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +ac_cv_have_chflags=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5 +$as_echo "$ac_cv_have_chflags" >&6; } +if test $ac_cv_have_chflags = yes +then +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHFLAGS 1 +_ACEOF -{ echo "$as_me:$LINENO: checking for lchflags" >&5 -echo $ECHO_N "checking for lchflags... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +fi + +{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5 +$as_echo_n "checking for lchflags... " >&6; } +if test "${ac_cv_have_lchflags+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_lchflags=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17306,42 +18653,50 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LCHFLAGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ac_cv_have_lchflags=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - +ac_cv_have_lchflags=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5 +$as_echo "$ac_cv_have_lchflags" >&6; } +if test $ac_cv_have_lchflags = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LCHFLAGS 1 +_ACEOF + +fi + case $ac_sys_system/$ac_sys_release in Darwin/*) _CUR_CFLAGS="${CFLAGS}" @@ -17351,10 +18706,10 @@ ;; esac -{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5 -echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5 +$as_echo_n "checking for inflateCopy in -lz... " >&6; } if test "${ac_cv_lib_z_inflateCopy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -17386,33 +18741,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_z_inflateCopy=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_inflateCopy=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_z_inflateCopy = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5 +$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } +if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ZLIB_COPY 1 @@ -17428,8 +18787,8 @@ ;; esac -{ echo "$as_me:$LINENO: checking for hstrerror" >&5 -echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5 +$as_echo_n "checking for hstrerror... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17454,39 +18813,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5 +$as_echo_n "checking for inet_aton... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17514,39 +18877,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5 +$as_echo_n "checking for inet_pton... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17574,13 +18941,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17590,22 +18958,22 @@ #define HAVE_INET_PTON 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5 +$as_echo_n "checking for setgroups... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17633,13 +19001,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17649,14 +19018,14 @@ #define HAVE_SETGROUPS 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17667,11 +19036,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17724,42 +19093,49 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_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; } + { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 +$as_echo_n "checking for openpty in -lutil... " >&6; } if test "${ac_cv_lib_util_openpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" @@ -17791,42 +19167,46 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_util_openpty=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_openpty=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_util_openpty = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 +$as_echo "$ac_cv_lib_util_openpty" >&6; } +if test "x$ac_cv_lib_util_openpty" = x""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; } + { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5 +$as_echo_n "checking for openpty in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_openpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -17858,33 +19238,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_bsd_openpty=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_openpty=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_bsd_openpty = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5 +$as_echo "$ac_cv_lib_bsd_openpty" >&6; } +if test "x$ac_cv_lib_bsd_openpty" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OPENPTY 1 _ACEOF @@ -17901,11 +19285,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17958,42 +19342,49 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_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; } + { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5 +$as_echo_n "checking for forkpty in -lutil... " >&6; } if test "${ac_cv_lib_util_forkpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" @@ -18025,42 +19416,46 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_util_forkpty=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_forkpty=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_util_forkpty = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5 +$as_echo "$ac_cv_lib_util_forkpty" >&6; } +if test "x$ac_cv_lib_util_forkpty" = x""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; } + { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5 +$as_echo_n "checking for forkpty in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_forkpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -18092,33 +19487,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_bsd_forkpty=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_forkpty=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_bsd_forkpty = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5 +$as_echo "$ac_cv_lib_bsd_forkpty" >&6; } +if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FORKPTY 1 _ACEOF @@ -18137,11 +19536,11 @@ for ac_func in 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18194,35 +19593,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -18238,11 +19644,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18295,35 +19701,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -18335,11 +19748,11 @@ for ac_func in dup2 getcwd strdup 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18392,35 +19805,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else @@ -18437,11 +19857,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18494,35 +19914,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18545,13 +19972,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18563,7 +19991,7 @@ else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -18577,11 +20005,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18634,35 +20062,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18685,13 +20120,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18703,7 +20139,7 @@ else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -18717,11 +20153,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18774,35 +20210,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18825,20 +20268,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -18855,8 +20299,8 @@ done -{ echo "$as_me:$LINENO: checking for major" >&5 -echo $ECHO_N "checking for major... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for major" >&5 +$as_echo_n "checking for major... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18888,44 +20332,48 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +$as_echo_n "checking for getaddrinfo... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18941,9 +20389,7 @@ int main () { - getaddrinfo(NULL, NULL, NULL, NULL); - ; return 0; } @@ -18954,27 +20400,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + have_getaddrinfo=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ 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; } -buggygetaddrinfo=yes + have_getaddrinfo=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 +$as_echo "$have_getaddrinfo" >&6; } +if test $have_getaddrinfo = yes +then + { $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 +$as_echo_n "checking getaddrinfo bug... " >&6; } + if test "${ac_cv_buggy_getaddrinfo+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_buggy_getaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18989,7 +20451,7 @@ #include #include -main() +int main() { int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; @@ -19061,12 +20523,12 @@ if (aitop) freeaddrinfo(aitop); - exit(0); + return 0; bad: if (aitop) freeaddrinfo(aitop); - exit(1); + return 1; } _ACEOF @@ -19076,53 +20538,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: good" >&5 -echo "${ECHO_T}good" >&6; } -buggygetaddrinfo=no + ac_cv_buggy_getaddrinfo=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: buggy" >&5 -echo "${ECHO_T}buggy" >&6; } -buggygetaddrinfo=yes +ac_cv_buggy_getaddrinfo=yes fi +rm -rf conftest.dSYM 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; } -buggygetaddrinfo=yes - fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +fi -if test "$buggygetaddrinfo" = "yes"; then - if test "$ipv6" = "yes"; then +if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes +then + if test $ipv6 = yes + then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 @@ -19137,11 +20590,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19194,35 +20647,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -19230,10 +20690,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19260,20 +20720,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_time=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no @@ -19281,8 +20742,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -19291,10 +20752,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test "${ac_cv_struct_tm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19310,7 +20771,7 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + return !p; ; return 0; } @@ -19321,20 +20782,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_struct_tm=time.h else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h @@ -19342,8 +20804,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -19352,10 +20814,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +$as_echo_n "checking for struct tm.tm_zone... " >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19383,20 +20845,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_tm_tm_zone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -19425,20 +20888,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_tm_tm_zone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no @@ -19449,9 +20913,9 @@ 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; } -if test $ac_cv_member_struct_tm_tm_zone = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -19467,10 +20931,10 @@ _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +$as_echo_n "checking whether tzname is declared... " >&6; } if test "${ac_cv_have_decl_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19497,20 +20961,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no @@ -19518,9 +20983,9 @@ 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +$as_echo "$ac_cv_have_decl_tzname" >&6; } +if test "x$ac_cv_have_decl_tzname" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TZNAME 1 @@ -19536,10 +21001,10 @@ fi - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19566,31 +21031,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_var_tzname=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -19600,10 +21069,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 +$as_echo_n "checking for struct stat.st_rdev... " >&6; } if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19628,20 +21097,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_rdev=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -19667,20 +21137,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_rdev=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_rdev=no @@ -19691,9 +21162,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_rdev = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 +$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; } +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_RDEV 1 @@ -19702,10 +21173,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +$as_echo_n "checking for struct stat.st_blksize... " >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19730,20 +21201,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_blksize=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -19769,20 +21241,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_blksize=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blksize=no @@ -19793,9 +21266,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_blksize = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } +if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -19804,10 +21277,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 -echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 +$as_echo_n "checking for struct stat.st_flags... " >&6; } if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19832,20 +21305,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_flags=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -19871,20 +21345,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_flags=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_flags=no @@ -19895,9 +21370,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_flags = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5 +$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; } +if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_FLAGS 1 @@ -19906,10 +21381,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 -echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 +$as_echo_n "checking for struct stat.st_gen... " >&6; } if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19934,20 +21409,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_gen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -19973,20 +21449,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_gen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_gen=no @@ -19997,9 +21474,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_gen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5 +$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; } +if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_GEN 1 @@ -20008,10 +21485,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5 -echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5 +$as_echo_n "checking for struct stat.st_birthtime... " >&6; } if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20036,20 +21513,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_birthtime=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20075,20 +21553,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_birthtime=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_birthtime=no @@ -20099,9 +21578,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_birthtime = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5 +$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; } +if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 @@ -20110,10 +21589,10 @@ fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +$as_echo_n "checking for struct stat.st_blocks... " >&6; } if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20138,20 +21617,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_blocks=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20177,20 +21657,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_stat_st_blocks=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blocks=no @@ -20201,9 +21682,9 @@ 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; } -if test $ac_cv_member_struct_stat_st_blocks = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; } +if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -20225,10 +21706,10 @@ -{ 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; } +{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5 +$as_echo_n "checking for time.h that defines altzone... " >&6; } if test "${ac_cv_header_time_altzone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20251,20 +21732,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_time_altzone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time_altzone=no @@ -20273,8 +21755,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5 +$as_echo "$ac_cv_header_time_altzone" >&6; } if test $ac_cv_header_time_altzone = yes; then cat >>confdefs.h <<\_ACEOF @@ -20284,8 +21766,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; } +{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20311,13 +21793,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -20331,20 +21814,20 @@ was_it_defined=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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; } +{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5 +$as_echo "$was_it_defined" >&6; } -{ echo "$as_me:$LINENO: checking for addrinfo" >&5 -echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5 +$as_echo_n "checking for addrinfo... " >&6; } if test "${ac_cv_struct_addrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20368,20 +21851,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_struct_addrinfo=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_addrinfo=no @@ -20390,8 +21874,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5 +$as_echo "$ac_cv_struct_addrinfo" >&6; } if test $ac_cv_struct_addrinfo = yes; then cat >>confdefs.h <<\_ACEOF @@ -20400,10 +21884,10 @@ fi -{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 -echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 +$as_echo_n "checking for sockaddr_storage... " >&6; } if test "${ac_cv_struct_sockaddr_storage+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20428,20 +21912,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_struct_sockaddr_storage=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_sockaddr_storage=no @@ -20450,8 +21935,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5 +$as_echo "$ac_cv_struct_sockaddr_storage" >&6; } if test $ac_cv_struct_sockaddr_storage = yes; then cat >>confdefs.h <<\_ACEOF @@ -20463,10 +21948,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20491,20 +21976,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_c_char_unsigned=no else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_char_unsigned=yes @@ -20512,8 +21998,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$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 @@ -20521,10 +22007,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20596,20 +22082,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_c_const=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no @@ -20617,20 +22104,20 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF -#define const +#define const /**/ _ACEOF fi works=no -{ echo "$as_me:$LINENO: checking for working volatile" >&5 -echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5 +$as_echo_n "checking for working volatile... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20652,37 +22139,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 works=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF -#define volatile +#define volatile /**/ _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6; } +{ $as_echo "$as_me:$LINENO: result: $works" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5 +$as_echo_n "checking for working signed char... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20704,37 +22192,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 works=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF -#define signed +#define signed /**/ _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6; } +{ $as_echo "$as_me:$LINENO: result: $works" >&5 +$as_echo "$works" >&6; } have_prototypes=no -{ echo "$as_me:$LINENO: checking for prototypes" >&5 -echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5 +$as_echo_n "checking for prototypes... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20756,13 +22245,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -20776,19 +22266,19 @@ have_prototypes=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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; } +{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5 +$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20820,13 +22310,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -20840,19 +22331,19 @@ works=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6; } +{ $as_echo "$as_me:$LINENO: result: $works" >&5 +$as_echo "$works" >&6; } # check for socketpair -{ echo "$as_me:$LINENO: checking for socketpair" >&5 -echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5 +$as_echo_n "checking for socketpair... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20877,13 +22368,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -20893,22 +22385,22 @@ #define HAVE_SOCKETPAIR 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5 +$as_echo_n "checking if sockaddr has sa_len member... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20932,37 +22424,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5 +$as_echo_n "checking whether va_list is an array... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20990,20 +22483,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -21017,17 +22511,17 @@ fi 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; } +{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +$as_echo_n "checking for gethostbyname_r... " >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21080,39 +22574,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_gethostbyname_r=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname_r=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_func_gethostbyname_r = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +$as_echo "$ac_cv_func_gethostbyname_r" >&6; } +if test "x$ac_cv_func_gethostbyname_r" = x""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; } + { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5 +$as_echo_n "checking gethostbyname_r with 6 args... " >&6; } OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" cat >conftest.$ac_ext <<_ACEOF @@ -21146,13 +22644,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21167,18 +22666,18 @@ #define HAVE_GETHOSTBYNAME_R_6_ARG 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5 +$as_echo_n "checking gethostbyname_r with 5 args... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21210,13 +22709,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21231,18 +22731,18 @@ #define HAVE_GETHOSTBYNAME_R_5_ARG 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5 +$as_echo_n "checking gethostbyname_r with 3 args... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21272,13 +22772,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21293,16 +22794,16 @@ #define HAVE_GETHOSTBYNAME_R_3_ARG 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -21322,11 +22823,11 @@ 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21379,35 +22880,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -21426,10 +22934,10 @@ # (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; } +{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5 +$as_echo_n "checking for __fpu_control... " >&6; } if test "${ac_cv_func___fpu_control+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21482,39 +22990,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func___fpu_control=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func___fpu_control=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_func___fpu_control = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5 +$as_echo "$ac_cv_func___fpu_control" >&6; } +if test "x$ac_cv_func___fpu_control" = x""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; } +{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5 +$as_echo_n "checking for __fpu_control in -lieee... " >&6; } if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" @@ -21546,33 +23058,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ieee___fpu_control=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ieee___fpu_control=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_ieee___fpu_control = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5 +$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } +if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBIEEE 1 _ACEOF @@ -21586,8 +23102,8 @@ # Check for --with-fpectl -{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5 -echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5 +$as_echo_n "checking for --with-fpectl... " >&6; } # Check whether --with-fpectl was given. if test "${with_fpectl+set}" = set; then @@ -21599,14 +23115,14 @@ #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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -21616,53 +23132,53 @@ Darwin) ;; *) LIBM=-lm esac -{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5 -echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5 +$as_echo_n "checking for --with-libm=STRING... " >&6; } # Check whether --with-libm was given. if test "${with_libm+set}" = set; then 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; } + { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5 +$as_echo "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; } -else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5 -echo "$as_me: error: proper usage is --with-libm=STRING" >&2;} + { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5 +$as_echo "set LIBM=\"$withval\"" >&6; } +else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5 +$as_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; } + { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5 +$as_echo "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; } +{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5 +$as_echo_n "checking for --with-libc=STRING... " >&6; } # Check whether --with-libc was given. if test "${with_libc+set}" = set; then 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; } + { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5 +$as_echo "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; } -else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5 -echo "$as_me: error: proper usage is --with-libc=STRING" >&2;} + { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5 +$as_echo "set LIBC=\"$withval\"" >&6; } +else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5 +$as_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; } + { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5 +$as_echo "default LIBC=\"$LIBC\"" >&6; } fi @@ -21670,10 +23186,10 @@ # * Check for various properties of floating point * # ************************************************** -{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5 -echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5 +$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; } if test "${ac_cv_little_endian_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -21702,37 +23218,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_little_endian_double=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_little_endian_double=no fi +rm -rf conftest.dSYM 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_little_endian_double" >&5 -echo "${ECHO_T}$ac_cv_little_endian_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5 +$as_echo "$ac_cv_little_endian_double" >&6; } if test "$ac_cv_little_endian_double" = yes then @@ -21742,10 +23261,10 @@ fi -{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5 -echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5 +$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; } if test "${ac_cv_big_endian_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -21774,37 +23293,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_big_endian_double=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_big_endian_double=no fi +rm -rf conftest.dSYM 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_big_endian_double" >&5 -echo "${ECHO_T}$ac_cv_big_endian_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5 +$as_echo "$ac_cv_big_endian_double" >&6; } if test "$ac_cv_big_endian_double" = yes then @@ -21818,10 +23340,10 @@ # While Python doesn't currently have full support for these platforms # (see e.g., issue 1762561), we can at least make sure that float <-> string # conversions work. -{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5 -echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5 +$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; } if test "${ac_cv_mixed_endian_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -21850,37 +23372,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_mixed_endian_double=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_mixed_endian_double=no fi +rm -rf conftest.dSYM 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_mixed_endian_double" >&5 -echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5 +$as_echo "$ac_cv_mixed_endian_double" >&6; } if test "$ac_cv_mixed_endian_double" = yes then @@ -21900,8 +23425,8 @@ then # Check that it's okay to use gcc inline assembler to get and set # x87 control word. It should be, but you never know... - { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 -echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 +$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21927,28 +23452,29 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 have_gcc_asm_for_x87=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_gcc_asm_for_x87=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5 -echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; } + { $as_echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5 +$as_echo "$have_gcc_asm_for_x87" >&6; } if test "$have_gcc_asm_for_x87" = yes then @@ -21964,8 +23490,8 @@ # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding # mode is round-to-nearest and double rounding issues are present, and # 0 otherwise. See http://bugs.python.org/issue2937 for more info. -{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5 -echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5 +$as_echo_n "checking for x87-style double rounding... " >&6; } # $BASECFLAGS may affect the result ac_save_cc="$CC" CC="$CC $BASECFLAGS" @@ -22005,36 +23531,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_x87_double_rounding=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_x87_double_rounding=yes fi +rm -rf conftest.dSYM 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_x87_double_rounding" >&5 -echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5 +$as_echo "$ac_cv_x87_double_rounding" >&6; } if test "$ac_cv_x87_double_rounding" = yes then @@ -22053,10 +23582,10 @@ # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of # -0. on some architectures. -{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5 -echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5 +$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; } if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -22087,37 +23616,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_tanh_preserves_zero_sign=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_tanh_preserves_zero_sign=no fi +rm -rf conftest.dSYM 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_tanh_preserves_zero_sign" >&5 -echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5 +$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; } if test "$ac_cv_tanh_preserves_zero_sign" = yes then @@ -22138,11 +23670,11 @@ for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round 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; } +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22195,44 +23727,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -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 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5 -echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5 +$as_echo_n "checking whether isinf is declared... " >&6; } if test "${ac_cv_have_decl_isinf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22259,20 +23798,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_isinf=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isinf=no @@ -22280,9 +23820,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5 -echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; } -if test $ac_cv_have_decl_isinf = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5 +$as_echo "$ac_cv_have_decl_isinf" >&6; } +if test "x$ac_cv_have_decl_isinf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISINF 1 @@ -22296,10 +23836,10 @@ fi -{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5 -echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5 +$as_echo_n "checking whether isnan is declared... " >&6; } if test "${ac_cv_have_decl_isnan+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22326,20 +23866,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_isnan=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isnan=no @@ -22347,9 +23888,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5 -echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; } -if test $ac_cv_have_decl_isnan = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5 +$as_echo "$ac_cv_have_decl_isnan" >&6; } +if test "x$ac_cv_have_decl_isnan" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISNAN 1 @@ -22363,10 +23904,10 @@ fi -{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5 -echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5 +$as_echo_n "checking whether isfinite is declared... " >&6; } if test "${ac_cv_have_decl_isfinite+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22393,20 +23934,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_isfinite=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isfinite=no @@ -22414,9 +23956,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5 -echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; } -if test $ac_cv_have_decl_isfinite = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5 +$as_echo "$ac_cv_have_decl_isfinite" >&6; } +if test "x$ac_cv_have_decl_isfinite" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISFINITE 1 @@ -22436,14 +23978,13 @@ LIBS=$LIBS_SAVE # Multiprocessing check for broken sem_getvalue -{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 -echo $ECHO_N "checking for broken sem_getvalue... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 +$as_echo_n "checking for broken sem_getvalue... " >&6; } +if test "${ac_cv_broken_sem_getvalue+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_broken_sem_getvalue=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22472,7 +24013,6 @@ return res==-1 ? 1 : 0; } - _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -22480,45 +24020,53 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + ac_cv_broken_sem_getvalue=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +ac_cv_broken_sem_getvalue=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_BROKEN_SEM_GETVALUE 1 -_ACEOF fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5 +$as_echo "$ac_cv_broken_sem_getvalue" >&6; } +if test $ac_cv_broken_sem_getvalue = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BROKEN_SEM_GETVALUE 1 +_ACEOF +fi # determine what size digit to use for Python's longs -{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 -echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 +$as_echo_n "checking digit size for Python's longs... " >&6; } # Check whether --enable-big-digits was given. if test "${enable_big_digits+set}" = set; then enableval=$enable_big_digits; case $enable_big_digits in @@ -22529,12 +24077,12 @@ 15|30) ;; *) - { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5 -echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;} + { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5 +$as_echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;} { (exit 1); exit 1; }; } ;; esac -{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5 -echo "${ECHO_T}$enable_big_digits" >&6; } +{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5 +$as_echo "$enable_big_digits" >&6; } cat >>confdefs.h <<_ACEOF #define PYLONG_BITS_IN_DIGIT $enable_big_digits @@ -22542,24 +24090,24 @@ else - { echo "$as_me:$LINENO: result: no value specified" >&5 -echo "${ECHO_T}no value specified" >&6; } + { $as_echo "$as_me:$LINENO: result: no value specified" >&5 +$as_echo "no value specified" >&6; } fi # 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; } + { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5 +$as_echo_n "checking for wchar.h... " >&6; } if test "${ac_cv_header_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5 +$as_echo_n "checking wchar.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22575,32 +24123,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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; } +{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5 +$as_echo_n "checking wchar.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22614,51 +24163,52 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 -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;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -22667,18 +24217,18 @@ ) | 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; } +{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5 +$as_echo_n "checking for wchar.h... " >&6; } if test "${ac_cv_header_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 +$as_echo "$ac_cv_header_wchar_h" >&6; } fi -if test $ac_cv_header_wchar_h = yes; then +if test "x$ac_cv_header_wchar_h" = x""yes; then cat >>confdefs.h <<\_ACEOF @@ -22697,69 +24247,14 @@ # 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; } -if test "${ac_cv_type_wchar_t+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 - -typedef wchar_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - 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_type_wchar_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_wchar_t=no -fi - -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; } - -# The cast to long int works around a bug in the HP C Compiler + # 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; } +{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5 +$as_echo_n "checking size of wchar_t... " >&6; } if test "${ac_cv_sizeof_wchar_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -22771,11 +24266,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)]; test_array [0] = 0 ; @@ -22788,13 +24282,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22809,11 +24304,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -22826,20 +24320,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -22853,7 +24348,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -22864,11 +24359,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)]; test_array [0] = 0 ; @@ -22881,13 +24375,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22902,11 +24397,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -22919,20 +24413,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -22946,7 +24441,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -22967,11 +24462,10 @@ /* end confdefs.h. */ #include - typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -22984,20 +24478,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -23008,11 +24503,13 @@ case $ac_lo in ?*) ac_cv_sizeof_wchar_t=$ac_lo;; '') if test "$ac_cv_type_wchar_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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) +$as_echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_wchar_t=0 fi ;; @@ -23026,9 +24523,8 @@ /* end confdefs.h. */ #include - 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_)); } +static long int longval () { return (long int) (sizeof (wchar_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); } #include #include int @@ -23038,20 +24534,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (wchar_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (wchar_t)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (wchar_t)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -23064,43 +24562,48 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_wchar_t=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_wchar_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_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) +$as_echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_wchar_t=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5 +$as_echo "$ac_cv_sizeof_wchar_t" >&6; } @@ -23111,8 +24614,8 @@ fi -{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 -echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 +$as_echo_n "checking for UCS-4 tcl... " >&6; } have_ucs4_tcl=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23139,13 +24642,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -23159,24 +24663,24 @@ have_ucs4_tcl=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi 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; } +{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5 +$as_echo "$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; } + { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5 +$as_echo_n "checking whether wchar_t is signed... " >&6; } if test "${ac_cv_wchar_t_signed+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -23203,41 +24707,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_wchar_t_signed=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_wchar_t_signed=no fi +rm -rf conftest.dSYM 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; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5 +$as_echo "$ac_cv_wchar_t_signed" >&6; } fi -{ echo "$as_me:$LINENO: checking what type to use for str" >&5 -echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking what type to use for str" >&5 +$as_echo_n "checking what type to use for str... " >&6; } # Check whether --with-wide-unicode was given. if test "${with_wide_unicode+set}" = set; then @@ -23304,32 +24811,178 @@ else PY_UNICODE_TYPE="no type found" fi -{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 -echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; } +{ $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 +$as_echo "$PY_UNICODE_TYPE" >&6; } # 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; } + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +#include int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) - bogus endian macros -#endif +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif ; return 0; @@ -23341,33 +24994,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +#include int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif +#ifndef _BIG_ENDIAN + not big endian + #endif ; return 0; @@ -23379,20 +25032,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_c_bigendian=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no @@ -23400,29 +25054,44 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # 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 - cat >conftest.$ac_ext <<_ACEOF + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -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 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; } +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + int main () { - _ascii (); _ebcdic (); +return use_ascii (foo) == use_ebcdic (foo); ; return 0; } @@ -23433,30 +25102,31 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -23475,14 +25145,14 @@ main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; ; return 0; @@ -23494,63 +25164,70 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi - -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; } -case $ac_cv_c_bigendian in - yes) +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF +;; #( + no) + ;; #( + universal) cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 +#define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; -esac + esac # 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; } +{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5 +$as_echo_n "checking whether right shift extends the sign bit... " >&6; } if test "${ac_cv_rshift_extends_sign+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -23575,37 +25252,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_rshift_extends_sign=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_rshift_extends_sign=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5 +$as_echo "$ac_cv_rshift_extends_sign" >&6; } if test "$ac_cv_rshift_extends_sign" = no then @@ -23616,10 +25296,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5 +$as_echo_n "checking for getc_unlocked() and friends... " >&6; } if test "${ac_cv_have_getc_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -23648,32 +25328,36 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_have_getc_unlocked=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_getc_unlocked=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5 +$as_echo "$ac_cv_have_getc_unlocked" >&6; } if test "$ac_cv_have_getc_unlocked" = yes then @@ -23691,8 +25375,8 @@ # library. NOTE: Keep the precedence of listed libraries synchronised # with setup.py. py_cv_lib_readline=no -{ echo "$as_me:$LINENO: checking how to link readline libs" >&5 -echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5 +$as_echo_n "checking how to link readline libs... " >&6; } for py_libtermcap in "" ncursesw ncurses curses termcap; do if test -z "$py_libtermcap"; then READLINE_LIBS="-lreadline" @@ -23728,26 +25412,30 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then py_cv_lib_readline=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test $py_cv_lib_readline = yes; then @@ -23757,11 +25445,11 @@ # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts #AC_SUBST([READLINE_LIBS]) if test $py_cv_lib_readline = no; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } else - { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5 -echo "${ECHO_T}$READLINE_LIBS" >&6; } + { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5 +$as_echo "$READLINE_LIBS" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 @@ -23770,10 +25458,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5 +$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; } if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -23805,33 +25493,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_readline_rl_callback_handler_install=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_callback_handler_install=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 +$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; } +if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_CALLBACK 1 @@ -23854,20 +25546,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_readline=no @@ -23898,10 +25591,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5 +$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; } if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -23933,33 +25626,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_readline_rl_pre_input_hook=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_pre_input_hook=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5 +$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; } +if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_PRE_INPUT_HOOK 1 @@ -23969,10 +25666,10 @@ # also in 4.0 -{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5 -echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5 +$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; } if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -24004,33 +25701,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_readline_rl_completion_display_matches_hook=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_completion_display_matches_hook=no fi +rm -rf conftest.dSYM 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_display_matches_hook" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } -if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5 +$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } +if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1 @@ -24040,10 +25741,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5 +$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; } if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -24075,33 +25776,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_readline_rl_completion_matches=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_completion_matches=no fi +rm -rf conftest.dSYM 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; } -if test $ac_cv_lib_readline_rl_completion_matches = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5 +$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; } +if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_COMPLETION_MATCHES 1 @@ -24124,20 +25829,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_readline=no @@ -24170,10 +25876,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5 +$as_echo_n "checking for broken nice()... " >&6; } if test "${ac_cv_broken_nice+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -24201,37 +25907,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_nice=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_nice=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5 +$as_echo "$ac_cv_broken_nice" >&6; } if test "$ac_cv_broken_nice" = yes then @@ -24241,9 +25950,12 @@ fi -{ 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 +{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5 +$as_echo_n "checking for broken poll()... " >&6; } +if test "${ac_cv_broken_poll+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then ac_cv_broken_poll=no else cat >conftest.$ac_ext <<_ACEOF @@ -24255,27 +25967,21 @@ #include -int main (void) - { +int main() +{ struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; + int poll_test; close (42); - int poll_test = poll (&poll_struct, 1, 0); - + poll_test = poll(&poll_struct, 1, 0); if (poll_test < 0) - { - exit(0); - } + return 0; else if (poll_test == 0 && poll_struct.revents != POLLNVAL) - { - exit(0); - } + return 0; else - { - exit(1); - } - } + return 1; +} _ACEOF rm -f conftest$ac_exeext @@ -24284,35 +25990,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_poll=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_poll=no fi +rm -rf conftest.dSYM 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; } +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5 +$as_echo "$ac_cv_broken_poll" >&6; } if test "$ac_cv_broken_poll" = yes then @@ -24325,10 +26036,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +$as_echo_n "checking for struct tm.tm_zone... " >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24356,20 +26067,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_tm_tm_zone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -24398,20 +26110,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_member_struct_tm_tm_zone=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no @@ -24422,9 +26135,9 @@ 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; } -if test $ac_cv_member_struct_tm_tm_zone = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -24440,10 +26153,10 @@ _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +$as_echo_n "checking whether tzname is declared... " >&6; } if test "${ac_cv_have_decl_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24470,20 +26183,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no @@ -24491,9 +26205,9 @@ 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +$as_echo "$ac_cv_have_decl_tzname" >&6; } +if test "x$ac_cv_have_decl_tzname" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TZNAME 1 @@ -24509,10 +26223,10 @@ fi - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24539,31 +26253,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_var_tzname=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -24575,10 +26293,10 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5 +$as_echo_n "checking for working tzset()... " >&6; } if test "${ac_cv_working_tzset+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -24661,37 +26379,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_tzset=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_working_tzset=no fi +rm -rf conftest.dSYM 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5 +$as_echo "$ac_cv_working_tzset" >&6; } if test "$ac_cv_working_tzset" = yes then @@ -24702,10 +26423,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5 +$as_echo_n "checking for tv_nsec in struct stat... " >&6; } if test "${ac_cv_stat_tv_nsec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24731,20 +26452,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_stat_tv_nsec=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_stat_tv_nsec=no @@ -24753,8 +26475,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5 +$as_echo "$ac_cv_stat_tv_nsec" >&6; } if test "$ac_cv_stat_tv_nsec" = yes then @@ -24765,10 +26487,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5 +$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; } if test "${ac_cv_stat_tv_nsec2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24794,20 +26516,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_stat_tv_nsec2=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_stat_tv_nsec2=no @@ -24816,8 +26539,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5 +$as_echo "$ac_cv_stat_tv_nsec2" >&6; } if test "$ac_cv_stat_tv_nsec2" = yes then @@ -24828,10 +26551,10 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5 +$as_echo_n "checking whether mvwdelch is an expression... " >&6; } if test "${ac_cv_mvwdelch_is_expression+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24857,20 +26580,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_mvwdelch_is_expression=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_mvwdelch_is_expression=no @@ -24879,8 +26603,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5 +$as_echo "$ac_cv_mvwdelch_is_expression" >&6; } if test "$ac_cv_mvwdelch_is_expression" = yes then @@ -24891,10 +26615,10 @@ fi -{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5 -echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5 +$as_echo_n "checking whether WINDOW has _flags... " >&6; } if test "${ac_cv_window_has_flags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24920,20 +26644,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_window_has_flags=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_window_has_flags=no @@ -24942,8 +26667,8 @@ 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; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5 +$as_echo "$ac_cv_window_has_flags" >&6; } if test "$ac_cv_window_has_flags" = yes @@ -24955,8 +26680,8 @@ fi -{ echo "$as_me:$LINENO: checking for is_term_resized" >&5 -echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5 +$as_echo_n "checking for is_term_resized... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24978,13 +26703,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -24994,21 +26720,21 @@ #define HAVE_CURSES_IS_TERM_RESIZED 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5 +$as_echo_n "checking for resize_term... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25030,13 +26756,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -25046,21 +26773,21 @@ #define HAVE_CURSES_RESIZE_TERM 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5 +$as_echo_n "checking for resizeterm... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25082,13 +26809,14 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -25098,61 +26826,60 @@ #define HAVE_CURSES_RESIZETERM 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi 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; } +{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5 +$as_echo_n "checking for /dev/ptmx... " >&6; } if test -r /dev/ptmx then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5 -echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5 +$as_echo_n "checking for /dev/ptc... " >&6; } if test -r /dev/ptc then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "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; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } -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; }; } +{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 +$as_echo_n "checking for %zd printf() format support... " >&6; } +if test "${ac_cv_have_size_t_format+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_size_t_format=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25160,6 +26887,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include #include @@ -25194,6 +26922,7 @@ return 0; } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -25201,47 +26930,57 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define PY_FORMAT_SIZE_T "z" -_ACEOF - + ac_cv_have_size_t_format=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +ac_cv_have_size_t_format=no fi +rm -rf conftest.dSYM 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; } +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5 +$as_echo "$ac_cv_have_size_t_format" >&6; } +if test $ac_cv_have_size_t_format = yes +then + +cat >>confdefs.h <<\_ACEOF +#define PY_FORMAT_SIZE_T "z" +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 +$as_echo_n "checking for socklen_t... " >&6; } if test "${ac_cv_type_socklen_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_socklen_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -25256,14 +26995,53 @@ #endif -typedef socklen_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) +if (sizeof (socklen_t)) + return 0; + ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + + +int +main () +{ +if (sizeof ((socklen_t))) + return 0; ; return 0; } @@ -25274,30 +27052,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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_type_socklen_t=yes + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_socklen_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_socklen_t=no + fi 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; } -if test $ac_cv_type_socklen_t = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +$as_echo "$ac_cv_type_socklen_t" >&6; } +if test "x$ac_cv_type_socklen_t" = x""yes; then : else @@ -25308,9 +27095,12 @@ fi -{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 -echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then +{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 +$as_echo_n "checking for broken mbstowcs... " >&6; } +if test "${ac_cv_broken_mbstowcs+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then ac_cv_broken_mbstowcs=no else cat >conftest.$ac_ext <<_ACEOF @@ -25335,35 +27125,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_mbstowcs=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_mbstowcs=yes fi +rm -rf conftest.dSYM 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_mbstowcs" >&5 -echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; } +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5 +$as_echo "$ac_cv_broken_mbstowcs" >&6; } if test "$ac_cv_broken_mbstowcs" = yes then @@ -25374,8 +27169,8 @@ fi # Check for --with-computed-gotos -{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5 -echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5 +$as_echo_n "checking for --with-computed-gotos... " >&6; } # Check whether --with-computed-gotos was given. if test "${with_computed_gotos+set}" = set; then @@ -25387,14 +27182,14 @@ #define USE_COMPUTED_GOTOS 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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -25408,15 +27203,15 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for build directories" >&5 +$as_echo_n "checking for build directories... " >&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; } +{ $as_echo "$as_me:$LINENO: result: done" >&5 +$as_echo "done" >&6; } # generate output files ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc" @@ -25448,11 +27243,12 @@ 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;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -25485,12 +27281,12 @@ 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;} + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -25506,7 +27302,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_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" @@ -25518,12 +27314,14 @@ + : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -25536,7 +27334,7 @@ SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -25546,7 +27344,7 @@ 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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -25568,17 +27366,45 @@ 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=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -25594,8 +27420,6 @@ # 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. @@ -25618,7 +27442,7 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -25631,17 +27455,10 @@ PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - 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) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -25663,7 +27480,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -25714,7 +27531,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_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 @@ -25742,7 +27559,6 @@ *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -25755,19 +27571,22 @@ rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - 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 || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + 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' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -25792,10 +27611,10 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -25818,7 +27637,7 @@ # values after options handling. ac_log=" This file was extended by python $as_me 3.2, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -25831,29 +27650,39 @@ _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -25864,24 +27693,24 @@ Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ python config.status 3.2 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -25903,30 +27732,36 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 + { $as_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 ;; + $as_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: error: unrecognized option: $1 + -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -25945,30 +27780,32 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -25983,8 +27820,8 @@ "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;; "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done @@ -26024,224 +27861,144 @@ (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# -# 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 +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF +ac_cr=`echo X | tr X '\015'` +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` 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 -ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim -PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim -PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$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 -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 -GNULD!$GNULD$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -ARFLAGS!$ARFLAGS$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 -UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$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 -_ACEOF + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; 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;} + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_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 +rm -f conf$$subs.sh -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 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + print line +} -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHLIBS!$SHLIBS$ac_delim -USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim -SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim -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 -THREADHEADERS!$THREADHEADERS$ac_delim -SRCDIRS!$SRCDIRS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACAWK _ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; 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;} +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&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 @@ -26257,19 +28014,133 @@ }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # 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. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag 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;} + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; @@ -26298,26 +28169,38 @@ [\\/$]*) 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;} + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" done # 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." + configure_input='Generated from '` + $as_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;} + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; esac @@ -26327,7 +28210,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -26353,7 +28236,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -26362,7 +28245,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -26383,17 +28266,17 @@ test -d "$as_dir" && break done 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;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_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/ ;; @@ -26433,12 +28316,13 @@ esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -26447,13 +28331,14 @@ /@infodir@/p /@localedir@/p /@mandir@/p -' $ac_file_inputs` in +' +case `eval "sed -n \"\$ac_sed_dataroot\" $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;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -26467,15 +28352,16 @@ # 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 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -26485,119 +28371,58 @@ 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 +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } 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' + { $as_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' +$as_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;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; :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=' ,' - -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 - -# 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. -# (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"' - -while : -do - # 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"' "$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 conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; 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;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - rm -f $ac_file - mv "$tmp/config.h" $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - echo "/* $configure_input */" - cat "$ac_result" + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi - rm -f "$tmp/out12" ;; @@ -26611,6 +28436,11 @@ chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -26632,6 +28462,10 @@ # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi echo "creating Modules/Setup" Modified: python/branches/py3k/pyconfig.h.in ============================================================================== --- python/branches/py3k/pyconfig.h.in (original) +++ python/branches/py3k/pyconfig.h.in Fri Jul 17 09:49:53 2009 @@ -5,6 +5,9 @@ #define Py_PYCONFIG_H +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + /* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want support for AIX C++ shared extension modules. */ #undef AIX_GENUINE_CPLUSPLUS @@ -946,13 +949,13 @@ /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The number of bytes in an off_t. */ +/* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* The size of `pid_t', as computed by sizeof. */ #undef SIZEOF_PID_T -/* The number of bytes in a pthread_t. */ +/* The size of `pthread_t', as computed by sizeof. */ #undef SIZEOF_PTHREAD_T /* The size of `short', as computed by sizeof. */ @@ -961,7 +964,7 @@ /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* The number of bytes in a time_t. */ +/* The size of `time_t', as computed by sizeof. */ #undef SIZEOF_TIME_T /* The size of `uintptr_t', as computed by sizeof. */ @@ -995,6 +998,28 @@ /* Define if you want to use computed gotos in ceval.c. */ #undef USE_COMPUTED_GOTOS +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Define if a va_list is an array of some kind */ #undef VA_LIST_IS_ARRAY @@ -1032,20 +1057,21 @@ /* Define to profile with the Pentium timestamp counter */ #undef WITH_TSC -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif /* Define if arithmetic is subject to x87-style double rounding issue */ #undef X87_DOUBLE_ROUNDING -/* Define to 1 if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif - /* Define on OpenBSD to activate all library features */ #undef _BSD_SOURCE @@ -1064,15 +1090,25 @@ /* This must be defined on some systems to enable large file support. */ #undef _LARGEFILE_SOURCE +/* Define to 1 if on MINIX. */ +#undef _MINIX + /* Define on NetBSD to activate all library features */ #undef _NETBSD_SOURCE /* Define _OSF_SOURCE to get the makedev macro. */ #undef _OSF_SOURCE +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + /* Define to activate features from IEEE Stds 1003.1-2001 */ #undef _POSIX_C_SOURCE +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + /* Define if you have POSIX threads, and your system does not define that. */ #undef _POSIX_THREADS @@ -1080,12 +1116,12 @@ #undef _REENTRANT /* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef was allowed, the + , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef was allowed, the + , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT64_T From python-checkins at python.org Fri Jul 17 09:51:38 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 07:51:38 -0000 Subject: [Python-checkins] r74050 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 09:51:38 2009 New Revision: 74050 Log: Blocked revisions 74048 via svnmerge ........ r74048 | alexandre.vassalotti | 2009-07-17 03:46:46 -0400 (Fri, 17 Jul 2009) | 2 lines Regenerate configure script. ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Fri Jul 17 09:51:40 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 07:51:40 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 2.6 Message-ID: The Buildbot has detected a new failure of amd64 gentoo 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%202.6/builds/135 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: hirokazu.yamamoto BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_warnings ====================================================================== ERROR: test_bad_str (test.test_warnings.CWarnTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/test/test_warnings.py", line 350, in test_bad_str with self.assertRaises(ValueError): TypeError: failUnlessRaises() takes at least 3 arguments (2 given) ====================================================================== ERROR: test_bad_str (test.test_warnings.PyWarnTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/test/test_warnings.py", line 350, in test_bad_str with self.assertRaises(ValueError): TypeError: failUnlessRaises() takes at least 3 arguments (2 given) make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 09:54:23 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 07:54:23 -0000 Subject: [Python-checkins] r74051 - python/trunk/Modules/_cursesmodule.c Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 09:54:23 2009 New Revision: 74051 Log: Initialize variables in PyCurses_getsyx() to avoid compiler warnings. Modified: python/trunk/Modules/_cursesmodule.c Modified: python/trunk/Modules/_cursesmodule.c ============================================================================== --- python/trunk/Modules/_cursesmodule.c (original) +++ python/trunk/Modules/_cursesmodule.c Fri Jul 17 09:54:23 2009 @@ -1763,7 +1763,8 @@ static PyObject * PyCurses_getsyx(PyObject *self) { - int x,y; + int x = 0; + int y = 0; PyCursesInitialised From python-checkins at python.org Fri Jul 17 10:09:04 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 08:09:04 -0000 Subject: [Python-checkins] r74052 - python/trunk/Modules/main.c Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 10:09:04 2009 New Revision: 74052 Log: Fix GCC warning about fprintf used without a string literal and without format arguments. Modified: python/trunk/Modules/main.c Modified: python/trunk/Modules/main.c ============================================================================== --- python/trunk/Modules/main.c (original) +++ python/trunk/Modules/main.c Fri Jul 17 10:09:04 2009 @@ -112,9 +112,9 @@ if (exitcode) fprintf(f, "Try `python -h' for more information.\n"); else { - fprintf(f, usage_1); - fprintf(f, usage_2); - fprintf(f, usage_3); + fputs(usage_1, f); + fputs(usage_2, f); + fputs(usage_3, f); fprintf(f, usage_4, DELIM); fprintf(f, usage_5, DELIM, PYTHONHOMEHELP); } From python-checkins at python.org Fri Jul 17 10:29:18 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 08:29:18 -0000 Subject: [Python-checkins] r74053 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 10:29:18 2009 New Revision: 74053 Log: Blocked revisions 74028-74029,74038 via svnmerge ........ r74028 | georg.brandl | 2009-07-16 15:24:48 -0400 (Thu, 16 Jul 2009) | 1 line #6482: simplify "except: raise" to "finally:". ........ r74029 | georg.brandl | 2009-07-16 17:47:51 -0400 (Thu, 16 Jul 2009) | 1 line Revert r74028. ........ r74038 | alexandre.vassalotti | 2009-07-17 02:10:06 -0400 (Fri, 17 Jul 2009) | 3 lines Double-quote the test cases for chflags() and lchflags() to ensure they don't get mangled. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Fri Jul 17 10:31:44 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 08:31:44 -0000 Subject: [Python-checkins] r74054 - in python/branches/py3k: Modules/_cursesmodule.c Modules/main.c Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 10:31:44 2009 New Revision: 74054 Log: Merged revisions 74051-74052 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74051 | alexandre.vassalotti | 2009-07-17 03:54:23 -0400 (Fri, 17 Jul 2009) | 2 lines Initialize variables in PyCurses_getsyx() to avoid compiler warnings. ........ r74052 | alexandre.vassalotti | 2009-07-17 04:09:04 -0400 (Fri, 17 Jul 2009) | 3 lines Fix GCC warning about fprintf used without a string literal and without format arguments. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Modules/_cursesmodule.c python/branches/py3k/Modules/main.c Modified: python/branches/py3k/Modules/_cursesmodule.c ============================================================================== --- python/branches/py3k/Modules/_cursesmodule.c (original) +++ python/branches/py3k/Modules/_cursesmodule.c Fri Jul 17 10:31:44 2009 @@ -1806,7 +1806,8 @@ static PyObject * PyCurses_getsyx(PyObject *self) { - int x,y; + int x = 0; + int y = 0; PyCursesInitialised Modified: python/branches/py3k/Modules/main.c ============================================================================== --- python/branches/py3k/Modules/main.c (original) +++ python/branches/py3k/Modules/main.c Fri Jul 17 10:31:44 2009 @@ -131,9 +131,9 @@ if (exitcode) fprintf(f, "Try `python -h' for more information.\n"); else { - fprintf(f, usage_1); - fprintf(f, usage_2); - fprintf(f, usage_3); + fputs(usage_1, f); + fputs(usage_2, f); + fputs(usage_3, f); fprintf(f, usage_4, DELIM); fprintf(f, usage_5, DELIM, PYTHONHOMEHELP); } From python-checkins at python.org Fri Jul 17 11:18:19 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 09:18:19 -0000 Subject: [Python-checkins] r74055 - in python/branches/py3k: Doc/copyright.rst Doc/library/intro.rst Doc/library/subprocess.rst Lib/idlelib/configDialog.py Lib/multiprocessing/pool.py Lib/platform.py Lib/test/test_kqueue.py Lib/test/test_multiprocessing.py Lib/test/test_unittest.py Lib/unittest.py Misc/ACKS Misc/NEWS Modules/selectmodule.c Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 11:18:18 2009 New Revision: 74055 Log: Merged revisions 73995,74002,74005,74007-74008,74011,74019-74023 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73995 | vinay.sajip | 2009-07-13 07:21:05 -0400 (Mon, 13 Jul 2009) | 1 line Issue #6314: logging: Extra checks on the "level" argument in more places. ........ r74002 | marc-andre.lemburg | 2009-07-13 16:23:49 -0400 (Mon, 13 Jul 2009) | 6 lines Use a new global DEV_NULL instead of hard-coding /dev/null into the system command helper functions. See #6479 for some motivation. ........ r74005 | marc-andre.lemburg | 2009-07-13 17:28:33 -0400 (Mon, 13 Jul 2009) | 6 lines Use a different VER command output parser to address the localization issues mentioned in #3410. Prepare for Windows 7 (still commented out). ........ r74007 | michael.foord | 2009-07-14 13:58:12 -0400 (Tue, 14 Jul 2009) | 1 line Move TestRunner initialisation into unittest.TestProgram.runTests. Fixes issue 6418. ........ r74008 | benjamin.peterson | 2009-07-14 20:46:42 -0400 (Tue, 14 Jul 2009) | 1 line update year ........ r74011 | ezio.melotti | 2009-07-15 13:07:04 -0400 (Wed, 15 Jul 2009) | 1 line methods' names pep8ification ........ r74019 | amaury.forgeotdarc | 2009-07-15 17:29:27 -0400 (Wed, 15 Jul 2009) | 2 lines #6076 Add a title to the IDLE Preferences window. ........ r74020 | georg.brandl | 2009-07-16 03:18:07 -0400 (Thu, 16 Jul 2009) | 1 line #5910: fix kqueue for calls with more than one event. ........ r74021 | georg.brandl | 2009-07-16 03:33:04 -0400 (Thu, 16 Jul 2009) | 1 line #6486: start with built in functions rather than "built in objects". ........ r74022 | georg.brandl | 2009-07-16 03:38:35 -0400 (Thu, 16 Jul 2009) | 1 line #6481: fix typo in os.system() replacement. ........ r74023 | jesse.noller | 2009-07-16 10:23:04 -0400 (Thu, 16 Jul 2009) | 1 line Issue 6433: multiprocessing.pool.map hangs on empty list ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/copyright.rst python/branches/py3k/Doc/library/intro.rst python/branches/py3k/Doc/library/subprocess.rst python/branches/py3k/Lib/idlelib/configDialog.py python/branches/py3k/Lib/multiprocessing/pool.py python/branches/py3k/Lib/platform.py python/branches/py3k/Lib/test/test_kqueue.py python/branches/py3k/Lib/test/test_multiprocessing.py python/branches/py3k/Lib/test/test_unittest.py python/branches/py3k/Lib/unittest.py python/branches/py3k/Misc/ACKS python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/selectmodule.c Modified: python/branches/py3k/Doc/copyright.rst ============================================================================== --- python/branches/py3k/Doc/copyright.rst (original) +++ python/branches/py3k/Doc/copyright.rst Fri Jul 17 11:18:18 2009 @@ -4,7 +4,7 @@ Python and this documentation is: -Copyright ? 2001-2008 Python Software Foundation. All rights reserved. +Copyright ? 2001-2009 Python Software Foundation. All rights reserved. Copyright ? 2000 BeOpen.com. All rights reserved. Modified: python/branches/py3k/Doc/library/intro.rst ============================================================================== --- python/branches/py3k/Doc/library/intro.rst (original) +++ python/branches/py3k/Doc/library/intro.rst Fri Jul 17 11:18:18 2009 @@ -43,8 +43,9 @@ function, module or term in the index (in the back). And finally, if you enjoy learning about random subjects, you choose a random page number (see module :mod:`random`) and read a section or two. Regardless of the order in which you -read the sections of this manual, it helps to start with chapter :ref:`builtin`, -as the remainder of the manual assumes familiarity with this material. +read the sections of this manual, it helps to start with chapter +:ref:`built-in-funcs`, as the remainder of the manual assumes familiarity with +this material. Let the show begin! Modified: python/branches/py3k/Doc/library/subprocess.rst ============================================================================== --- python/branches/py3k/Doc/library/subprocess.rst (original) +++ python/branches/py3k/Doc/library/subprocess.rst Fri Jul 17 11:18:18 2009 @@ -420,7 +420,7 @@ sts = os.system("mycmd" + " myarg") ==> p = Popen("mycmd" + " myarg", shell=True) - sts = os.waitpid(p.pid, 0) + sts = os.waitpid(p.pid, 0)[1] Notes: Modified: python/branches/py3k/Lib/idlelib/configDialog.py ============================================================================== --- python/branches/py3k/Lib/idlelib/configDialog.py (original) +++ python/branches/py3k/Lib/idlelib/configDialog.py Fri Jul 17 11:18:18 2009 @@ -30,6 +30,7 @@ self.wm_withdraw() self.configure(borderwidth=5) + self.title('IDLE Preferences') self.geometry("+%d+%d" % (parent.winfo_rootx()+20, parent.winfo_rooty()+30)) #Theme Elements. Each theme element key is its display name. Modified: python/branches/py3k/Lib/multiprocessing/pool.py ============================================================================== --- python/branches/py3k/Lib/multiprocessing/pool.py (original) +++ python/branches/py3k/Lib/multiprocessing/pool.py Fri Jul 17 11:18:18 2009 @@ -208,6 +208,8 @@ chunksize, extra = divmod(len(iterable), len(self._pool) * 4) if extra: chunksize += 1 + if len(iterable) == 0: + chunksize = 0 task_batches = Pool._get_tasks(func, iterable, chunksize) result = MapResult(self._cache, chunksize, len(iterable), callback) Modified: python/branches/py3k/Lib/platform.py ============================================================================== --- python/branches/py3k/Lib/platform.py (original) +++ python/branches/py3k/Lib/platform.py Fri Jul 17 11:18:18 2009 @@ -32,6 +32,7 @@ # # # +# 1.0.7 - added DEV_NULL # 1.0.6 - added linux_distribution() # 1.0.5 - fixed Java support to allow running the module on Jython # 1.0.4 - added IronPython support @@ -89,7 +90,7 @@ __copyright__ = """ Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal at lemburg.com - Copyright (c) 2000-2008, eGenix.com Software GmbH; mailto:info at egenix.com + Copyright (c) 2000-2009, eGenix.com Software GmbH; mailto:info at egenix.com Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee or royalty is hereby granted, @@ -108,10 +109,25 @@ """ -__version__ = '1.0.6' +__version__ = '1.0.7' import sys, os, re +### Globals & Constants + +# Determine the platform's /dev/null device +try: + DEV_NULL = os.devnull +except AttributeError: + # os.devnull was added in Python 2.4, so emulate it for earlier + # Python versions + if sys.platform in ('dos','win32','win16','os2'): + # Use the old CP/M NUL as device name + DEV_NULL = 'NUL' + else: + # Standard Unix uses /dev/null + DEV_NULL = '/dev/null' + ### Platform specific APIs _libc_search = re.compile(r'(__libc_init)' @@ -446,7 +462,16 @@ _ver_output = re.compile(r'(?:([\w ]+) ([\w.]+) ' '.*' - 'Version ([\d.]+))', re.ASCII) + '\[.* ([\d.]+)\])') + +# Examples of VER command output: +# +# Windows 2000: Microsoft Windows 2000 [Version 5.00.2195] +# Windows XP: Microsoft Windows XP [Version 5.1.2600] +# Windows Vista: Microsoft Windows [Version 6.0.6002] +# +# Note that the "Version" string gets localized on different +# Windows versions. def _syscmd_ver(system='', release='', version='', @@ -578,6 +603,7 @@ version = '%i.%i.%i' % (maj,min,buildno & 0xFFFF) if csd[:13] == 'Service Pack ': csd = 'SP' + csd[13:] + if plat == VER_PLATFORM_WIN32_WINDOWS: regkey = 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion' # Try to guess the release name @@ -592,6 +618,7 @@ release = 'postMe' elif maj == 5: release = '2000' + elif plat == VER_PLATFORM_WIN32_NT: regkey = 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion' if maj <= 4: @@ -620,8 +647,12 @@ release = 'Vista' else: release = '2008Server' + #elif min == 1: + # # Windows 7 release candidate uses version 6.1.7100 + # release = '7RC' else: release = 'post2008Server' + else: if not release: # E.g. Win3.1 with win32s @@ -902,7 +933,7 @@ # XXX Others too ? return default try: - f = os.popen('uname %s 2> /dev/null' % option) + f = os.popen('uname %s 2> %s' % (option, DEV_NULL)) except (AttributeError,os.error): return default output = f.read().strip() @@ -927,7 +958,7 @@ return default target = _follow_symlinks(target) try: - f = os.popen('file "%s" 2> /dev/null' % target) + f = os.popen('file "%s" 2> %s' % (target, DEV_NULL)) except (AttributeError,os.error): return default output = f.read().strip() Modified: python/branches/py3k/Lib/test/test_kqueue.py ============================================================================== --- python/branches/py3k/Lib/test/test_kqueue.py (original) +++ python/branches/py3k/Lib/test/test_kqueue.py Fri Jul 17 11:18:18 2009 @@ -163,6 +163,22 @@ server.close() serverSocket.close() + def testPair(self): + kq = select.kqueue() + a, b = socket.socketpair() + + a.send(b'foo') + event1 = select.kevent(a, select.KQ_FILTER_READ, select.KQ_EV_ADD | select.KQ_EV_ENABLE) + event2 = select.kevent(b, select.KQ_FILTER_READ, select.KQ_EV_ADD | select.KQ_EV_ENABLE) + r = kq.control([event1, event2], 1, 1) + self.assertTrue(r) + self.assertFalse(r[0].flags & select.KQ_EV_ERROR) + self.assertEquals(b.recv(r[0].data), b'foo') + + a.close() + b.close() + kq.close() + def test_main(): support.run_unittest(TestKQueue) Modified: python/branches/py3k/Lib/test/test_multiprocessing.py ============================================================================== --- python/branches/py3k/Lib/test/test_multiprocessing.py (original) +++ python/branches/py3k/Lib/test/test_multiprocessing.py Fri Jul 17 11:18:18 2009 @@ -990,6 +990,12 @@ self.assertEqual(pmap(sqr, list(range(100)), chunksize=20), list(map(sqr, list(range(100))))) + def test_map_chunksize(self): + try: + self.pool.map_async(sqr, [], chunksize=1).get(timeout=TIMEOUT1) + except multiprocessing.TimeoutError: + self.fail("pool.map_async with chunksize stalled on null list") + def test_async(self): res = self.pool.apply_async(sqr, (7, TIMEOUT1,)) get = TimingWrapper(res.get) Modified: python/branches/py3k/Lib/test/test_unittest.py ============================================================================== --- python/branches/py3k/Lib/test/test_unittest.py (original) +++ python/branches/py3k/Lib/test/test_unittest.py Fri Jul 17 11:18:18 2009 @@ -3303,15 +3303,6 @@ self.assertEqual(runner.test, test) self.assertEqual(program.verbosity, 2) - - def testTestProgram_testRunnerArgument(self): - program = object.__new__(TestProgram) - program.parseArgs = lambda _: None - program.runTests = lambda: None - program.__init__(testRunner=None) - self.assertEqual(program.testRunner, unittest.TextTestRunner) - - class FooBar(unittest.TestCase): def testPass(self): assert True Modified: python/branches/py3k/Lib/unittest.py ============================================================================== --- python/branches/py3k/Lib/unittest.py (original) +++ python/branches/py3k/Lib/unittest.py Fri Jul 17 11:18:18 2009 @@ -1684,8 +1684,6 @@ argv=None, testRunner=None, testLoader=defaultTestLoader, exit=True, verbosity=1): - if testRunner is None: - testRunner = TextTestRunner if isinstance(module, str): self.module = __import__(module) for part in module.split('.')[1:]: @@ -1775,6 +1773,8 @@ self.test = loader.discover(start_dir, pattern, top_level_dir) def runTests(self): + if self.testRunner is None: + self.testRunner = TextTestRunner if isinstance(self.testRunner, type): try: testRunner = self.testRunner(verbosity=self.verbosity) Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Fri Jul 17 11:18:18 2009 @@ -197,6 +197,7 @@ Hans Eckardt Grant Edwards John Ehresman +Eric Eisner Andrew Eland Lance Ellinghaus David Ely Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 17 11:18:18 2009 @@ -908,6 +908,13 @@ It's `distutils.util.get_compiler_versions`. Added deprecation warnings for the obsolete get_versions() functions. +- Issue #6433: fixed issues with multiprocessing.pool.map hanging on empty list + +- Issue #6314: logging: Extra checks on the "level" argument in more places. + +- Issue #2622: Fixed an ImportError when importing email.messsage from a + standalone application built with py2exe or py2app. + - Issue #6459: distutils.command.build_ext.get_export_symbols now uses the "PyInit" prefix, rather than "init". @@ -920,6 +927,10 @@ - Issue #6403: Fixed package path usage in build_ext. +- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was + unconditionally calling "os.close(sys.stdin.fileno())" resulting in file + descriptor errors + - Issue #6365: Distutils build_ext inplace mode was copying the compiled extension in a subdirectory if the extension name had dots. Modified: python/branches/py3k/Modules/selectmodule.c ============================================================================== --- python/branches/py3k/Modules/selectmodule.c (original) +++ python/branches/py3k/Modules/selectmodule.c Fri Jul 17 11:18:18 2009 @@ -1492,7 +1492,7 @@ if (nevents < 0) { PyErr_Format(PyExc_ValueError, "Length of eventlist must be 0 or positive, got %d", - nchanges); + nevents); return NULL; } @@ -1550,6 +1550,7 @@ PyErr_NoMemory(); return NULL; } + i = 0; while ((ei = PyIter_Next(it)) != NULL) { if (!kqueue_event_Check(ei)) { Py_DECREF(ei); @@ -1558,7 +1559,7 @@ "select.kevent objects"); goto error; } else { - chl[i] = ((kqueue_event_Object *)ei)->e; + chl[i++] = ((kqueue_event_Object *)ei)->e; } Py_DECREF(ei); } @@ -1589,7 +1590,7 @@ goto error; } - for (i=0; i < gotevents; i++) { + for (i = 0; i < gotevents; i++) { kqueue_event_Object *ch; ch = PyObject_New(kqueue_event_Object, &kqueue_event_Type); From python-checkins at python.org Fri Jul 17 11:34:31 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 09:34:31 -0000 Subject: [Python-checkins] r74056 - in python/branches/py3k: Misc/ACKS Misc/NEWS Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 11:34:31 2009 New Revision: 74056 Log: Merged revisions 73985-73986,73988-73991,73994 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73985 | benjamin.peterson | 2009-07-12 17:18:55 -0400 (Sun, 12 Jul 2009) | 1 line add Joe ........ r73986 | kristjan.jonsson | 2009-07-12 18:42:08 -0400 (Sun, 12 Jul 2009) | 2 lines http://bugs.python.org/issue6267 Add more tests for the xlmrpc.ServerProxy ........ r73988 | benjamin.peterson | 2009-07-12 19:40:33 -0400 (Sun, 12 Jul 2009) | 1 line fix Tarek's name ........ r73989 | benjamin.peterson | 2009-07-12 19:44:43 -0400 (Sun, 12 Jul 2009) | 1 line change encoding to utf-8 ........ r73990 | benjamin.peterson | 2009-07-12 19:49:23 -0400 (Sun, 12 Jul 2009) | 1 line fix another name ........ r73991 | benjamin.peterson | 2009-07-12 19:56:18 -0400 (Sun, 12 Jul 2009) | 1 line change encoding to utf-8 ........ r73994 | benjamin.peterson | 2009-07-12 20:03:20 -0400 (Sun, 12 Jul 2009) | 1 line fix umlaut ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Misc/ACKS python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Fri Jul 17 11:34:31 2009 @@ -7,7 +7,7 @@ --Guido -PS: In the standard Python distribution, this file is encoded in Latin-1. +PS: In the standard Python distribution, this file is encoded in UTF-8. David Abrahams Jim Ahlstrom @@ -15,10 +15,11 @@ Jyrki Alakuijala Billy G. Allie Kevin Altis +Joe Amenta Mark Anacker Anders Andersen John Anderson -Erik Anders?n +Erik Anders??n Oliver Andrich Ross Andrus Jason Asbahr @@ -193,7 +194,7 @@ Eugene Dvurechenski Josip Dzolonga Maxim Dzumanenko -Walter D?rwald +Walter D??rwald Hans Eckardt Grant Edwards John Ehresman @@ -204,7 +205,7 @@ Jeff Epler Tom Epperly Stoffel Erasmus -J?rgen A. Erhard +J??rgen A. Erhard Michael Ernst Ben Escoto Andy Eskilsson @@ -227,7 +228,7 @@ Nils Fischbeck Frederik Fix Matt Fleming -Hern?n Mart?nez Foffani +Hern??n Mart??nez Foffani Michael Foord Amaury Forgeot d'Arc Doug Fort @@ -241,7 +242,7 @@ Peter Funk Geoff Furnish Ulisses Furquim -Hagen F?rstenau +Hagen F??rstenau Achim Gaedke Martin von Gagern Lele Gaifax @@ -273,13 +274,13 @@ Duncan Grisby Dag Gruneau Michael Guravage -Lars Gust?bel -Thomas G?ttler +Lars Gust??bel +Thomas G??ttler Barry Haddow Paul ten Hagen Rasmus Hahn Peter Haight -V?clav Haisman +V??clav Haisman Bob Halley Jesse Hallio Jun Hamano @@ -303,7 +304,7 @@ James Henstridge Chris Herborth Ivan Herman -J?rgen Hermann +J??rgen Hermann Gary Herron Thomas Herve Bernhard Herzog @@ -340,7 +341,7 @@ Greg Humphreys Eric Huss Jeremy Hylton -Gerhard H?ring +Gerhard H??ring Mihai Ibanescu Lars Immisch Tony Ingraldi @@ -356,7 +357,7 @@ Jack Jansen Bill Janssen Drew Jenkins -Flemming Kj?r Jensen +Flemming Kj??r Jensen Jiba Orjan Johansen Fredrik Johansson @@ -454,7 +455,7 @@ Mark Lutz Jim Lynch Mikael Lyngvig -Martin von L?wis +Martin von L??wis Andrew I MacIntyre Tim MacKenzie Nick Maclaren @@ -467,7 +468,7 @@ Doug Marien Alex Martelli Anthony Martin -S?bastien Martini +S??bastien Martini Roger Masse Nick Mathewson Graham Matthews @@ -514,7 +515,7 @@ Trent Nelson Tony Nelson Chad Netzer -Max Neunh?ffer +Max Neunh??ffer George Neville-Neil Johannes Nicolai Samuel Nicolary @@ -543,7 +544,7 @@ Ondrej Palkovsky Mike Pall Todd R. Palmer -Juan David Ib??ez Palomar +Juan David Ib????ez Palomar Jan Palus M. Papillon Peter Parente @@ -554,7 +555,7 @@ Samuele Pedroni Marcel van der Peijl Steven Pemberton -Santiago Peres?n +Santiago Peres??n Mark Perrego Trevor Perrin Tim Peters @@ -569,11 +570,11 @@ Jim St. Pierre Dan Pierson Martijn Pieters -Fran?ois Pinard +Fran??ois Pinard Zach Pincus Michael Piotrowski Antoine Pitrou -Jean-Fran?ois Pi?ronne +Jean-Fran??ois Pi??ronne Guilherme Polo Michael Pomraning Iustin Pop @@ -582,8 +583,8 @@ Paul Prescod Donovan Preston Steve Purcell -Fernando P?rez -Eduardo P?rez +Fernando P??rez +Eduardo P??rez Brian Quinlan Anders Qvist Burton Radons @@ -740,7 +741,7 @@ Stephen Turner Bill Tutt Doobee R. Tzeck -Eren T?rkay +Eren T??rkay Lionel Ulmer Roger Upole Michael Urman @@ -817,5 +818,5 @@ Mike Zarnstorff Siebren van der Zee Uwe Zessin -Tarek Ziad? -Peter ?strand +Tarek Ziad?? +Peter ??strand Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 17 11:34:31 2009 @@ -138,7 +138,7 @@ possible to update the lineno attribute of the current frame. - Issue #5330: C functions called with keyword arguments were not reported by - the various profiling modules (profile, cProfile). Patch by Hagen F?rstenau. + the various profiling modules (profile, cProfile). Patch by Hagen F??rstenau. Library ------- From python-checkins at python.org Fri Jul 17 12:42:05 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 10:42:05 -0000 Subject: [Python-checkins] r74057 - in python/branches/py3k: .bzrignore .hgignore Doc/c-api/import.rst Doc/library/array.rst Doc/library/imp.rst Doc/library/locale.rst Lib/subprocess.py Lib/test/data Lib/test/support.py Makefile.pre.in Misc/NEWS Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 12:42:05 2009 New Revision: 74057 Log: Merged revisions 73930-73932,73937-73939,73945,73951,73954,73962-73963,73970 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73930 | amaury.forgeotdarc | 2009-07-10 12:47:42 -0400 (Fri, 10 Jul 2009) | 2 lines #6447: typo in subprocess docstring ........ r73931 | ezio.melotti | 2009-07-10 16:25:56 -0400 (Fri, 10 Jul 2009) | 1 line more cleanups and if zlib -> skipUnless(zlib) ........ r73932 | kristjan.jonsson | 2009-07-11 04:44:43 -0400 (Sat, 11 Jul 2009) | 3 lines http://bugs.python.org/issue6460 Need to be careful with thread switching when testing the xmlrpc server. The server thread may not have updated stats when the client thread tests them. ........ r73937 | georg.brandl | 2009-07-11 06:12:36 -0400 (Sat, 11 Jul 2009) | 1 line Fix style. ........ r73938 | georg.brandl | 2009-07-11 06:14:54 -0400 (Sat, 11 Jul 2009) | 1 line #6446: fix import_spam() function to use correct error and reference handling. ........ r73939 | georg.brandl | 2009-07-11 06:18:10 -0400 (Sat, 11 Jul 2009) | 1 line #6448: clarify docs for find_module(). ........ r73945 | georg.brandl | 2009-07-11 06:51:31 -0400 (Sat, 11 Jul 2009) | 1 line #6456: clarify the meaning of constants used as arguments to nl_langinfo(). ........ r73951 | georg.brandl | 2009-07-11 10:23:38 -0400 (Sat, 11 Jul 2009) | 2 lines array.array is actually a class. ........ r73954 | tarek.ziade | 2009-07-11 13:21:00 -0400 (Sat, 11 Jul 2009) | 1 line reverted changes for #6459 (doesn't apply on 2.x) ........ r73962 | benjamin.peterson | 2009-07-11 18:15:13 -0400 (Sat, 11 Jul 2009) | 1 line put downloaded test support files in Lib/test/data instead of the cwd ........ r73963 | benjamin.peterson | 2009-07-11 18:25:24 -0400 (Sat, 11 Jul 2009) | 1 line ignore things in Lib/test/data/ ........ r73970 | hirokazu.yamamoto | 2009-07-11 22:04:47 -0400 (Sat, 11 Jul 2009) | 1 line Fixed distutils test. ........ Added: python/branches/py3k/Lib/test/data/ (props changed) - copied from r73970, /python/trunk/Lib/test/data/ Modified: python/branches/py3k/ (props changed) python/branches/py3k/.bzrignore python/branches/py3k/.hgignore python/branches/py3k/Doc/c-api/import.rst python/branches/py3k/Doc/library/array.rst python/branches/py3k/Doc/library/imp.rst python/branches/py3k/Doc/library/locale.rst python/branches/py3k/Lib/subprocess.py python/branches/py3k/Lib/test/support.py python/branches/py3k/Makefile.pre.in python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/.bzrignore ============================================================================== --- python/branches/py3k/.bzrignore (original) +++ python/branches/py3k/.bzrignore Fri Jul 17 12:42:05 2009 @@ -14,24 +14,7 @@ pyconfig.h libpython*.a python.exe -CP936.TXT -SHIFT_JISX0213.TXT -JOHAB.TXT -EUC-JP.TXT -NormalizationTest-3.2.0.txt -NormalizationTest.txt -BIG5.TXT -BIG5HKSCS-2004.TXT -CP949.TXT -EUC-CN.TXT -BIG5HKSCS.TXT -SHIFTJIS.TXT -EUC-KR.TXT -EUC-JISX0213.TXT -CP932.TXT -CP950.TXT reflog.txt -gb-18030-2000.xml tags TAGS .gdb_history @@ -45,5 +28,6 @@ Modules/Setup.local Modules/config.c Parser/pgen +Lib/test/data/* Lib/lib2to3/Grammar*.pickle Lib/lib2to3/PatternGrammar*.pickle Modified: python/branches/py3k/.hgignore ============================================================================== --- python/branches/py3k/.hgignore (original) +++ python/branches/py3k/.hgignore Fri Jul 17 12:42:05 2009 @@ -1,24 +1,8 @@ .gdb_history .purify .svn -BIG5.TXT -BIG5HKSCS-2004.TXT -BIG5HKSCS.TXT -CP932.TXT -CP936.TXT -CP949.TXT -CP950.TXT -EUC-CN.TXT -EUC-JISX0213.TXT -EUC-JP.TXT -EUC-KR.TXT -JOHAB.TXT Makefile Makefile.pre -NormalizationTest-3.2.0.txt -NormalizationTest.txt -SHIFTJIS.TXT -SHIFT_JISX0213.TXT TAGS autom4te.cache build @@ -28,7 +12,6 @@ config.status config.status.lineno db_home -gb-18030-2000.xml platform pyconfig.h python @@ -59,6 +42,7 @@ *.rej *~ Lib/lib2to3/*.pickle +Lib/test/data/* PCbuild/*.exe PCbuild/*.dll PCbuild/*.pdb Modified: python/branches/py3k/Doc/c-api/import.rst ============================================================================== --- python/branches/py3k/Doc/c-api/import.rst (original) +++ python/branches/py3k/Doc/c-api/import.rst Fri Jul 17 12:42:05 2009 @@ -25,6 +25,8 @@ imported module, or *NULL* with an exception set on failure. A failing import of a module doesn't leave the module in :data:`sys.modules`. + This function always uses absolute imports. + .. cfunction:: PyObject* PyImport_ImportModuleNoBlock(const char *name) @@ -75,6 +77,8 @@ current globals. This means that the import is done using whatever import hooks are installed in the current environment. + This function always uses absolute imports. + .. cfunction:: PyObject* PyImport_ReloadModule(PyObject *m) Modified: python/branches/py3k/Doc/library/array.rst ============================================================================== --- python/branches/py3k/Doc/library/array.rst (original) +++ python/branches/py3k/Doc/library/array.rst Fri Jul 17 12:42:05 2009 @@ -52,9 +52,9 @@ The module defines the following type: -.. function:: array(typecode[, initializer]) +.. class:: array(typecode[, initializer]) - Return a new array whose items are restricted by *typecode*, and initialized + A new array whose items are restricted by *typecode*, and initialized from the optional *initializer* value, which must be a list, object supporting the buffer interface, or iterable over elements of the appropriate type. @@ -67,7 +67,7 @@ .. data:: ArrayType - Obsolete alias for :func:`array`. + Obsolete alias for :class:`array`. .. data:: typecodes @@ -81,7 +81,6 @@ The following data items and methods are also supported: - .. attribute:: array.typecode The typecode character used to create the array. Modified: python/branches/py3k/Doc/library/imp.rst ============================================================================== --- python/branches/py3k/Doc/library/imp.rst (original) +++ python/branches/py3k/Doc/library/imp.rst Fri Jul 17 12:42:05 2009 @@ -33,16 +33,17 @@ .. function:: find_module(name[, path]) - Try to find the module *name* on the search path *path*. If *path* is a list - of directory names, each directory is searched for files with any of the - suffixes returned by :func:`get_suffixes` above. Invalid names in the list - are silently ignored (but all list items must be strings). If *path* is - omitted or ``None``, the list of directory names given by ``sys.path`` is - searched, but first it searches a few special places: it tries to find a - built-in module with the given name (:const:`C_BUILTIN`), then a frozen - module (:const:`PY_FROZEN`), and on some systems some other places are looked - in as well (on Windows, it looks in the registry which may point to a - specific file). + Try to find the module *name*. If *path* is omitted or ``None``, the list of + directory names given by ``sys.path`` is searched, but first a few special + places are searched: the function tries to find a built-in module with the + given name (:const:`C_BUILTIN`), then a frozen module (:const:`PY_FROZEN`), + and on some systems some other places are looked in as well (on Windows, it + looks in the registry which may point to a specific file). + + Otherwise, *path* must be a list of directory names; each directory is + searched for files with any of the suffixes returned by :func:`get_suffixes` + above. Invalid names in the list are silently ignored (but all list items + must be strings). If search is successful, the return value is a 3-element tuple ``(file, pathname, description)``: Modified: python/branches/py3k/Doc/library/locale.rst ============================================================================== --- python/branches/py3k/Doc/library/locale.rst (original) +++ python/branches/py3k/Doc/library/locale.rst Fri Jul 17 12:42:05 2009 @@ -144,13 +144,127 @@ .. function:: nl_langinfo(option) - Return some locale-specific information as a string. This function is not - available on all systems, and the set of possible options might also vary across - platforms. The possible argument values are numbers, for which symbolic - constants are available in the locale module. + Return some locale-specific information as a string. This function is not + available on all systems, and the set of possible options might also vary + across platforms. The possible argument values are numbers, for which + symbolic constants are available in the locale module. + The :func:`nl_langinfo` function accepts one of the following keys. Most + descriptions are taken from the corresponding description in the GNU C + library. -.. function:: getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')) + .. data:: CODESET + + Get a string with the name of the character encoding used in the + selected locale. + + .. data:: D_T_FMT + + Get a string that can be used as a format string for :func:`strftime` to + represent time and date in a locale-specific way. + + .. data:: D_FMT + + Get a string that can be used as a format string for :func:`strftime` to + represent a date in a locale-specific way. + + .. data:: T_FMT + + Get a string that can be used as a format string for :func:`strftime` to + represent a time in a locale-specific way. + + .. data:: T_FMT_AMPM + + Get a format string for :func:`strftime` to represent time in the am/pm + format. + + .. data:: DAY_1 ... DAY_7 + + Get the name of the n-th day of the week. + + .. note:: + + This follows the US convention of :const:`DAY_1` being Sunday, not the + international convention (ISO 8601) that Monday is the first day of the + week. + + .. data:: ABDAY_1 ... ABDAY_7 + + Get the abbreviated name of the n-th day of the week. + + .. data:: MON_1 ... MON_12 + + Get the name of the n-th month. + + .. data:: ABMON_1 ... ABMON_12 + + Get the abbreviated name of the n-th month. + + .. data:: RADIXCHAR + + Get the radix character (decimal dot, decimal comma, etc.) + + .. data:: THOUSEP + + Get the separator character for thousands (groups of three digits). + + .. data:: YESEXPR + + Get a regular expression that can be used with the regex function to + recognize a positive response to a yes/no question. + + .. note:: + + The expression is in the syntax suitable for the :cfunc:`regex` function + from the C library, which might differ from the syntax used in :mod:`re`. + + .. data:: NOEXPR + + Get a regular expression that can be used with the regex(3) function to + recognize a negative response to a yes/no question. + + .. data:: CRNCYSTR + + Get the currency symbol, preceded by "-" if the symbol should appear before + the value, "+" if the symbol should appear after the value, or "." if the + symbol should replace the radix character. + + .. data:: ERA + + Get a string that represents the era used in the current locale. + + Most locales do not define this value. An example of a locale which does + define this value is the Japanese one. In Japan, the traditional + representation of dates includes the name of the era corresponding to the + then-emperor's reign. + + Normally it should not be necessary to use this value directly. Specifying + the ``E`` modifier in their format strings causes the :func:`strftime` + function to use this information. The format of the returned string is not + specified, and therefore you should not assume knowledge of it on different + systems. + + .. data:: ERA_YEAR + + Get the year in the relevant era of the locale. + + .. data:: ERA_D_T_FMT + + Get a format string for :func:`strftime` to represent dates and times in a + locale-specific era-based way. + + .. data:: ERA_D_FMT + + Get a format string for :func:`strftime` to represent time in a + locale-specific era-based way. + + .. data:: ALT_DIGITS + + Get a representation of up to 100 values used to represent the values + 0 to 99. + + +.. function:: getdefaultlocale([envvars]) Tries to determine the default locale settings and returns them as a tuple of the form ``(language code, encoding)``. @@ -338,140 +452,13 @@ This is a symbolic constant used for different values returned by :func:`localeconv`. -The :func:`nl_langinfo` function accepts one of the following keys. Most -descriptions are taken from the corresponding description in the GNU C library. - - -.. data:: CODESET - - Return a string with the name of the character encoding used in the selected - locale. - - -.. data:: D_T_FMT - - Return a string that can be used as a format string for strftime(3) to represent - time and date in a locale-specific way. - - -.. data:: D_FMT - - Return a string that can be used as a format string for strftime(3) to represent - a date in a locale-specific way. - - -.. data:: T_FMT - - Return a string that can be used as a format string for strftime(3) to represent - a time in a locale-specific way. - - -.. data:: T_FMT_AMPM - - The return value can be used as a format string for 'strftime' to represent time - in the am/pm format. - - -.. data:: DAY_1 ... DAY_7 - - Return name of the n-th day of the week. - - .. note:: - - This follows the US convention of :const:`DAY_1` being Sunday, not the - international convention (ISO 8601) that Monday is the first day of the week. - - -.. data:: ABDAY_1 ... ABDAY_7 - - Return abbreviated name of the n-th day of the week. - - -.. data:: MON_1 ... MON_12 - - Return name of the n-th month. - - -.. data:: ABMON_1 ... ABMON_12 - - Return abbreviated name of the n-th month. - - -.. data:: RADIXCHAR - - Return radix character (decimal dot, decimal comma, etc.) - - -.. data:: THOUSEP - - Return separator character for thousands (groups of three digits). - - -.. data:: YESEXPR - - Return a regular expression that can be used with the regex function to - recognize a positive response to a yes/no question. - - .. note:: - - The expression is in the syntax suitable for the :cfunc:`regex` function from - the C library, which might differ from the syntax used in :mod:`re`. - - -.. data:: NOEXPR - - Return a regular expression that can be used with the regex(3) function to - recognize a negative response to a yes/no question. - - -.. data:: CRNCYSTR - - Return the currency symbol, preceded by "-" if the symbol should appear before - the value, "+" if the symbol should appear after the value, or "." if the symbol - should replace the radix character. - - -.. data:: ERA - - The return value represents the era used in the current locale. - - Most locales do not define this value. An example of a locale which does define - this value is the Japanese one. In Japan, the traditional representation of - dates includes the name of the era corresponding to the then-emperor's reign. - - Normally it should not be necessary to use this value directly. Specifying the - ``E`` modifier in their format strings causes the :func:`strftime` function to - use this information. The format of the returned string is not specified, and - therefore you should not assume knowledge of it on different systems. - - -.. data:: ERA_YEAR - - The return value gives the year in the relevant era of the locale. - - -.. data:: ERA_D_T_FMT - - This return value can be used as a format string for :func:`strftime` to - represent dates and times in a locale-specific era-based way. - - -.. data:: ERA_D_FMT - - This return value can be used as a format string for :func:`strftime` to - represent time in a locale-specific era-based way. - - -.. data:: ALT_DIGITS - - The return value is a representation of up to 100 values used to represent the - values 0 to 99. Example:: >>> import locale >>> loc = locale.getlocale() # get current locale - >>> locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform + # use German locale; name might vary with platform + >>> locale.setlocale(locale.LC_ALL, 'de_DE') >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale >>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale Modified: python/branches/py3k/Lib/subprocess.py ============================================================================== --- python/branches/py3k/Lib/subprocess.py (original) +++ python/branches/py3k/Lib/subprocess.py Fri Jul 17 12:42:05 2009 @@ -724,7 +724,7 @@ # Windows methods # def _get_handles(self, stdin, stdout, stderr): - """Construct and return tupel with IO objects: + """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin is None and stdout is None and stderr is None: @@ -959,7 +959,7 @@ # POSIX methods # def _get_handles(self, stdin, stdout, stderr): - """Construct and return tupel with IO objects: + """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ p2cread, p2cwrite = None, None Modified: python/branches/py3k/Lib/test/support.py ============================================================================== --- python/branches/py3k/Lib/test/support.py (original) +++ python/branches/py3k/Lib/test/support.py Fri Jul 17 12:42:05 2009 @@ -453,13 +453,12 @@ requires('urlfetch') filename = urllib.parse.urlparse(url)[2].split('/')[-1] # '/': it's URL! - for path in [os.path.curdir, os.path.pardir]: - fn = os.path.join(path, filename) - if os.path.exists(fn): - return open(fn, *args, **kw) + fn = os.path.join(os.path.dirname(__file__), "data", filename) + if os.path.exists(fn): + return open(fn) print('\tfetching %s ...' % url, file=get_original_stdout()) - fn, _ = urllib.request.urlretrieve(url, filename) + fn, _ = urllib.request.urlretrieve(url, fn) return open(fn, *args, **kw) Modified: python/branches/py3k/Makefile.pre.in ============================================================================== --- python/branches/py3k/Makefile.pre.in (original) +++ python/branches/py3k/Makefile.pre.in Fri Jul 17 12:42:05 2009 @@ -1181,6 +1181,7 @@ # remove all generated files, even Makefile[.pre] # Keep configure and Python-ast.[ch], it's possible they can't be generated distclean: clobber + -rm -f Lib/test/data/* -rm -f core Makefile Makefile.pre config.status \ Modules/Setup Modules/Setup.local Modules/Setup.config find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Jul 17 12:42:05 2009 @@ -915,9 +915,6 @@ - Issue #2622: Fixed an ImportError when importing email.messsage from a standalone application built with py2exe or py2app. -- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the - "PyInit" prefix, rather than "init". - - Issue #6455: Fixed test_build_ext under win32. - Issue #6377: Enabled the compiler option, and deprecate its usage as an From python-checkins at python.org Fri Jul 17 12:55:51 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 10:55:51 -0000 Subject: [Python-checkins] r74058 - in python/branches/py3k: Lib/test/test_import.py Python/import.c Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 12:55:50 2009 New Revision: 74058 Log: Merged revisions 73870,73879,73899-73900,73905-73906 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73870 | r.david.murray | 2009-07-06 21:06:13 -0400 (Mon, 06 Jul 2009) | 5 lines Issue 6070: when creating a compiled file, after copying the mode bits, on posix zap the execute bit in case it was set on the .py file, since the compiled files are not directly executable on posix. Patch by Marco N. ........ r73879 | r.david.murray | 2009-07-07 05:54:16 -0400 (Tue, 07 Jul 2009) | 3 lines Update issue 6070 patch to match the patch that was actually tested on Windows. ........ r73899 | r.david.murray | 2009-07-08 21:43:41 -0400 (Wed, 08 Jul 2009) | 3 lines Conditionalize test cleanup code to eliminate traceback, which will hopefully reveal the real problem. ........ r73900 | r.david.murray | 2009-07-08 22:06:17 -0400 (Wed, 08 Jul 2009) | 2 lines Make test work with -O. ........ r73905 | r.david.murray | 2009-07-09 09:55:44 -0400 (Thu, 09 Jul 2009) | 3 lines Specify umask in execute bit test to get consistent results and make sure we test resetting all three execute bits. ........ r73906 | r.david.murray | 2009-07-09 11:35:33 -0400 (Thu, 09 Jul 2009) | 5 lines Curdir needs to be in the path for the test to work on all buildbots. (I copied this from another import test, but currently this will fail if TESTFN ends up in /tmp...see issue 2609). ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_import.py python/branches/py3k/Python/import.c Modified: python/branches/py3k/Lib/test/test_import.py ============================================================================== --- python/branches/py3k/Lib/test/test_import.py (original) +++ python/branches/py3k/Lib/test/test_import.py Fri Jul 17 12:55:50 2009 @@ -1,5 +1,6 @@ import unittest import os +import stat import random import shutil import sys @@ -7,7 +8,7 @@ import warnings import imp import marshal -from test.support import unlink, TESTFN, unload, run_unittest +from test.support import unlink, TESTFN, unload, run_unittest, TestFailed def remove_files(name): @@ -80,6 +81,32 @@ finally: del sys.path[0] + @unittest.skipUnless(os.name == 'posix', "test meaningful only on posix systems") + def test_execute_bit_not_copied(self): + # Issue 6070: under posix .pyc files got their execute bit set if + # the .py file had the execute bit set, but they aren't executable. + oldmask = os.umask(0o022) + sys.path.insert(0, os.curdir) + try: + fname = TESTFN + os.extsep + "py" + f = open(fname, 'w').close() + os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | + stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) + __import__(TESTFN) + fn = fname + 'c' + if not os.path.exists(fn): + fn = fname + 'o' + if not os.path.exists(fn): raise TestFailed("__import__ did " + "not result in creation of either a .pyc or .pyo file") + s = os.stat(fn) + self.assertEquals(stat.S_IMODE(s.st_mode), + stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) + finally: + os.umask(oldmask) + remove_files(TESTFN) + if TESTFN in sys.modules: del sys.modules[TESTFN] + del sys.path[0] + def testImpModule(self): # Verify that the imp module can correctly load and find .py files import imp @@ -230,6 +257,7 @@ else: self.fail("import by path didn't raise an exception") + class TestPycRewriting(unittest.TestCase): # Test that the `co_filename` attribute on code objects always points # to the right file, even when various things happen (e.g. both the .py Modified: python/branches/py3k/Python/import.c ============================================================================== --- python/branches/py3k/Python/import.c (original) +++ python/branches/py3k/Python/import.c Fri Jul 17 12:55:50 2009 @@ -931,7 +931,11 @@ { FILE *fp; time_t mtime = srcstat->st_mtime; - mode_t mode = srcstat->st_mode; +#ifdef MS_WINDOWS /* since Windows uses different permissions */ + mode_t mode = srcstat->st_mode & ~S_IEXEC; +#else + mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH; +#endif fp = open_exclusive(cpathname, mode); if (fp == NULL) { From alexandre at peadrop.com Fri Jul 17 13:06:55 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Fri, 17 Jul 2009 07:06:55 -0400 Subject: [Python-checkins] r73894 - python/branches/py3k/Lib/test/test_zipfile.py In-Reply-To: <20090708222416.79E74FA186@spunkymail-mx1.g.dreamhost.com> References: <20090708222416.79E74FA186@spunkymail-mx1.g.dreamhost.com> Message-ID: On Wed, Jul 8, 2009 at 6:24 PM, ezio.melotti wrote: > Author: ezio.melotti > Date: Thu Jul ?9 00:24:06 2009 > New Revision: 73894 > > Log: > Merged revisions 73841 via svnmerge from > svn+ssh://pythondev at svn.python.org/python/trunk > > ........ > ?r73841 | ezio.melotti | 2009-07-04 17:58:27 +0300 (Sat, 04 Jul 2009) | 1 line > > ?if zlib -> skipUnless(zlib) and minor cleanups > ........ > > > Modified: > ? python/branches/py3k/Lib/test/test_zipfile.py > Ezio, When you merge your changes with svnmerge.py, you need to also commit the svn metadata. So when you commit, do not specify only the file you are merging. For example, this is: Bad: svn commit -F svnmerge-commit-message.txt Lib/test/test_zipfile.py Good: svn commit -F svnmerge-commit-message.txt . Lib/test/test_zipfile.py Also good: svn commit -F svnmerge-commit-message.txt If you do otherwise your merge won't be recorded. Thank you, -- Alexandre From python-checkins at python.org Fri Jul 17 13:07:44 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 11:07:44 -0000 Subject: [Python-checkins] r74059 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 13:07:44 2009 New Revision: 74059 Log: Recorded merge of revisions 73841 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73841 | ezio.melotti | 2009-07-04 10:58:27 -0400 (Sat, 04 Jul 2009) | 1 line if zlib -> skipUnless(zlib) and minor cleanups ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Fri Jul 17 13:11:32 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 11:11:32 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc trunk Message-ID: 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%20solaris10%20gcc%20trunk/builds/662 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: alexandre.vassalotti,hirokazu.yamamoto BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 13:12:50 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 11:12:50 -0000 Subject: [Python-checkins] r74060 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 13:12:50 2009 New Revision: 74060 Log: Blocked revisions 73774,73812,73839 via svnmerge ........ r73774 | benjamin.peterson | 2009-07-02 13:06:17 -0400 (Thu, 02 Jul 2009) | 1 line only order comparisons are removed in py3k #6119 ........ r73812 | benjamin.peterson | 2009-07-03 10:08:20 -0400 (Fri, 03 Jul 2009) | 1 line another cStringIO restriction ........ r73839 | gregory.p.smith | 2009-07-04 04:42:10 -0400 (Sat, 04 Jul 2009) | 3 lines Merge r73838 from py3k branch. Use the nondeprecated unittest method names. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Fri Jul 17 13:20:14 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 11:20:14 -0000 Subject: [Python-checkins] r74061 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 13:20:13 2009 New Revision: 74061 Log: Blocked revisions 73773 via svnmerge ........ r73773 | benjamin.peterson | 2009-07-02 12:51:56 -0400 (Thu, 02 Jul 2009) | 1 line remove this test; a module level warning is enough ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Fri Jul 17 13:43:26 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 11:43:26 -0000 Subject: [Python-checkins] r74062 - in python/branches/py3k: Doc/library/decimal.rst Doc/library/multiprocessing.rst Doc/library/optparse.rst Doc/library/subprocess.rst Doc/library/unittest.rst Python/sysmodule.c Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 13:43:26 2009 New Revision: 74062 Log: Merged revisions 73665,73693,73704-73705,73707,73712-73713,73824 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73665 | alexandre.vassalotti | 2009-06-28 21:01:51 -0400 (Sun, 28 Jun 2009) | 2 lines Update docstrings for sys.getdlopenflags() and sys.setdlopenflags(). ........ r73693 | jesse.noller | 2009-06-29 14:20:34 -0400 (Mon, 29 Jun 2009) | 1 line Bug 5906: add a documentation note for unix daemons vs. multiprocessing daemons ........ r73704 | georg.brandl | 2009-06-30 12:15:43 -0400 (Tue, 30 Jun 2009) | 1 line #6376: fix copy-n-paste oversight. ........ r73705 | georg.brandl | 2009-06-30 12:17:28 -0400 (Tue, 30 Jun 2009) | 1 line #6374: add a bit of explanation about shell=True on Windows. ........ r73707 | georg.brandl | 2009-06-30 12:35:11 -0400 (Tue, 30 Jun 2009) | 1 line #6371: fix link targets. ........ r73712 | ezio.melotti | 2009-06-30 18:51:06 -0400 (Tue, 30 Jun 2009) | 1 line Fixed defaultTestCase -> defaultTestResult ........ r73713 | ezio.melotti | 2009-06-30 18:56:16 -0400 (Tue, 30 Jun 2009) | 1 line Fixed a backslash that was not supposed to be there ........ r73824 | ezio.melotti | 2009-07-03 21:18:08 -0400 (Fri, 03 Jul 2009) | 1 line #6398 typo: versio. -> version. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/decimal.rst python/branches/py3k/Doc/library/multiprocessing.rst python/branches/py3k/Doc/library/optparse.rst python/branches/py3k/Doc/library/subprocess.rst python/branches/py3k/Doc/library/unittest.rst python/branches/py3k/Python/sysmodule.c Modified: python/branches/py3k/Doc/library/decimal.rst ============================================================================== --- python/branches/py3k/Doc/library/decimal.rst (original) +++ python/branches/py3k/Doc/library/decimal.rst Fri Jul 17 13:43:26 2009 @@ -558,10 +558,9 @@ operands* (see :ref:`logical_operands_label`). The result is the digit-wise ``and`` of the two operands. - .. method:: logical_invert(other[, context]) + .. method:: logical_invert([context]) - :meth:`logical_invert` is a logical operation. The argument must - be a *logical operand* (see :ref:`logical_operands_label`). The + :meth:`logical_invert` is a logical operation. The result is the digit-wise inversion of the operand. .. method:: logical_or(other[, context]) Modified: python/branches/py3k/Doc/library/multiprocessing.rst ============================================================================== --- python/branches/py3k/Doc/library/multiprocessing.rst (original) +++ python/branches/py3k/Doc/library/multiprocessing.rst Fri Jul 17 13:43:26 2009 @@ -372,7 +372,9 @@ Note that a daemonic process is not allowed to create child processes. Otherwise a daemonic process would leave its children orphaned if it gets - terminated when its parent process exits. + terminated when its parent process exits. Additionally, these are **not** + Unix daemons or services, they are normal processes that will be + terminated (and not joined) if non-dameonic processes have exited. In addition to the :class:`Threading.Thread` API, :class:`Process` objects also support the following attributes and methods: Modified: python/branches/py3k/Doc/library/optparse.rst ============================================================================== --- python/branches/py3k/Doc/library/optparse.rst (original) +++ python/branches/py3k/Doc/library/optparse.rst Fri Jul 17 13:43:26 2009 @@ -637,8 +637,8 @@ ``parser.error()`` from your application code. If :mod:`optparse`'s default error-handling behaviour does not suit your needs, -you'll need to subclass OptionParser and override its :meth:`exit` and/or -:meth:`error` methods. +you'll need to subclass OptionParser and override its :meth:`~OptionParser.exit` +and/or :meth:`~OptionParser.error` methods. .. _optparse-putting-it-all-together: Modified: python/branches/py3k/Doc/library/subprocess.rst ============================================================================== --- python/branches/py3k/Doc/library/subprocess.rst (original) +++ python/branches/py3k/Doc/library/subprocess.rst Fri Jul 17 13:43:26 2009 @@ -68,7 +68,11 @@ needed: Usually, the program to execute is defined by the *args* argument. If ``shell=True``, the *executable* argument specifies which shell to use. On Unix, the default shell is :file:`/bin/sh`. On Windows, the default shell is - specified by the :envvar:`COMSPEC` environment variable. + specified by the :envvar:`COMSPEC` environment variable. The only reason you + would need to specify ``shell=True`` on Windows is where the command you + wish to execute is actually built in to the shell, eg ``dir``, ``copy``. + You don't need ``shell=True`` to run a batch file, nor to run a console-based + executable. *stdin*, *stdout* and *stderr* specify the executed programs' standard input, standard output and standard error file handles, respectively. Valid values Modified: python/branches/py3k/Doc/library/unittest.rst ============================================================================== --- python/branches/py3k/Doc/library/unittest.rst (original) +++ python/branches/py3k/Doc/library/unittest.rst Fri Jul 17 13:43:26 2009 @@ -646,8 +646,8 @@ Run the test, collecting the result into the test result object passed as *result*. If *result* is omitted or :const:`None`, a temporary result - object is created (by calling the :meth:`defaultTestCase` method) and - used; this result object is not returned to :meth:`run`'s caller. + object is created (by calling the :meth:`defaultTestResult` method) and + used. The result object is not returned to :meth:`run`'s caller. The same effect may be had by simply calling the :class:`TestCase` instance. Modified: python/branches/py3k/Python/sysmodule.c ============================================================================== --- python/branches/py3k/Python/sysmodule.c (original) +++ python/branches/py3k/Python/sysmodule.c Fri Jul 17 13:43:26 2009 @@ -586,12 +586,14 @@ PyDoc_STRVAR(setdlopenflags_doc, "setdlopenflags(n) -> None\n\ \n\ -Set the flags that will be used for dlopen() calls. Among other\n\ -things, this will enable a lazy resolving of symbols when importing\n\ -a module, if called as sys.setdlopenflags(0)\n\ -To share symbols across extension modules, call as\n\ -sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)" -); +Set the flags used by the interpreter for dlopen calls, such as when the\n\ +interpreter loads extension modules. Among other things, this will enable\n\ +a lazy resolving of symbols when importing a module, if called as\n\ +sys.setdlopenflags(0). To share symbols across extension modules, call as\n\ +sys.setdlopenflags(ctypes.RTLD_GLOBAL). Symbolic names for the flag modules\n\ +can be either found in the ctypes module, or in the DLFCN module. If DLFCN\n\ +is not available, it can be generated from /usr/include/dlfcn.h using the\n\ +h2py script."); static PyObject * sys_getdlopenflags(PyObject *self, PyObject *args) @@ -605,10 +607,10 @@ PyDoc_STRVAR(getdlopenflags_doc, "getdlopenflags() -> int\n\ \n\ -Return the current value of the flags that are used for dlopen()\n\ -calls. The flag constants are defined in the dl module." -); -#endif +Return the current value of the flags that are used for dlopen calls.\n\ +The flag constants are defined in the ctypes and DLFCN modules."); + +#endif /* HAVE_DLOPEN */ #ifdef USE_MALLOPT /* Link with -lmalloc (or -lmpc) on an SGI */ From python-checkins at python.org Fri Jul 17 14:07:01 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 12:07:01 -0000 Subject: [Python-checkins] r74063 - in python/branches/py3k: Doc/library/multiprocessing.rst Lib/multiprocessing/process.py Lib/test/test_multiprocessing.py Misc/ACKS Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 14:07:01 2009 New Revision: 74063 Log: Merged revisions 73694,73708,73738 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73694 | jesse.noller | 2009-06-29 14:24:26 -0400 (Mon, 29 Jun 2009) | 1 line Issue 5740: multiprocessing.connection.* authkey fixes ........ r73708 | jesse.noller | 2009-06-30 13:11:52 -0400 (Tue, 30 Jun 2009) | 1 line Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes ........ r73738 | r.david.murray | 2009-06-30 22:49:10 -0400 (Tue, 30 Jun 2009) | 2 lines Make punctuation prettier and break up run-on sentence. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/multiprocessing.rst python/branches/py3k/Lib/multiprocessing/process.py python/branches/py3k/Lib/test/test_multiprocessing.py python/branches/py3k/Misc/ACKS Modified: python/branches/py3k/Doc/library/multiprocessing.rst ============================================================================== --- python/branches/py3k/Doc/library/multiprocessing.rst (original) +++ python/branches/py3k/Doc/library/multiprocessing.rst Fri Jul 17 14:07:01 2009 @@ -1715,7 +1715,7 @@ generally be omitted since it can usually be inferred from the format of *address*. (See :ref:`multiprocessing-address-formats`) - If *authentication* is ``True`` or *authkey* is a string then digest + If *authenticate* is ``True`` or *authkey* is a string then digest authentication is used. The key used for authentication will be either *authkey* or ``current_process().authkey)`` if *authkey* is ``None``. If authentication fails then :exc:`AuthenticationError` is raised. See @@ -1757,7 +1757,7 @@ If *authkey* is ``None`` and *authenticate* is ``True`` then ``current_process().authkey`` is used as the authentication key. If - *authkey* is ``None`` and *authentication* is ``False`` then no + *authkey* is ``None`` and *authenticate* is ``False`` then no authentication is done. If authentication fails then :exc:`AuthenticationError` is raised. See :ref:`multiprocessing-auth-keys`. @@ -2099,6 +2099,38 @@ for i in range(10): Process(target=f, args=(lock,)).start() +Beware replacing sys.stdin with a "file like object" + + :mod:`multiprocessing` originally unconditionally called:: + + os.close(sys.stdin.fileno()) + + in the :meth:`multiprocessing.Process._bootstrap` method --- this resulted + in issues with processes-in-processes. This has been changed to:: + + sys.stdin.close() + sys.stdin = open(os.devnull) + + Which solves the fundamental issue of processes colliding with each other + resulting in a bad file descriptor error, but introduces a potential danger + to applications which replace :func:`sys.stdin` with a "file-like object" + with output buffering. This danger is that if multiple processes call + :func:`close()` on this file-like object, it could result in the same + data being flushed to the object multiple times, resulting in corruption. + + If you write a file-like object and implement your own caching, you can + make it fork-safe by storing the pid whenever you append to the cache, + and discarding the cache when the pid changes. For example:: + + @property + def cache(self): + pid = os.getpid() + if pid != self._pid: + self._pid = pid + self._cache = [] + return self._cache + + For more information, see :issue:`5155`, :issue:`5313` and :issue:`5331` Windows ~~~~~~~ Modified: python/branches/py3k/Lib/multiprocessing/process.py ============================================================================== --- python/branches/py3k/Lib/multiprocessing/process.py (original) +++ python/branches/py3k/Lib/multiprocessing/process.py Fri Jul 17 14:07:01 2009 @@ -221,7 +221,8 @@ self._counter = itertools.count(1) if sys.stdin is not None: try: - os.close(sys.stdin.fileno()) + sys.stdin.close() + sys.stdin = open(os.devnull) except (OSError, ValueError): pass _current_process = self Modified: python/branches/py3k/Lib/test/test_multiprocessing.py ============================================================================== --- python/branches/py3k/Lib/test/test_multiprocessing.py (original) +++ python/branches/py3k/Lib/test/test_multiprocessing.py Fri Jul 17 14:07:01 2009 @@ -8,6 +8,7 @@ import threading import queue as pyqueue import time +import io import sys import os import gc @@ -1868,7 +1869,74 @@ p.join() self.assertEqual(self.ns.test, 1) -testcases_other = [OtherTest, TestInvalidHandle, TestInitializers] +# +# Issue 5155, 5313, 5331: Test process in processes +# Verifies os.close(sys.stdin.fileno) vs. sys.stdin.close() behavior +# + +def _ThisSubProcess(q): + try: + item = q.get(block=False) + except pyqueue.Empty: + pass + +def _TestProcess(q): + queue = multiprocessing.Queue() + subProc = multiprocessing.Process(target=_ThisSubProcess, args=(queue,)) + subProc.start() + subProc.join() + +def _afunc(x): + return x*x + +def pool_in_process(): + pool = multiprocessing.Pool(processes=4) + x = pool.map(_afunc, [1, 2, 3, 4, 5, 6, 7]) + +class _file_like(object): + def __init__(self, delegate): + self._delegate = delegate + self._pid = None + + @property + def cache(self): + pid = os.getpid() + # There are no race conditions since fork keeps only the running thread + if pid != self._pid: + self._pid = pid + self._cache = [] + return self._cache + + def write(self, data): + self.cache.append(data) + + def flush(self): + self._delegate.write(''.join(self.cache)) + self._cache = [] + +class TestStdinBadfiledescriptor(unittest.TestCase): + + def test_queue_in_process(self): + queue = multiprocessing.Queue() + proc = multiprocessing.Process(target=_TestProcess, args=(queue,)) + proc.start() + proc.join() + + def test_pool_in_process(self): + p = multiprocessing.Process(target=pool_in_process) + p.start() + p.join() + + def test_flushing(self): + sio = io.StringIO() + flike = _file_like(sio) + flike.write('foo') + proc = multiprocessing.Process(target=lambda: flike.flush()) + flike.flush() + assert sio.getvalue() == 'foo' + +testcases_other = [OtherTest, TestInvalidHandle, TestInitializers, + TestStdinBadfiledescriptor] # # Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Fri Jul 17 14:07:01 2009 @@ -46,6 +46,7 @@ Ulf Bartelt Nick Bastin Jeff Bauer +Mike Bayer Michael R Bax Anthony Baxter Samuel L. Bayer @@ -185,6 +186,7 @@ Dean Draayer John DuBois Paul Dubois +Graham Dumpleton Quinn Dunkan Robin Dunn Luke Dunstan @@ -558,6 +560,7 @@ Santiago Peres?n Mark Perrego Trevor Perrin +Gabriel de Perthuis Tim Peters Benjamin Peterson Chris Petrilli From buildbot at python.org Fri Jul 17 14:11:52 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 12:11:52 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.x Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.x/builds/951 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_normalization ====================================================================== ERROR: test_main (test.test_normalization.NormalizationTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_normalization.py", line 43, in test_main for line in open_urlresource(TESTDATAURL, encoding="utf-8"): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 1129: ordinal not in range(128) sincerely, -The Buildbot From buildbot at python.org Fri Jul 17 14:21:02 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 12:21:02 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/974 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_bigmem test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 17 14:46:58 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 12:46:58 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1187 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_thread.py", line 49, in task self.done_mutex.release() _thread.error: release unlocked lock Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_thread.py", line 49, in task self.done_mutex.release() _thread.error: release unlocked lock 1 test failed: test_imp make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 14:49:05 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 12:49:05 -0000 Subject: [Python-checkins] r74064 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Fri Jul 17 14:49:05 2009 New Revision: 74064 Log: Blocked revisions 73819,73821-73822,73863,73877 via svnmerge ........ r73819 | kristjan.jonsson | 2009-07-03 19:07:07 -0400 (Fri, 03 Jul 2009) | 2 lines http://bugs.python.org/issue6381 some platforms may raise ENOTCONN if the stack has disconnected the socket on behalf of the peer. ........ r73821 | kristjan.jonsson | 2009-07-03 19:26:02 -0400 (Fri, 03 Jul 2009) | 2 lines http://bugs.python.org/issue6267 Incorrect exception handling for xmlrp client retry ........ r73822 | kristjan.jonsson | 2009-07-03 19:29:50 -0400 (Fri, 03 Jul 2009) | 2 lines http://bugs.python.org/issue6267 Incorrect exception handling for xmlrpc client retry ........ r73863 | kristjan.jonsson | 2009-07-05 16:56:57 -0400 (Sun, 05 Jul 2009) | 2 lines http://bugs.python.org/issue6382 close_request() (which can send a socket.shutdown()) must be called by the child process in a forking server. The parent must merely close the socket handle. ........ r73877 | kristjan.jonsson | 2009-07-07 05:01:34 -0400 (Tue, 07 Jul 2009) | 2 lines http://bugs.python.org/issue6382 added the shutdown_request() which can perform shutdown before calling close. This is needed for the ForkingMixIn because different close semantics are required for child and parent process. shutdown_request(), for TCP servers, calls socket.shutdown() and then calls close_request(). Therefore, this is not an backwards incompatible change, since subclasses that continue to override close_request() continue to work. ........ Modified: python/branches/py3k/ (props changed) From alexandre at peadrop.com Fri Jul 17 14:59:33 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Fri, 17 Jul 2009 08:59:33 -0400 Subject: [Python-checkins] r74064 - python/branches/py3k In-Reply-To: <20090717124910.5981811BC6@spunkymail-mx10.g.dreamhost.com> References: <20090717124910.5981811BC6@spunkymail-mx10.g.dreamhost.com> Message-ID: Kristjan, Could you double-check that the following commits are correctly integrated in the py3k branch? They all look good to me, except perhaps r73863 which I am unsure about. Thanks, -- Alexandre On Fri, Jul 17, 2009 at 8:49 AM, alexandre.vassalotti wrote: > Author: alexandre.vassalotti > Date: Fri Jul 17 14:49:05 2009 > New Revision: 74064 > > Log: > Blocked revisions 73819,73821-73822,73863,73877 via svnmerge > > ........ > ?r73819 | kristjan.jonsson | 2009-07-03 19:07:07 -0400 (Fri, 03 Jul 2009) | 2 lines > > ?http://bugs.python.org/issue6381 > ?some platforms may raise ENOTCONN if the stack has disconnected the socket on behalf of the peer. > ........ > ?r73821 | kristjan.jonsson | 2009-07-03 19:26:02 -0400 (Fri, 03 Jul 2009) | 2 lines > > ?http://bugs.python.org/issue6267 > ?Incorrect exception handling for xmlrp client retry > ........ > ?r73822 | kristjan.jonsson | 2009-07-03 19:29:50 -0400 (Fri, 03 Jul 2009) | 2 lines > > ?http://bugs.python.org/issue6267 > ?Incorrect exception handling for xmlrpc client retry > ........ > ?r73863 | kristjan.jonsson | 2009-07-05 16:56:57 -0400 (Sun, 05 Jul 2009) | 2 lines > > ?http://bugs.python.org/issue6382 > ?close_request() (which can send a socket.shutdown()) must be called by the child process in a forking server. ?The parent must merely close the socket handle. > ........ > ?r73877 | kristjan.jonsson | 2009-07-07 05:01:34 -0400 (Tue, 07 Jul 2009) | 2 lines > > ?http://bugs.python.org/issue6382 > ?added the shutdown_request() which can perform shutdown before calling close. ?This is needed for the ForkingMixIn because different close semantics are required for child and parent process. ?shutdown_request(), for TCP servers, calls socket.shutdown() and then calls close_request(). ?Therefore, this is not an backwards incompatible change, since subclasses that continue to override close_request() continue to work. > ........ > > > Modified: > ? python/branches/py3k/ ? (props changed) > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins > From buildbot at python.org Fri Jul 17 17:26:13 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 15:26:13 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2336 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: alexandre.vassalotti,hirokazu.yamamoto BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 19:52:49 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 17 Jul 2009 17:52:49 -0000 Subject: [Python-checkins] r74065 - sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py Message-ID: Author: benjamin.peterson Date: Fri Jul 17 19:52:49 2009 New Revision: 74065 Log: pathname2url and url2pathname are in urllib.request not urllib.parse #6496 Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py (original) +++ sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py Fri Jul 17 19:52:49 2009 @@ -12,13 +12,13 @@ MAPPING = {'urllib': [ ('urllib.request', ['URLOpener', 'FancyURLOpener', 'urlretrieve', - '_urlopener', 'urlopen', 'urlcleanup']), + '_urlopener', 'urlopen', 'urlcleanup', + 'pathname2url', 'url2pathname']), ('urllib.parse', ['quote', 'quote_plus', 'unquote', 'unquote_plus', - 'urlencode', 'pathname2url', 'url2pathname', 'splitattr', - 'splithost', 'splitnport', 'splitpasswd', 'splitport', - 'splitquery', 'splittag', 'splittype', 'splituser', - 'splitvalue', ]), + 'urlencode', 'splitattr', 'splithost', 'splitnport', + 'splitpasswd', 'splitport', 'splitquery', 'splittag', + 'splittype', 'splituser', 'splitvalue', ]), ('urllib.error', ['ContentTooShortError'])], 'urllib2' : [ From buildbot at python.org Fri Jul 17 20:09:41 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 18:09:41 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.x Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.x/builds/779 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_normalization ====================================================================== ERROR: test_main (test.test_normalization.NormalizationTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_normalization.py", line 43, in test_main for line in open_urlresource(TESTDATAURL, encoding="utf-8"): File "E:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 6539: character maps to sincerely, -The Buildbot From python-checkins at python.org Fri Jul 17 21:11:02 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 17 Jul 2009 19:11:02 -0000 Subject: [Python-checkins] r74066 - python/branches/py3k/Python/Python-ast.c Message-ID: Author: benjamin.peterson Date: Fri Jul 17 21:11:02 2009 New Revision: 74066 Log: update ast version Modified: python/branches/py3k/Python/Python-ast.c Modified: python/branches/py3k/Python/Python-ast.c ============================================================================== --- python/branches/py3k/Python/Python-ast.c (original) +++ python/branches/py3k/Python/Python-ast.c Fri Jul 17 21:11:02 2009 @@ -2,7 +2,7 @@ /* - __version__ 67616. + __version__ 73626. This module must be committed separately after each AST grammar change; The __version__ number is set to the revision number of the commit @@ -6411,7 +6411,7 @@ NULL; if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) return NULL; - if (PyModule_AddStringConstant(m, "__version__", "67616") < 0) + if (PyModule_AddStringConstant(m, "__version__", "73626") < 0) return NULL; if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return NULL; From buildbot at python.org Fri Jul 17 21:42:47 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 19:42:47 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/977 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 4 tests failed: test_codecs test_import test_io test_mailbox ====================================================================== ERROR: test_basics (test.test_codecs.BasicUnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 1360, in test_basics encodedresult += encoder.encode(c) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_decoder_state (test.test_codecs.BasicUnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 1445, in test_decoder_state self.check_state_handling_decode(encoding, u, u.encode(encoding)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 30, in check_state_handling_decode part1 = d.decode(s[:i]) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1753, in test_basic_io self.assertEquals(f.read(), "abc") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1748, in test_basic_io self.assertEquals(f.write("abc"), 3) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_destructor (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1698, in test_destructor t.write("abc") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_detach (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1531, in test_detach t.write("howdy") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1796, in read decoder.decode(self.buffer.read(), final=True)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_writing (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1593, in test_encoding_errors_writing self.assertRaises(UnicodeError, t.write, "\xff") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest.py", line 592, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 493, in readlines return list(self) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1811, in __next__ line = self.readline() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1888, in readline while self._read_chunk(): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_output (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1682, in test_newlines_output txt.write("AAA\nB") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 17 21:45:00 2009 From: buildbot at python.org (buildbot at python.org) Date: Fri, 17 Jul 2009 19:45:00 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1189 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_syslog Traceback (most recent call last): File "./Lib/test/regrtest.py", line 692, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_syslog.py", line 2, in from test import support NameError: name 'support' is not defined make: *** [buildbottest] Error 1 sincerely, -The Buildbot From martin at v.loewis.de Fri Jul 17 21:58:45 2009 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Fri, 17 Jul 2009 21:58:45 +0200 Subject: [Python-checkins] r74049 - in python/branches/py3k: configure pyconfig.h.in In-Reply-To: References: Message-ID: <4A60D7F5.4010808@v.loewis.de> > Regenerate configure script. I think this change is incorrect - you should have used autoconf 2.61, not autoconf 2.63. The size of the diff should have told you that something is wrong. Regards, Martin From alexandre at peadrop.com Sat Jul 18 00:15:20 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Fri, 17 Jul 2009 18:15:20 -0400 Subject: [Python-checkins] r74049 - in python/branches/py3k: configure pyconfig.h.in In-Reply-To: <4A60D7F5.4010808@v.loewis.de> References: <4A60D7F5.4010808@v.loewis.de> Message-ID: On Fri, Jul 17, 2009 at 3:58 PM, "Martin v. L?wis" wrote: >> Regenerate configure script. > > I think this change is incorrect - you should have used autoconf 2.61, > not autoconf 2.63. The size of the diff should have told you that > something is wrong. > I don't understand; why should autoconf 2.61 be used instead of a newer version? It is a matter to make the changes in the generated output easier to review? If so, would it be sufficient to provide a diff of the old configure script and the script generated by autoconf 2.61? Anyway, I am not against reverting the change and regenerating the configure script with autoconf 2.61. However, there isn't a autoconf 2.61 package available for my Ubuntu 9.04 machine. So, I need to compile it myself to fix this. Cheers, -- Alexandre From martin at v.loewis.de Sat Jul 18 00:34:01 2009 From: martin at v.loewis.de (=?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?=) Date: Sat, 18 Jul 2009 00:34:01 +0200 Subject: [Python-checkins] r74049 - in python/branches/py3k: configure pyconfig.h.in In-Reply-To: References: <4A60D7F5.4010808@v.loewis.de> Message-ID: <4A60FC59.6060703@v.loewis.de> >> I think this change is incorrect - you should have used autoconf 2.61, >> not autoconf 2.63. The size of the diff should have told you that >> something is wrong. >> > > I don't understand; why should autoconf 2.61 be used instead of a > newer version? Because 2.63 doesn't work. I suppose you have edited the configure file before checking it in; if I run 2.63 again, subversion will complain svn: File 'configure' has inconsistent newlines svn: Inconsistent line ending style That's because 2.63 is broken; it emits a blank carriage-return character in the file which subversion cannot deal with. > It is a matter to make the changes in the generated > output easier to review? If so, would it be sufficient to provide a > diff of the old configure script and the script generated by autoconf > 2.61? It's also desirable that all committers use the same version, so the that the file doesn't change forth and back all the time. It's sometimes important to confirm that the changes get passed through correctly into the generated script; this because tedious if you also have to fight the version differences. So by policy decision, we are all using a fixed version, and that is currently 2.61 - see the comment at the beginning of the file. It would be possible to change the policy, but such a change must be agreed. > Anyway, I am not against reverting the change and regenerating the > configure script with autoconf 2.61. However, there isn't a autoconf > 2.61 package available for my Ubuntu 9.04 machine. So, I need to > compile it myself to fix this. Correct - although "compile" is a bit of an overstatement; autoconf installation doesn't really compile anything. I usually do configure --prefix=~/ac261 make make install and then run ~/ac261/bin/autoconf when I need to generate Python's configure. I guess I will put some m4 magic into the file to prevent it from being compiled with anything than the official version, so that I don't have to explain all that every two months. Regards, Martin From ncoghlan at gmail.com Sat Jul 18 00:54:53 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Sat, 18 Jul 2009 08:54:53 +1000 Subject: [Python-checkins] r74049 - in python/branches/py3k: configure pyconfig.h.in In-Reply-To: <4A60FC59.6060703@v.loewis.de> References: <4A60D7F5.4010808@v.loewis.de> <4A60FC59.6060703@v.loewis.de> Message-ID: <4A61013D.8010909@gmail.com> Martin v. L?wis wrote: > I guess I will put some m4 magic into the file to prevent it from > being compiled with anything than the official version, so that I > don't have to explain all that every two months. +1 (I must admit I probably would have forgotten about it if I had a need to edit configure.in) Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From python-checkins at python.org Sat Jul 18 01:09:03 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 23:09:03 -0000 Subject: [Python-checkins] r74067 - in python/trunk: configure pyconfig.h.in Message-ID: Author: alexandre.vassalotti Date: Sat Jul 18 01:09:02 2009 New Revision: 74067 Log: Revert r74048. Modified: python/trunk/configure python/trunk/pyconfig.h.in Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Sat Jul 18 01:09:02 2009 @@ -1,12 +1,12 @@ #! /bin/sh -# From configure.in Revision: 74044 . +# From configure.in Revision: 72898 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for python 2.7. +# Generated by GNU Autoconf 2.61 for python 2.7. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 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. ## --------------------- ## @@ -18,7 +18,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # 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 @@ -40,45 +40,17 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + 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 # Support unset when possible. @@ -94,6 +66,8 @@ # 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. @@ -116,7 +90,7 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -129,10 +103,17 @@ PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + 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) >/dev/null 2>&1 && $as_unset $as_var + fi +done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -154,7 +135,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -180,7 +161,7 @@ as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -262,7 +243,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # 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 @@ -283,7 +264,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # 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 @@ -363,10 +344,10 @@ 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+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -435,10 +416,9 @@ test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell bug-autoconf at gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. + echo Please tell autoconf at gnu.org about your system, + echo including any error possibly output before this + echo message } @@ -474,7 +454,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { 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 @@ -502,6 +482,7 @@ *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -514,22 +495,19 @@ rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + mkdir conf$$.dir fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - 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' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + 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' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -554,10 +532,10 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -638,160 +616,128 @@ # include #endif" -ac_subst_vars='LTLIBOBJS -SRCDIRS -THREADHEADERS -UNICODE_OBJS -LIBC -LIBM -HAVE_GETHOSTBYNAME -HAVE_GETHOSTBYNAME_R -HAVE_GETHOSTBYNAME_R_3_ARG -HAVE_GETHOSTBYNAME_R_5_ARG -HAVE_GETHOSTBYNAME_R_6_ARG -LIBOBJS -TRUE -MACHDEP_OBJS -DYNLOADFILE -DLINCLDIR -THREADOBJ -LDLAST -USE_THREAD_MODULE -SIGNAL_OBJS -USE_SIGNAL_MODULE -SHLIBS -CFLAGSFORSHARED -LINKFORSHARED -CCSHARED -BLDSHARED -LDSHARED -SO -LIBTOOL_CRUFT -OTHER_LIBTOOL_OPT -UNIVERSAL_ARCH_FLAGS -BASECFLAGS -OPT -LN -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -SVNVERSION -ARFLAGS -AR -RANLIB -GNULD -LINKCC -RUNSHARED -INSTSONAME -LDLIBRARYDIR -BLDLIBRARY -DLLLIBRARY -LDLIBRARY -LIBRARY -BUILDEXEEXT -EGREP -GREP -CPP -MAINCC -CXX -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -EXPORT_MACOSX_DEPLOYMENT_TARGET -CONFIGURE_MACOSX_DEPLOYMENT_TARGET -EXTRAMACHDEPPATH -EXTRAPLATDIR -SGI_ABI -MACHDEP -FRAMEWORKUNIXTOOLSPREFIX -FRAMEWORKALTINSTALLLAST -FRAMEWORKALTINSTALLFIRST -FRAMEWORKINSTALLLAST -FRAMEWORKINSTALLFIRST -PYTHONFRAMEWORKINSTALLDIR -PYTHONFRAMEWORKPREFIX -PYTHONFRAMEWORKDIR -PYTHONFRAMEWORKIDENTIFIER -PYTHONFRAMEWORK -ARCH_RUN_32BIT -UNIVERSALSDK -CONFIG_ARGS -SOVERSION -VERSION -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME +ac_subst_vars='SHELL PATH_SEPARATOR -SHELL' +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 +ARCH_RUN_32BIT +PYTHONFRAMEWORK +PYTHONFRAMEWORKIDENTIFIER +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 +GNULD +RANLIB +AR +ARFLAGS +SVNVERSION +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +LN +OPT +BASECFLAGS +UNIVERSAL_ARCH_FLAGS +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_user_opts=' -enable_option_checking -enable_universalsdk -with_universal_archs -with_framework_name -enable_framework -with_gcc -with_cxx_main -with_suffix -enable_shared -enable_profiling -with_pydebug -enable_toolbox_glue -with_libs -with_system_ffi -with_dbmliborder -with_signal_module -with_dec_threads -with_threads -with_thread -with_pth -enable_ipv6 -with_doc_strings -with_tsc -with_pymalloc -with_wctype_functions -with_fpectl -with_libm -with_libc -enable_big_digits -enable_unicode -' ac_precious_vars='build_alias host_alias target_alias @@ -806,8 +752,6 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -906,21 +850,13 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -933,21 +869,13 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$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- \ @@ -1138,38 +1066,22 @@ ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -1189,7 +1101,7 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option + -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1198,16 +1110,16 @@ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1216,38 +1128,22 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. +# 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=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1262,7 +1158,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1278,10 +1174,10 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1289,12 +1185,12 @@ if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1321,12 +1217,12 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1375,9 +1271,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1387,25 +1283,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --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] - --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] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --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] + --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 @@ -1419,7 +1315,6 @@ cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-universalsdk[=SDKDIR] @@ -1493,17 +1388,15 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + 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/ ;; @@ -1539,7 +1432,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1549,10 +1442,10 @@ if $ac_init_version; then cat <<\_ACEOF python configure 2.7 -generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +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 @@ -1563,7 +1456,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by python $as_me 2.7, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1599,7 +1492,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1634,7 +1527,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1686,12 +1579,11 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_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) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1721,9 +1613,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1738,9 +1630,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1756,8 +1648,8 @@ echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1799,24 +1691,21 @@ # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE +# Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + set x "$prefix/share/config.site" "$prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" +shift +for ac_site_file do - test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1826,16 +1715,16 @@ # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { 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";; esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1849,38 +1738,29 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_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 @@ -1890,12 +1770,10 @@ fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -2037,20 +1915,20 @@ UNIVERSAL_ARCHS="32-bit" -{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5 -$as_echo_n "checking for --with-universal-archs... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5 +echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; } # Check whether --with-universal-archs was given. if test "${with_universal_archs+set}" = set; then withval=$with_universal_archs; - { $as_echo "$as_me:$LINENO: result: $withval" >&5 -$as_echo "$withval" >&6; } + { echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6; } UNIVERSAL_ARCHS="$withval" else - { $as_echo "$as_me:$LINENO: result: 32-bit" >&5 -$as_echo "32-bit" >&6; } + { echo "$as_me:$LINENO: result: 32-bit" >&5 +echo "${ECHO_T}32-bit" >&6; } fi @@ -2174,8 +2052,8 @@ ## # Set name for machine-dependent library files -{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5 -$as_echo_n "checking MACHDEP... " >&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` @@ -2338,14 +2216,14 @@ LDFLAGS="$SGI_ABI $LDFLAGS" MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` fi -{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5 -$as_echo "$MACHDEP" >&6; } +{ echo "$as_me:$LINENO: result: $MACHDEP" >&5 +echo "${ECHO_T}$MACHDEP" >&6; } # And add extra plat-mac for darwin -{ $as_echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5 -$as_echo_n "checking EXTRAPLATDIR... " >&6; } +{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5 +echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; } if test -z "$EXTRAPLATDIR" then case $MACHDEP in @@ -2359,8 +2237,8 @@ ;; esac fi -{ $as_echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5 -$as_echo "$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 @@ -2370,11 +2248,11 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' -{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5 -$as_echo_n "checking machine type as reported by uname -m... " >&6; } +{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5 +echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; } ac_sys_machine=`uname -m` -{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5 -$as_echo "$ac_sys_machine" >&6; } +{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5 +echo "${ECHO_T}$ac_sys_machine" >&6; } # checks for alternative programs @@ -2386,8 +2264,8 @@ # XXX shouldn't some/most/all of this code be merged with the stuff later # on that fiddles with OPT and BASECFLAGS? -{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5 -$as_echo_n "checking for --without-gcc... " >&6; } +{ echo "$as_me:$LINENO: checking for --without-gcc" >&5 +echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; } # Check whether --with-gcc was given. if test "${with_gcc+set}" = set; then @@ -2420,8 +2298,8 @@ OPT="$OPT -O" ;; *) - { { $as_echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5 -$as_echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;} + { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5 +echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -2435,15 +2313,15 @@ esac fi -{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5 -$as_echo "$without_gcc" >&6; } +{ 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" then - { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file + { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)" >&5 -$as_echo "$as_me: error: cached CC is different -- throw away $cache_file +echo "$as_me: error: cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)" >&2;} { (exit 1); exit 1; }; } fi @@ -2456,10 +2334,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2472,7 +2350,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2483,11 +2361,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2496,10 +2374,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + 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. @@ -2512,7 +2390,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2523,11 +2401,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2535,8 +2413,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ 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 @@ -2549,10 +2431,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2565,7 +2447,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2576,11 +2458,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2589,10 +2471,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2610,7 +2492,7 @@ continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2633,11 +2515,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2648,10 +2530,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2664,7 +2546,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2675,11 +2557,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2692,10 +2574,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + 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. @@ -2708,7 +2590,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2719,11 +2601,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2735,8 +2617,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ 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 @@ -2746,50 +2632,44 @@ fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2808,22 +2688,27 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # 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. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - +{ 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[^ ]*//'` +# +# 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 | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2834,11 +2719,10 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # 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' @@ -2849,7 +2733,7 @@ do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2876,27 +2760,25 @@ ac_file='' fi -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables +echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&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 @@ -2905,53 +2787,49 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. +echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi fi fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ 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; } -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2960,33 +2838,31 @@ 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3009,43 +2885,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then 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 | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3071,21 +2944,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -3095,19 +2967,15 @@ ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +{ 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 -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -3134,21 +3002,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -3173,21 +3040,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3213,21 +3079,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3242,8 +3107,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$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 @@ -3259,10 +3124,10 @@ CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3333,21 +3198,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_c89=$ac_arg else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3363,15 +3227,15 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3384,8 +3248,8 @@ -{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=" >&5 -$as_echo_n "checking for --with-cxx-main=... " >&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 was given. if test "${with_cxx_main+set}" = set; then @@ -3410,8 +3274,8 @@ fi -{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5 -$as_echo "$with_cxx_main" >&6; } +{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5 +echo "${ECHO_T}$with_cxx_main" >&6; } preset_cxx="$CXX" if test -z "$CXX" @@ -3419,10 +3283,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CXX in [\\/]* | ?:[\\/]*) @@ -3437,7 +3301,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3450,20 +3314,20 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CXX in [\\/]* | ?:[\\/]*) @@ -3478,7 +3342,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3491,11 +3355,11 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi ;; @@ -3511,10 +3375,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -3527,7 +3391,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3538,11 +3402,11 @@ fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3557,12 +3421,12 @@ fi if test "$preset_cxx" != "$CXX" then - { $as_echo "$as_me:$LINENO: WARNING: + { echo "$as_me:$LINENO: WARNING: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. " >&5 -$as_echo "$as_me: WARNING: +echo "$as_me: WARNING: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. @@ -3577,15 +3441,15 @@ 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 -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&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= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3617,21 +3481,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3655,14 +3518,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3670,7 +3532,7 @@ # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3695,8 +3557,8 @@ else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$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 @@ -3724,21 +3586,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3762,14 +3623,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3777,7 +3637,7 @@ # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3793,13 +3653,11 @@ if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi ac_ext=c @@ -3809,37 +3667,42 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$GREP"; then 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 +# 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. + 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 - $as_echo_n 0123456789 >"conftest.in" + 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" - $as_echo 'GREP' >> "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` @@ -3854,60 +3717,74 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_GREP_found && break 3 - done + + $ac_path_GREP_found && break 3 done done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + + +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 +fi + else ac_cv_path_GREP=$GREP fi + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - if test -z "$EGREP"; then + # 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 +# 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. + 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 - $as_echo_n 0123456789 >"conftest.in" + 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" - $as_echo 'EGREP' >> "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` @@ -3922,2669 +3799,832 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_EGREP_found && break 3 - done + + $ac_path_EGREP_found && break 3 done done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + + +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 +fi + else ac_cv_path_EGREP=$EGREP fi + fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&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 -#include -#include -#include - -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -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. - cat >conftest.$ac_ext <<_ACEOF +{ 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 cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#ifdef _AIX + yes +#endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + $EGREP "yes" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : else - ac_cv_header_stdc=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f conftest* -fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -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)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +# Check for unsupported systems +case $ac_sys_system/$ac_sys_release in +atheos*|Linux*/1*) + echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. + echo See README for details. + exit 1;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -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 --with-suffix" >&5 +echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; } +# Check whether --with-suffix was given. +if test "${with_suffix+set}" = set; then + withval=$with_suffix; + case $withval in + no) EXEEXT=;; + yes) EXEEXT=.exe;; + *) EXEEXT=$withval;; + esac fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF -fi +{ echo "$as_me:$LINENO: result: $EXEEXT" >&5 +echo "${ECHO_T}$EXEEXT" >&6; } -# On IRIX 5.3, sys/types and inttypes.h are conflicting. +# 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; } +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; } + BUILDEXEEXT=.exe +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + BUILDEXEEXT=$EXEEXT +fi +rmdir CaseSensitiveTestDir +case $MACHDEP in +bsdos*) + case $CC in + gcc) CC="$CC -D_HAVE_BSDI";; + esac;; +esac +case $ac_sys_system in +hp*|HP*) + case $CC in + cc|*/cc) CC="$CC -Ae";; + esac;; +Monterey*) + case $CC in + cc) CC="$CC -Wl,-Bexport";; + esac;; +SunOS*) + # Some functions have a prototype only with that define, e.g. confstr +cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + ;; +esac -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - 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 +{ 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; } -#include <$ac_header> -_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# 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 +# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY +# is blank as the main program is not linked directly against LDLIBRARY. +# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On +# systems without shared libraries, LDLIBRARY is the same as LIBRARY +# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, +# DLLLIBRARY is the shared (i.e., DLL) library. +# +# RUNSHARED is used to run shared python without installed libraries +# +# INSTSONAME is the name of the shared library that will be use to install +# on the system - some systems like version suffix, others don't - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + + + +LDLIBRARY="$LIBRARY" +BLDLIBRARY='$(LDLIBRARY)' +INSTSONAME='$(LDLIBRARY)' +DLLLIBRARY='' +LDLIBRARYDIR='' +RUNSHARED='' + +# LINKCC is the command that links the python executable -- default is $(CC). +# If CXX is set, and if it is needed to link a main function that was +# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: +# python might then depend on the C++ runtime +# 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; } +if test -z "$LINKCC" +then + LINKCC='$(PURIFY) $(MAINCC)' + case $ac_sys_system in + AIX*) + exp_extra="\"\"" + if test $ac_sys_release -ge 5 -o \ + $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then + exp_extra="." + fi + LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; + Monterey64*) + LINKCC="$LINKCC -L/usr/lib/ia64l64";; + QNX*) + # qcc must be used because the other compilers do not + # support -N. + LINKCC=qcc;; + esac fi +{ echo "$as_me:$LINENO: result: $LINKCC" >&5 +echo "${ECHO_T}$LINKCC" >&6; } -done +# GNULD is set to "yes" if the GNU linker is used. If this goes wrong +# make sure we default having it set to "no": this is used by +# distutils.unixccompiler to know if it should add --enable-new-dtags +# to linker command lines, and failing to detect GNU ld simply results +# in the same bahaviour as before. + +{ echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +ac_prog=ld +if test "$GCC" = yes; then + ac_prog=`$CC -print-prog-name=ld` +fi +case `"$ac_prog" -V 2>&1 < /dev/null` in + *GNU*) + GNULD=yes;; + *) + GNULD=no;; +esac +{ echo "$as_me:$LINENO: result: $GNULD" >&5 +echo "${ECHO_T}$GNULD" >&6; } +{ 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; +fi - if test "${ac_cv_header_minix_config_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -$as_echo_n "checking for minix/config.h... " >&6; } -if test "${ac_cv_header_minix_config_h+set}" = set; then - $as_echo_n "(cached) " >&6 +if test -z "$enable_shared" +then + case $ac_sys_system in + CYGWIN* | atheos*) + enable_shared="yes";; + *) + enable_shared="no";; + esac fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -$as_echo "$ac_cv_header_minix_config_h" >&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 was given. +if test "${enable_profiling+set}" = set; then + enableval=$enable_profiling; ac_save_cc="$CC" + CC="$CC -pg" + if test "$cross_compiling" = yes; then + ac_enable_profiling="no" else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 -$as_echo_n "checking minix/config.h usability... " >&6; } -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 -#include +int main() { return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 -$as_echo_n "checking minix/config.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_enable_profiling="yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +( exit $ac_status ) +ac_enable_profiling="no" fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -$as_echo_n "checking for minix/config.h... " >&6; } -if test "${ac_cv_header_minix_config_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_minix_config_h=$ac_header_preproc +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -$as_echo "$ac_cv_header_minix_config_h" >&6; } -fi -if test "x$ac_cv_header_minix_config_h" = x""yes; then - MINIX=yes -else - MINIX= -fi + CC="$ac_save_cc" +fi - if test "$MINIX" = yes; then +{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 +echo "${ECHO_T}$ac_enable_profiling" >&6; } -cat >>confdefs.h <<\_ACEOF -#define _POSIX_SOURCE 1 -_ACEOF +case "$ac_enable_profiling" in + "yes") + BASECFLAGS="-pg $BASECFLAGS" + LDFLAGS="-pg $LDFLAGS" + ;; +esac +{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5 +echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; } -cat >>confdefs.h <<\_ACEOF -#define _POSIX_1_SOURCE 2 -_ACEOF +# MacOSX framework builds need more magic. LDLIBRARY is the dynamic +# library that we build, but we do not want to link against it (we +# will find it with a -framework option). For this reason there is an +# extra variable BLDLIBRARY against which Python and the extension +# modules are linked, BLDLIBRARY. This is normally the same as +# LDLIBRARY, but empty for MacOSX framework builds. +if test "$enable_framework" +then + LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' + RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH" + BLDLIBRARY='' +else + BLDLIBRARY='$(LDLIBRARY)' +fi +# Other platforms follow +if test $enable_shared = "yes"; then cat >>confdefs.h <<\_ACEOF -#define _MINIX 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +#define Py_ENABLE_SHARED 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_safe_to_define___extensions__=yes + case $ac_sys_system in + BeOS*) + LDLIBRARY='libpython$(VERSION).so' + ;; + CYGWIN*) + LDLIBRARY='libpython$(VERSION).dll.a' + DLLLIBRARY='libpython$(VERSION).dll' + ;; + SunOS*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + INSTSONAME="$LDLIBRARY".$SOVERSION + ;; + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + case $ac_sys_system in + FreeBSD*) + SOVERSION=`echo $SOVERSION|cut -d "." -f 1` + ;; + esac + INSTSONAME="$LDLIBRARY".$SOVERSION + ;; + hp*|HP*) + case `uname -m` in + ia64) + LDLIBRARY='libpython$(VERSION).so' + ;; + *) + LDLIBRARY='libpython$(VERSION).sl' + ;; + esac + BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)' + RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH} + ;; + OSF*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + ;; + atheos*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} + ;; + Darwin*) + LDLIBRARY='libpython$(VERSION).dylib' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}' + ;; + + esac +else # shared is disabled + case $ac_sys_system in + CYGWIN*) + BLDLIBRARY='$(LIBRARY)' + LDLIBRARY='libpython$(VERSION).dll.a' + ;; + esac +fi + +{ 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; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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 { 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 - ac_cv_safe_to_define___extensions__=no +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { 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; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF +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; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 { 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 - cat >>confdefs.h <<\_ACEOF -#define _ALL_SOURCE 1 -_ACEOF +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; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi - cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF + 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 - cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define _TANDEM_SOURCE 1 -_ACEOF +for ac_prog in ar aal +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; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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 { 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; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi -# Check for unsupported systems -case $ac_sys_system/$ac_sys_release in -atheos*|Linux*/1*) - echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. - echo See README for details. - exit 1;; -esac + test -n "$AR" && break +done +test -n "$AR" || AR="ar" -{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5 -$as_echo_n "checking for --with-suffix... " >&6; } +# tweak ARFLAGS only if the user didn't set it on the command line -# Check whether --with-suffix was given. -if test "${with_suffix+set}" = set; then - withval=$with_suffix; - case $withval in - no) EXEEXT=;; - yes) EXEEXT=.exe;; - *) EXEEXT=$withval;; - esac +if test -z "$ARFLAGS" +then + ARFLAGS="rc" fi -{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5 -$as_echo "$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 +# 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; } +if test "${ac_cv_prog_SVNVERSION+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$SVNVERSION"; then + ac_cv_prog_SVNVERSION="$SVNVERSION" # 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 { 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 -{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 -$as_echo_n "checking for case-insensitive build directory... " >&6; } -if test ! -d CaseSensitiveTestDir; then -mkdir CaseSensitiveTestDir + 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; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -if test -d casesensitivetestdir + +if test $SVNVERSION = found then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - BUILDEXEEXT=.exe + SVNVERSION="svnversion \$(srcdir)" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - BUILDEXEEXT=$EXEEXT + SVNVERSION="echo Unversioned directory" fi -rmdir CaseSensitiveTestDir case $MACHDEP in -bsdos*) - case $CC in - gcc) CC="$CC -D_HAVE_BSDI";; - esac;; +bsdos*|hp*|HP*) + # install -d does not work on BSDI or HP-UX + if test -z "$INSTALL" + then + INSTALL="${srcdir}/install-sh -c" + fi esac +ac_aux_dir= +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 + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + 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;} + { (exit 1); exit 1; }; } +fi + +# 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. -case $ac_sys_system in -hp*|HP*) - case $CC in - cc|*/cc) CC="$CC -Ae";; - esac;; -Monterey*) - case $CC in - cc) CC="$CC -Wl,-Bexport";; - esac;; -SunOS*) - # Some functions have a prototype only with that define, e.g. confstr - -cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# 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; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + 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. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done ;; esac +done +IFS=$as_save_IFS - -{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5 -$as_echo_n "checking LIBRARY... " >&6; } -if test -z "$LIBRARY" -then - LIBRARY='libpython$(VERSION).a' fi -{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5 -$as_echo "$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 -# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY -# is blank as the main program is not linked directly against LDLIBRARY. -# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On -# systems without shared libraries, LDLIBRARY is the same as LIBRARY -# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, -# DLLLIBRARY is the shared (i.e., DLL) library. -# -# RUNSHARED is used to run shared python without installed libraries -# -# INSTSONAME is the name of the shared library that will be use to install -# on the system - some systems like version suffix, others don't - - + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # 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 value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ 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. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -LDLIBRARY="$LIBRARY" -BLDLIBRARY='$(LDLIBRARY)' -INSTSONAME='$(LDLIBRARY)' -DLLLIBRARY='' -LDLIBRARYDIR='' -RUNSHARED='' -# LINKCC is the command that links the python executable -- default is $(CC). -# If CXX is set, and if it is needed to link a main function that was -# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: -# python might then depend on the C++ runtime -# This is altered for AIX in order to build the export list before -# linking. +# Not every filesystem supports hard links -{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5 -$as_echo_n "checking LINKCC... " >&6; } -if test -z "$LINKCC" -then - LINKCC='$(PURIFY) $(MAINCC)' +if test -z "$LN" ; then case $ac_sys_system in - AIX*) - exp_extra="\"\"" - if test $ac_sys_release -ge 5 -o \ - $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then - exp_extra="." - fi - LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; - Monterey64*) - LINKCC="$LINKCC -L/usr/lib/ia64l64";; - QNX*) - # qcc must be used because the other compilers do not - # support -N. - LINKCC=qcc;; + BeOS*) LN="ln -s";; + CYGWIN*) LN="ln -s";; + atheos*) LN="ln -s";; + *) LN=ln;; esac fi -{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5 -$as_echo "$LINKCC" >&6; } - -# GNULD is set to "yes" if the GNU linker is used. If this goes wrong -# make sure we default having it set to "no": this is used by -# distutils.unixccompiler to know if it should add --enable-new-dtags -# to linker command lines, and failing to detect GNU ld simply results -# in the same bahaviour as before. - -{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -ac_prog=ld -if test "$GCC" = yes; then - ac_prog=`$CC -print-prog-name=ld` -fi -case `"$ac_prog" -V 2>&1 < /dev/null` in - *GNU*) - GNULD=yes;; - *) - GNULD=no;; -esac -{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5 -$as_echo "$GNULD" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5 -$as_echo_n "checking for --enable-shared... " >&6; } -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; -fi +# Check for --with-pydebug +{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5 +echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; } -if test -z "$enable_shared" +# Check whether --with-pydebug was given. +if test "${with_pydebug+set}" = set; then + withval=$with_pydebug; +if test "$withval" != no then - case $ac_sys_system in - CYGWIN* | atheos*) - enable_shared="yes";; - *) - enable_shared="no";; - esac -fi -{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } -{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5 -$as_echo_n "checking for --enable-profiling... " >&6; } -# Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then - enableval=$enable_profiling; ac_save_cc="$CC" - CC="$CC -pg" - if test "$cross_compiling" = yes; then - ac_enable_profiling="no" -else - 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; } +cat >>confdefs.h <<\_ACEOF +#define Py_DEBUG 1 _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_enable_profiling="yes" -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_enable_profiling="no" -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { 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' fi - - - CC="$ac_save_cc" +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 -$as_echo "$ac_enable_profiling" >&6; } -case "$ac_enable_profiling" in - "yes") - BASECFLAGS="-pg $BASECFLAGS" - LDFLAGS="-pg $LDFLAGS" - ;; -esac +# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be +# merged with this chunk of code? -{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5 -$as_echo_n "checking LDLIBRARY... " >&6; } +# Optimizer/debugger flags +# ------------------------ +# (The following bit of code is complicated enough - please keep things +# indented properly. Just pretend you're editing Python code. ;-) -# MacOSX framework builds need more magic. LDLIBRARY is the dynamic -# library that we build, but we do not want to link against it (we -# will find it with a -framework option). For this reason there is an -# extra variable BLDLIBRARY against which Python and the extension -# modules are linked, BLDLIBRARY. This is normally the same as -# LDLIBRARY, but empty for MacOSX framework builds. -if test "$enable_framework" -then - LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' - RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH" - BLDLIBRARY='' -else - BLDLIBRARY='$(LDLIBRARY)' -fi - -# Other platforms follow -if test $enable_shared = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define Py_ENABLE_SHARED 1 -_ACEOF - - case $ac_sys_system in - BeOS*) - LDLIBRARY='libpython$(VERSION).so' - ;; - CYGWIN*) - LDLIBRARY='libpython$(VERSION).dll.a' - DLLLIBRARY='libpython$(VERSION).dll' - ;; - SunOS*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - INSTSONAME="$LDLIBRARY".$SOVERSION - ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - case $ac_sys_system in - FreeBSD*) - SOVERSION=`echo $SOVERSION|cut -d "." -f 1` - ;; - esac - INSTSONAME="$LDLIBRARY".$SOVERSION - ;; - hp*|HP*) - case `uname -m` in - ia64) - LDLIBRARY='libpython$(VERSION).so' - ;; - *) - LDLIBRARY='libpython$(VERSION).sl' - ;; - esac - BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)' - RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH} - ;; - OSF*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - ;; - atheos*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} - ;; - Darwin*) - LDLIBRARY='libpython$(VERSION).dylib' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}' - ;; - - esac -else # shared is disabled - case $ac_sys_system in - CYGWIN*) - BLDLIBRARY='$(LIBRARY)' - LDLIBRARY='libpython$(VERSION).dll.a' - ;; - esac -fi - -{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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 { 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" - $as_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 - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 { 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" - $as_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_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - -for ac_prog in ar aal -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # 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 { 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" - $as_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 - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break -done -test -n "$AR" || AR="ar" - - -# tweak ARFLAGS only if the user didn't set it on the command line - -if test -z "$ARFLAGS" -then - ARFLAGS="rc" -fi - - -# Extract the first word of "svnversion", so it can be a program name with args. -set dummy svnversion; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_SVNVERSION+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$SVNVERSION"; then - ac_cv_prog_SVNVERSION="$SVNVERSION" # 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 { 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" - $as_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 - { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5 -$as_echo "$SVNVERSION" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test $SVNVERSION = found -then - SVNVERSION="svnversion \$(srcdir)" -else - SVNVERSION="echo Unversioned directory" -fi - -case $MACHDEP in -bsdos*|hp*|HP*) - # install -d does not work on BSDI or HP-UX - if test -z "$INSTALL" - then - INSTALL="${srcdir}/install-sh -c" - fi -esac -ac_aux_dir= -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 - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - 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 - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# 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 -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# 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. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - 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. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -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. 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 value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -# Not every filesystem supports hard links - -if test -z "$LN" ; then - case $ac_sys_system in - BeOS*) LN="ln -s";; - CYGWIN*) LN="ln -s";; - atheos*) LN="ln -s";; - *) LN=ln;; - esac -fi - -# Check for --with-pydebug -{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5 -$as_echo_n "checking for --with-pydebug... " >&6; } - -# Check whether --with-pydebug was given. -if test "${with_pydebug+set}" = set; then - withval=$with_pydebug; -if test "$withval" != no -then - -cat >>confdefs.h <<\_ACEOF -#define Py_DEBUG 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; }; - Py_DEBUG='true' -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; }; Py_DEBUG='false' -fi -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be -# merged with this chunk of code? - -# Optimizer/debugger flags -# ------------------------ -# (The following bit of code is complicated enough - please keep things -# indented properly. Just pretend you're editing Python code. ;-) - -# There are two parallel sets of case statements below, one that checks to -# see if OPT was set and one that does BASECFLAGS setting based upon -# compiler and platform. BASECFLAGS tweaks need to be made even if the -# user set OPT. - -# tweak OPT based on compiler and platform, only if the user didn't set -# it on the command line - -if test -z "$OPT" -then - case $GCC in - yes) - if test "$CC" != 'g++' ; then - STRICT_PROTO="-Wstrict-prototypes" - fi - # For gcc 4.x we need to use -fwrapv so lets check if its supported - if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then - WRAP="-fwrapv" - fi - case $ac_cv_prog_cc_g in - yes) - if test "$Py_DEBUG" = 'true' ; then - # Optimization messes up debuggers, so turn it off for - # debug builds. - OPT="-g -Wall $STRICT_PROTO" - else - OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" - fi - ;; - *) - OPT="-O3 -Wall $STRICT_PROTO" - ;; - esac - case $ac_sys_system in - SCO_SV*) OPT="$OPT -m486 -DSCO5" - ;; - esac - ;; - - *) - OPT="-O" - ;; - esac - - # The current (beta) Monterey compiler dies with optimizations - # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this? - case $ac_sys_system in - Monterey*) - OPT="" - ;; - esac - -fi - - - -# The -arch flags for universal builds on OSX -UNIVERSAL_ARCH_FLAGS= - - -# tweak BASECFLAGS based on compiler and platform -case $GCC in -yes) - # 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. - { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 -$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; } - ac_save_cc="$CC" - CC="$CC -fno-strict-aliasing" - if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_no_strict_aliasing_ok=no -else - 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_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_no_strict_aliasing_ok=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_no_strict_aliasing_ok=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi - - CC="$ac_save_cc" - { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5 -$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; } - if test $ac_cv_no_strict_aliasing_ok = yes - then - BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" - fi - - # if using gcc on alpha, use -mieee to get (near) full IEEE 754 - # support. Without this, treatment of subnormals doesn't follow - # the standard. - case $ac_sys_machine in - alpha*) - BASECFLAGS="$BASECFLAGS -mieee" - ;; - esac - - case $ac_sys_system in - SCO_SV*) - BASECFLAGS="$BASECFLAGS -m486 -DSCO5" - ;; - # is there any other compiler on Darwin besides gcc? - Darwin*) - # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd - # used to be here, but non-Apple gcc doesn't accept them. - - - if test "${enable_universalsdk}"; then - UNIVERSAL_ARCH_FLAGS="" - if test "$UNIVERSAL_ARCHS" = "32-bit" ; then - UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" - ARCH_RUN_32BIT="" - - elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then - UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" - - elif test "$UNIVERSAL_ARCHS" = "all" ; then - UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" - ARCH_RUN_32BIT="arch -i386 -ppc" - - else - { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 -$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} - { (exit 1); exit 1; }; } - - fi - - - BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}" - tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` - if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then - CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}" - fi - fi - - # Calculate the right deployment target for this build. - # - cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` - if test ${cur_target} '>' 10.2; then - cur_target=10.3 - fi - if test "${UNIVERSAL_ARCHS}" = "all"; then - # Ensure that the default platform for a 4-way - # universal build is OSX 10.5, that's the first - # OS release where 4-way builds make sense. - cur_target='10.5' - fi - CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} - - # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the - # environment with a value that is the same as what we'll use - # in the Makefile to ensure that we'll get the same compiler - # environment during configure and build time. - MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET" - export MACOSX_DEPLOYMENT_TARGET - EXPORT_MACOSX_DEPLOYMENT_TARGET='' - - ;; - OSF*) - BASECFLAGS="$BASECFLAGS -mieee" - ;; - esac - ;; - -*) - case $ac_sys_system in - OpenUNIX*|UnixWare*) - BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca " - ;; - OSF*) - BASECFLAGS="$BASECFLAGS -ieee -std" - ;; - SCO_SV*) - BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5" - ;; - esac - ;; -esac - -if test "$Py_DEBUG" = 'true'; then - : -else - OPT="-DNDEBUG $OPT" -fi - -if test "$ac_arch_flags" -then - BASECFLAGS="$BASECFLAGS $ac_arch_flags" -fi - -# disable check for icc since it seems to pass, but generates a warning -if test "$CC" = icc -then - ac_cv_opt_olimit_ok=no -fi - -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5 -$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; } -if test "${ac_cv_opt_olimit_ok+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" -CC="$CC -OPT:Olimit=0" -if test "$cross_compiling" = yes; then - ac_cv_opt_olimit_ok=no -else - 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_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_opt_olimit_ok=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_opt_olimit_ok=no -fi -rm -rf conftest.dSYM -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 - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5 -$as_echo "$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 - # olimit_ok test is "no". Is it "yes" in some other Darwin-esque - # environment? - Darwin*) - ;; - *) - BASECFLAGS="$BASECFLAGS -OPT:Olimit=0" - ;; - esac -else - { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 -$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; } - if test "${ac_cv_olimit_ok+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" - CC="$CC -Olimit 1500" - if test "$cross_compiling" = yes; then - ac_cv_olimit_ok=no -else - 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_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_olimit_ok=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_olimit_ok=no -fi -rm -rf conftest.dSYM -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 - - { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 -$as_echo "$ac_cv_olimit_ok" >&6; } - if test $ac_cv_olimit_ok = yes; then - BASECFLAGS="$BASECFLAGS -Olimit 1500" - fi -fi - -# Check whether GCC supports PyArg_ParseTuple format -if test "$GCC" = "yes" -then - { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5 -$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; } - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Werror" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2))); - -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$save_CFLAGS -fi - -# On some compilers, pthreads are available without further options -# (e.g. MacOS X). On some of these systems, the compiler will not -# 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. -{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 -$as_echo_n "checking whether pthreads are available without options... " >&6; } -if test "${ac_cv_pthread_is_default+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_pthread_is_default=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - ac_cv_pthread_is_default=yes - ac_cv_kthread=no - ac_cv_pthread=no - -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_pthread_is_default=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 -$as_echo "$ac_cv_pthread_is_default" >&6; } - - -if test $ac_cv_pthread_is_default = yes -then - ac_cv_kpthread=no -else -# -Kpthread, if available, provides the right #defines -# and linker options to make pthread_create available -# 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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 -$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } -if test "${ac_cv_kpthread+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" -CC="$CC -Kpthread" -if test "$cross_compiling" = yes; then - ac_cv_kpthread=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_kpthread=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_kpthread=no -fi -rm -rf conftest.dSYM -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 - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 -$as_echo "$ac_cv_kpthread" >&6; } -fi - -if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no -then -# -Kthread, if available, provides the right #defines -# and linker options to make pthread_create available -# 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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 -$as_echo_n "checking whether $CC accepts -Kthread... " >&6; } -if test "${ac_cv_kthread+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" -CC="$CC -Kthread" -if test "$cross_compiling" = yes; then - ac_cv_kthread=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_kthread=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_kthread=no -fi -rm -rf conftest.dSYM -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 - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 -$as_echo "$ac_cv_kthread" >&6; } -fi - -if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no -then -# -pthread, if available, provides the right #defines -# and linker options to make pthread_create available -# 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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5 -$as_echo_n "checking whether $CC accepts -pthread... " >&6; } -if test "${ac_cv_thread+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" -CC="$CC -pthread" -if test "$cross_compiling" = yes; then - ac_cv_pthread=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_pthread=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_pthread=no -fi -rm -rf conftest.dSYM -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 - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -$as_echo "$ac_cv_pthread" >&6; } -fi - -# If we have set a CC compiler flag for thread support then -# check if it works for CXX, too. -ac_cv_cxx_thread=no -if test ! -z "$CXX" -then -{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5 -$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; } -ac_save_cxx="$CXX" - -if test "$ac_cv_kpthread" = "yes" -then - CXX="$CXX -Kpthread" - ac_cv_cxx_thread=yes -elif test "$ac_cv_kthread" = "yes" -then - CXX="$CXX -Kthread" - ac_cv_cxx_thread=yes -elif test "$ac_cv_pthread" = "yes" -then - CXX="$CXX -pthread" - ac_cv_cxx_thread=yes -fi - -if test $ac_cv_cxx_thread = yes -then - echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext - $CXX -c conftest.$ac_ext 2>&5 - if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ - && test -s conftest$ac_exeext && ./conftest$ac_exeext - then - ac_cv_cxx_thread=yes - else - ac_cv_cxx_thread=no - fi - rm -fr conftest* -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -$as_echo "$ac_cv_cxx_thread" >&6; } -fi -CXX="$ac_save_cxx" - - -# checks for header files -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&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 -#include -#include -#include - -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -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. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -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)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ -fcntl.h grp.h \ -ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ -shadow.h signal.h stdint.h stropts.h termios.h thread.h \ -unistd.h utime.h \ -sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ -sys/lock.h sys/mkdev.h sys/modem.h \ -sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ -sys/termio.h sys/time.h \ -sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ -sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ -bluetooth/bluetooth.h linux/tipc.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -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 -#include <$ac_header> -_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&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 -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$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 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 -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -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 -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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -$as_echo "$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 - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$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 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 -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# There are two parallel sets of case statements below, one that checks to +# see if OPT was set and one that does BASECFLAGS setting based upon +# compiler and platform. BASECFLAGS tweaks need to be made even if the +# user set OPT. +# tweak OPT based on compiler and platform, only if the user didn't set +# it on the command line -fi +if test -z "$OPT" +then + case $GCC in + yes) + if test "$CC" != 'g++' ; then + STRICT_PROTO="-Wstrict-prototypes" + fi + # For gcc 4.x we need to use -fwrapv so lets check if its supported + if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then + WRAP="-fwrapv" + fi + case $ac_cv_prog_cc_g in + yes) + if test "$Py_DEBUG" = 'true' ; then + # Optimization messes up debuggers, so turn it off for + # debug builds. + OPT="-g -Wall $STRICT_PROTO" + else + OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" + fi + ;; + *) + OPT="-O3 -Wall $STRICT_PROTO" + ;; + esac + case $ac_sys_system in + SCO_SV*) OPT="$OPT -m486 -DSCO5" + ;; + esac + ;; -rm -rf conftest.dSYM -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 -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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -$as_echo "$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" + *) + OPT="-O" + ;; + esac -fi + # The current (beta) Monterey compiler dies with optimizations + # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this? + case $ac_sys_system in + Monterey*) + OPT="" + ;; + esac fi -{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 -$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then - $as_echo_n "(cached) " >&6 + + +# The -arch flags for universal builds on OSX +UNIVERSAL_ARCH_FLAGS= + + +# tweak BASECFLAGS based on compiler and platform +case $GCC in +yes) + # 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; } + ac_save_cc="$CC" + CC="$CC -fno-strict-aliasing" + if test "$cross_compiling" = yes; then + ac_cv_no_strict_aliasing_ok=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6592,350 +4632,359 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -return makedev(0, 0); - ; - return 0; -} +int main() { return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_header_sys_types_h_makedev=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_no_strict_aliasing_ok=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_sys_types_h_makedev=no +( exit $ac_status ) +ac_cv_no_strict_aliasing_ok=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 -$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } + 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; } + if test $ac_cv_no_strict_aliasing_ok = yes + then + BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" + fi -if test $ac_cv_header_sys_types_h_makedev = no; then -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -$as_echo_n "checking for sys/mkdev.h... " >&6; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 -$as_echo_n "checking sys/mkdev.h usability... " >&6; } -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 -#include -_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;; + # if using gcc on alpha, use -mieee to get (near) full IEEE 754 + # support. Without this, treatment of subnormals doesn't follow + # the standard. + case $ac_sys_machine in + alpha*) + BASECFLAGS="$BASECFLAGS -mieee" + ;; + esac + + case $ac_sys_system in + SCO_SV*) + BASECFLAGS="$BASECFLAGS -m486 -DSCO5" + ;; + # is there any other compiler on Darwin besides gcc? + Darwin*) + # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd + # used to be here, but non-Apple gcc doesn't accept them. + + + if test "${enable_universalsdk}"; then + UNIVERSAL_ARCH_FLAGS="" + if test "$UNIVERSAL_ARCHS" = "32-bit" ; then + UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" + ARCH_RUN_32BIT="" + + elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then + UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + + elif test "$UNIVERSAL_ARCHS" = "all" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="arch -i386 -ppc" + + else + { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 +echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} + { (exit 1); exit 1; }; } + + fi + + + BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}" + tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` + if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then + CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}" + fi + fi + + # Calculate the right deployment target for this build. + # + cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` + if test ${cur_target} '>' 10.2; then + cur_target=10.3 + fi + if test "${UNIVERSAL_ARCHS}" = "all"; then + # Ensure that the default platform for a 4-way + # universal build is OSX 10.5, that's the first + # OS release where 4-way builds make sense. + cur_target='10.5' + fi + CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} + + # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the + # environment with a value that is the same as what we'll use + # in the Makefile to ensure that we'll get the same compiler + # environment during configure and build time. + MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET" + export MACOSX_DEPLOYMENT_TARGET + EXPORT_MACOSX_DEPLOYMENT_TARGET='' + + ;; + OSF*) + BASECFLAGS="$BASECFLAGS -mieee" + ;; + esac + ;; + +*) + case $ac_sys_system in + OpenUNIX*|UnixWare*) + BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca " + ;; + OSF*) + BASECFLAGS="$BASECFLAGS -ieee -std" + ;; + SCO_SV*) + BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5" + ;; + esac + ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_header_compiler=yes + +if test "$Py_DEBUG" = 'true'; then + : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + OPT="-DNDEBUG $OPT" +fi - ac_header_compiler=no +if test "$ac_arch_flags" +then + BASECFLAGS="$BASECFLAGS $ac_arch_flags" +fi + +# disable check for icc since it seems to pass, but generates a warning +if test "$CC" = icc +then + ac_cv_opt_olimit_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 -$as_echo_n "checking sys/mkdev.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF +{ 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 + ac_save_cc="$CC" +CC="$CC -OPT:Olimit=0" +if test "$cross_compiling" = yes; then + ac_cv_opt_olimit_ok=no +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() { return 0; } _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_opt_olimit_ok=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -$as_echo_n "checking for sys/mkdev.h... " >&6; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_sys_mkdev_h=$ac_header_preproc +( exit $ac_status ) +ac_cv_opt_olimit_ok=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_MKDEV 1 -_ACEOF +CC="$ac_save_cc" fi - - - if test $ac_cv_header_sys_mkdev_h = no; then - if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -$as_echo_n "checking for sys/sysmacros.h... " >&6; } -if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -$as_echo "$ac_cv_header_sys_sysmacros_h" >&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 + # olimit_ok test is "no". Is it "yes" in some other Darwin-esque + # environment? + Darwin*) + ;; + *) + BASECFLAGS="$BASECFLAGS -OPT:Olimit=0" + ;; + esac else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 -$as_echo_n "checking sys/sysmacros.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF + { 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 + ac_save_cc="$CC" + CC="$CC -Olimit 1500" + if test "$cross_compiling" = yes; then + ac_cv_olimit_ok=no +else + 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 -#include +int main() { return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_header_compiler=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_olimit_ok=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +( exit $ac_status ) +ac_cv_olimit_ok=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 -$as_echo_n "checking sys/sysmacros.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF + CC="$ac_save_cc" +fi + + { 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 +fi + +# 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; } + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + + void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2))); + +int +main () +{ + + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -$as_echo_n "checking for sys/sysmacros.h... " >&6; } -if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_sys_sysmacros_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } - -fi -if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_SYSMACROS 1 +#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1 _ACEOF -fi + { 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; } - fi fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$save_CFLAGS +fi -# On Solaris, term.h requires curses.h - -for ac_header in term.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +# On some compilers, pthreads are available without further options +# (e.g. MacOS X). On some of these systems, the compiler will not +# 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; } +if test "${ac_cv_pthread_is_default+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_pthread_is_default=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6944,66 +4993,81 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_CURSES_H -#include -#endif +#include +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); + return 0; +} -#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - eval "$as_ac_Header=yes" + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + + ac_cv_pthread_is_default=yes + ac_cv_kthread=no + ac_cv_pthread=no + else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +( exit $ac_status ) +ac_cv_pthread_is_default=no fi - -rm -f core conftest.err 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 -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done +fi -# On Linux, netlink.h requires asm/types.h +{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 +echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; } -for ac_header in linux/netlink.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + +if test $ac_cv_pthread_is_default = yes +then + ac_cv_kpthread=no +else +# -Kpthread, if available, provides the right #defines +# and linker options to make pthread_create available +# 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; } +if test "${ac_cv_kpthread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cc="$CC" +CC="$CC -Kpthread" +if test "$cross_compiling" = yes; then + ac_cv_kpthread=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7012,235 +5076,276 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_ASM_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif +#include +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); + return 0; +} -#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - eval "$as_ac_Header=yes" + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_kpthread=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +( exit $ac_status ) +ac_cv_kpthread=no fi - -rm -f core conftest.err 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 -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done +CC="$ac_save_cc" +fi +{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 +echo "${ECHO_T}$ac_cv_kpthread" >&6; } +fi -# checks for typedefs -was_it_defined=no -{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5 -$as_echo_n "checking for clock_t in time.h... " >&6; } -cat >conftest.$ac_ext <<_ACEOF +if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no +then +# -Kthread, if available, provides the right #defines +# and linker options to make pthread_create available +# 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; } +if test "${ac_cv_kthread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cc="$CC" +CC="$CC -Kthread" +if test "$cross_compiling" = yes; then + ac_cv_kthread=no +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "clock_t" >/dev/null 2>&1; then - was_it_defined=yes -else - - -cat >>confdefs.h <<\_ACEOF -#define clock_t long -_ACEOF +#include -fi -rm -f conftest* - -{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5 -$as_echo "$was_it_defined" >&6; } +void* routine(void* p){return NULL;} -# Check whether using makedev requires defining _OSF_SOURCE -{ $as_echo "$as_me:$LINENO: checking for makedev" >&5 -$as_echo_n "checking for makedev... " >&6; } -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 () -{ - makedev(0, 0) - ; +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_has_makedev=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_kthread=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_has_makedev=no +( exit $ac_status ) +ac_cv_kthread=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -rf conftest.dSYM -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 - cat >conftest.$ac_ext <<_ACEOF + +CC="$ac_save_cc" +fi + +{ 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 +then +# -pthread, if available, provides the right #defines +# and linker options to make pthread_create available +# 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; } +if test "${ac_cv_thread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cc="$CC" +CC="$CC -pthread" +if test "$cross_compiling" = yes; then + ac_cv_pthread=no +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _OSF_SOURCE 1 -#include +#include -int -main () -{ - makedev(0, 0) - ; +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_has_makedev=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_pthread=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_has_makedev=no +( exit $ac_status ) +ac_cv_pthread=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -rf conftest.dSYM -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 -cat >>confdefs.h <<\_ACEOF -#define _OSF_SOURCE 1 -_ACEOF +CC="$ac_save_cc" +fi - fi +{ 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 +# check if it works for CXX, too. +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; } +ac_save_cxx="$CXX" + +if test "$ac_cv_kpthread" = "yes" +then + CXX="$CXX -Kpthread" + ac_cv_cxx_thread=yes +elif test "$ac_cv_kthread" = "yes" +then + CXX="$CXX -Kthread" + ac_cv_cxx_thread=yes +elif test "$ac_cv_pthread" = "yes" +then + CXX="$CXX -pthread" + ac_cv_cxx_thread=yes fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 -$as_echo "$ac_cv_has_makedev" >&6; } -if test "$ac_cv_has_makedev" = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MAKEDEV 1 -_ACEOF +if test $ac_cv_cxx_thread = yes +then + echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext + $CXX -c conftest.$ac_ext 2>&5 + if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ + && test -s conftest$ac_exeext && ./conftest$ac_exeext + then + ac_cv_cxx_thread=yes + else + ac_cv_cxx_thread=no + fi + rm -fr conftest* +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 +echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } fi +CXX="$ac_save_cxx" -# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in -# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are -# defined, but the compiler does not support pragma redefine_extname, -# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit -# structures (such as rlimit64) without declaring them. As a -# work-around, disable LFS on such configurations -use_lfs=yes -{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5 -$as_echo_n "checking Solaris LFS bug... " >&6; } -cat >conftest.$ac_ext <<_ACEOF +# 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; } +if test "${ac_cv_header_stdc+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. */ - -#define _LARGEFILE_SOURCE 1 -#define _FILE_OFFSET_BITS 64 -#include +#include +#include +#include +#include int main () { -struct rlimit foo; + ; return 0; } @@ -7251,96 +5356,169 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - sol_lfs_bug=no + ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - sol_lfs_bug=yes + ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5 -$as_echo "$sol_lfs_bug" >&6; } -if test "$sol_lfs_bug" = "yes"; then - use_lfs=no -fi -if test "$use_lfs" = "yes"; then -# Two defines needed to enable largefile support on various platforms -# These may affect some typedefs +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -cat >>confdefs.h <<\_ACEOF -#define _LARGEFILE_SOURCE 1 _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi -cat >>confdefs.h <<\_ACEOF -#define _FILE_OFFSET_BITS 64 +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi +rm -f conftest* -# Add some code to confdefs.h so that the test for off_t works on SCO -cat >> confdefs.h <<\EOF -#if defined(SCO_DS) -#undef _OFF_T -#endif -EOF +fi -# Type availability checks -{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 -$as_echo_n "checking for mode_t... " >&6; } -if test "${ac_cv_type_mode_t+set}" = set; then - $as_echo_n "(cached) " >&6 +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : else - ac_cv_type_mode_t=no -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 +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { -if (sizeof (mode_t)) - return 0; - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +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; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + 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 { 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 /* confdefs.h. */ _ACEOF @@ -7348,14 +5526,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -int -main () -{ -if (sizeof ((mode_t))) - return 0; - ; - return 0; -} + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7363,54 +5535,121 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : + eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=yes -fi + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -$as_echo "$ac_cv_type_mode_t" >&6; } -if test "x$ac_cv_type_mode_t" = x""yes; then - : -else -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF -fi -{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 -$as_echo_n "checking for off_t... " >&6; } -if test "${ac_cv_type_off_t+set}" = set; then - $as_echo_n "(cached) " >&6 +for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +fcntl.h grp.h \ +ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ +shadow.h signal.h stdint.h stropts.h termios.h thread.h \ +unistd.h utime.h \ +sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ +sys/lock.h sys/mkdev.h sys/modem.h \ +sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ +sys/termio.h sys/time.h \ +sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ +sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ +bluetooth/bluetooth.h linux/tipc.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +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 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - ac_cv_type_off_t=no + # Is the header compilable? +{ 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 @@ -7418,14 +5657,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -int -main () -{ -if (sizeof (off_t)) - return 0; - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7433,100 +5665,146 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - cat >conftest.$ac_ext <<_ACEOF + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +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; } +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 -int -main () -{ -if (sizeof ((off_t))) - return 0; - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : + }; then + ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_off_t=yes + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +rm -f conftest.err conftest.$ac_ext +{ 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 + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +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 +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | 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 { 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 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -$as_echo "$ac_cv_type_off_t" >&6; } -if test "x$ac_cv_type_off_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 -$as_echo_n "checking for pid_t... " >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 +done + + + + + + +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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_pid_t=no -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 +#include +#include <$ac_hdr> + int main () { -if (sizeof (pid_t)) - return 0; +if ((DIR *) 0) +return 0; ; return 0; } @@ -7537,195 +5815,284 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - cat >conftest.$ac_ext <<_ACEOF + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +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; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +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 + +/* 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 +char opendir (); int main () { -if (sizeof ((pid_t))) - return 0; +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_opendir=$ac_res else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -$as_echo "$ac_cv_type_pid_t" >&6; } -if test "x$ac_cv_type_pid_t" = x""yes; then +done +if test "${ac_cv_search_opendir+set}" = set; then : else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF + 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; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then - $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + { 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 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +/* 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 +char opendir (); int main () { -return *(signal (0, 0)) (0) == 1; +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_type_signal=int + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_opendir=$ac_res else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signal=void + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } +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; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF +fi +fi -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&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 - ac_cv_type_size_t=no -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 +#include int main () { -if (sizeof (size_t)) - return 0; +return makedev(0, 0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - cat >conftest.$ac_ext <<_ACEOF + } && 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 +fi + +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; } + +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; } +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; } +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; } +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 -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7733,111 +6100,140 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF +# 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; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes +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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - ac_cv_type_uid_t=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF +rm -f conftest.err conftest.$ac_ext +{ 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 + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 +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 +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | 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; } +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; } +fi +if test $ac_cv_header_sys_mkdev_h = yes; then cat >>confdefs.h <<\_ACEOF -#define gid_t int +#define MAJOR_IN_MKDEV 1 _ACEOF fi - { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 -$as_echo_n "checking for uint32_t... " >&6; } -if test "${ac_cv_c_uint32_t+set}" = set; then - $as_echo_n "(cached) " >&6 + + 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; } +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; } else - ac_cv_c_uint32_t=no - for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF + # 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; } +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 -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7845,153 +6241,145 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - case $ac_type in - uint32_t) ac_cv_c_uint32_t=yes ;; - *) ac_cv_c_uint32_t=$ac_type ;; -esac - + ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint32_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 -$as_echo "$ac_cv_c_uint32_t" >&6; } - case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<\_ACEOF -#define _UINT32_T 1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } - - { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 -$as_echo_n "checking for uint64_t... " >&6; } -if test "${ac_cv_c_uint64_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_uint64_t=no - for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF +# 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; } +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 -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - case $ac_type in - uint64_t) ac_cv_c_uint64_t=yes ;; - *) ac_cv_c_uint64_t=$ac_type ;; -esac - + }; then + ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + 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; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 +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 +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | 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; } +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; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint64_t" != no && break - done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 -$as_echo "$ac_cv_c_uint64_t" >&6; } - case $ac_cv_c_uint64_t in #( - no|yes) ;; #( - *) +if test $ac_cv_header_sys_sysmacros_h = yes; then cat >>confdefs.h <<\_ACEOF -#define _UINT64_T 1 +#define MAJOR_IN_SYSMACROS 1 _ACEOF +fi -cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t -_ACEOF -;; - esac + fi +fi - { $as_echo "$as_me:$LINENO: checking for int32_t" >&5 -$as_echo_n "checking for int32_t... " >&6; } -if test "${ac_cv_c_int32_t+set}" = set; then - $as_echo_n "(cached) " >&6 + +# On Solaris, term.h requires curses.h + +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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_c_int32_t=no - for ac_type in 'int32_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - 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 -int -main () -{ -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - ; - return 0; -} +#ifdef HAVE_CURSES_H +#include +#endif + + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7999,35 +6387,66 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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 +_ACEOF + +fi + +done + + +# On Linux, netlink.h requires asm/types.h + +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 { 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - ; - return 0; -} +#ifdef HAVE_ASM_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -8035,188 +6454,207 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : + eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - case $ac_type in - int32_t) ac_cv_c_int32_t=yes ;; - *) ac_cv_c_int32_t=$ac_type ;; -esac - + eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi +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 +_ACEOF -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int32_t" != no && break - done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 -$as_echo "$ac_cv_c_int32_t" >&6; } - case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) -cat >>confdefs.h <<_ACEOF -#define int32_t $ac_cv_c_int32_t -_ACEOF -;; - esac +done - { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 -$as_echo_n "checking for int64_t... " >&6; } -if test "${ac_cv_c_int64_t+set}" = set; then - $as_echo_n "(cached) " >&6 +# 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; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "clock_t" >/dev/null 2>&1; then + was_it_defined=yes else - ac_cv_c_int64_t=no - for ac_type in 'int64_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define clock_t long +_ACEOF + + +fi +rm -f conftest* + +{ 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; } +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 +#include int main () { -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 - + makedev(0, 0) ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - cat >conftest.$ac_ext <<_ACEOF + } && 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 +fi + +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 + 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 + +#define _OSF_SOURCE 1 +#include + int main () { -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - + makedev(0, 0) ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_has_makedev=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - case $ac_type in - int64_t) ac_cv_c_int64_t=yes ;; - *) ac_cv_c_int64_t=$ac_type ;; -esac - + ac_cv_has_makedev=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_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 conftest.$ac_ext + if test "$ac_cv_has_makedev" = "yes"; then +cat >>confdefs.h <<\_ACEOF +#define _OSF_SOURCE 1 +_ACEOF + fi fi +{ 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 +#define HAVE_MAKEDEV 1 +_ACEOF -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int64_t" != no && break - done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 -$as_echo "$ac_cv_c_int64_t" >&6; } - case $ac_cv_c_int64_t in #( - no|yes) ;; #( - *) -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t -_ACEOF -;; - esac +# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in +# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are +# defined, but the compiler does not support pragma redefine_extname, +# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit +# structures (such as rlimit64) without declaring them. As a +# work-around, disable LFS on such configurations -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 -$as_echo_n "checking for ssize_t... " >&6; } -if test "${ac_cv_type_ssize_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_ssize_t=no +use_lfs=yes +{ 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 cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + +#define _LARGEFILE_SOURCE 1 +#define _FILE_OFFSET_BITS 64 +#include + int main () { -if (sizeof (ssize_t)) - return 0; +struct rlimit foo; ; return 0; } @@ -8227,18 +6665,60 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 + sol_lfs_bug=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + sol_lfs_bug=yes +fi + +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 + +if test "$use_lfs" = "yes"; then +# Two defines needed to enable largefile support on various platforms +# These may affect some typedefs + +cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 64 +_ACEOF + +fi + +# Add some code to confdefs.h so that the test for off_t works on SCO +cat >> confdefs.h <<\EOF +#if defined(SCO_DS) +#undef _OFF_T +#endif +EOF + +# Type availability checks +{ 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8246,11 +6726,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if (sizeof ((ssize_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8261,73 +6744,59 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_ssize_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_mode_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_mode_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 -$as_echo "$ac_cv_type_ssize_t" >&6; } -if test "x$ac_cv_type_ssize_t" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SSIZE_T 1 +{ 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 + +cat >>confdefs.h <<_ACEOF +#define mode_t int _ACEOF fi - -# Sizes of various common basic types -# ANSI C requires sizeof(char) == 1, so no need to check it -# 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. -{ $as_echo "$as_me:$LINENO: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then - $as_echo_n "(cached) " >&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 - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -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 off_t ac__type_new_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; -test_array [0] = 0 - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8338,33 +6807,59 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF + 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 +fi + +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; } +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#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; } +if test "${ac_cv_type_pid_t+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. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8375,50 +6870,57 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break + ac_cv_type_pid_t=yes else - $as_echo "$as_me: failed program was:" >&5 + 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_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +fi +{ 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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +{ 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 + 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 +#include +#include + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; -test_array [0] = 0 - +return *(signal (0, 0)) (0) == 1; ; return 0; } @@ -8429,33 +6931,55 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +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; } + +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; } +if test "${ac_cv_type_size_t+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. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; -test_array [0] = 0 - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8466,58 +6990,97 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break + ac_cv_type_size_t=yes else - $as_echo "$as_me: failed program was:" >&5 + 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_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +fi +{ 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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= -fi +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -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` +{ 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ 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 +#define uid_t int +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define gid_t int +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for uint32_t" >&5 +echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; } +if test "${ac_cv_c_uint32_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_uint32_t=no + for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; test_array [0] = 0 ; @@ -8530,151 +7093,136 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid + case $ac_type in + uint32_t) ac_cv_c_uint32_t=yes ;; + *) ac_cv_c_uint32_t=$ac_type ;; +esac + else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_int=0 - fi ;; -esac + test "$ac_cv_c_uint32_t" != no && break + done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 +echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; } + case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<\_ACEOF +#define _UINT32_T 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF +;; + esac + + + { echo "$as_me:$LINENO: checking for uint64_t" >&5 +echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; } +if test "${ac_cv_c_uint64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_uint64_t=no + for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 -static long int longval () { return (long int) (sizeof (int)); } -static unsigned long int ulongval () { return (long int) (sizeof (int)); } -#include -#include int main () { - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (int))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; +static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; +test_array [0] = 0 ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + 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 + case $ac_type in + uint64_t) ac_cv_c_uint64_t=yes ;; + *) ac_cv_c_uint64_t=$ac_type ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_int=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi -rm -f conftest.val + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_uint64_t" != no && break + done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 +echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; } + case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) +cat >>confdefs.h <<\_ACEOF +#define _UINT64_T 1 +_ACEOF cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int +#define uint64_t $ac_cv_c_uint64_t _ACEOF +;; + esac -# 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. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for int32_t" >&5 +echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; } +if test "${ac_cv_c_int32_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_int32_t=no + for ac_type in 'int32_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8684,7 +7232,7 @@ int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; test_array [0] = 0 ; @@ -8697,21 +7245,18 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8721,7 +7266,8 @@ int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -8734,38 +7280,63 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break + : else - $as_echo "$as_me: failed program was:" >&5 + 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` + case $ac_type in + int32_t) ac_cv_c_int32_t=yes ;; + *) ac_cv_c_int32_t=$ac_type ;; +esac + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int32_t" != no && break + done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 +echo "${ECHO_T}$ac_cv_c_int32_t" >&6; } + case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int32_t $ac_cv_c_int32_t +_ACEOF +;; + esac + + + { echo "$as_me:$LINENO: checking for int64_t" >&5 +echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } +if test "${ac_cv_c_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_int64_t=no + for ac_type in 'int64_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8775,7 +7346,7 @@ int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; test_array [0] = 0 ; @@ -8788,21 +7359,18 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8812,7 +7380,8 @@ int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -8825,47 +7394,58 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break + : else - $as_echo "$as_me: failed program was:" >&5 + 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` + case $ac_type in + int64_t) ac_cv_c_int64_t=yes ;; + *) ac_cv_c_int64_t=$ac_type ;; +esac + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int64_t" != no && break + done fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 +echo "${ECHO_T}$ac_cv_c_int64_t" >&6; } + case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) -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` +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF +;; + esac + +{ 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8873,12 +7453,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef ssize_t ac__type_new_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8889,42 +7471,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid + ac_cv_type_ssize_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + ac_cv_type_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi ;; -esac +fi +{ 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 +#define HAVE_SSIZE_T 1 +_ACEOF + +fi + + +# 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; } +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8933,103 +7517,56 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long)); } -#include -#include +typedef int ac__type_new_; int main () { - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` + 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_type_int=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + ac_cv_type_int=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9040,10 +7577,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 int) (sizeof (void *))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9056,14 +7594,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9077,10 +7614,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 int) (sizeof (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9093,21 +7631,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9121,7 +7658,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9131,10 +7668,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 int) (sizeof (void *))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9147,14 +7685,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9168,10 +7705,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 int) (sizeof (void *))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9184,21 +7722,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9212,7 +7749,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9232,10 +7769,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 int) (sizeof (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9248,21 +7786,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9271,17 +7808,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (void *) +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_void_p=0 + ac_cv_sizeof_int=0 fi ;; esac else @@ -9292,8 +7827,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (void *)); } -static unsigned long int ulongval () { return (long int) (sizeof (void *)); } + 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 @@ -9303,22 +7839,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (void *))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (void *)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (void *)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9331,64 +7865,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 +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 + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +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) +See \`config.log' for more details." >&2;} + { (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 +fi +{ 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; } +if test "${ac_cv_type_long+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. */ +$ac_includes_default +typedef long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` + 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_type_long=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_void_p=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + ac_cv_type_long=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9399,10 +7982,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 int) (sizeof (short))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9415,14 +7999,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9436,10 +8019,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 int) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9452,21 +8036,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9480,7 +8063,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9490,10 +8073,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 int) (sizeof (short))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9506,14 +8090,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9527,10 +8110,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 int) (sizeof (short))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9543,21 +8127,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9571,7 +8154,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9591,10 +8174,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 int) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9607,21 +8191,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9630,17 +8213,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +?*) ac_cv_sizeof_long=$ac_lo;; +'') if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_long=0 fi ;; esac else @@ -9651,8 +8232,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (short)); } -static unsigned long int ulongval () { return (long int) (sizeof (short)); } + 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 @@ -9662,22 +8244,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (short))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (short)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (short)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9690,64 +8270,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` + ac_cv_sizeof_long=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_long=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&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_SHORT $ac_cv_sizeof_short +#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; } +if test "${ac_cv_type_void_p+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. */ +$ac_includes_default +typedef void * ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_void_p=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_void_p=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of float" >&5 -$as_echo_n "checking size of float... " >&6; } -if test "${ac_cv_sizeof_float+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9758,10 +8387,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 int) (sizeof (float))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9774,14 +8404,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9795,10 +8424,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 int) (sizeof (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9811,21 +8441,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9839,7 +8468,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9849,10 +8478,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 int) (sizeof (float))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9865,14 +8495,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9886,10 +8515,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 int) (sizeof (float))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9902,21 +8532,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9930,7 +8559,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9950,10 +8579,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 int) (sizeof (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9966,21 +8596,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9989,17 +8618,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_float=$ac_lo;; -'') if test "$ac_cv_type_float" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (float) +echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_float=0 + ac_cv_sizeof_void_p=0 fi ;; esac else @@ -10010,8 +8637,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (float)); } -static unsigned long int ulongval () { return (long int) (sizeof (float)); } + 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 @@ -10021,22 +8649,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (float))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (float)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (float)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10049,64 +8675,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_float=`cat conftest.val` + ac_cv_sizeof_void_p=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_float" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) +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 -$as_echo "$as_me: error: cannot compute sizeof (float) +echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_float=0 + ac_cv_sizeof_void_p=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 -$as_echo "$ac_cv_sizeof_float" >&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_FLOAT $ac_cv_sizeof_float +#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; } +if test "${ac_cv_type_short+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. */ +$ac_includes_default +typedef short ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_short=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_short=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of double" >&5 -$as_echo_n "checking size of double... " >&6; } -if test "${ac_cv_sizeof_double+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10117,10 +8792,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 int) (sizeof (double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10133,14 +8809,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10154,10 +8829,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 int) (sizeof (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10170,21 +8846,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10198,7 +8873,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10208,10 +8883,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 int) (sizeof (double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10224,14 +8900,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10245,10 +8920,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 int) (sizeof (double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10261,21 +8937,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10289,7 +8964,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10309,10 +8984,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 int) (sizeof (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10325,21 +9001,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10348,17 +9023,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_double=$ac_lo;; -'') if test "$ac_cv_type_double" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) +?*) ac_cv_sizeof_short=$ac_lo;; +'') if test "$ac_cv_type_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (double) +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_double=0 + ac_cv_sizeof_short=0 fi ;; esac else @@ -10369,8 +9042,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (double)); } -static unsigned long int ulongval () { return (long int) (sizeof (double)); } + 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 @@ -10380,22 +9054,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (double))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (double)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (double)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10408,64 +9080,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_double=`cat conftest.val` + ac_cv_sizeof_short=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_double" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) +if test "$ac_cv_type_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (double) +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_double=0 + ac_cv_sizeof_short=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 -$as_echo "$ac_cv_sizeof_double" >&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_DOUBLE $ac_cv_sizeof_double +#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; } +if test "${ac_cv_type_float+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. */ +$ac_includes_default +typedef float ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_float=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_float=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5 -$as_echo_n "checking size of fpos_t... " >&6; } -if test "${ac_cv_sizeof_fpos_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10476,10 +9197,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 int) (sizeof (fpos_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10492,14 +9214,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10513,10 +9234,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 int) (sizeof (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10529,21 +9251,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10557,7 +9278,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10567,10 +9288,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 int) (sizeof (fpos_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10583,14 +9305,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10604,10 +9325,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 int) (sizeof (fpos_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10620,21 +9342,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10648,7 +9369,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10668,10 +9389,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 int) (sizeof (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10684,21 +9406,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10707,17 +9428,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_fpos_t=$ac_lo;; -'') if test "$ac_cv_type_fpos_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (fpos_t) +echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_fpos_t=0 + ac_cv_sizeof_float=0 fi ;; esac else @@ -10728,8 +9447,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (fpos_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); } + 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 @@ -10739,22 +9459,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (fpos_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (fpos_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (fpos_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10767,64 +9485,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_fpos_t=`cat conftest.val` + ac_cv_sizeof_float=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_fpos_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) +if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (fpos_t) +echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_fpos_t=0 + ac_cv_sizeof_float=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 -$as_echo "$ac_cv_sizeof_fpos_t" >&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_FPOS_T $ac_cv_sizeof_fpos_t +#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; } +if test "${ac_cv_type_double+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. */ +$ac_includes_default +typedef double ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_double=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_double=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5 -$as_echo_n "checking size of size_t... " >&6; } -if test "${ac_cv_sizeof_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10835,10 +9602,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 int) (sizeof (size_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10851,14 +9619,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10872,10 +9639,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 int) (sizeof (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10888,21 +9656,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10916,7 +9683,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10926,10 +9693,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 int) (sizeof (size_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10942,14 +9710,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10963,10 +9730,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 int) (sizeof (size_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10979,21 +9747,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11007,7 +9774,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11027,10 +9794,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 int) (sizeof (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11043,21 +9811,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11066,17 +9833,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_size_t=$ac_lo;; -'') if test "$ac_cv_type_size_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +?*) ac_cv_sizeof_double=$ac_lo;; +'') if test "$ac_cv_type_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (size_t) +echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_size_t=0 + ac_cv_sizeof_double=0 fi ;; esac else @@ -11087,8 +9852,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (size_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (size_t)); } + 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 @@ -11098,22 +9864,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (size_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (size_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (size_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11126,64 +9890,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_size_t=`cat conftest.val` + ac_cv_sizeof_double=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_size_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +if test "$ac_cv_type_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (size_t) +echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_size_t=0 + ac_cv_sizeof_double=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 -$as_echo "$ac_cv_sizeof_size_t" >&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_SIZE_T $ac_cv_sizeof_size_t +#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; } +if test "${ac_cv_type_fpos_t+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. */ +$ac_includes_default +typedef fpos_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_fpos_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_fpos_t=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5 -$as_echo_n "checking size of pid_t... " >&6; } -if test "${ac_cv_sizeof_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11194,10 +10007,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 int) (sizeof (pid_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11210,14 +10024,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11231,10 +10044,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 int) (sizeof (pid_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11247,21 +10061,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -11275,7 +10088,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -11285,10 +10098,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 int) (sizeof (pid_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -11301,14 +10115,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11322,10 +10135,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 int) (sizeof (pid_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11338,21 +10152,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11366,7 +10179,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11386,10 +10199,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 int) (sizeof (pid_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11402,21 +10216,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11425,17 +10238,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_pid_t=$ac_lo;; -'') if test "$ac_cv_type_pid_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) +?*) ac_cv_sizeof_fpos_t=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (pid_t) +echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_pid_t=0 + ac_cv_sizeof_fpos_t=0 fi ;; esac else @@ -11446,8 +10257,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (pid_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (pid_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 @@ -11457,22 +10269,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (pid_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (pid_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (pid_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11485,71 +10295,71 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pid_t=`cat conftest.val` + ac_cv_sizeof_fpos_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_pid_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) +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 -$as_echo "$as_me: error: cannot compute sizeof (pid_t) +echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_pid_t=0 + ac_cv_sizeof_fpos_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 -$as_echo "$ac_cv_sizeof_pid_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_PID_T $ac_cv_sizeof_pid_t +#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t _ACEOF - -{ $as_echo "$as_me:$LINENO: checking for long long support" >&5 -$as_echo_n "checking for long long support... " >&6; } -have_long_long=no -cat >conftest.$ac_ext <<_ACEOF +{ 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 + 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_new_; int main () { -long long x; x = (long long)0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -11560,45 +10370,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_LONG 1 -_ACEOF - - have_long_long=yes - + ac_cv_type_size_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5 -$as_echo "$have_long_long" >&6; } -if test "$have_long_long" = yes ; then +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&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. -{ $as_echo "$as_me:$LINENO: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11609,10 +10412,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 int) (sizeof (long long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11625,14 +10429,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11646,10 +10449,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 int) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11662,21 +10466,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -11690,7 +10493,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -11700,10 +10503,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 int) (sizeof (long long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -11716,14 +10520,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11737,10 +10540,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 int) (sizeof (long long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11753,21 +10557,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11781,7 +10584,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11801,10 +10604,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 int) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11817,21 +10621,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11840,17 +10643,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (long long) +echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_size_t=0 fi ;; esac else @@ -11861,8 +10662,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (long long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long long)); } + 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 @@ -11872,22 +10674,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (long long))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (long long)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long long)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11900,72 +10700,71 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` + ac_cv_sizeof_size_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +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 -$as_echo "$as_me: error: cannot compute sizeof (long long) +echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_size_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&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_LONG_LONG $ac_cv_sizeof_long_long +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF -fi - -{ $as_echo "$as_me:$LINENO: checking for long double support" >&5 -$as_echo_n "checking for long double support... " >&6; } -have_long_double=no -cat >conftest.$ac_ext <<_ACEOF +{ 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 + 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 pid_t ac__type_new_; int main () { -long double x; x = (long double)0.; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -11976,45 +10775,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_DOUBLE 1 -_ACEOF - - have_long_double=yes - + ac_cv_type_pid_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5 -$as_echo "$have_long_double" >&6; } -if test "$have_long_double" = yes ; then +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&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. -{ $as_echo "$as_me:$LINENO: checking size of long double" >&5 -$as_echo_n "checking size of long double... " >&6; } -if test "${ac_cv_sizeof_long_double+set}" = set; then - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking size of pid_t" >&5 +echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12025,10 +10817,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12041,14 +10834,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12062,10 +10854,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12078,21 +10871,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12106,7 +10898,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12116,10 +10908,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12132,14 +10925,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12153,10 +10945,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12169,21 +10962,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -12197,7 +10989,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -12217,10 +11009,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12233,21 +11026,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -12256,17 +11048,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_double=$ac_lo;; -'') if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double) +?*) ac_cv_sizeof_pid_t=$ac_lo;; +'') if test "$ac_cv_type_pid_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long double) +echo "$as_me: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_long_double=0 + ac_cv_sizeof_pid_t=0 fi ;; esac else @@ -12277,8 +11067,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (long double)); } -static unsigned long int ulongval () { return (long int) (sizeof (long double)); } + typedef pid_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 @@ -12288,22 +11079,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (long double))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (long double)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long double)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12316,61 +11105,55 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_double=`cat conftest.val` + ac_cv_sizeof_pid_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double) +if test "$ac_cv_type_pid_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long double) +echo "$as_me: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_long_double=0 + ac_cv_sizeof_pid_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +#define SIZEOF_PID_T $ac_cv_sizeof_pid_t _ACEOF -fi -{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5 -$as_echo_n "checking for _Bool support... " >&6; } -have_c99_bool=no +{ 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. */ _ACEOF @@ -12381,7 +11164,7 @@ int main () { -_Bool x; x = (_Bool)0; +long long x; x = (long long)0; ; return 0; } @@ -12392,14 +11175,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12407,30 +11189,84 @@ cat >>confdefs.h <<\_ACEOF -#define HAVE_C99_BOOL 1 +#define HAVE_LONG_LONG 1 _ACEOF - have_c99_bool=yes + have_long_long=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5 -$as_echo "$have_c99_bool" >&6; } -if test "$have_c99_bool" = yes ; then +{ 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; } +if test "${ac_cv_type_long_long+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. */ +$ac_includes_default +typedef long long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_long=no +fi + +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; } + # 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. -{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5 -$as_echo_n "checking size of _Bool... " >&6; } -if test "${ac_cv_sizeof__Bool+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12441,10 +11277,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 int) (sizeof (_Bool))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12457,14 +11294,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12478,10 +11314,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 int) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12494,21 +11331,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12522,7 +11358,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12532,10 +11368,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 int) (sizeof (_Bool))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12548,14 +11385,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12569,10 +11405,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 int) (sizeof (_Bool))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12585,21 +11422,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -12613,7 +11449,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -12633,10 +11469,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 int) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12649,21 +11486,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -12672,17 +11508,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof__Bool=$ac_lo;; -'') if test "$ac_cv_type__Bool" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (_Bool) +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof__Bool=0 + ac_cv_sizeof_long_long=0 fi ;; esac else @@ -12693,8 +11527,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (_Bool)); } -static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); } + 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 @@ -12704,22 +11539,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (_Bool))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (_Bool)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (_Bool)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12732,79 +11565,67 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof__Bool=`cat conftest.val` + ac_cv_sizeof_long_long=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type__Bool" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +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 -$as_echo "$as_me: error: cannot compute sizeof (_Bool) +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof__Bool=0 + ac_cv_sizeof_long_long=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 -$as_echo "$ac_cv_sizeof__Bool" >&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__BOOL $ac_cv_sizeof__Bool +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5 -$as_echo_n "checking for uintptr_t... " >&6; } -if test "${ac_cv_type_uintptr_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_uintptr_t=no +{ echo "$as_me:$LINENO: checking for long double support" >&5 +echo $ECHO_N "checking for long double support... $ECHO_C" >&6; } +have_long_double=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_STDINT_H - #include - #endif int main () { -if (sizeof (uintptr_t)) - return 0; +long double x; x = (long double)0.; ; return 0; } @@ -12815,33 +11636,56 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_DOUBLE 1 +_ACEOF + + have_long_double=yes + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_long_double" >&5 +echo "${ECHO_T}$have_long_double" >&6; } +if test "$have_long_double" = yes ; then +{ echo "$as_me:$LINENO: checking for long double" >&5 +echo $ECHO_N "checking for long double... $ECHO_C" >&6; } +if test "${ac_cv_type_long_double+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. */ -#ifdef HAVE_STDINT_H - #include - #endif - +$ac_includes_default +typedef long double ac__type_new_; int main () { -if (sizeof ((uintptr_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -12852,52 +11696,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_uintptr_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + } && test -s conftest.$ac_objext; then + ac_cv_type_long_double=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_long_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -$as_echo "$ac_cv_type_uintptr_t" >&6; } -if test "x$ac_cv_type_uintptr_t" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5 +echo "${ECHO_T}$ac_cv_type_long_double" >&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. -{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5 -$as_echo_n "checking size of uintptr_t... " >&6; } -if test "${ac_cv_sizeof_uintptr_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking size of long double" >&5 +echo $ECHO_N "checking size of long double... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12908,10 +11738,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12924,14 +11755,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12945,10 +11775,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12961,21 +11792,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12989,7 +11819,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12999,10 +11829,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -13015,14 +11846,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13036,10 +11866,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13052,21 +11883,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -13080,7 +11910,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -13100,10 +11930,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13116,21 +11947,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -13139,17 +11969,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_uintptr_t=$ac_lo;; -'') if test "$ac_cv_type_uintptr_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) +?*) ac_cv_sizeof_long_double=$ac_lo;; +'') if test "$ac_cv_type_long_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (uintptr_t) +echo "$as_me: error: cannot compute sizeof (long double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_uintptr_t=0 + ac_cv_sizeof_long_double=0 fi ;; esac else @@ -13160,8 +11988,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (uintptr_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); } + typedef long 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 @@ -13171,22 +12000,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (uintptr_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (uintptr_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (uintptr_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -13199,67 +12026,169 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_uintptr_t=`cat conftest.val` + ac_cv_sizeof_long_double=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_uintptr_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) +if test "$ac_cv_type_long_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (uintptr_t) +echo "$as_me: error: cannot compute sizeof (long double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_uintptr_t=0 + ac_cv_sizeof_long_double=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 -$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +_ACEOF + + +fi + +{ 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. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +_Bool x; x = (_Bool)0; + ; + 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 + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_C99_BOOL 1 _ACEOF + have_c99_bool=yes + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +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; } +if test "${ac_cv_type__Bool+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. */ +$ac_includes_default +typedef _Bool ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type__Bool=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type__Bool=no fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5 -$as_echo_n "checking size of off_t... " >&6; } -if test "${ac_cv_sizeof_off_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -13269,16 +12198,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -13291,14 +12216,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13311,16 +12235,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13333,21 +12253,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -13361,7 +12280,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -13370,16 +12289,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -13392,14 +12307,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13412,16 +12326,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13434,21 +12344,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -13462,7 +12371,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -13481,16 +12390,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13503,21 +12408,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -13526,17 +12430,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_off_t=$ac_lo;; -'') if test "$ac_cv_type_off_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +?*) ac_cv_sizeof__Bool=$ac_lo;; +'') if test "$ac_cv_type__Bool" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (off_t) +echo "$as_me: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_off_t=0 + ac_cv_sizeof__Bool=0 fi ;; esac else @@ -13546,14 +12448,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - -static long int longval () { return (long int) (sizeof (off_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (off_t)); } +$ac_includes_default + 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 @@ -13563,110 +12461,203 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (off_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (off_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (off_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f 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>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof__Bool=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +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) +See \`config.log' for more details." >&2;} + { (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 +fi +{ 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 + + +fi + +{ 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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_STDINT_H + #include + #endif + +typedef uintptr_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_uintptr_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uintptr_t=no +fi + +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; } +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; } +if test "${ac_cv_type_uintptr_t+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. */ +$ac_includes_default +typedef uintptr_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_off_t=`cat conftest.val` + 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_type_uintptr_t=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -if test "$ac_cv_type_off_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_off_t=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + ac_cv_type_uintptr_t=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -$as_echo "$ac_cv_sizeof_off_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF_T $ac_cv_sizeof_off_t -_ACEOF - - - -{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5 -$as_echo_n "checking whether to enable large file support... " >&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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LARGEFILE_SUPPORT 1 -_ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5 -$as_echo_n "checking size of time_t... " >&6; } -if test "${ac_cv_sizeof_time_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -13676,19 +12667,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -13701,14 +12685,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13721,19 +12704,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13746,21 +12722,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -13774,7 +12749,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -13783,19 +12758,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -13808,14 +12776,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13828,19 +12795,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13853,21 +12813,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -13881,7 +12840,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -13900,19 +12859,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13925,21 +12877,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -13948,17 +12899,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_time_t=$ac_lo;; -'') if test "$ac_cv_type_time_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +?*) ac_cv_sizeof_uintptr_t=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (time_t) +echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_time_t=0 + ac_cv_sizeof_uintptr_t=0 fi ;; esac else @@ -13968,17 +12917,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - -static long int longval () { return (long int) (sizeof (time_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (time_t)); } +$ac_includes_default + 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 @@ -13988,22 +12930,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (time_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (time_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (time_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -14016,355 +12956,234 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_time_t=`cat conftest.val` + ac_cv_sizeof_uintptr_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_time_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +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 -$as_echo "$as_me: error: cannot compute sizeof (time_t) +echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_time_t=0 + ac_cv_sizeof_uintptr_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 -$as_echo "$ac_cv_sizeof_time_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_TIME_T $ac_cv_sizeof_time_t +#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t _ACEOF - -# if have pthread_t then define SIZEOF_PTHREAD_T -ac_save_cc="$CC" -if test "$ac_cv_kpthread" = "yes" -then CC="$CC -Kpthread" -elif test "$ac_cv_kthread" = "yes" -then CC="$CC -Kthread" -elif test "$ac_cv_pthread" = "yes" -then CC="$CC -pthread" fi -{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5 -$as_echo_n "checking for pthread_t... " >&6; } -have_pthread_t=no -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 () -{ -pthread_t x; x = *(pthread_t*)0; - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - have_pthread_t=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5 -$as_echo "$have_pthread_t" >&6; } -if test "$have_pthread_t" = yes ; then - # 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. -{ $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5 -$as_echo_n "checking size of pthread_t... " >&6; } -if test "${ac_cv_sizeof_pthread_t+set}" = set; then - $as_echo_n "(cached) " >&6 +# 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; } +if test "${ac_cv_sizeof_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= 0)]; -test_array [0] = 0 - - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; -test_array [0] = 0 - - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_hi=$ac_mid; break -else - $as_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` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done + ac_cv_sizeof_off_t=4 else - $as_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. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -int -main () +#include +#include +main() { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) < 0)]; -test_array [0] = 0 - - ; - return 0; + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(off_t)); + exit(0); } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof_off_t=`cat conftestval` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_sizeof_off_t=0 +fi +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; } + +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; } +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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LARGEFILE_SUPPORT 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; } +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; } +if test "${ac_cv_sizeof_time_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_time_t=4 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -int -main () +#include +#include +main() { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(time_t)); + exit(0); } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_lo=$ac_mid; break + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof_time_t=`cat conftestval` else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +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` +( exit $ac_status ) +ac_cv_sizeof_time_t=0 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -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` - cat >conftest.$ac_ext <<_ACEOF +{ 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 +_ACEOF + + + +# if have pthread_t then define SIZEOF_PTHREAD_T +ac_save_cc="$CC" +if test "$ac_cv_kpthread" = "yes" +then CC="$CC -Kpthread" +elif test "$ac_cv_kthread" = "yes" +then CC="$CC -Kthread" +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; } +have_pthread_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H #include -#endif - - int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; -test_array [0] = 0 - +pthread_t x; x = *(pthread_t*)0; ; return 0; } @@ -14375,42 +13194,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid + have_pthread_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_pthread_t=$ac_lo;; -'') if test "$ac_cv_type_pthread_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (pthread_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_pthread_t=0 - fi ;; -esac +{ 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; } + if test "${ac_cv_sizeof_pthread_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_pthread_t=4 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14418,44 +13232,15 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -static long int longval () { return (long int) (sizeof (pthread_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (pthread_t)); } #include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (pthread_t))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (pthread_t)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (pthread_t)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} +#include + main() + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(pthread_t)); + exit(0); + } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -14463,61 +13248,48 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pthread_t=`cat conftest.val` + ac_cv_sizeof_pthread_t=`cat conftestval` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_pthread_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (pthread_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_pthread_t=0 - fi +ac_cv_sizeof_pthread_t=0 fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 -$as_echo "$ac_cv_sizeof_pthread_t" >&6; } +fi + + { 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 _ACEOF - fi CC="$ac_save_cc" -{ $as_echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5 -$as_echo_n "checking for --enable-toolbox-glue... " >&6; } +{ 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; @@ -14548,8 +13320,8 @@ extra_undefs="" ;; esac -{ $as_echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5 -$as_echo "$enable_toolbox_glue" >&6; } +{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5 +echo "${ECHO_T}$enable_toolbox_glue" >&6; } @@ -14586,8 +13358,8 @@ LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac -{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5 -$as_echo_n "checking for --enable-framework... " >&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" @@ -14598,21 +13370,21 @@ #define WITH_NEXT_FRAMEWORK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } if test $enable_shared = "yes" then - { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5 -$as_echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;} + { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5 +echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for dyld" >&5 -$as_echo_n "checking for dyld... " >&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/*) @@ -14620,12 +13392,12 @@ #define WITH_DYLD 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5 -$as_echo "always on for Darwin" >&6; } + { echo "$as_me:$LINENO: result: always on for Darwin" >&5 +echo "${ECHO_T}always on for Darwin" >&6; } ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ;; esac @@ -14637,8 +13409,8 @@ # SO is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin -{ $as_echo "$as_me:$LINENO: checking SO" >&5 -$as_echo_n "checking SO... " >&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 @@ -14663,8 +13435,8 @@ echo '=====================================================================' sleep 10 fi -{ $as_echo "$as_me:$LINENO: result: $SO" >&5 -$as_echo "$SO" >&6; } +{ echo "$as_me:$LINENO: result: $SO" >&5 +echo "${ECHO_T}$SO" >&6; } cat >>confdefs.h <<_ACEOF @@ -14675,8 +13447,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.) -{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5 -$as_echo_n "checking LDSHARED... " >&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 @@ -14782,13 +13554,13 @@ *) LDSHARED="ld";; esac fi -{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5 -$as_echo_n "checking CCSHARED... " >&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 @@ -14823,12 +13595,12 @@ atheos*) CCSHARED="-fPIC";; esac fi -{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5 -$as_echo_n "checking LINKFORSHARED... " >&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 @@ -14883,13 +13655,13 @@ LINKFORSHARED='-Wl,-E -N 2048K';; esac fi -{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 -$as_echo "$LINKFORSHARED" >&6; } +{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 +echo "${ECHO_T}$LINKFORSHARED" >&6; } -{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5 -$as_echo_n "checking CFLAGSFORSHARED... " >&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 @@ -14901,8 +13673,8 @@ CFLAGSFORSHARED='$(CCSHARED)' esac fi -{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5 -$as_echo "$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). @@ -14913,22 +13685,22 @@ # don't need to link LIBS explicitly. The default should be only changed # on systems where this approach causes problems. -{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5 -$as_echo_n "checking SHLIBS... " >&6; } +{ echo "$as_me:$LINENO: checking SHLIBS" >&5 +echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; } case "$ac_sys_system" in *) SHLIBS='$(LIBS)';; esac -{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5 -$as_echo "$SHLIBS" >&6; } +{ echo "$as_me:$LINENO: result: $SHLIBS" >&5 +echo "${ECHO_T}$SHLIBS" >&6; } # checks for libraries -{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -14960,37 +13732,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +{ 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 _ACEOF @@ -15000,10 +13768,10 @@ fi # Dynamic linking for SunOS/Solaris and SYSV -{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -15035,37 +13803,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then +{ 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 _ACEOF @@ -15077,10 +13841,10 @@ # only check for sem_init if thread support is requested if test "$with_threads" = "yes" -o -z "$with_threads"; then - { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5 -$as_echo_n "checking for library containing sem_init... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -15118,30 +13882,26 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_search_sem_init=$ac_res else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -rf conftest.dSYM 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 @@ -15156,8 +13916,8 @@ rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5 -$as_echo "$ac_cv_search_sem_init" >&6; } +{ 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" @@ -15169,10 +13929,10 @@ fi # check if we need libintl for locale functions -{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 -$as_echo_n "checking for textdomain in -lintl... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" @@ -15204,37 +13964,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_textdomain=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_textdomain=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5 -$as_echo "$ac_cv_lib_intl_textdomain" >&6; } -if test "x$ac_cv_lib_intl_textdomain" = x""yes; then +{ 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 #define WITH_LIBINTL 1 @@ -15245,8 +14001,8 @@ # checks for system dependent C++ extensions support case "$ac_sys_system" in - AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5 -$as_echo_n "checking for genuine AIX C++ extensions support... " >&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 @@ -15268,37 +14024,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define AIX_GENUINE_CPLUSPLUS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext;; *) ;; @@ -15306,10 +14058,10 @@ # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. # BeOS' sockets are stashed in libnet. -{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 -$as_echo_n "checking for t_open in -lnsl... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" @@ -15341,44 +14093,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_t_open=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_t_open=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 -$as_echo "$ac_cv_lib_nsl_t_open" >&6; } -if test "x$ac_cv_lib_nsl_t_open" = x""yes; then +{ 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 -{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS $LIBS" @@ -15410,47 +14158,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_socket=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = x""yes; then +{ 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 # SVR4 sockets case "$ac_sys_system" in BeOS*) -{ $as_echo "$as_me:$LINENO: checking for socket in -lnet" >&5 -$as_echo_n "checking for socket in -lnet... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnet $LIBS $LIBS" @@ -15482,62 +14226,58 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_net_socket=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_net_socket=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5 -$as_echo "$ac_cv_lib_net_socket" >&6; } -if test "x$ac_cv_lib_net_socket" = x""yes; then +{ 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 # BeOS ;; esac -{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5 -$as_echo_n "checking for --with-libs... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-libs" >&5 +echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; } # Check whether --with-libs was given. if test "${with_libs+set}" = set; then withval=$with_libs; -{ $as_echo "$as_me:$LINENO: result: $withval" >&5 -$as_echo "$withval" >&6; } +{ echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6; } LIBS="$withval $LIBS" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Check for use of the system libffi library -{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5 -$as_echo_n "checking for --with-system-ffi... " >&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 was given. if test "${with_system_ffi+set}" = set; then @@ -15545,41 +14285,41 @@ fi -{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5 -$as_echo "$with_system_ffi" >&6; } +{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5 +echo "${ECHO_T}$with_system_ffi" >&6; } # Check for --with-dbmliborder -{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5 -$as_echo_n "checking for --with-dbmliborder... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5 +echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; } # Check whether --with-dbmliborder was given. if test "${with_dbmliborder+set}" = set; then withval=$with_dbmliborder; if test x$with_dbmliborder = xyes then -{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 -$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} +{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 +echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} { (exit 1); exit 1; }; } else for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb then - { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 -$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} + { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 +echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} { (exit 1); exit 1; }; } fi done fi fi -{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5 -$as_echo "$with_dbmliborder" >&6; } +{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5 +echo "${ECHO_T}$with_dbmliborder" >&6; } # Determine if signalmodule should be used. -{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5 -$as_echo_n "checking for --with-signal-module... " >&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 was given. if test "${with_signal_module+set}" = set; then @@ -15590,8 +14330,8 @@ if test -z "$with_signal_module" then with_signal_module="yes" fi -{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5 -$as_echo "$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="" @@ -15605,22 +14345,22 @@ USE_THREAD_MODULE="" -{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5 -$as_echo_n "checking for --with-dec-threads... " >&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 was given. if test "${with_dec_threads+set}" = set; then withval=$with_dec_threads; -{ $as_echo "$as_me:$LINENO: result: $withval" >&5 -$as_echo "$withval" >&6; } +{ 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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -15633,8 +14373,8 @@ -{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5 -$as_echo_n "checking for --with-threads... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-threads" >&5 +echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; } # Check whether --with-threads was given. if test "${with_threads+set}" = set; then @@ -15653,8 +14393,8 @@ if test -z "$with_threads" then with_threads="yes" fi -{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5 -$as_echo "$with_threads" >&6; } +{ echo "$as_me:$LINENO: result: $with_threads" >&5 +echo "${ECHO_T}$with_threads" >&6; } if test "$with_threads" = "no" @@ -15720,8 +14460,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) - { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5 -$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&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 @@ -15743,25 +14483,25 @@ fi rm -f conftest* - { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 -$as_echo "$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 - { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5 -$as_echo_n "checking for cthreads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5 -$as_echo_n "checking cthreads.h usability... " >&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 @@ -15777,33 +14517,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5 -$as_echo_n "checking cthreads.h presence... " >&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 @@ -15817,52 +14556,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -15871,18 +14609,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5 -$as_echo_n "checking for cthreads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_cthreads_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 -$as_echo "$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 "x$ac_cv_header_cthreads_h" = x""yes; then +if test $ac_cv_header_cthreads_h = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15901,17 +14639,17 @@ else if test "${ac_cv_header_mach_cthreads_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 -$as_echo_n "checking for mach/cthreads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5 -$as_echo_n "checking mach/cthreads.h usability... " >&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 @@ -15927,33 +14665,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5 -$as_echo_n "checking mach/cthreads.h presence... " >&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 @@ -15967,52 +14704,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -16021,18 +14757,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 -$as_echo_n "checking for mach/cthreads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mach_cthreads_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 -$as_echo "$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 "x$ac_cv_header_mach_cthreads_h" = x""yes; then +if test $ac_cv_header_mach_cthreads_h = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -16049,13 +14785,13 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5 -$as_echo_n "checking for --with-pth... " >&6; } + { echo "$as_me:$LINENO: checking for --with-pth" >&5 +echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; } # Check whether --with-pth was given. if test "${with_pth+set}" = set; then - withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5 -$as_echo "$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 @@ -16068,16 +14804,16 @@ LIBS="-lpth $LIBS" THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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" - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 -$as_echo_n "checking for pthread_create in -lpthread... " >&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 @@ -16102,24 +14838,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -16127,15 +14860,15 @@ posix_threads=yes THREADOBJ="Python/thread.o" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$_libs - { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5 -$as_echo_n "checking for pthread_detach... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16188,36 +14921,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_pthread_detach=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_pthread_detach=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5 -$as_echo "$ac_cv_func_pthread_detach" >&6; } -if test "x$ac_cv_func_pthread_detach" = x""yes; then +{ 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 _ACEOF @@ -16227,17 +14956,17 @@ else if test "${ac_cv_header_atheos_threads_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 -$as_echo_n "checking for atheos/threads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5 -$as_echo_n "checking atheos/threads.h usability... " >&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 @@ -16253,33 +14982,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5 -$as_echo_n "checking atheos/threads.h presence... " >&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 @@ -16293,52 +15021,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -16347,18 +15074,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 -$as_echo_n "checking for atheos/threads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_atheos_threads_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 -$as_echo "$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 "x$ac_cv_header_atheos_threads_h" = x""yes; then +if test $ac_cv_header_atheos_threads_h = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -16372,17 +15099,17 @@ else if test "${ac_cv_header_kernel_OS_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for kernel/OS.h" >&5 -$as_echo_n "checking for kernel/OS.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5 -$as_echo_n "checking kernel/OS.h usability... " >&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 @@ -16398,33 +15125,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5 -$as_echo_n "checking kernel/OS.h presence... " >&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 @@ -16438,52 +15164,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -16492,18 +15217,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for kernel/OS.h" >&5 -$as_echo_n "checking for kernel/OS.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_kernel_OS_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 -$as_echo "$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 "x$ac_cv_header_kernel_OS_h" = x""yes; then +if test $ac_cv_header_kernel_OS_h = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -16516,10 +15241,10 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5 -$as_echo_n "checking for pthread_create in -lpthreads... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthreads $LIBS" @@ -16551,37 +15276,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthreads_pthread_create=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5 -$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } -if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then +{ 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 _ACEOF @@ -16591,10 +15312,10 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 -$as_echo_n "checking for pthread_create in -lc_r... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" @@ -16626,37 +15347,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_r_pthread_create=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 -$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } -if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then +{ 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 _ACEOF @@ -16666,10 +15383,10 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5 -$as_echo_n "checking for __pthread_create_system in -lpthread... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" @@ -16701,37 +15418,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_create_system=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread___pthread_create_system=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5 -$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } -if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then +{ 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 _ACEOF @@ -16741,10 +15454,10 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5 -$as_echo_n "checking for pthread_create in -lcma... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcma $LIBS" @@ -16776,37 +15489,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_cma_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cma_pthread_create=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5 -$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } -if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then +{ 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 _ACEOF @@ -16836,7 +15545,6 @@ fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi @@ -16848,10 +15556,10 @@ - { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5 -$as_echo_n "checking for usconfig in -lmpc... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpc $LIBS" @@ -16883,37 +15591,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_mpc_usconfig=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpc_usconfig=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5 -$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } -if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then +{ 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 _ACEOF @@ -16925,10 +15629,10 @@ if test "$posix_threads" != "yes"; then - { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 -$as_echo_n "checking for thr_create in -lthread... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lthread $LIBS" @@ -16960,37 +15664,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_thread_thr_create=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_thread_thr_create=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 -$as_echo "$ac_cv_lib_thread_thr_create" >&6; } -if test "x$ac_cv_lib_thread_thr_create" = x""yes; then +{ 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 _ACEOF @@ -17043,10 +15743,10 @@ ;; esac - { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 -$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_pthread_system_supported=no @@ -17076,32 +15776,29 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_pthread_system_supported=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_pthread_system_supported=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -17109,8 +15806,8 @@ fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5 -$as_echo "$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 @@ -17121,11 +15818,11 @@ for ac_func in pthread_sigmask do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17178,42 +15875,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF case $ac_sys_system in CYGWIN*) @@ -17233,18 +15923,18 @@ # Check for enable-ipv6 -{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5 -$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } +{ 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 no) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no ;; - *) { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + *) { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define ENABLE_IPV6 1 _ACEOF @@ -17255,8 +15945,8 @@ else if test "$cross_compiling" = yes; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no else @@ -17284,44 +15974,41 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ipv6=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no fi -rm -rf conftest.dSYM 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 - { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5 -$as_echo_n "checking if RFC2553 API is available... " >&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 @@ -17345,27 +16032,26 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ipv6=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no fi @@ -17387,8 +16073,8 @@ ipv6trylibc=no if test "$ipv6" = "yes"; then - { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5 -$as_echo_n "checking ipv6 stack type... " >&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 @@ -17544,8 +16230,8 @@ break fi done - { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5 -$as_echo "$ipv6type" >&6; } + { echo "$as_me:$LINENO: result: $ipv6type" >&5 +echo "${ECHO_T}$ipv6type" >&6; } fi if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then @@ -17564,8 +16250,8 @@ fi fi -{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5 -$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; } +{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5 +echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17587,14 +16273,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17604,22 +16289,22 @@ #define HAVE_OSX105_SDK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Check for --with-doc-strings -{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5 -$as_echo_n "checking for --with-doc-strings... " >&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 was given. if test "${with_doc_strings+set}" = set; then @@ -17638,12 +16323,12 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5 -$as_echo_n "checking for --with-tsc... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-tsc" >&5 +echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; } # Check whether --with-tsc was given. if test "${with_tsc+set}" = set; then @@ -17655,20 +16340,20 @@ #define WITH_TSC 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Check for Python-specific malloc support -{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5 -$as_echo_n "checking for --with-pymalloc... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5 +echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; } # Check whether --with-pymalloc was given. if test "${with_pymalloc+set}" = set; then @@ -17687,12 +16372,12 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5 -$as_echo "$with_pymalloc" >&6; } +{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5 +echo "${ECHO_T}$with_pymalloc" >&6; } # Check for --with-wctype-functions -{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5 -$as_echo_n "checking for --with-wctype-functions... " >&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 was given. if test "${with_wctype_functions+set}" = set; then @@ -17704,14 +16389,14 @@ #define WANT_WCTYPE_FUNCTIONS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -17724,11 +16409,11 @@ for ac_func in dlopen do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17781,42 +16466,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -17826,8 +16504,8 @@ # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic # loading of modules. -{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5 -$as_echo_n "checking DYNLOADFILE... " >&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 @@ -17852,8 +16530,8 @@ ;; esac fi -{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 -$as_echo "$DYNLOADFILE" >&6; } +{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 +echo "${ECHO_T}$DYNLOADFILE" >&6; } if test "$DYNLOADFILE" != "dynload_stub.o" then @@ -17866,16 +16544,16 @@ # MACHDEP_OBJS can be set to platform-specific object files needed by Python -{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5 -$as_echo_n "checking MACHDEP_OBJS... " >&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 -{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5 -$as_echo "MACHDEP_OBJS" >&6; } +{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5 +echo "${ECHO_T}MACHDEP_OBJS" >&6; } # checks for library functions @@ -17977,11 +16655,11 @@ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18034,42 +16712,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -18078,8 +16749,8 @@ # For some functions, having a definition is not sufficient, since # we want to take their address. -{ $as_echo "$as_me:$LINENO: checking for chroot" >&5 -$as_echo_n "checking for chroot... " >&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 @@ -18101,14 +16772,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18118,20 +16788,20 @@ #define HAVE_CHROOT 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for link" >&5 -$as_echo_n "checking for link... " >&6; } +{ 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 @@ -18153,14 +16823,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18170,20 +16839,20 @@ #define HAVE_LINK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for symlink" >&5 -$as_echo_n "checking for symlink... " >&6; } +{ 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 @@ -18205,14 +16874,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18222,20 +16890,20 @@ #define HAVE_SYMLINK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5 -$as_echo_n "checking for fchdir... " >&6; } +{ 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 @@ -18257,14 +16925,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18274,20 +16941,20 @@ #define HAVE_FCHDIR 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for fsync" >&5 -$as_echo_n "checking for fsync... " >&6; } +{ 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 @@ -18309,14 +16976,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18326,20 +16992,20 @@ #define HAVE_FSYNC 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5 -$as_echo_n "checking for fdatasync... " >&6; } +{ 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 @@ -18361,14 +17027,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18378,20 +17043,20 @@ #define HAVE_FDATASYNC 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for epoll" >&5 -$as_echo_n "checking for epoll... " >&6; } +{ echo "$as_me:$LINENO: checking for epoll" >&5 +echo $ECHO_N "checking for epoll... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18413,14 +17078,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18430,20 +17094,20 @@ #define HAVE_EPOLL 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5 -$as_echo_n "checking for kqueue... " >&6; } +{ echo "$as_me:$LINENO: checking for kqueue" >&5 +echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18468,14 +17132,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18485,14 +17148,14 @@ #define HAVE_KQUEUE 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -18503,8 +17166,8 @@ # address to avoid compiler warnings and potential miscompilations # because of the missing prototypes. -{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5 -$as_echo_n "checking for ctermid_r... " >&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 @@ -18529,14 +17192,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18546,21 +17208,21 @@ #define HAVE_CTERMID_R 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for flock" >&5 -$as_echo_n "checking for flock... " >&6; } +{ 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 @@ -18585,14 +17247,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18602,21 +17263,21 @@ #define HAVE_FLOCK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5 -$as_echo_n "checking for getpagesize... " >&6; } +{ 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 @@ -18641,14 +17302,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18658,14 +17318,14 @@ #define HAVE_GETPAGESIZE 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -18675,10 +17335,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$TRUE"; then ac_cv_prog_TRUE="$TRUE" # Let the user override the test. @@ -18691,7 +17351,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -18702,11 +17362,11 @@ fi TRUE=$ac_cv_prog_TRUE if test -n "$TRUE"; then - { $as_echo "$as_me:$LINENO: result: $TRUE" >&5 -$as_echo "$TRUE" >&6; } + { echo "$as_me:$LINENO: result: $TRUE" >&5 +echo "${ECHO_T}$TRUE" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -18715,10 +17375,10 @@ test -n "$TRUE" || TRUE="/bin/true" -{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5 -$as_echo_n "checking for inet_aton in -lc... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" @@ -18750,44 +17410,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_inet_aton=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_inet_aton=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5 -$as_echo "$ac_cv_lib_c_inet_aton" >&6; } -if test "x$ac_cv_lib_c_inet_aton" = x""yes; then +{ 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 -{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 -$as_echo_n "checking for inet_aton in -lresolv... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" @@ -18819,37 +17475,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_resolv_inet_aton=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_resolv_inet_aton=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 -$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } -if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then +{ 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 _ACEOF @@ -18864,13 +17516,14 @@ # On Tru64, chflags seems to be present, but calling it will # exit Python -{ $as_echo "$as_me:$LINENO: checking for chflags" >&5 -$as_echo_n "checking for chflags... " >&6; } -if test "${ac_cv_have_chflags+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_have_chflags=no +{ echo "$as_me:$LINENO: checking for chflags" >&5 +echo $ECHO_N "checking for chflags... $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 +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. */ @@ -18895,57 +17548,50 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_chflags=yes + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHFLAGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_have_chflags=no -fi -rm -rf conftest.dSYM -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: no" >&5 +echo "${ECHO_T}no" >&6; } fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5 -$as_echo "$ac_cv_have_chflags" >&6; } -if test $ac_cv_have_chflags = yes -then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHFLAGS 1 -_ACEOF - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5 -$as_echo_n "checking for lchflags... " >&6; } -if test "${ac_cv_have_lchflags+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_have_lchflags=no + + +{ echo "$as_me:$LINENO: checking for lchflags" >&5 +echo $ECHO_N "checking for lchflags... $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 +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. */ @@ -18970,50 +17616,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_lchflags=yes + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LCHFLAGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_have_lchflags=no +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5 -$as_echo "$ac_cv_have_lchflags" >&6; } -if test $ac_cv_have_lchflags = yes -then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LCHFLAGS 1 -_ACEOF - -fi - case $ac_sys_system/$ac_sys_release in Darwin/*) _CUR_CFLAGS="${CFLAGS}" @@ -19023,10 +17661,10 @@ ;; esac -{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5 -$as_echo_n "checking for inflateCopy in -lz... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -19058,37 +17696,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_z_inflateCopy=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_inflateCopy=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5 -$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } -if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then +{ 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 #define HAVE_ZLIB_COPY 1 @@ -19104,8 +17738,8 @@ ;; esac -{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5 -$as_echo_n "checking for hstrerror... " >&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 @@ -19130,43 +17764,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_HSTRERROR 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5 -$as_echo_n "checking for inet_aton... " >&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 @@ -19194,43 +17824,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_INET_ATON 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5 -$as_echo_n "checking for inet_pton... " >&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 @@ -19258,14 +17884,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -19275,22 +17900,22 @@ #define HAVE_INET_PTON 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # On some systems, setgroups is in unistd.h, on others, in grp.h -{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5 -$as_echo_n "checking for setgroups... " >&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 @@ -19318,14 +17943,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -19335,14 +17959,14 @@ #define HAVE_SETGROUPS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -19353,11 +17977,11 @@ for ac_func in openpty do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19410,49 +18034,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 -$as_echo_n "checking for openpty in -lutil... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" @@ -19484,46 +18101,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_util_openpty=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_openpty=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 -$as_echo "$ac_cv_lib_util_openpty" >&6; } -if test "x$ac_cv_lib_util_openpty" = x""yes; then +{ 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 - { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5 -$as_echo_n "checking for openpty in -lbsd... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -19555,37 +18168,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_openpty=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_openpty=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5 -$as_echo "$ac_cv_lib_bsd_openpty" >&6; } -if test "x$ac_cv_lib_bsd_openpty" = x""yes; then +{ 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 _ACEOF @@ -19602,11 +18211,11 @@ for ac_func in forkpty do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19659,49 +18268,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5 -$as_echo_n "checking for forkpty in -lutil... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" @@ -19733,46 +18335,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_util_forkpty=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_forkpty=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5 -$as_echo "$ac_cv_lib_util_forkpty" >&6; } -if test "x$ac_cv_lib_util_forkpty" = x""yes; then +{ 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 - { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5 -$as_echo_n "checking for forkpty in -lbsd... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -19804,37 +18402,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_forkpty=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_forkpty=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5 -$as_echo "$ac_cv_lib_bsd_forkpty" >&6; } -if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then +{ 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 _ACEOF @@ -19853,11 +18447,11 @@ for ac_func in memmove do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19910,42 +18504,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -19961,11 +18548,11 @@ for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20018,42 +18605,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -20065,11 +18645,11 @@ for ac_func in dup2 getcwd strdup do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20122,42 +18702,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else @@ -20174,11 +18747,11 @@ for ac_func in getpgrp do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20231,42 +18804,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20289,14 +18855,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -20308,7 +18873,7 @@ else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20322,11 +18887,11 @@ for ac_func in setpgrp do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20379,42 +18944,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20437,14 +18995,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -20456,7 +19013,7 @@ else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20470,11 +19027,11 @@ for ac_func in gettimeofday do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20527,42 +19084,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20585,21 +19135,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20616,8 +19165,8 @@ done -{ $as_echo "$as_me:$LINENO: checking for major" >&5 -$as_echo_n "checking for major... " >&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 @@ -20649,48 +19198,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_MACROS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM 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. -{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -$as_echo_n "checking for getaddrinfo... " >&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 @@ -20706,7 +19251,9 @@ int main () { + getaddrinfo(NULL, NULL, NULL, NULL); + ; return 0; } @@ -20717,43 +19264,27 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - have_getaddrinfo=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_getaddrinfo=no -fi + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 -$as_echo "$have_getaddrinfo" >&6; } -if test $have_getaddrinfo = yes -then - { $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 -$as_echo_n "checking getaddrinfo bug... " >&6; } - if test "${ac_cv_buggy_getaddrinfo+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_buggy_getaddrinfo=yes +{ 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; } +buggygetaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20768,7 +19299,7 @@ #include #include -int main() +main() { int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; @@ -20840,12 +19371,12 @@ if (aitop) freeaddrinfo(aitop); - return 0; + exit(0); bad: if (aitop) freeaddrinfo(aitop); - return 1; + exit(1); } _ACEOF @@ -20855,44 +19386,53 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_buggy_getaddrinfo=no + { echo "$as_me:$LINENO: result: good" >&5 +echo "${ECHO_T}good" >&6; } +buggygetaddrinfo=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_buggy_getaddrinfo=yes +{ echo "$as_me:$LINENO: result: buggy" >&5 +echo "${ECHO_T}buggy" >&6; } +buggygetaddrinfo=yes fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -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; } +buggygetaddrinfo=yes fi -if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes -then - if test $ipv6 = yes - then +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +if test "$buggygetaddrinfo" = "yes"; then + if test "$ipv6" = "yes"; then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 @@ -20907,11 +19447,11 @@ for ac_func in getnameinfo do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20964,42 +19504,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -21007,10 +19540,10 @@ # checks for structures -{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21037,21 +19570,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_time=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no @@ -21059,8 +19591,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -$as_echo "$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 @@ -21069,10 +19601,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21088,7 +19620,7 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + return !p; ; return 0; } @@ -21099,21 +19631,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_tm=time.h else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h @@ -21121,8 +19652,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -$as_echo "$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 @@ -21131,10 +19662,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -$as_echo_n "checking for struct tm.tm_zone... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21162,21 +19693,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_tm_tm_zone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21205,21 +19735,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_tm_tm_zone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no @@ -21230,9 +19759,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then +{ 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 #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -21248,10 +19777,10 @@ _ACEOF else - { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -$as_echo_n "checking whether tzname is declared... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21278,21 +19807,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no @@ -21300,9 +19828,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -$as_echo "$ac_cv_have_decl_tzname" >&6; } -if test "x$ac_cv_have_decl_tzname" = x""yes; then +{ 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 @@ -21318,10 +19846,10 @@ fi - { $as_echo "$as_me:$LINENO: checking for tzname" >&5 -$as_echo_n "checking for tzname... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21348,35 +19876,31 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -$as_echo "$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 @@ -21386,10 +19910,10 @@ fi fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -$as_echo_n "checking for struct stat.st_rdev... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21414,21 +19938,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_rdev=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21454,21 +19977,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_rdev=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_rdev=no @@ -21479,9 +20001,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; } -if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_RDEV 1 @@ -21490,10 +20012,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -$as_echo_n "checking for struct stat.st_blksize... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21518,21 +20040,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_blksize=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21558,21 +20079,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_blksize=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blksize=no @@ -21583,9 +20103,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -21594,10 +20114,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 -$as_echo_n "checking for struct stat.st_flags... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21622,21 +20142,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_flags=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21662,21 +20181,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_flags=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_flags=no @@ -21687,9 +20205,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5 -$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; } -if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_FLAGS 1 @@ -21698,10 +20216,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 -$as_echo_n "checking for struct stat.st_gen... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21726,21 +20244,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_gen=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21766,21 +20283,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_gen=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_gen=no @@ -21791,9 +20307,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5 -$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; } -if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_GEN 1 @@ -21802,10 +20318,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5 -$as_echo_n "checking for struct stat.st_birthtime... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21830,21 +20346,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_birthtime=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21870,21 +20385,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_birthtime=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_birthtime=no @@ -21895,9 +20409,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5 -$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; } -if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 @@ -21906,10 +20420,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -$as_echo_n "checking for struct stat.st_blocks... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21934,21 +20448,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_blocks=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21974,21 +20487,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_blocks=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blocks=no @@ -21999,9 +20511,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; } -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -22023,10 +20535,10 @@ -{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5 -$as_echo_n "checking for time.h that defines altzone... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22049,21 +20561,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_time_altzone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time_altzone=no @@ -22072,8 +20583,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5 -$as_echo "$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 @@ -22083,8 +20594,8 @@ fi was_it_defined=no -{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&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 @@ -22110,14 +20621,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22131,20 +20641,20 @@ was_it_defined=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5 -$as_echo "$was_it_defined" >&6; } +{ echo "$as_me:$LINENO: result: $was_it_defined" >&5 +echo "${ECHO_T}$was_it_defined" >&6; } -{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5 -$as_echo_n "checking for addrinfo... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22168,21 +20678,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_addrinfo=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_addrinfo=no @@ -22191,8 +20700,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5 -$as_echo "$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 @@ -22201,10 +20710,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 -$as_echo_n "checking for sockaddr_storage... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22229,21 +20738,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_sockaddr_storage=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_sockaddr_storage=no @@ -22252,8 +20760,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5 -$as_echo "$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 @@ -22265,10 +20773,10 @@ # checks for compiler characteristics -{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -$as_echo_n "checking whether char is unsigned... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22293,21 +20801,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_char_unsigned=no else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_char_unsigned=yes @@ -22315,8 +20822,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -$as_echo "$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 @@ -22324,10 +20831,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22399,21 +20906,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_const=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no @@ -22421,20 +20927,20 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -$as_echo "$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 -#define const /**/ +#define const _ACEOF fi works=no -{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&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 @@ -22456,38 +20962,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 works=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF -#define volatile /**/ +#define volatile _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $works" >&5 -$as_echo "$works" >&6; } +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } works=no -{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5 -$as_echo_n "checking for working signed char... " >&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 @@ -22509,38 +21014,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 works=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF -#define signed /**/ +#define signed _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $works" >&5 -$as_echo "$works" >&6; } +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } have_prototypes=no -{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5 -$as_echo_n "checking for prototypes... " >&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 @@ -22562,14 +21066,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22583,19 +21086,19 @@ have_prototypes=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5 -$as_echo "$have_prototypes" >&6; } +{ echo "$as_me:$LINENO: result: $have_prototypes" >&5 +echo "${ECHO_T}$have_prototypes" >&6; } works=no -{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5 -$as_echo_n "checking for variable length prototypes and stdarg.h... " >&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 @@ -22627,14 +21130,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22648,19 +21150,19 @@ works=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $works" >&5 -$as_echo "$works" >&6; } +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } # check for socketpair -{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5 -$as_echo_n "checking for socketpair... " >&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 @@ -22685,14 +21187,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22702,22 +21203,22 @@ #define HAVE_SOCKETPAIR 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # check if sockaddr has sa_len member -{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5 -$as_echo_n "checking if sockaddr has sa_len member... " >&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 @@ -22741,38 +21242,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 _ACEOF else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext va_list_is_array=no -{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5 -$as_echo_n "checking whether va_list is an array... " >&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 @@ -22800,21 +21300,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -22828,17 +21327,17 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5 -$as_echo "$va_list_is_array" >&6; } +{ 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 :-( -{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -$as_echo_n "checking for gethostbyname_r... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22891,43 +21390,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname_r=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -$as_echo "$ac_cv_func_gethostbyname_r" >&6; } -if test "x$ac_cv_func_gethostbyname_r" = x""yes; then +{ 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 - { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5 -$as_echo_n "checking gethostbyname_r with 6 args... " >&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 @@ -22961,14 +21456,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22983,18 +21477,18 @@ #define HAVE_GETHOSTBYNAME_R_6_ARG 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5 -$as_echo_n "checking gethostbyname_r with 5 args... " >&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 @@ -23026,14 +21520,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -23048,18 +21541,18 @@ #define HAVE_GETHOSTBYNAME_R_5_ARG 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5 -$as_echo_n "checking gethostbyname_r with 3 args... " >&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 @@ -23089,14 +21582,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -23111,16 +21603,16 @@ #define HAVE_GETHOSTBYNAME_R_3_ARG 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -23140,11 +21632,11 @@ for ac_func in gethostbyname do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23197,42 +21689,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -23251,10 +21736,10 @@ # (none yet) # Linux requires this for correct f.p. operations -{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5 -$as_echo_n "checking for __fpu_control... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23307,43 +21792,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func___fpu_control=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func___fpu_control=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5 -$as_echo "$ac_cv_func___fpu_control" >&6; } -if test "x$ac_cv_func___fpu_control" = x""yes; then +{ 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 -{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5 -$as_echo_n "checking for __fpu_control in -lieee... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" @@ -23375,37 +21856,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee___fpu_control=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ieee___fpu_control=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5 -$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } -if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then +{ 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 _ACEOF @@ -23419,8 +21896,8 @@ # Check for --with-fpectl -{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5 -$as_echo_n "checking for --with-fpectl... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5 +echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; } # Check whether --with-fpectl was given. if test "${with_fpectl+set}" = set; then @@ -23432,14 +21909,14 @@ #define WANT_SIGFPE_HANDLER 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -23450,53 +21927,53 @@ BeOS) ;; *) LIBM=-lm esac -{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5 -$as_echo_n "checking for --with-libm=STRING... " >&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 was given. if test "${with_libm+set}" = set; then withval=$with_libm; if test "$withval" = no then LIBM= - { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5 -$as_echo "set LIBM=\"$withval\"" >&6; } -else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5 -$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;} + { 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 - { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5 -$as_echo "default LIBM=\"$LIBM\"" >&6; } + { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5 +echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; } fi # check for --with-libc=... -{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5 -$as_echo_n "checking for --with-libc=STRING... " >&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 was given. if test "${with_libc+set}" = set; then withval=$with_libc; if test "$withval" = no then LIBC= - { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5 -$as_echo "set LIBC=\"$withval\"" >&6; } -else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5 -$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;} + { 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 - { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5 -$as_echo "default LIBC=\"$LIBC\"" >&6; } + { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5 +echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; } fi @@ -23512,10 +21989,10 @@ # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding # mode is round-to-nearest and double rounding issues are present, and # 0 otherwise. See http://bugs.python.org/issue2937 for more info. -{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5 -$as_echo_n "checking for x87-style double rounding... " >&6; } +{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5 +echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; } if test "${ac_cv_x87_double_rounding+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -23554,40 +22031,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_x87_double_rounding=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_x87_double_rounding=yes fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5 -$as_echo "$ac_cv_x87_double_rounding" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5 +echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; } if test "$ac_cv_x87_double_rounding" = yes then @@ -23598,13 +22072,14 @@ fi # Multiprocessing check for broken sem_getvalue -{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 -$as_echo_n "checking for broken sem_getvalue... " >&6; } -if test "${ac_cv_broken_sem_getvalue+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_broken_sem_getvalue=yes +{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 +echo $ECHO_N "checking for broken sem_getvalue... $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 +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. */ @@ -23633,6 +22108,7 @@ return res==-1 ? 1 : 0; } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -23640,56 +22116,48 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_broken_sem_getvalue=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_broken_sem_getvalue=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5 -$as_echo "$ac_cv_broken_sem_getvalue" >&6; } -if test $ac_cv_broken_sem_getvalue = yes -then +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_SEM_GETVALUE 1 _ACEOF + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of # -0. on some architectures. -{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5 -$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; } +{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5 +echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; } if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -23720,40 +22188,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_tanh_preserves_zero_sign=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_tanh_preserves_zero_sign=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5 -$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5 +echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; } if test "$ac_cv_tanh_preserves_zero_sign" = yes then @@ -23774,11 +22239,11 @@ for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23831,51 +22296,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5 -$as_echo_n "checking whether isinf is declared... " >&6; } +{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5 +echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_isinf+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23902,21 +22360,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_isinf=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isinf=no @@ -23924,9 +22381,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5 -$as_echo "$ac_cv_have_decl_isinf" >&6; } -if test "x$ac_cv_have_decl_isinf" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5 +echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; } +if test $ac_cv_have_decl_isinf = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISINF 1 @@ -23940,10 +22397,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5 -$as_echo_n "checking whether isnan is declared... " >&6; } +{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5 +echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_isnan+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23970,21 +22427,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_isnan=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isnan=no @@ -23992,9 +22448,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5 -$as_echo "$ac_cv_have_decl_isnan" >&6; } -if test "x$ac_cv_have_decl_isnan" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5 +echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; } +if test $ac_cv_have_decl_isnan = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISNAN 1 @@ -24008,10 +22464,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5 -$as_echo_n "checking whether isfinite is declared... " >&6; } +{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5 +echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_isfinite+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24038,21 +22494,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_isfinite=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isfinite=no @@ -24060,9 +22515,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5 -$as_echo "$ac_cv_have_decl_isfinite" >&6; } -if test "x$ac_cv_have_decl_isfinite" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5 +echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; } +if test $ac_cv_have_decl_isfinite = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISFINITE 1 @@ -24082,8 +22537,8 @@ LIBS=$LIBS_SAVE # determine what size digit to use for Python's longs -{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 -$as_echo_n "checking digit size for Python's longs... " >&6; } +{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 +echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; } # Check whether --enable-big-digits was given. if test "${enable_big_digits+set}" = set; then enableval=$enable_big_digits; case $enable_big_digits in @@ -24094,12 +22549,12 @@ 15|30) ;; *) - { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5 -$as_echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;} + { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5 +echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;} { (exit 1); exit 1; }; } ;; esac -{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5 -$as_echo "$enable_big_digits" >&6; } +{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5 +echo "${ECHO_T}$enable_big_digits" >&6; } cat >>confdefs.h <<_ACEOF #define PYLONG_BITS_IN_DIGIT $enable_big_digits @@ -24107,24 +22562,24 @@ else - { $as_echo "$as_me:$LINENO: result: no value specified" >&5 -$as_echo "no value specified" >&6; } + { echo "$as_me:$LINENO: result: no value specified" >&5 +echo "${ECHO_T}no value specified" >&6; } fi # check for wchar.h if test "${ac_cv_header_wchar_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5 -$as_echo_n "checking for wchar.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5 -$as_echo_n "checking wchar.h usability... " >&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 @@ -24140,33 +22595,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5 -$as_echo_n "checking wchar.h presence... " >&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 @@ -24180,52 +22634,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -24234,18 +22687,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5 -$as_echo_n "checking for wchar.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_wchar_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -$as_echo "$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 "x$ac_cv_header_wchar_h" = x""yes; then +if test $ac_cv_header_wchar_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -24264,14 +22717,69 @@ # determine wchar_t size if test "$wchar_h" = yes then - # The cast to long int works around a bug in the HP C Compiler + { 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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +typedef wchar_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_wchar_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_wchar_t=no +fi + +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; } + +# 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. -{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5 -$as_echo_n "checking size of wchar_t... " >&6; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -24283,10 +22791,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -24299,14 +22808,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -24321,10 +22829,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -24337,21 +22846,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -24365,7 +22873,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -24376,10 +22884,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -24392,14 +22901,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -24414,10 +22922,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -24430,21 +22939,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -24458,7 +22966,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -24479,10 +22987,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -24495,21 +23004,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -24520,13 +23028,11 @@ case $ac_lo in ?*) ac_cv_sizeof_wchar_t=$ac_lo;; '') if test "$ac_cv_type_wchar_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (wchar_t) +echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_wchar_t=0 fi ;; @@ -24540,8 +23046,9 @@ /* end confdefs.h. */ #include -static long int longval () { return (long int) (sizeof (wchar_t)); } -static unsigned long int ulongval () { return (long int) (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 @@ -24551,22 +23058,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (wchar_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (wchar_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (wchar_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -24579,48 +23084,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_wchar_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_wchar_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (wchar_t) +echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_wchar_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5 -$as_echo "$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; } @@ -24631,8 +23131,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 -$as_echo_n "checking for UCS-4 tcl... " >&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. */ @@ -24659,14 +23159,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -24680,24 +23179,24 @@ have_ucs4_tcl=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5 -$as_echo "$have_ucs4_tcl" >&6; } +{ 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 - { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5 -$as_echo_n "checking whether wchar_t is signed... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -24724,44 +23223,41 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_wchar_t_signed=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_wchar_t_signed=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking what type to use for unicode" >&5 -$as_echo_n "checking what type to use for unicode... " >&6; } +{ 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; @@ -24805,8 +23301,8 @@ if test "$enable_unicode" = "no" then UNICODE_OBJS="" - { $as_echo "$as_me:$LINENO: result: not used" >&5 -$as_echo "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" @@ -24841,184 +23337,38 @@ PY_UNICODE_TYPE="unsigned long" cat >>confdefs.h <<\_ACEOF #define PY_UNICODE_TYPE unsigned long -_ACEOF - - else - PY_UNICODE_TYPE="no type found" - fi - { $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 -$as_echo "$PY_UNICODE_TYPE" >&6; } -fi - -# check for endianness - - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - - # Check for potential -arch flags. It is not universal unless - # there are some -arch flags. Note that *ppc* also matches - # ppc64. This check is also rather less than ideal. - case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( - *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; - esac -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - # It does; now see whether it defined to BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_c_bigendian=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +_ACEOF + else + PY_UNICODE_TYPE="no type found" + fi + { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 +echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat >conftest.$ac_ext <<_ACEOF +# 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; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include +#include int main () { -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif ; return 0; @@ -25030,33 +23380,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include +#include int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif ; return 0; @@ -25068,21 +23418,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no @@ -25090,44 +23439,29 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then - # Try to guess by grepping values from an object file. - cat >conftest.$ac_ext <<_ACEOF + # 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 + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - +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 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 () { -return use_ascii (foo) == use_ebcdic (foo); + _ascii (); _ebcdic (); ; return 0; } @@ -25138,31 +23472,30 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -25181,14 +23514,14 @@ main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; ; return 0; @@ -25200,70 +23533,63 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF -;; #( - no) - ;; #( - universal) + +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; } +case $ac_cv_c_bigendian in + yes) cat >>confdefs.h <<\_ACEOF -#define AC_APPLE_UNIVERSAL_BUILD 1 +#define WORDS_BIGENDIAN 1 _ACEOF - - ;; #( - *) - { { $as_echo "$as_me:$LINENO: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -$as_echo "$as_me: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; - esac +esac # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). -{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5 -$as_echo_n "checking whether right shift extends the sign bit... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -25288,40 +23614,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_rshift_extends_sign=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_rshift_extends_sign=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5 -$as_echo "$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 @@ -25332,10 +23655,10 @@ fi # check for getc_unlocked and related locking functions -{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5 -$as_echo_n "checking for getc_unlocked() and friends... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -25364,36 +23687,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_have_getc_unlocked=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_getc_unlocked=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5 -$as_echo "$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 @@ -25411,8 +23730,8 @@ # library. NOTE: Keep the precedence of listed libraries synchronised # with setup.py. py_cv_lib_readline=no -{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5 -$as_echo_n "checking how to link readline libs... " >&6; } +{ echo "$as_me:$LINENO: checking how to link readline libs" >&5 +echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; } for py_libtermcap in "" ncursesw ncurses curses termcap; do if test -z "$py_libtermcap"; then READLINE_LIBS="-lreadline" @@ -25448,30 +23767,26 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then py_cv_lib_readline=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test $py_cv_lib_readline = yes; then @@ -25481,11 +23796,11 @@ # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts #AC_SUBST([READLINE_LIBS]) if test $py_cv_lib_readline = no; then - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5 -$as_echo "$READLINE_LIBS" >&6; } + { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5 +echo "${ECHO_T}$READLINE_LIBS" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 @@ -25494,10 +23809,10 @@ fi # check for readline 2.1 -{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5 -$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -25529,37 +23844,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_callback_handler_install=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_callback_handler_install=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 -$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; } -if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then +{ 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 #define HAVE_RL_CALLBACK 1 @@ -25582,21 +23893,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_readline=no @@ -25627,10 +23937,10 @@ fi # check for readline 4.0 -{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5 -$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -25662,37 +23972,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_pre_input_hook=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_pre_input_hook=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5 -$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; } -if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then +{ 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 #define HAVE_RL_PRE_INPUT_HOOK 1 @@ -25702,10 +24008,10 @@ # also in 4.0 -{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5 -$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; } +{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5 +echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; } if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -25737,37 +24043,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_completion_display_matches_hook=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_completion_display_matches_hook=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5 -$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } -if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } +if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1 @@ -25777,10 +24079,10 @@ # check for readline 4.2 -{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5 -$as_echo_n "checking for rl_completion_matches in -lreadline... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -25812,37 +24114,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_completion_matches=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_completion_matches=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5 -$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; } -if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then +{ 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 #define HAVE_RL_COMPLETION_MATCHES 1 @@ -25865,21 +24163,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_readline=no @@ -25912,10 +24209,10 @@ # End of readline checks: restore LIBS LIBS=$LIBS_no_readline -{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5 -$as_echo_n "checking for broken nice()... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -25943,40 +24240,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_nice=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_nice=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5 -$as_echo "$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 @@ -25986,12 +24280,9 @@ fi -{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5 -$as_echo_n "checking for broken poll()... " >&6; } -if test "${ac_cv_broken_poll+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then +{ 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 cat >conftest.$ac_ext <<_ACEOF @@ -26003,21 +24294,27 @@ #include -int main() -{ +int main (void) + { struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; - int poll_test; close (42); - poll_test = poll(&poll_struct, 1, 0); + int poll_test = poll (&poll_struct, 1, 0); + if (poll_test < 0) - return 0; + { + exit(0); + } else if (poll_test == 0 && poll_struct.revents != POLLNVAL) - return 0; + { + exit(0); + } else - return 1; -} + { + exit(1); + } + } _ACEOF rm -f conftest$ac_exeext @@ -26026,40 +24323,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_poll=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_poll=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5 -$as_echo "$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 @@ -26072,10 +24364,10 @@ # 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[] -{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -$as_echo_n "checking for struct tm.tm_zone... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26103,21 +24395,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_tm_tm_zone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -26146,21 +24437,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_tm_tm_zone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no @@ -26171,9 +24461,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then +{ 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 #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -26189,10 +24479,10 @@ _ACEOF else - { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -$as_echo_n "checking whether tzname is declared... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26219,21 +24509,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no @@ -26241,9 +24530,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -$as_echo "$ac_cv_have_decl_tzname" >&6; } -if test "x$ac_cv_have_decl_tzname" = x""yes; then +{ 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 @@ -26259,10 +24548,10 @@ fi - { $as_echo "$as_me:$LINENO: checking for tzname" >&5 -$as_echo_n "checking for tzname... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26289,35 +24578,31 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -$as_echo "$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 @@ -26329,10 +24614,10 @@ # check tzset(3) exists and works like we expect it to -{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5 -$as_echo_n "checking for working tzset()... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -26415,40 +24700,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_tzset=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_working_tzset=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5 -$as_echo "$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 @@ -26459,10 +24741,10 @@ fi # Look for subsecond timestamps in struct stat -{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5 -$as_echo_n "checking for tv_nsec in struct stat... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26488,21 +24770,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_stat_tv_nsec=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_stat_tv_nsec=no @@ -26511,8 +24792,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5 -$as_echo "$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 @@ -26523,10 +24804,10 @@ fi # Look for BSD style subsecond timestamps in struct stat -{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5 -$as_echo_n "checking for tv_nsec2 in struct stat... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26552,21 +24833,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_stat_tv_nsec2=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_stat_tv_nsec2=no @@ -26575,8 +24855,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5 -$as_echo "$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 @@ -26587,10 +24867,10 @@ fi # On HP/UX 11.0, mvwdelch is a block with a return statement -{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5 -$as_echo_n "checking whether mvwdelch is an expression... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26616,21 +24896,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_mvwdelch_is_expression=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_mvwdelch_is_expression=no @@ -26639,8 +24918,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5 -$as_echo "$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 @@ -26651,10 +24930,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5 -$as_echo_n "checking whether WINDOW has _flags... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26680,21 +24959,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_window_has_flags=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_window_has_flags=no @@ -26703,8 +24981,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5 -$as_echo "$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 @@ -26716,8 +24994,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5 -$as_echo_n "checking for is_term_resized... " >&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 @@ -26739,14 +25017,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -26756,21 +25033,21 @@ #define HAVE_CURSES_IS_TERM_RESIZED 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5 -$as_echo_n "checking for resize_term... " >&6; } +{ 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 @@ -26792,14 +25069,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -26809,21 +25085,21 @@ #define HAVE_CURSES_RESIZE_TERM 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5 -$as_echo_n "checking for resizeterm... " >&6; } +{ 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 @@ -26845,14 +25121,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -26862,60 +25137,61 @@ #define HAVE_CURSES_RESIZETERM 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5 -$as_echo_n "checking for /dev/ptmx... " >&6; } +{ 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 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5 -$as_echo_n "checking for /dev/ptc... " >&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 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 -$as_echo_n "checking for %zd printf() format support... " >&6; } -if test "${ac_cv_have_size_t_format+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_have_size_t_format=no +{ 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 +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. */ @@ -26923,7 +25199,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include #include #include @@ -26958,7 +25233,6 @@ return 0; } - _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -26966,98 +25240,46 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_size_t_format=yes + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define PY_FORMAT_SIZE_T "z" +_ACEOF + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_have_size_t_format=no +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5 -$as_echo "$ac_cv_have_size_t_format" >&6; } -if test $ac_cv_have_size_t_format = yes -then - -cat >>confdefs.h <<\_ACEOF -#define PY_FORMAT_SIZE_T "z" -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 -$as_echo_n "checking for socklen_t... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_socklen_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - - -int -main () -{ -if (sizeof (socklen_t)) - return 0; - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27073,11 +25295,14 @@ #endif +typedef socklen_t ac__type_new_; int main () { -if (sizeof ((socklen_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -27088,39 +25313,30 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_socklen_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_socklen_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_socklen_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -$as_echo "$ac_cv_type_socklen_t" >&6; } -if test "x$ac_cv_type_socklen_t" = x""yes; then +{ 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 @@ -27140,15 +25356,15 @@ SRCDIRS="Parser Grammar Objects Python Modules Mac" -{ $as_echo "$as_me:$LINENO: checking for build directories" >&5 -$as_echo_n "checking for build directories... " >&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 -{ $as_echo "$as_me:$LINENO: result: done" >&5 -$as_echo "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 Misc/python.pc" @@ -27180,12 +25396,11 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_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) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -27218,12 +25433,12 @@ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { 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 @@ -27239,7 +25454,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + 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" @@ -27251,14 +25466,12 @@ - : ${CONFIG_STATUS=./config.status} -ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -27271,7 +25484,7 @@ SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -27281,7 +25494,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # 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 @@ -27303,45 +25516,17 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + 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 # Support unset when possible. @@ -27357,6 +25542,8 @@ # 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. @@ -27379,7 +25566,7 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -27392,10 +25579,17 @@ PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + 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) >/dev/null 2>&1 && $as_unset $as_var + fi +done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -27417,7 +25611,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -27468,7 +25662,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { 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 @@ -27496,6 +25690,7 @@ *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -27508,22 +25703,19 @@ rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + mkdir conf$$.dir fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - 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' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + 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' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -27548,10 +25740,10 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -27574,7 +25766,7 @@ # values after options handling. ac_log=" This file was extended by python $as_me 2.7, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -27587,39 +25779,29 @@ _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -27630,24 +25812,24 @@ Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ python config.status 2.7 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2008 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." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' -test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do @@ -27669,36 +25851,30 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 + { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + 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. - -*) { $as_echo "$as_me: error: unrecognized option: $1 + -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -27717,32 +25893,30 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' + 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 "\$@" + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets @@ -27758,8 +25932,8 @@ "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;; "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { 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 @@ -27799,144 +25973,227 @@ (umask 077 && mkdir "$tmp") } || { - $as_echo "$as_me: cannot create a temporary directory in ." >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - +# +# Set up the sed scripts for CONFIG_FILES section. +# -ac_cr=`echo X | tr X '\015'` -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi +# 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 -echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + 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 +ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim +PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim +PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$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 +GNULD!$GNULD$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +ARFLAGS!$ARFLAGS$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 +UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$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 +_ACEOF - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { { 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 -rm -f conf$$subs.sh -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" +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 -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } +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 - print line -} -_ACAWK +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +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 +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 -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; 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 @@ -27952,133 +26209,19 @@ }' fi -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # 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. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -shift -for ac_tag +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*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + :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;; @@ -28107,38 +26250,26 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { { 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 - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + ac_file_inputs="$ac_file_inputs $ac_f" done # 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 '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' + 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" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac @@ -28148,7 +26279,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -28174,7 +26305,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -28183,7 +26314,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -28204,17 +26335,17 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || 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=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + 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/ ;; @@ -28254,13 +26385,12 @@ esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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= -ac_sed_dataroot=' -/datarootdir/ { +case `sed -n '/datarootdir/ { p q } @@ -28269,14 +26399,13 @@ /@infodir@/p /@localedir@/p /@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { 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_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -28290,16 +26419,15 @@ # 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 || ac_write_fail=1 -ac_sed_extra="$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t +s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -28309,58 +26437,119 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +" $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"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { 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 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +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;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + -) 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=' ,' + +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 + +# 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. +# (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"' + +while : +do + # 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"' "$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 conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + 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 - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + rm -f $ac_file + mv "$tmp/config.h" $ac_file fi else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + echo "/* $configure_input */" + cat "$ac_result" fi + rm -f "$tmp/out12" ;; @@ -28374,11 +26563,6 @@ chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -28400,10 +26584,6 @@ # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi echo "creating Modules/Setup" @@ -28425,12 +26605,12 @@ case $ac_sys_system in BeOS) - { $as_echo "$as_me:$LINENO: WARNING: + { echo "$as_me:$LINENO: WARNING: Support for BeOS is deprecated as of Python 2.6. See PEP 11 for the gory details. " >&5 -$as_echo "$as_me: WARNING: +echo "$as_me: WARNING: Support for BeOS is deprecated as of Python 2.6. See PEP 11 for the gory details. Modified: python/trunk/pyconfig.h.in ============================================================================== --- python/trunk/pyconfig.h.in (original) +++ python/trunk/pyconfig.h.in Sat Jul 18 01:09:02 2009 @@ -923,13 +923,13 @@ /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The size of `off_t', as computed by sizeof. */ +/* The number of bytes in an off_t. */ #undef SIZEOF_OFF_T /* The size of `pid_t', as computed by sizeof. */ #undef SIZEOF_PID_T -/* The size of `pthread_t', as computed by sizeof. */ +/* The number of bytes in a pthread_t. */ #undef SIZEOF_PTHREAD_T /* The size of `short', as computed by sizeof. */ @@ -938,7 +938,7 @@ /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* The size of `time_t', as computed by sizeof. */ +/* The number of bytes in a time_t. */ #undef SIZEOF_TIME_T /* The size of `uintptr_t', as computed by sizeof. */ From python-checkins at python.org Sat Jul 18 01:11:53 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 23:11:53 -0000 Subject: [Python-checkins] r74068 - in python/branches/py3k: configure pyconfig.h.in Message-ID: Author: alexandre.vassalotti Date: Sat Jul 18 01:11:52 2009 New Revision: 74068 Log: Revert r74049. Modified: python/branches/py3k/configure python/branches/py3k/pyconfig.h.in Modified: python/branches/py3k/configure ============================================================================== --- python/branches/py3k/configure (original) +++ python/branches/py3k/configure Sat Jul 18 01:11:52 2009 @@ -1,12 +1,12 @@ #! /bin/sh -# From configure.in Revision: 74045 . +# From configure.in Revision: 73307 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for python 3.2. +# Generated by GNU Autoconf 2.61 for python 3.2. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 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. ## --------------------- ## @@ -18,7 +18,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # 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 @@ -40,45 +40,17 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + 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 # Support unset when possible. @@ -94,6 +66,8 @@ # 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. @@ -116,7 +90,7 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -129,10 +103,17 @@ PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + 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) >/dev/null 2>&1 && $as_unset $as_var + fi +done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -154,7 +135,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -180,7 +161,7 @@ as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -262,7 +243,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # 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 @@ -283,7 +264,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # 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 @@ -363,10 +344,10 @@ 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+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -435,10 +416,9 @@ test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell bug-autoconf at gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. + echo Please tell autoconf at gnu.org about your system, + echo including any error possibly output before this + echo message } @@ -474,7 +454,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { 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 @@ -502,6 +482,7 @@ *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -514,22 +495,19 @@ rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + mkdir conf$$.dir fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - 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' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + 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' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -554,10 +532,10 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -638,157 +616,125 @@ # include #endif" -ac_subst_vars='LTLIBOBJS -SRCDIRS -THREADHEADERS -LIBC -LIBM -HAVE_GETHOSTBYNAME -HAVE_GETHOSTBYNAME_R -HAVE_GETHOSTBYNAME_R_3_ARG -HAVE_GETHOSTBYNAME_R_5_ARG -HAVE_GETHOSTBYNAME_R_6_ARG -LIBOBJS -TRUE -MACHDEP_OBJS -DYNLOADFILE -DLINCLDIR -THREADOBJ -LDLAST -USE_THREAD_MODULE -SIGNAL_OBJS -USE_SIGNAL_MODULE -SHLIBS -CFLAGSFORSHARED -LINKFORSHARED -CCSHARED -BLDSHARED -LDSHARED -SO -LIBTOOL_CRUFT -OTHER_LIBTOOL_OPT -UNIVERSAL_ARCH_FLAGS -BASECFLAGS -OPT -LN -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -SVNVERSION -ARFLAGS -AR -RANLIB -GNULD -LINKCC -RUNSHARED -INSTSONAME -LDLIBRARYDIR -BLDLIBRARY -DLLLIBRARY -LDLIBRARY -LIBRARY -BUILDEXEEXT -EGREP -GREP -CPP -MAINCC -CXX -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -EXPORT_MACOSX_DEPLOYMENT_TARGET -CONFIGURE_MACOSX_DEPLOYMENT_TARGET -SGI_ABI -MACHDEP -FRAMEWORKUNIXTOOLSPREFIX -FRAMEWORKALTINSTALLLAST -FRAMEWORKALTINSTALLFIRST -FRAMEWORKINSTALLLAST -FRAMEWORKINSTALLFIRST -PYTHONFRAMEWORKINSTALLDIR -PYTHONFRAMEWORKPREFIX -PYTHONFRAMEWORKDIR -PYTHONFRAMEWORKIDENTIFIER -PYTHONFRAMEWORK -ARCH_RUN_32BIT -UNIVERSALSDK -CONFIG_ARGS -SOVERSION -VERSION -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME +ac_subst_vars='SHELL PATH_SEPARATOR -SHELL' +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 +ARCH_RUN_32BIT +PYTHONFRAMEWORK +PYTHONFRAMEWORKIDENTIFIER +PYTHONFRAMEWORKDIR +PYTHONFRAMEWORKPREFIX +PYTHONFRAMEWORKINSTALLDIR +FRAMEWORKINSTALLFIRST +FRAMEWORKINSTALLLAST +FRAMEWORKALTINSTALLFIRST +FRAMEWORKALTINSTALLLAST +FRAMEWORKUNIXTOOLSPREFIX +MACHDEP +SGI_ABI +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 +GNULD +RANLIB +AR +ARFLAGS +SVNVERSION +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +LN +OPT +BASECFLAGS +UNIVERSAL_ARCH_FLAGS +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 +THREADHEADERS +SRCDIRS +LTLIBOBJS' ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_universalsdk -with_universal_archs -with_framework_name -enable_framework -with_gcc -with_cxx_main -with_suffix -enable_shared -enable_profiling -with_pydebug -with_libs -with_system_ffi -with_dbmliborder -with_signal_module -with_dec_threads -with_threads -with_thread -with_pth -enable_ipv6 -with_doc_strings -with_tsc -with_pymalloc -with_wctype_functions -with_fpectl -with_libm -with_libc -enable_big_digits -with_wide_unicode -with_computed_gotos -' ac_precious_vars='build_alias host_alias target_alias @@ -803,8 +749,6 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -903,21 +847,13 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -930,21 +866,13 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$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- \ @@ -1135,38 +1063,22 @@ ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -1186,7 +1098,7 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option + -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1195,16 +1107,16 @@ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1213,38 +1125,22 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. +# 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=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1259,7 +1155,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1275,10 +1171,10 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1286,12 +1182,12 @@ if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1318,12 +1214,12 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1372,9 +1268,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1384,25 +1280,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --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] - --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] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --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] + --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 @@ -1416,7 +1312,6 @@ cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-universalsdk[=SDKDIR] @@ -1490,17 +1385,15 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + 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/ ;; @@ -1536,7 +1429,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1546,10 +1439,10 @@ if $ac_init_version; then cat <<\_ACEOF python configure 3.2 -generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +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 @@ -1560,7 +1453,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by python $as_me 3.2, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1596,7 +1489,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1631,7 +1524,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1683,12 +1576,11 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_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) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1718,9 +1610,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1735,9 +1627,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1753,8 +1645,8 @@ echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1796,24 +1688,21 @@ # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE +# Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + set x "$prefix/share/config.site" "$prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" +shift +for ac_site_file do - test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1823,16 +1712,16 @@ # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { 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";; esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1846,38 +1735,29 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_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 @@ -1887,12 +1767,10 @@ fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -2034,20 +1912,20 @@ UNIVERSAL_ARCHS="32-bit" -{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5 -$as_echo_n "checking for --with-universal-archs... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5 +echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; } # Check whether --with-universal-archs was given. if test "${with_universal_archs+set}" = set; then withval=$with_universal_archs; - { $as_echo "$as_me:$LINENO: result: $withval" >&5 -$as_echo "$withval" >&6; } + { echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6; } UNIVERSAL_ARCHS="$withval" else - { $as_echo "$as_me:$LINENO: result: 32-bit" >&5 -$as_echo "32-bit" >&6; } + { echo "$as_me:$LINENO: result: 32-bit" >&5 +echo "${ECHO_T}32-bit" >&6; } fi @@ -2169,8 +2047,8 @@ ## # Set name for machine-dependent library files -{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5 -$as_echo_n "checking MACHDEP... " >&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` @@ -2333,8 +2211,8 @@ LDFLAGS="$SGI_ABI $LDFLAGS" MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` fi -{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5 -$as_echo "$MACHDEP" >&6; } +{ echo "$as_me:$LINENO: result: $MACHDEP" >&5 +echo "${ECHO_T}$MACHDEP" >&6; } # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, # it may influence the way we can build extensions, so distutils @@ -2344,11 +2222,11 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' -{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5 -$as_echo_n "checking machine type as reported by uname -m... " >&6; } +{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5 +echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; } ac_sys_machine=`uname -m` -{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5 -$as_echo "$ac_sys_machine" >&6; } +{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5 +echo "${ECHO_T}$ac_sys_machine" >&6; } # checks for alternative programs @@ -2360,8 +2238,8 @@ # XXX shouldn't some/most/all of this code be merged with the stuff later # on that fiddles with OPT and BASECFLAGS? -{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5 -$as_echo_n "checking for --without-gcc... " >&6; } +{ echo "$as_me:$LINENO: checking for --without-gcc" >&5 +echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; } # Check whether --with-gcc was given. if test "${with_gcc+set}" = set; then @@ -2386,15 +2264,15 @@ esac fi -{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5 -$as_echo "$without_gcc" >&6; } +{ 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" then - { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file + { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)" >&5 -$as_echo "$as_me: error: cached CC is different -- throw away $cache_file +echo "$as_me: error: cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)" >&2;} { (exit 1); exit 1; }; } fi @@ -2407,10 +2285,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2423,7 +2301,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2434,11 +2312,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2447,10 +2325,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + 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. @@ -2463,7 +2341,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2474,11 +2352,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2486,8 +2364,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ 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 @@ -2500,10 +2382,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2516,7 +2398,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2527,11 +2409,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2540,10 +2422,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2561,7 +2443,7 @@ continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2584,11 +2466,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2599,10 +2481,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2615,7 +2497,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2626,11 +2508,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2643,10 +2525,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + 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. @@ -2659,7 +2541,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2670,11 +2552,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2686,8 +2568,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ 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 @@ -2697,50 +2583,44 @@ fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2759,22 +2639,27 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # 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. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - +{ 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[^ ]*//'` +# +# 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 | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2785,11 +2670,10 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # 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' @@ -2800,7 +2684,7 @@ do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2827,27 +2711,25 @@ ac_file='' fi -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables +echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&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 @@ -2856,53 +2738,49 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. +echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi fi fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ 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; } -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2911,33 +2789,31 @@ 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2960,43 +2836,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then 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 | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3022,21 +2895,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -3046,19 +2918,15 @@ ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +{ 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 -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -3085,21 +2953,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -3124,21 +2991,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3164,21 +3030,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3193,8 +3058,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$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 @@ -3210,10 +3075,10 @@ CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3284,21 +3149,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_prog_cc_c89=$ac_arg else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3314,15 +3178,15 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3335,8 +3199,8 @@ -{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=" >&5 -$as_echo_n "checking for --with-cxx-main=... " >&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 was given. if test "${with_cxx_main+set}" = set; then @@ -3361,8 +3225,8 @@ fi -{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5 -$as_echo "$with_cxx_main" >&6; } +{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5 +echo "${ECHO_T}$with_cxx_main" >&6; } preset_cxx="$CXX" if test -z "$CXX" @@ -3370,10 +3234,10 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CXX in [\\/]* | ?:[\\/]*) @@ -3388,7 +3252,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3401,20 +3265,20 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CXX in [\\/]* | ?:[\\/]*) @@ -3429,7 +3293,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3442,11 +3306,11 @@ fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi ;; @@ -3462,10 +3326,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -3478,7 +3342,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3489,11 +3353,11 @@ fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3508,12 +3372,12 @@ fi if test "$preset_cxx" != "$CXX" then - { $as_echo "$as_me:$LINENO: WARNING: + { echo "$as_me:$LINENO: WARNING: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. " >&5 -$as_echo "$as_me: WARNING: +echo "$as_me: WARNING: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. @@ -3528,15 +3392,15 @@ 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 -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&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= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3568,21 +3432,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3606,14 +3469,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3621,7 +3483,7 @@ # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3646,8 +3508,8 @@ else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$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 @@ -3675,21 +3537,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3713,14 +3574,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -3728,7 +3588,7 @@ # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -3744,13 +3604,11 @@ if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi ac_ext=c @@ -3760,37 +3618,42 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$GREP"; then 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 +# 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. + 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 - $as_echo_n 0123456789 >"conftest.in" + 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" - $as_echo 'GREP' >> "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` @@ -3805,60 +3668,74 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_GREP_found && break 3 - done + + $ac_path_GREP_found && break 3 done done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + + +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 +fi + else ac_cv_path_GREP=$GREP fi + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - if test -z "$EGREP"; then + # 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 +# 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. + 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 - $as_echo_n 0123456789 >"conftest.in" + 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" - $as_echo 'EGREP' >> "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` @@ -3873,2665 +3750,828 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_EGREP_found && break 3 - done + + $ac_path_EGREP_found && break 3 done done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + + +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 +fi + else ac_cv_path_EGREP=$EGREP fi + fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&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 -#include -#include -#include - -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -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. - cat >conftest.$ac_ext <<_ACEOF +{ 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 cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#ifdef _AIX + yes +#endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + $EGREP "yes" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : else - ac_cv_header_stdc=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f conftest* -fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -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)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +# Check for unsupported systems +case $ac_sys_system/$ac_sys_release in +atheos*|Linux*/1*) + echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. + echo See README for details. + exit 1;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -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 --with-suffix" >&5 +echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; } +# Check whether --with-suffix was given. +if test "${with_suffix+set}" = set; then + withval=$with_suffix; + case $withval in + no) EXEEXT=;; + yes) EXEEXT=.exe;; + *) EXEEXT=$withval;; + esac fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +{ echo "$as_me:$LINENO: result: $EXEEXT" >&5 +echo "${ECHO_T}$EXEEXT" >&6; } -fi +# Test whether we're running on a non-case-sensitive system, in which +# case we give a warning if no ext is given -# On IRIX 5.3, sys/types and inttypes.h are conflicting. +{ 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; } + BUILDEXEEXT=.exe +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + BUILDEXEEXT=$EXEEXT +fi +rmdir CaseSensitiveTestDir +case $MACHDEP in +bsdos*) + case $CC in + gcc) CC="$CC -D_HAVE_BSDI";; + esac;; +esac +case $ac_sys_system in +hp*|HP*) + case $CC in + cc|*/cc) CC="$CC -Ae";; + esac;; +Monterey*) + case $CC in + cc) CC="$CC -Wl,-Bexport";; + esac;; +SunOS*) + # Some functions have a prototype only with that define, e.g. confstr +cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + ;; +esac +{ 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; } + +# 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 +# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY +# is blank as the main program is not linked directly against LDLIBRARY. +# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On +# systems without shared libraries, LDLIBRARY is the same as LIBRARY +# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, +# DLLLIBRARY is the shared (i.e., DLL) library. +# +# RUNSHARED is used to run shared python without installed libraries +# +# INSTSONAME is the name of the shared library that will be use to install +# on the system - some systems like version suffix, others don't -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - 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 -#include <$ac_header> -_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + +LDLIBRARY="$LIBRARY" +BLDLIBRARY='$(LDLIBRARY)' +INSTSONAME='$(LDLIBRARY)' +DLLLIBRARY='' +LDLIBRARYDIR='' +RUNSHARED='' + +# LINKCC is the command that links the python executable -- default is $(CC). +# If CXX is set, and if it is needed to link a main function that was +# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: +# python might then depend on the C++ runtime +# 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; } +if test -z "$LINKCC" +then + LINKCC='$(PURIFY) $(MAINCC)' + case $ac_sys_system in + AIX*) + exp_extra="\"\"" + if test $ac_sys_release -ge 5 -o \ + $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then + exp_extra="." + fi + LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; + Monterey64*) + LINKCC="$LINKCC -L/usr/lib/ia64l64";; + QNX*) + # qcc must be used because the other compilers do not + # support -N. + LINKCC=qcc;; + esac fi +{ echo "$as_me:$LINENO: result: $LINKCC" >&5 +echo "${ECHO_T}$LINKCC" >&6; } -done +# GNULD is set to "yes" if the GNU linker is used. If this goes wrong +# make sure we default having it set to "no": this is used by +# distutils.unixccompiler to know if it should add --enable-new-dtags +# to linker command lines, and failing to detect GNU ld simply results +# in the same bahaviour as before. + +{ echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +ac_prog=ld +if test "$GCC" = yes; then + ac_prog=`$CC -print-prog-name=ld` +fi +case `"$ac_prog" -V 2>&1 < /dev/null` in + *GNU*) + GNULD=yes;; + *) + GNULD=no;; +esac +{ echo "$as_me:$LINENO: result: $GNULD" >&5 +echo "${ECHO_T}$GNULD" >&6; } +{ 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; +fi - if test "${ac_cv_header_minix_config_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -$as_echo_n "checking for minix/config.h... " >&6; } -if test "${ac_cv_header_minix_config_h+set}" = set; then - $as_echo_n "(cached) " >&6 +if test -z "$enable_shared" +then + case $ac_sys_system in + CYGWIN* | atheos*) + enable_shared="yes";; + *) + enable_shared="no";; + esac fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -$as_echo "$ac_cv_header_minix_config_h" >&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 was given. +if test "${enable_profiling+set}" = set; then + enableval=$enable_profiling; ac_save_cc="$CC" + CC="$CC -pg" + if test "$cross_compiling" = yes; then + ac_enable_profiling="no" else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 -$as_echo_n "checking minix/config.h usability... " >&6; } -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 -#include +int main() { return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 -$as_echo_n "checking minix/config.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_enable_profiling="yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +( exit $ac_status ) +ac_enable_profiling="no" fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -$as_echo_n "checking for minix/config.h... " >&6; } -if test "${ac_cv_header_minix_config_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_minix_config_h=$ac_header_preproc +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -$as_echo "$ac_cv_header_minix_config_h" >&6; } -fi -if test "x$ac_cv_header_minix_config_h" = x""yes; then - MINIX=yes -else - MINIX= -fi + CC="$ac_save_cc" +fi - if test "$MINIX" = yes; then +{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 +echo "${ECHO_T}$ac_enable_profiling" >&6; } -cat >>confdefs.h <<\_ACEOF -#define _POSIX_SOURCE 1 -_ACEOF +case "$ac_enable_profiling" in + "yes") + BASECFLAGS="-pg $BASECFLAGS" + LDFLAGS="-pg $LDFLAGS" + ;; +esac +{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5 +echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; } -cat >>confdefs.h <<\_ACEOF -#define _POSIX_1_SOURCE 2 -_ACEOF +# MacOSX framework builds need more magic. LDLIBRARY is the dynamic +# library that we build, but we do not want to link against it (we +# will find it with a -framework option). For this reason there is an +# extra variable BLDLIBRARY against which Python and the extension +# modules are linked, BLDLIBRARY. This is normally the same as +# LDLIBRARY, but empty for MacOSX framework builds. +if test "$enable_framework" +then + LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' + RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH" + BLDLIBRARY='' +else + BLDLIBRARY='$(LDLIBRARY)' +fi +# Other platforms follow +if test $enable_shared = "yes"; then cat >>confdefs.h <<\_ACEOF -#define _MINIX 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +#define Py_ENABLE_SHARED 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_safe_to_define___extensions__=yes + case $ac_sys_system in + CYGWIN*) + LDLIBRARY='libpython$(VERSION).dll.a' + DLLLIBRARY='libpython$(VERSION).dll' + ;; + SunOS*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + INSTSONAME="$LDLIBRARY".$SOVERSION + ;; + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + case $ac_sys_system in + FreeBSD*) + SOVERSION=`echo $SOVERSION|cut -d "." -f 1` + ;; + esac + INSTSONAME="$LDLIBRARY".$SOVERSION + ;; + hp*|HP*) + case `uname -m` in + ia64) + LDLIBRARY='libpython$(VERSION).so' + ;; + *) + LDLIBRARY='libpython$(VERSION).sl' + ;; + esac + BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)' + RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH} + ;; + OSF*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + ;; + atheos*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} + ;; + Darwin*) + LDLIBRARY='libpython$(VERSION).dylib' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}' + ;; + + esac +else # shared is disabled + case $ac_sys_system in + CYGWIN*) + BLDLIBRARY='$(LIBRARY)' + LDLIBRARY='libpython$(VERSION).dll.a' + ;; + esac +fi + +{ 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; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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 { 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 - ac_cv_safe_to_define___extensions__=no +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { 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; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF +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; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 { 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 - cat >>confdefs.h <<\_ACEOF -#define _ALL_SOURCE 1 -_ACEOF +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; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi - cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF + 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 - cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define _TANDEM_SOURCE 1 -_ACEOF +for ac_prog in ar aal +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; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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 { 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; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi -# Check for unsupported systems -case $ac_sys_system/$ac_sys_release in -atheos*|Linux*/1*) - echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. - echo See README for details. - exit 1;; -esac + test -n "$AR" && break +done +test -n "$AR" || AR="ar" -{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5 -$as_echo_n "checking for --with-suffix... " >&6; } +# tweak ARFLAGS only if the user didn't set it on the command line -# Check whether --with-suffix was given. -if test "${with_suffix+set}" = set; then - withval=$with_suffix; - case $withval in - no) EXEEXT=;; - yes) EXEEXT=.exe;; - *) EXEEXT=$withval;; - esac +if test -z "$ARFLAGS" +then + ARFLAGS="rc" fi -{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5 -$as_echo "$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 +# 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; } +if test "${ac_cv_prog_SVNVERSION+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$SVNVERSION"; then + ac_cv_prog_SVNVERSION="$SVNVERSION" # 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 { 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 -{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 -$as_echo_n "checking for case-insensitive build directory... " >&6; } -if test ! -d CaseSensitiveTestDir; then -mkdir CaseSensitiveTestDir + 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; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -if test -d casesensitivetestdir + +if test $SVNVERSION = found then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - BUILDEXEEXT=.exe + SVNVERSION="svnversion \$(srcdir)" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - BUILDEXEEXT=$EXEEXT + SVNVERSION="echo Unversioned directory" fi -rmdir CaseSensitiveTestDir case $MACHDEP in -bsdos*) - case $CC in - gcc) CC="$CC -D_HAVE_BSDI";; - esac;; +bsdos*|hp*|HP*) + # install -d does not work on BSDI or HP-UX + if test -z "$INSTALL" + then + INSTALL="${srcdir}/install-sh -c" + fi esac +ac_aux_dir= +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 + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + 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;} + { (exit 1); exit 1; }; } +fi + +# 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. -case $ac_sys_system in -hp*|HP*) - case $CC in - cc|*/cc) CC="$CC -Ae";; - esac;; -Monterey*) - case $CC in - cc) CC="$CC -Wl,-Bexport";; - esac;; -SunOS*) - # Some functions have a prototype only with that define, e.g. confstr - -cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF - + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# 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; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + 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. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done ;; esac +done +IFS=$as_save_IFS - -{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5 -$as_echo_n "checking LIBRARY... " >&6; } -if test -z "$LIBRARY" -then - LIBRARY='libpython$(VERSION).a' fi -{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5 -$as_echo "$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 -# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY -# is blank as the main program is not linked directly against LDLIBRARY. -# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On -# systems without shared libraries, LDLIBRARY is the same as LIBRARY -# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, -# DLLLIBRARY is the shared (i.e., DLL) library. -# -# RUNSHARED is used to run shared python without installed libraries -# -# INSTSONAME is the name of the shared library that will be use to install -# on the system - some systems like version suffix, others don't - - + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # 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 value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ 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. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -LDLIBRARY="$LIBRARY" -BLDLIBRARY='$(LDLIBRARY)' -INSTSONAME='$(LDLIBRARY)' -DLLLIBRARY='' -LDLIBRARYDIR='' -RUNSHARED='' -# LINKCC is the command that links the python executable -- default is $(CC). -# If CXX is set, and if it is needed to link a main function that was -# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: -# python might then depend on the C++ runtime -# This is altered for AIX in order to build the export list before -# linking. +# Not every filesystem supports hard links -{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5 -$as_echo_n "checking LINKCC... " >&6; } -if test -z "$LINKCC" -then - LINKCC='$(PURIFY) $(MAINCC)' +if test -z "$LN" ; then case $ac_sys_system in - AIX*) - exp_extra="\"\"" - if test $ac_sys_release -ge 5 -o \ - $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then - exp_extra="." - fi - LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; - Monterey64*) - LINKCC="$LINKCC -L/usr/lib/ia64l64";; - QNX*) - # qcc must be used because the other compilers do not - # support -N. - LINKCC=qcc;; + CYGWIN*) LN="ln -s";; + atheos*) LN="ln -s";; + *) LN=ln;; esac fi -{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5 -$as_echo "$LINKCC" >&6; } - -# GNULD is set to "yes" if the GNU linker is used. If this goes wrong -# make sure we default having it set to "no": this is used by -# distutils.unixccompiler to know if it should add --enable-new-dtags -# to linker command lines, and failing to detect GNU ld simply results -# in the same bahaviour as before. - -{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -ac_prog=ld -if test "$GCC" = yes; then - ac_prog=`$CC -print-prog-name=ld` -fi -case `"$ac_prog" -V 2>&1 < /dev/null` in - *GNU*) - GNULD=yes;; - *) - GNULD=no;; -esac -{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5 -$as_echo "$GNULD" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5 -$as_echo_n "checking for --enable-shared... " >&6; } -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; -fi +# Check for --with-pydebug +{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5 +echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; } -if test -z "$enable_shared" +# Check whether --with-pydebug was given. +if test "${with_pydebug+set}" = set; then + withval=$with_pydebug; +if test "$withval" != no then - case $ac_sys_system in - CYGWIN* | atheos*) - enable_shared="yes";; - *) - enable_shared="no";; - esac -fi -{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } -{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5 -$as_echo_n "checking for --enable-profiling... " >&6; } -# Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then - enableval=$enable_profiling; ac_save_cc="$CC" - CC="$CC -pg" - if test "$cross_compiling" = yes; then - ac_enable_profiling="no" -else - 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; } +cat >>confdefs.h <<\_ACEOF +#define Py_DEBUG 1 _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_enable_profiling="yes" -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_enable_profiling="no" -fi -rm -rf conftest.dSYM -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: 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' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 -$as_echo "$ac_enable_profiling" >&6; } - -case "$ac_enable_profiling" in - "yes") - BASECFLAGS="-pg $BASECFLAGS" - LDFLAGS="-pg $LDFLAGS" - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5 -$as_echo_n "checking LDLIBRARY... " >&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 -# will find it with a -framework option). For this reason there is an -# extra variable BLDLIBRARY against which Python and the extension -# modules are linked, BLDLIBRARY. This is normally the same as -# LDLIBRARY, but empty for MacOSX framework builds. -if test "$enable_framework" -then - LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' - RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH" - BLDLIBRARY='' else - BLDLIBRARY='$(LDLIBRARY)' + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -# Other platforms follow -if test $enable_shared = "yes"; then -cat >>confdefs.h <<\_ACEOF -#define Py_ENABLE_SHARED 1 -_ACEOF +# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be +# merged with this chunk of code? - case $ac_sys_system in - CYGWIN*) - LDLIBRARY='libpython$(VERSION).dll.a' - DLLLIBRARY='libpython$(VERSION).dll' - ;; - SunOS*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - INSTSONAME="$LDLIBRARY".$SOVERSION - ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - case $ac_sys_system in - FreeBSD*) - SOVERSION=`echo $SOVERSION|cut -d "." -f 1` - ;; - esac - INSTSONAME="$LDLIBRARY".$SOVERSION - ;; - hp*|HP*) - case `uname -m` in - ia64) - LDLIBRARY='libpython$(VERSION).so' - ;; - *) - LDLIBRARY='libpython$(VERSION).sl' - ;; - esac - BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)' - RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH} - ;; - OSF*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - ;; - atheos*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} - ;; - Darwin*) - LDLIBRARY='libpython$(VERSION).dylib' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}' - ;; - - esac -else # shared is disabled - case $ac_sys_system in - CYGWIN*) - BLDLIBRARY='$(LIBRARY)' - LDLIBRARY='libpython$(VERSION).dll.a' - ;; - esac -fi - -{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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 { 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" - $as_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 - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 { 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" - $as_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_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - -for ac_prog in ar aal -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # 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 { 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" - $as_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 - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break -done -test -n "$AR" || AR="ar" - - -# tweak ARFLAGS only if the user didn't set it on the command line - -if test -z "$ARFLAGS" -then - ARFLAGS="rc" -fi - - -# Extract the first word of "svnversion", so it can be a program name with args. -set dummy svnversion; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_SVNVERSION+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$SVNVERSION"; then - ac_cv_prog_SVNVERSION="$SVNVERSION" # 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 { 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" - $as_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 - { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5 -$as_echo "$SVNVERSION" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test $SVNVERSION = found -then - SVNVERSION="svnversion \$(srcdir)" -else - SVNVERSION="echo Unversioned directory" -fi - -case $MACHDEP in -bsdos*|hp*|HP*) - # install -d does not work on BSDI or HP-UX - if test -z "$INSTALL" - then - INSTALL="${srcdir}/install-sh -c" - fi -esac -ac_aux_dir= -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 - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - 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 - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# 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 -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# 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. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - 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. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -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. 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 value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -# Not every filesystem supports hard links - -if test -z "$LN" ; then - case $ac_sys_system in - CYGWIN*) LN="ln -s";; - atheos*) LN="ln -s";; - *) LN=ln;; - esac -fi - -# Check for --with-pydebug -{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5 -$as_echo_n "checking for --with-pydebug... " >&6; } - -# Check whether --with-pydebug was given. -if test "${with_pydebug+set}" = set; then - withval=$with_pydebug; -if test "$withval" != no -then - -cat >>confdefs.h <<\_ACEOF -#define Py_DEBUG 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; }; - Py_DEBUG='true' -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; }; Py_DEBUG='false' -fi -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be -# merged with this chunk of code? - -# Optimizer/debugger flags -# ------------------------ -# (The following bit of code is complicated enough - please keep things -# indented properly. Just pretend you're editing Python code. ;-) - -# There are two parallel sets of case statements below, one that checks to -# see if OPT was set and one that does BASECFLAGS setting based upon -# compiler and platform. BASECFLAGS tweaks need to be made even if the -# user set OPT. - -# tweak OPT based on compiler and platform, only if the user didn't set -# it on the command line - -if test -z "$OPT" -then - case $GCC in - yes) - if test "$CC" != 'g++' ; then - STRICT_PROTO="-Wstrict-prototypes" - fi - # For gcc 4.x we need to use -fwrapv so lets check if its supported - if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then - WRAP="-fwrapv" - fi - case $ac_cv_prog_cc_g in - yes) - if test "$Py_DEBUG" = 'true' ; then - # Optimization messes up debuggers, so turn it off for - # debug builds. - OPT="-g -Wall $STRICT_PROTO" - else - OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" - fi - ;; - *) - OPT="-O3 -Wall $STRICT_PROTO" - ;; - esac - case $ac_sys_system in - SCO_SV*) OPT="$OPT -m486 -DSCO5" - ;; - esac - ;; - - *) - OPT="-O" - ;; - esac - - # The current (beta) Monterey compiler dies with optimizations - # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this? - case $ac_sys_system in - Monterey*) - OPT="" - ;; - esac - -fi - - - -# The -arch flags for universal builds on OSX -UNIVERSAL_ARCH_FLAGS= - - -# tweak BASECFLAGS based on compiler and platform -case $GCC in -yes) - # 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. - { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 -$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; } - ac_save_cc="$CC" - CC="$CC -fno-strict-aliasing" - if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_no_strict_aliasing_ok=no -else - 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_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_no_strict_aliasing_ok=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_no_strict_aliasing_ok=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi - - CC="$ac_save_cc" - { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5 -$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; } - if test $ac_cv_no_strict_aliasing_ok = yes - then - BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" - fi - - # if using gcc on alpha, use -mieee to get (near) full IEEE 754 - # support. Without this, treatment of subnormals doesn't follow - # the standard. - case $ac_sys_machine in - alpha*) - BASECFLAGS="$BASECFLAGS -mieee" - ;; - esac - - case $ac_sys_system in - SCO_SV*) - BASECFLAGS="$BASECFLAGS -m486 -DSCO5" - ;; - # is there any other compiler on Darwin besides gcc? - Darwin*) - # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd - # used to be here, but non-Apple gcc doesn't accept them. - - - if test "${enable_universalsdk}"; then - UNIVERSAL_ARCH_FLAGS="" - if test "$UNIVERSAL_ARCHS" = "32-bit" ; then - UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" - ARCH_RUN_32BIT="" - - elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then - UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" - - elif test "$UNIVERSAL_ARCHS" = "all" ; then - UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" - ARCH_RUN_32BIT="arch -i386 -ppc" - - else - { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 -$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} - { (exit 1); exit 1; }; } - - fi - - - BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}" - tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` - if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then - CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}" - fi - fi - - # Calculate the right deployment target for this build. - # - cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` - if test ${cur_target} '>' 10.2; then - cur_target=10.3 - fi - if test "${UNIVERSAL_ARCHS}" = "all"; then - # Ensure that the default platform for a 4-way - # universal build is OSX 10.5, that's the first - # OS release where 4-way builds make sense. - cur_target='10.5' - fi - CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} - - # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the - # environment with a value that is the same as what we'll use - # in the Makefile to ensure that we'll get the same compiler - # environment during configure and build time. - MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET" - export MACOSX_DEPLOYMENT_TARGET - EXPORT_MACOSX_DEPLOYMENT_TARGET='' - - ;; - OSF*) - BASECFLAGS="$BASECFLAGS -mieee" - ;; - esac - ;; - -*) - case $ac_sys_system in - OpenUNIX*|UnixWare*) - BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca " - ;; - OSF*) - BASECFLAGS="$BASECFLAGS -ieee -std" - ;; - SCO_SV*) - BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5" - ;; - esac - ;; -esac - -if test "$Py_DEBUG" = 'true'; then - : -else - OPT="-DNDEBUG $OPT" -fi - -if test "$ac_arch_flags" -then - BASECFLAGS="$BASECFLAGS $ac_arch_flags" -fi - -# disable check for icc since it seems to pass, but generates a warning -if test "$CC" = icc -then - ac_cv_opt_olimit_ok=no -fi - -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5 -$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; } -if test "${ac_cv_opt_olimit_ok+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" -CC="$CC -OPT:Olimit=0" -if test "$cross_compiling" = yes; then - ac_cv_opt_olimit_ok=no -else - 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_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_opt_olimit_ok=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_opt_olimit_ok=no -fi -rm -rf conftest.dSYM -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 - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5 -$as_echo "$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 - # olimit_ok test is "no". Is it "yes" in some other Darwin-esque - # environment? - Darwin*) - ;; - *) - BASECFLAGS="$BASECFLAGS -OPT:Olimit=0" - ;; - esac -else - { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 -$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; } - if test "${ac_cv_olimit_ok+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" - CC="$CC -Olimit 1500" - if test "$cross_compiling" = yes; then - ac_cv_olimit_ok=no -else - 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_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_olimit_ok=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_olimit_ok=no -fi -rm -rf conftest.dSYM -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 - - { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 -$as_echo "$ac_cv_olimit_ok" >&6; } - if test $ac_cv_olimit_ok = yes; then - BASECFLAGS="$BASECFLAGS -Olimit 1500" - fi -fi - -# Check whether GCC supports PyArg_ParseTuple format -if test "$GCC" = "yes" -then - { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5 -$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; } - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Werror" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2))); - -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$save_CFLAGS -fi - -# On some compilers, pthreads are available without further options -# (e.g. MacOS X). On some of these systems, the compiler will not -# 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. -{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 -$as_echo_n "checking whether pthreads are available without options... " >&6; } -if test "${ac_cv_pthread_is_default+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_pthread_is_default=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - ac_cv_pthread_is_default=yes - ac_cv_kthread=no - ac_cv_pthread=no - -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_pthread_is_default=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 -$as_echo "$ac_cv_pthread_is_default" >&6; } - - -if test $ac_cv_pthread_is_default = yes -then - ac_cv_kpthread=no -else -# -Kpthread, if available, provides the right #defines -# and linker options to make pthread_create available -# 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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 -$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } -if test "${ac_cv_kpthread+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" -CC="$CC -Kpthread" -if test "$cross_compiling" = yes; then - ac_cv_kpthread=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_kpthread=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_kpthread=no -fi -rm -rf conftest.dSYM -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 - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 -$as_echo "$ac_cv_kpthread" >&6; } -fi - -if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no -then -# -Kthread, if available, provides the right #defines -# and linker options to make pthread_create available -# 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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 -$as_echo_n "checking whether $CC accepts -Kthread... " >&6; } -if test "${ac_cv_kthread+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" -CC="$CC -Kthread" -if test "$cross_compiling" = yes; then - ac_cv_kthread=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_kthread=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_kthread=no -fi -rm -rf conftest.dSYM -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 - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 -$as_echo "$ac_cv_kthread" >&6; } -fi - -if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no -then -# -pthread, if available, provides the right #defines -# and linker options to make pthread_create available -# 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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5 -$as_echo_n "checking whether $CC accepts -pthread... " >&6; } -if test "${ac_cv_thread+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cc="$CC" -CC="$CC -pthread" -if test "$cross_compiling" = yes; then - ac_cv_pthread=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -void* routine(void* p){return NULL;} - -int main(){ - pthread_t p; - if(pthread_create(&p,NULL,routine,NULL)!=0) - return 1; - (void)pthread_detach(p); - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_pthread=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_pthread=no -fi -rm -rf conftest.dSYM -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 - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -$as_echo "$ac_cv_pthread" >&6; } -fi - -# If we have set a CC compiler flag for thread support then -# check if it works for CXX, too. -ac_cv_cxx_thread=no -if test ! -z "$CXX" -then -{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5 -$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; } -ac_save_cxx="$CXX" - -if test "$ac_cv_kpthread" = "yes" -then - CXX="$CXX -Kpthread" - ac_cv_cxx_thread=yes -elif test "$ac_cv_kthread" = "yes" -then - CXX="$CXX -Kthread" - ac_cv_cxx_thread=yes -elif test "$ac_cv_pthread" = "yes" -then - CXX="$CXX -pthread" - ac_cv_cxx_thread=yes -fi - -if test $ac_cv_cxx_thread = yes -then - echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext - $CXX -c conftest.$ac_ext 2>&5 - if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ - && test -s conftest$ac_exeext && ./conftest$ac_exeext - then - ac_cv_cxx_thread=yes - else - ac_cv_cxx_thread=no - fi - rm -fr conftest* -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -$as_echo "$ac_cv_cxx_thread" >&6; } -fi -CXX="$ac_save_cxx" - - -# checks for header files -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&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 -#include -#include -#include - -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -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. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -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)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ -fcntl.h grp.h \ -ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ -shadow.h signal.h stdint.h stropts.h termios.h thread.h \ -unistd.h utime.h \ -sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ -sys/lock.h sys/mkdev.h sys/modem.h \ -sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ -sys/termio.h sys/time.h \ -sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ -sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ -bluetooth/bluetooth.h linux/tipc.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -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 -#include <$ac_header> -_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&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 -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$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 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 -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -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 -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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -$as_echo "$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 - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Optimizer/debugger flags +# ------------------------ +# (The following bit of code is complicated enough - please keep things +# indented properly. Just pretend you're editing Python code. ;-) -/* 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 -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# There are two parallel sets of case statements below, one that checks to +# see if OPT was set and one that does BASECFLAGS setting based upon +# compiler and platform. BASECFLAGS tweaks need to be made even if the +# user set OPT. +# tweak OPT based on compiler and platform, only if the user didn't set +# it on the command line -fi +if test -z "$OPT" +then + case $GCC in + yes) + if test "$CC" != 'g++' ; then + STRICT_PROTO="-Wstrict-prototypes" + fi + # For gcc 4.x we need to use -fwrapv so lets check if its supported + if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then + WRAP="-fwrapv" + fi + case $ac_cv_prog_cc_g in + yes) + if test "$Py_DEBUG" = 'true' ; then + # Optimization messes up debuggers, so turn it off for + # debug builds. + OPT="-g -Wall $STRICT_PROTO" + else + OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" + fi + ;; + *) + OPT="-O3 -Wall $STRICT_PROTO" + ;; + esac + case $ac_sys_system in + SCO_SV*) OPT="$OPT -m486 -DSCO5" + ;; + esac + ;; -rm -rf conftest.dSYM -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 -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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -$as_echo "$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" + *) + OPT="-O" + ;; + esac -fi + # The current (beta) Monterey compiler dies with optimizations + # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this? + case $ac_sys_system in + Monterey*) + OPT="" + ;; + esac fi -{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 -$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then - $as_echo_n "(cached) " >&6 + + +# The -arch flags for universal builds on OSX +UNIVERSAL_ARCH_FLAGS= + + +# tweak BASECFLAGS based on compiler and platform +case $GCC in +yes) + # 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; } + ac_save_cc="$CC" + CC="$CC -fno-strict-aliasing" + if test "$cross_compiling" = yes; then + ac_cv_no_strict_aliasing_ok=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6539,351 +4579,293 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -return makedev(0, 0); - ; - return 0; -} +int main() { return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_header_sys_types_h_makedev=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_sys_types_h_makedev=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 -$as_echo "$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 - { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -$as_echo_n "checking for sys/mkdev.h... " >&6; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 -$as_echo_n "checking sys/mkdev.h usability... " >&6; } -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 -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_header_compiler=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_no_strict_aliasing_ok=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +( exit $ac_status ) +ac_cv_no_strict_aliasing_ok=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 -$as_echo_n "checking sys/mkdev.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + 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; } + if test $ac_cv_no_strict_aliasing_ok = yes + then + BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" + fi - ac_header_preproc=no -fi + # if using gcc on alpha, use -mieee to get (near) full IEEE 754 + # support. Without this, treatment of subnormals doesn't follow + # the standard. + case $ac_sys_machine in + alpha*) + BASECFLAGS="$BASECFLAGS -mieee" + ;; + esac -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + case $ac_sys_system in + SCO_SV*) + BASECFLAGS="$BASECFLAGS -m486 -DSCO5" + ;; + # is there any other compiler on Darwin besides gcc? + Darwin*) + # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd + # used to be here, but non-Apple gcc doesn't accept them. -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + + if test "${enable_universalsdk}"; then + UNIVERSAL_ARCH_FLAGS="" + if test "$UNIVERSAL_ARCHS" = "32-bit" ; then + UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" + ARCH_RUN_32BIT="" + + elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then + UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + + elif test "$UNIVERSAL_ARCHS" = "all" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="arch -i386 -ppc" + + else + { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5 +echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;} + { (exit 1); exit 1; }; } + + fi + + + BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}" + tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` + if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then + CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}" + fi + fi + + # Calculate the right deployment target for this build. + # + cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` + if test ${cur_target} '>' 10.2; then + cur_target=10.3 + fi + if test "${UNIVERSAL_ARCHS}" = "all"; then + # Ensure that the default platform for a 4-way + # universal build is OSX 10.5, that's the first + # OS release where 4-way builds make sense. + cur_target='10.5' + fi + CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} + + # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the + # environment with a value that is the same as what we'll use + # in the Makefile to ensure that we'll get the same compiler + # environment during configure and build time. + MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET" + export MACOSX_DEPLOYMENT_TARGET + EXPORT_MACOSX_DEPLOYMENT_TARGET='' + + ;; + OSF*) + BASECFLAGS="$BASECFLAGS -mieee" + ;; + esac ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 + +*) + case $ac_sys_system in + OpenUNIX*|UnixWare*) + BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca " + ;; + OSF*) + BASECFLAGS="$BASECFLAGS -ieee -std" + ;; + SCO_SV*) + BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5" + ;; + esac ;; esac -{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -$as_echo_n "checking for sys/mkdev.h... " >&6; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - $as_echo_n "(cached) " >&6 + +if test "$Py_DEBUG" = 'true'; then + : else - ac_cv_header_sys_mkdev_h=$ac_header_preproc + OPT="-DNDEBUG $OPT" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } +if test "$ac_arch_flags" +then + BASECFLAGS="$BASECFLAGS $ac_arch_flags" fi -if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_MKDEV 1 -_ACEOF +# disable check for icc since it seems to pass, but generates a warning +if test "$CC" = icc +then + ac_cv_opt_olimit_ok=no fi - - - if test $ac_cv_header_sys_mkdev_h = no; then - if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -$as_echo_n "checking for sys/sysmacros.h... " >&6; } -if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -$as_echo "$ac_cv_header_sys_sysmacros_h" >&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 - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 -$as_echo_n "checking sys/sysmacros.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF + ac_save_cc="$CC" +CC="$CC -OPT:Olimit=0" +if test "$cross_compiling" = yes; then + ac_cv_opt_olimit_ok=no +else + 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 -#include +int main() { return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_header_compiler=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_opt_olimit_ok=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +( exit $ac_status ) +ac_cv_opt_olimit_ok=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 -$as_echo_n "checking sys/sysmacros.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF +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; } +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 + # olimit_ok test is "no". Is it "yes" in some other Darwin-esque + # environment? + Darwin*) + ;; + *) + BASECFLAGS="$BASECFLAGS -OPT:Olimit=0" + ;; + 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; } + if test "${ac_cv_olimit_ok+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cc="$CC" + CC="$CC -Olimit 1500" + if test "$cross_compiling" = yes; then + ac_cv_olimit_ok=no +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() { return 0; } _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_olimit_ok=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------- ## -## Report this to http://bugs.python.org/ ## -## -------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -$as_echo_n "checking for sys/sysmacros.h... " >&6; } -if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_sys_sysmacros_h=$ac_header_preproc +( exit $ac_status ) +ac_cv_olimit_ok=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_SYSMACROS 1 -_ACEOF + CC="$ac_save_cc" fi - + { 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 fi - -# On Solaris, term.h requires curses.h - -for ac_header in term.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else +# 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; } + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6891,12 +4873,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_CURSES_H -#include -#endif + void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2))); +int +main () +{ -#include <$ac_header> + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6904,53 +4889,132 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - eval "$as_ac_Header=yes" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1 +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$save_CFLAGS fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# On some compilers, pthreads are available without further options +# (e.g. MacOS X). On some of these systems, the compiler will not +# 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; } +if test "${ac_cv_pthread_is_default+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_pthread_is_default=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); + return 0; +} + +_ACEOF +rm -f 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>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + + ac_cv_pthread_is_default=yes + ac_cv_kthread=no + ac_cv_pthread=no + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_pthread_is_default=no fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -done -# On Linux, netlink.h requires asm/types.h +fi -for ac_header in linux/netlink.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&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 +then + ac_cv_kpthread=no +else +# -Kpthread, if available, provides the right #defines +# and linker options to make pthread_create available +# 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; } +if test "${ac_cv_kpthread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cc="$CC" +CC="$CC -Kpthread" +if test "$cross_compiling" = yes; then + ac_cv_kpthread=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6959,235 +5023,276 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_ASM_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif +#include +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); + return 0; +} -#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 - eval "$as_ac_Header=yes" + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_kpthread=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +( exit $ac_status ) +ac_cv_kpthread=no fi - -rm -f core conftest.err 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 -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done +CC="$ac_save_cc" +fi +{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 +echo "${ECHO_T}$ac_cv_kpthread" >&6; } +fi -# checks for typedefs -was_it_defined=no -{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5 -$as_echo_n "checking for clock_t in time.h... " >&6; } -cat >conftest.$ac_ext <<_ACEOF +if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no +then +# -Kthread, if available, provides the right #defines +# and linker options to make pthread_create available +# 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; } +if test "${ac_cv_kthread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cc="$CC" +CC="$CC -Kthread" +if test "$cross_compiling" = yes; then + ac_cv_kthread=no +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "clock_t" >/dev/null 2>&1; then - was_it_defined=yes -else - - -cat >>confdefs.h <<\_ACEOF -#define clock_t long -_ACEOF - -fi -rm -f conftest* +#include -{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5 -$as_echo "$was_it_defined" >&6; } +void* routine(void* p){return NULL;} -# Check whether using makedev requires defining _OSF_SOURCE -{ $as_echo "$as_me:$LINENO: checking for makedev" >&5 -$as_echo_n "checking for makedev... " >&6; } -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 () -{ - makedev(0, 0) - ; +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_has_makedev=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_kthread=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_has_makedev=no +( exit $ac_status ) +ac_cv_kthread=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -rf conftest.dSYM -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 - cat >conftest.$ac_ext <<_ACEOF + +CC="$ac_save_cc" +fi + +{ 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 +then +# -pthread, if available, provides the right #defines +# and linker options to make pthread_create available +# 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; } +if test "${ac_cv_thread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cc="$CC" +CC="$CC -pthread" +if test "$cross_compiling" = yes; then + ac_cv_pthread=no +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _OSF_SOURCE 1 -#include +#include -int -main () -{ - makedev(0, 0) - ; +void* routine(void* p){return NULL;} + +int main(){ + pthread_t p; + if(pthread_create(&p,NULL,routine,NULL)!=0) + return 1; + (void)pthread_detach(p); return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_has_makedev=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_pthread=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_has_makedev=no +( exit $ac_status ) +ac_cv_pthread=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -rf conftest.dSYM -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 -cat >>confdefs.h <<\_ACEOF -#define _OSF_SOURCE 1 -_ACEOF +CC="$ac_save_cc" +fi - fi +{ 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 +# check if it works for CXX, too. +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; } +ac_save_cxx="$CXX" + +if test "$ac_cv_kpthread" = "yes" +then + CXX="$CXX -Kpthread" + ac_cv_cxx_thread=yes +elif test "$ac_cv_kthread" = "yes" +then + CXX="$CXX -Kthread" + ac_cv_cxx_thread=yes +elif test "$ac_cv_pthread" = "yes" +then + CXX="$CXX -pthread" + ac_cv_cxx_thread=yes fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 -$as_echo "$ac_cv_has_makedev" >&6; } -if test "$ac_cv_has_makedev" = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MAKEDEV 1 -_ACEOF +if test $ac_cv_cxx_thread = yes +then + echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext + $CXX -c conftest.$ac_ext 2>&5 + if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ + && test -s conftest$ac_exeext && ./conftest$ac_exeext + then + ac_cv_cxx_thread=yes + else + ac_cv_cxx_thread=no + fi + rm -fr conftest* fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 +echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } +fi +CXX="$ac_save_cxx" -# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in -# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are -# defined, but the compiler does not support pragma redefine_extname, -# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit -# structures (such as rlimit64) without declaring them. As a -# work-around, disable LFS on such configurations -use_lfs=yes -{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5 -$as_echo_n "checking Solaris LFS bug... " >&6; } -cat >conftest.$ac_ext <<_ACEOF +# 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; } +if test "${ac_cv_header_stdc+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. */ - -#define _LARGEFILE_SOURCE 1 -#define _FILE_OFFSET_BITS 64 -#include +#include +#include +#include +#include int main () { -struct rlimit foo; + ; return 0; } @@ -7198,96 +5303,169 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - sol_lfs_bug=no + ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - sol_lfs_bug=yes + ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5 -$as_echo "$sol_lfs_bug" >&6; } -if test "$sol_lfs_bug" = "yes"; then - use_lfs=no -fi -if test "$use_lfs" = "yes"; then -# Two defines needed to enable largefile support on various platforms -# These may affect some typedefs +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -cat >>confdefs.h <<\_ACEOF -#define _LARGEFILE_SOURCE 1 _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi -cat >>confdefs.h <<\_ACEOF -#define _FILE_OFFSET_BITS 64 +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi +rm -f conftest* -# Add some code to confdefs.h so that the test for off_t works on SCO -cat >> confdefs.h <<\EOF -#if defined(SCO_DS) -#undef _OFF_T -#endif -EOF +fi -# Type availability checks -{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 -$as_echo_n "checking for mode_t... " >&6; } -if test "${ac_cv_type_mode_t+set}" = set; then - $as_echo_n "(cached) " >&6 +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : else - ac_cv_type_mode_t=no -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 +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { -if (sizeof (mode_t)) - return 0; - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +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; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + 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 { 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 /* confdefs.h. */ _ACEOF @@ -7295,14 +5473,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -int -main () -{ -if (sizeof ((mode_t))) - return 0; - ; - return 0; -} + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7310,54 +5482,121 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : + eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=yes -fi + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -$as_echo "$ac_cv_type_mode_t" >&6; } -if test "x$ac_cv_type_mode_t" = x""yes; then - : -else -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF +for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +fcntl.h grp.h \ +ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \ +shadow.h signal.h stdint.h stropts.h termios.h thread.h \ +unistd.h utime.h \ +sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ +sys/lock.h sys/mkdev.h sys/modem.h \ +sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \ +sys/termio.h sys/time.h \ +sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ +sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ +bluetooth/bluetooth.h linux/tipc.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +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 - -{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 -$as_echo_n "checking for off_t... " >&6; } -if test "${ac_cv_type_off_t+set}" = set; then - $as_echo_n "(cached) " >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - ac_cv_type_off_t=no + # Is the header compilable? +{ 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 @@ -7365,14 +5604,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -int -main () -{ -if (sizeof (off_t)) - return 0; - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7380,100 +5612,146 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - cat >conftest.$ac_ext <<_ACEOF + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +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; } +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 -int -main () -{ -if (sizeof ((off_t))) - return 0; - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : + }; then + ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_off_t=yes + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +rm -f conftest.err conftest.$ac_ext +{ 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 + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +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 +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | 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 { 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 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -$as_echo "$ac_cv_type_off_t" >&6; } -if test "x$ac_cv_type_off_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 -$as_echo_n "checking for pid_t... " >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 +done + + + + + + +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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_pid_t=no -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 +#include +#include <$ac_hdr> + int main () { -if (sizeof (pid_t)) - return 0; +if ((DIR *) 0) +return 0; ; return 0; } @@ -7484,195 +5762,284 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - cat >conftest.$ac_ext <<_ACEOF + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +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; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +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 + +/* 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 +char opendir (); int main () { -if (sizeof ((pid_t))) - return 0; +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_opendir=$ac_res else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -$as_echo "$ac_cv_type_pid_t" >&6; } -if test "x$ac_cv_type_pid_t" = x""yes; then +done +if test "${ac_cv_search_opendir+set}" = set; then : else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF + 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; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then - $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + { 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 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +/* 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 +char opendir (); int main () { -return *(signal (0, 0)) (0) == 1; +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_type_signal=int + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_opendir=$ac_res else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signal=void + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 +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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } +{ 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" -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF +fi +fi -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&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 - ac_cv_type_size_t=no -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 +#include int main () { -if (sizeof (size_t)) - return 0; +return makedev(0, 0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - cat >conftest.$ac_ext <<_ACEOF + } && 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 +fi + +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; } + +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; } +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; } +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; } +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 -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7680,111 +6047,140 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : -else +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF +# 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; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes +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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - ac_cv_type_uid_t=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF +rm -f conftest.err conftest.$ac_ext +{ 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 + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 +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 +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | 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; } +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; } +fi +if test $ac_cv_header_sys_mkdev_h = yes; then cat >>confdefs.h <<\_ACEOF -#define gid_t int +#define MAJOR_IN_MKDEV 1 _ACEOF fi - { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 -$as_echo_n "checking for uint32_t... " >&6; } -if test "${ac_cv_c_uint32_t+set}" = set; then - $as_echo_n "(cached) " >&6 + + 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; } +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; } else - ac_cv_c_uint32_t=no - for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF + # 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; } +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 -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7792,153 +6188,145 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - case $ac_type in - uint32_t) ac_cv_c_uint32_t=yes ;; - *) ac_cv_c_uint32_t=$ac_type ;; -esac - + ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint32_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 -$as_echo "$ac_cv_c_uint32_t" >&6; } - case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<\_ACEOF -#define _UINT32_T 1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac - +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } - { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 -$as_echo_n "checking for uint64_t... " >&6; } -if test "${ac_cv_c_uint64_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_uint64_t=no - for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF +# 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; } +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 -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - case $ac_type in - uint64_t) ac_cv_c_uint64_t=yes ;; - *) ac_cv_c_uint64_t=$ac_type ;; -esac - + }; then + ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + 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; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 +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 +## -------------------------------------- ## +## Report this to http://bugs.python.org/ ## +## -------------------------------------- ## +_ASBOX + ) | 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; } +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; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint64_t" != no && break - done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 -$as_echo "$ac_cv_c_uint64_t" >&6; } - case $ac_cv_c_uint64_t in #( - no|yes) ;; #( - *) +if test $ac_cv_header_sys_sysmacros_h = yes; then cat >>confdefs.h <<\_ACEOF -#define _UINT64_T 1 +#define MAJOR_IN_SYSMACROS 1 _ACEOF +fi -cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t -_ACEOF -;; - esac + + fi +fi - { $as_echo "$as_me:$LINENO: checking for int32_t" >&5 -$as_echo_n "checking for int32_t... " >&6; } -if test "${ac_cv_c_int32_t+set}" = set; then - $as_echo_n "(cached) " >&6 +# On Solaris, term.h requires curses.h + +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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_c_int32_t=no - for ac_type in 'int32_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - 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 -int -main () -{ -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - ; - return 0; -} +#ifdef HAVE_CURSES_H +#include +#endif + + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7946,35 +6334,66 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +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 +_ACEOF + +fi + +done + + +# On Linux, netlink.h requires asm/types.h + +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 { 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - ; - return 0; -} +#ifdef HAVE_ASM_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7982,188 +6401,207 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : + eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - case $ac_type in - int32_t) ac_cv_c_int32_t=yes ;; - *) ac_cv_c_int32_t=$ac_type ;; -esac - + eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi +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 +_ACEOF -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int32_t" != no && break - done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 -$as_echo "$ac_cv_c_int32_t" >&6; } - case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) -cat >>confdefs.h <<_ACEOF -#define int32_t $ac_cv_c_int32_t -_ACEOF -;; - esac +done - { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 -$as_echo_n "checking for int64_t... " >&6; } -if test "${ac_cv_c_int64_t+set}" = set; then - $as_echo_n "(cached) " >&6 +# 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; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "clock_t" >/dev/null 2>&1; then + was_it_defined=yes else - ac_cv_c_int64_t=no - for ac_type in 'int64_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define clock_t long +_ACEOF + + +fi +rm -f conftest* + +{ 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; } +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 +#include int main () { -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 - + makedev(0, 0) ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - cat >conftest.$ac_ext <<_ACEOF + } && 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 +fi + +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 + 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 + +#define _OSF_SOURCE 1 +#include + int main () { -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - + makedev(0, 0) ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_has_makedev=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - case $ac_type in - int64_t) ac_cv_c_int64_t=yes ;; - *) ac_cv_c_int64_t=$ac_type ;; -esac - + ac_cv_has_makedev=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_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 conftest.$ac_ext + if test "$ac_cv_has_makedev" = "yes"; then +cat >>confdefs.h <<\_ACEOF +#define _OSF_SOURCE 1 +_ACEOF + fi fi +{ 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 +#define HAVE_MAKEDEV 1 +_ACEOF -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int64_t" != no && break - done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 -$as_echo "$ac_cv_c_int64_t" >&6; } - case $ac_cv_c_int64_t in #( - no|yes) ;; #( - *) -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t -_ACEOF -;; - esac +# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in +# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are +# defined, but the compiler does not support pragma redefine_extname, +# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit +# structures (such as rlimit64) without declaring them. As a +# work-around, disable LFS on such configurations -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 -$as_echo_n "checking for ssize_t... " >&6; } -if test "${ac_cv_type_ssize_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_ssize_t=no +use_lfs=yes +{ 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 cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + +#define _LARGEFILE_SOURCE 1 +#define _FILE_OFFSET_BITS 64 +#include + int main () { -if (sizeof (ssize_t)) - return 0; +struct rlimit foo; ; return 0; } @@ -8174,18 +6612,60 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 + sol_lfs_bug=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + sol_lfs_bug=yes +fi + +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 + +if test "$use_lfs" = "yes"; then +# Two defines needed to enable largefile support on various platforms +# These may affect some typedefs + +cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 64 +_ACEOF + +fi + +# Add some code to confdefs.h so that the test for off_t works on SCO +cat >> confdefs.h <<\EOF +#if defined(SCO_DS) +#undef _OFF_T +#endif +EOF + +# Type availability checks +{ 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8193,11 +6673,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if (sizeof ((ssize_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8208,73 +6691,59 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_ssize_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_mode_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_mode_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 -$as_echo "$ac_cv_type_ssize_t" >&6; } -if test "x$ac_cv_type_ssize_t" = x""yes; then +{ 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 -cat >>confdefs.h <<\_ACEOF -#define HAVE_SSIZE_T 1 +cat >>confdefs.h <<_ACEOF +#define mode_t int _ACEOF fi - -# Sizes of various common basic types -# ANSI C requires sizeof(char) == 1, so no need to check it -# 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. -{ $as_echo "$as_me:$LINENO: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then - $as_echo_n "(cached) " >&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 - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -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 off_t ac__type_new_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; -test_array [0] = 0 - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8285,33 +6754,59 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF + 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 +fi + +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; } +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#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; } +if test "${ac_cv_type_pid_t+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. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8322,50 +6817,57 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break + ac_cv_type_pid_t=yes else - $as_echo "$as_me: failed program was:" >&5 + 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_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +fi +{ 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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +{ 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 + 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 +#include +#include + int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; -test_array [0] = 0 - +return *(signal (0, 0)) (0) == 1; ; return 0; } @@ -8376,33 +6878,55 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +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; } + +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; } +if test "${ac_cv_type_size_t+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. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; -test_array [0] = 0 - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8413,58 +6937,97 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break + ac_cv_type_size_t=yes else - $as_echo "$as_me: failed program was:" >&5 + 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_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +fi +{ 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 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= -fi +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -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` +{ 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ 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 +#define uid_t int +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define gid_t int +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for uint32_t" >&5 +echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; } +if test "${ac_cv_c_uint32_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_uint32_t=no + for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; test_array [0] = 0 ; @@ -8477,151 +7040,136 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid + case $ac_type in + uint32_t) ac_cv_c_uint32_t=yes ;; + *) ac_cv_c_uint32_t=$ac_type ;; +esac + else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_int=0 - fi ;; -esac + test "$ac_cv_c_uint32_t" != no && break + done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 +echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; } + case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<\_ACEOF +#define _UINT32_T 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF +;; + esac + + + { echo "$as_me:$LINENO: checking for uint64_t" >&5 +echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; } +if test "${ac_cv_c_uint64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_uint64_t=no + for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 -static long int longval () { return (long int) (sizeof (int)); } -static unsigned long int ulongval () { return (long int) (sizeof (int)); } -#include -#include int main () { - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (int))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; +static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; +test_array [0] = 0 ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + 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 + case $ac_type in + uint64_t) ac_cv_c_uint64_t=yes ;; + *) ac_cv_c_uint64_t=$ac_type ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_int=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi -rm -f conftest.val + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_uint64_t" != no && break + done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 +echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; } + case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) +cat >>confdefs.h <<\_ACEOF +#define _UINT64_T 1 +_ACEOF cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int +#define uint64_t $ac_cv_c_uint64_t _ACEOF +;; + esac -# 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. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for int32_t" >&5 +echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; } +if test "${ac_cv_c_int32_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_int32_t=no + for ac_type in 'int32_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8631,7 +7179,7 @@ int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; test_array [0] = 0 ; @@ -8644,21 +7192,18 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8668,7 +7213,8 @@ int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -8681,38 +7227,63 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break + : else - $as_echo "$as_me: failed program was:" >&5 + 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` + case $ac_type in + int32_t) ac_cv_c_int32_t=yes ;; + *) ac_cv_c_int32_t=$ac_type ;; +esac + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int32_t" != no && break + done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 +echo "${ECHO_T}$ac_cv_c_int32_t" >&6; } + case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int32_t $ac_cv_c_int32_t +_ACEOF +;; + esac + + + { echo "$as_me:$LINENO: checking for int64_t" >&5 +echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } +if test "${ac_cv_c_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_int64_t=no + for ac_type in 'int64_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8722,7 +7293,7 @@ int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; test_array [0] = 0 ; @@ -8735,21 +7306,18 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8759,7 +7327,8 @@ int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -8772,47 +7341,58 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break + : else - $as_echo "$as_me: failed program was:" >&5 + 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` + case $ac_type in + int64_t) ac_cv_c_int64_t=yes ;; + *) ac_cv_c_int64_t=$ac_type ;; +esac + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int64_t" != no && break + done fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 +echo "${ECHO_T}$ac_cv_c_int64_t" >&6; } + case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) -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` +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF +;; + esac + +{ 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8820,12 +7400,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef ssize_t ac__type_new_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -8836,42 +7418,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid + ac_cv_type_ssize_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + ac_cv_type_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi ;; -esac +fi +{ 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 +#define HAVE_SSIZE_T 1 +_ACEOF + +fi + + +# 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; } +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8880,103 +7464,56 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long)); } -#include -#include +typedef int ac__type_new_; int main () { - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` + 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_type_int=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_cv_type_int=no fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -8987,10 +7524,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 int) (sizeof (void *))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9003,14 +7541,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9024,10 +7561,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 int) (sizeof (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9040,21 +7578,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9068,7 +7605,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9078,10 +7615,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 int) (sizeof (void *))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9094,14 +7632,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9115,10 +7652,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 int) (sizeof (void *))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9131,21 +7669,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9159,7 +7696,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9179,10 +7716,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 int) (sizeof (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9195,21 +7733,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9218,17 +7755,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (void *) +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_void_p=0 + ac_cv_sizeof_int=0 fi ;; esac else @@ -9239,8 +7774,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (void *)); } -static unsigned long int ulongval () { return (long int) (sizeof (void *)); } + 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 @@ -9250,22 +7786,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (void *))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (void *)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (void *)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9278,64 +7812,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 +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 + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +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) +See \`config.log' for more details." >&2;} + { (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 +fi +{ 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; } +if test "${ac_cv_type_long+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. */ +$ac_includes_default +typedef long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` + 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_type_long=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_void_p=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_cv_type_long=no fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9346,10 +7929,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 int) (sizeof (short))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9362,14 +7946,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9383,10 +7966,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 int) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9399,21 +7983,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9427,7 +8010,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9437,10 +8020,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 int) (sizeof (short))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9453,14 +8037,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9474,10 +8057,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 int) (sizeof (short))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9490,21 +8074,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9518,7 +8101,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9538,10 +8121,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 int) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9554,21 +8138,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9577,17 +8160,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +?*) ac_cv_sizeof_long=$ac_lo;; +'') if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_long=0 fi ;; esac else @@ -9598,8 +8179,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (short)); } -static unsigned long int ulongval () { return (long int) (sizeof (short)); } + 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 @@ -9609,22 +8191,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (short))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (short)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (short)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9637,64 +8217,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` + ac_cv_sizeof_long=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_long=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&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_SHORT $ac_cv_sizeof_short +#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; } +if test "${ac_cv_type_void_p+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. */ +$ac_includes_default +typedef void * ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_void_p=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_void_p=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of float" >&5 -$as_echo_n "checking size of float... " >&6; } -if test "${ac_cv_sizeof_float+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -9705,10 +8334,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 int) (sizeof (float))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9721,14 +8351,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9742,10 +8371,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 int) (sizeof (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9758,21 +8388,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -9786,7 +8415,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -9796,10 +8425,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 int) (sizeof (float))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9812,14 +8442,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -9833,10 +8462,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 int) (sizeof (float))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9849,21 +8479,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -9877,7 +8506,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -9897,10 +8526,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 int) (sizeof (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9913,21 +8543,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -9936,17 +8565,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_float=$ac_lo;; -'') if test "$ac_cv_type_float" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (float) +echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_float=0 + ac_cv_sizeof_void_p=0 fi ;; esac else @@ -9957,8 +8584,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (float)); } -static unsigned long int ulongval () { return (long int) (sizeof (float)); } + 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 @@ -9968,22 +8596,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (float))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (float)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (float)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -9996,64 +8622,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_float=`cat conftest.val` + ac_cv_sizeof_void_p=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_float" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) +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 -$as_echo "$as_me: error: cannot compute sizeof (float) +echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_float=0 + ac_cv_sizeof_void_p=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 -$as_echo "$ac_cv_sizeof_float" >&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_FLOAT $ac_cv_sizeof_float +#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; } +if test "${ac_cv_type_short+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. */ +$ac_includes_default +typedef short ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_short=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_short=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of double" >&5 -$as_echo_n "checking size of double... " >&6; } -if test "${ac_cv_sizeof_double+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10064,10 +8739,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 int) (sizeof (double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10080,14 +8756,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10101,10 +8776,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 int) (sizeof (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10117,21 +8793,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10145,7 +8820,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10155,10 +8830,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 int) (sizeof (double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10171,14 +8847,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10192,10 +8867,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 int) (sizeof (double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10208,21 +8884,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10236,7 +8911,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10256,10 +8931,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 int) (sizeof (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10272,21 +8948,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10295,17 +8970,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_double=$ac_lo;; -'') if test "$ac_cv_type_double" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) +?*) ac_cv_sizeof_short=$ac_lo;; +'') if test "$ac_cv_type_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (double) +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_double=0 + ac_cv_sizeof_short=0 fi ;; esac else @@ -10316,8 +8989,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (double)); } -static unsigned long int ulongval () { return (long int) (sizeof (double)); } + 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 @@ -10327,22 +9001,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (double))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (double)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (double)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10355,64 +9027,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_double=`cat conftest.val` + ac_cv_sizeof_short=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_double" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) +if test "$ac_cv_type_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (double) +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_double=0 + ac_cv_sizeof_short=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 -$as_echo "$ac_cv_sizeof_double" >&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_DOUBLE $ac_cv_sizeof_double +#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; } +if test "${ac_cv_type_float+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. */ +$ac_includes_default +typedef float ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_float=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_float=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5 -$as_echo_n "checking size of fpos_t... " >&6; } -if test "${ac_cv_sizeof_fpos_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10423,10 +9144,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 int) (sizeof (fpos_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10439,14 +9161,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10460,10 +9181,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 int) (sizeof (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10476,21 +9198,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10504,7 +9225,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10514,10 +9235,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 int) (sizeof (fpos_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10530,14 +9252,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10551,10 +9272,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 int) (sizeof (fpos_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10567,21 +9289,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10595,7 +9316,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10615,10 +9336,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 int) (sizeof (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10631,21 +9353,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -10654,17 +9375,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_fpos_t=$ac_lo;; -'') if test "$ac_cv_type_fpos_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (fpos_t) +echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_fpos_t=0 + ac_cv_sizeof_float=0 fi ;; esac else @@ -10675,8 +9394,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (fpos_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); } + 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 @@ -10686,22 +9406,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (fpos_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (fpos_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (fpos_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -10714,64 +9432,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_fpos_t=`cat conftest.val` + ac_cv_sizeof_float=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_fpos_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) +if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (fpos_t) +echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_fpos_t=0 + ac_cv_sizeof_float=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 -$as_echo "$ac_cv_sizeof_fpos_t" >&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_FPOS_T $ac_cv_sizeof_fpos_t +#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; } +if test "${ac_cv_type_double+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. */ +$ac_includes_default +typedef double ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_double=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_double=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5 -$as_echo_n "checking size of size_t... " >&6; } -if test "${ac_cv_sizeof_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -10782,10 +9549,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 int) (sizeof (size_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10798,14 +9566,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10819,10 +9586,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 int) (sizeof (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10835,21 +9603,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -10863,7 +9630,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -10873,10 +9640,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 int) (sizeof (size_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10889,14 +9657,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -10910,10 +9677,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 int) (sizeof (size_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10926,21 +9694,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -10954,7 +9721,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -10974,10 +9741,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 int) (sizeof (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10990,21 +9758,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11013,17 +9780,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_size_t=$ac_lo;; -'') if test "$ac_cv_type_size_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +?*) ac_cv_sizeof_double=$ac_lo;; +'') if test "$ac_cv_type_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (size_t) +echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_size_t=0 + ac_cv_sizeof_double=0 fi ;; esac else @@ -11034,8 +9799,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (size_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (size_t)); } + 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 @@ -11045,22 +9811,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (size_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (size_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (size_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11073,64 +9837,113 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_size_t=`cat conftest.val` + ac_cv_sizeof_double=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_size_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +if test "$ac_cv_type_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (size_t) +echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_size_t=0 + ac_cv_sizeof_double=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 -$as_echo "$ac_cv_sizeof_size_t" >&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_SIZE_T $ac_cv_sizeof_size_t +#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; } +if test "${ac_cv_type_fpos_t+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. */ +$ac_includes_default +typedef fpos_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_fpos_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_fpos_t=no +fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5 -$as_echo_n "checking size of pid_t... " >&6; } -if test "${ac_cv_sizeof_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11141,10 +9954,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 int) (sizeof (pid_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11157,14 +9971,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11178,10 +9991,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 int) (sizeof (pid_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11194,21 +10008,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -11222,7 +10035,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -11232,10 +10045,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 int) (sizeof (pid_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -11248,14 +10062,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11269,10 +10082,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 int) (sizeof (pid_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11285,21 +10099,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11313,7 +10126,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11333,10 +10146,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 int) (sizeof (pid_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11349,21 +10163,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11372,17 +10185,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_pid_t=$ac_lo;; -'') if test "$ac_cv_type_pid_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) +?*) ac_cv_sizeof_fpos_t=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (pid_t) +echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_pid_t=0 + ac_cv_sizeof_fpos_t=0 fi ;; esac else @@ -11393,8 +10204,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (pid_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (pid_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 @@ -11404,22 +10216,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (pid_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (pid_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (pid_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11432,71 +10242,71 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pid_t=`cat conftest.val` + ac_cv_sizeof_fpos_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_pid_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) +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 -$as_echo "$as_me: error: cannot compute sizeof (pid_t) +echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_pid_t=0 + ac_cv_sizeof_fpos_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 -$as_echo "$ac_cv_sizeof_pid_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_PID_T $ac_cv_sizeof_pid_t +#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t _ACEOF - -{ $as_echo "$as_me:$LINENO: checking for long long support" >&5 -$as_echo_n "checking for long long support... " >&6; } -have_long_long=no -cat >conftest.$ac_ext <<_ACEOF +{ 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 + 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_new_; int main () { -long long x; x = (long long)0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -11507,45 +10317,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_LONG 1 -_ACEOF - - have_long_long=yes - + ac_cv_type_size_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5 -$as_echo "$have_long_long" >&6; } -if test "$have_long_long" = yes ; then +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&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. -{ $as_echo "$as_me:$LINENO: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11556,10 +10359,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 int) (sizeof (long long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11572,14 +10376,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11593,10 +10396,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 int) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11609,21 +10413,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -11637,7 +10440,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -11647,10 +10450,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 int) (sizeof (long long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -11663,14 +10467,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -11684,10 +10487,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 int) (sizeof (long long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11700,21 +10504,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -11728,7 +10531,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -11748,10 +10551,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 int) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11764,21 +10568,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -11787,17 +10590,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (long long) +echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_size_t=0 fi ;; esac else @@ -11808,8 +10609,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (long long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long long)); } + 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 @@ -11819,22 +10621,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (long long))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (long long)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long long)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -11847,72 +10647,71 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` + ac_cv_sizeof_size_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +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 -$as_echo "$as_me: error: cannot compute sizeof (long long) +echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_size_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&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_LONG_LONG $ac_cv_sizeof_long_long +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF -fi - -{ $as_echo "$as_me:$LINENO: checking for long double support" >&5 -$as_echo_n "checking for long double support... " >&6; } -have_long_double=no -cat >conftest.$ac_ext <<_ACEOF +{ 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 + 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 pid_t ac__type_new_; int main () { -long double x; x = (long double)0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -11923,45 +10722,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_DOUBLE 1 -_ACEOF - - have_long_double=yes - + ac_cv_type_pid_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5 -$as_echo "$have_long_double" >&6; } -if test "$have_long_double" = yes ; then +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&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. -{ $as_echo "$as_me:$LINENO: checking size of long double" >&5 -$as_echo_n "checking size of long double... " >&6; } -if test "${ac_cv_sizeof_long_double+set}" = set; then - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking size of pid_t" >&5 +echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -11972,10 +10764,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11988,14 +10781,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12009,10 +10801,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12025,21 +10818,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12053,7 +10845,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12063,10 +10855,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12079,14 +10872,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12100,10 +10892,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12116,21 +10909,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -12144,7 +10936,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -12164,10 +10956,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef pid_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12180,21 +10973,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -12203,17 +10995,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_double=$ac_lo;; -'') if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double) +?*) ac_cv_sizeof_pid_t=$ac_lo;; +'') if test "$ac_cv_type_pid_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long double) +echo "$as_me: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_long_double=0 + ac_cv_sizeof_pid_t=0 fi ;; esac else @@ -12224,8 +11014,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (long double)); } -static unsigned long int ulongval () { return (long int) (sizeof (long double)); } + typedef pid_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 @@ -12235,22 +11026,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (long double))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (long double)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long double)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12263,62 +11052,55 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_double=`cat conftest.val` + ac_cv_sizeof_pid_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double) +if test "$ac_cv_type_pid_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long double) +echo "$as_me: error: cannot compute sizeof (pid_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_long_double=0 + ac_cv_sizeof_pid_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +#define SIZEOF_PID_T $ac_cv_sizeof_pid_t _ACEOF -fi - -{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5 -$as_echo_n "checking for _Bool support... " >&6; } -have_c99_bool=no +{ 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. */ _ACEOF @@ -12329,7 +11111,7 @@ int main () { -_Bool x; x = (_Bool)0; +long long x; x = (long long)0; ; return 0; } @@ -12340,14 +11122,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12355,30 +11136,84 @@ cat >>confdefs.h <<\_ACEOF -#define HAVE_C99_BOOL 1 +#define HAVE_LONG_LONG 1 _ACEOF - have_c99_bool=yes + have_long_long=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5 -$as_echo "$have_c99_bool" >&6; } -if test "$have_c99_bool" = yes ; then +{ 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; } +if test "${ac_cv_type_long_long+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. */ +$ac_includes_default +typedef long long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_long=no +fi + +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; } + # 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. -{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5 -$as_echo_n "checking size of _Bool... " >&6; } -if test "${ac_cv_sizeof__Bool+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12389,10 +11224,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 int) (sizeof (_Bool))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12405,14 +11241,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12426,10 +11261,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 int) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12442,21 +11278,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12470,7 +11305,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12480,10 +11315,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 int) (sizeof (_Bool))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12496,14 +11332,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12517,10 +11352,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 int) (sizeof (_Bool))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12533,21 +11369,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -12561,7 +11396,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -12581,10 +11416,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 int) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12597,21 +11433,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -12620,17 +11455,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof__Bool=$ac_lo;; -'') if test "$ac_cv_type__Bool" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (_Bool) +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof__Bool=0 + ac_cv_sizeof_long_long=0 fi ;; esac else @@ -12641,8 +11474,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (_Bool)); } -static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); } + 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 @@ -12652,22 +11486,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (_Bool))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (_Bool)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (_Bool)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -12680,79 +11512,67 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof__Bool=`cat conftest.val` + ac_cv_sizeof_long_long=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type__Bool" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) +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 -$as_echo "$as_me: error: cannot compute sizeof (_Bool) +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof__Bool=0 + ac_cv_sizeof_long_long=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 -$as_echo "$ac_cv_sizeof__Bool" >&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__BOOL $ac_cv_sizeof__Bool +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5 -$as_echo_n "checking for uintptr_t... " >&6; } -if test "${ac_cv_type_uintptr_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_uintptr_t=no +{ echo "$as_me:$LINENO: checking for long double support" >&5 +echo $ECHO_N "checking for long double support... $ECHO_C" >&6; } +have_long_double=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_STDINT_H - #include - #endif int main () { -if (sizeof (uintptr_t)) - return 0; +long double x; x = (long double)0; ; return 0; } @@ -12763,33 +11583,56 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_DOUBLE 1 +_ACEOF + + have_long_double=yes + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_long_double" >&5 +echo "${ECHO_T}$have_long_double" >&6; } +if test "$have_long_double" = yes ; then +{ echo "$as_me:$LINENO: checking for long double" >&5 +echo $ECHO_N "checking for long double... $ECHO_C" >&6; } +if test "${ac_cv_type_long_double+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. */ -#ifdef HAVE_STDINT_H - #include - #endif - +$ac_includes_default +typedef long double ac__type_new_; int main () { -if (sizeof ((uintptr_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -12800,52 +11643,38 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_uintptr_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_long_double=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_long_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -$as_echo "$ac_cv_type_uintptr_t" >&6; } -if test "x$ac_cv_type_uintptr_t" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5 +echo "${ECHO_T}$ac_cv_type_long_double" >&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. -{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5 -$as_echo_n "checking size of uintptr_t... " >&6; } -if test "${ac_cv_sizeof_uintptr_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking size of long double" >&5 +echo $ECHO_N "checking size of long double... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_long_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -12856,10 +11685,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12872,14 +11702,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12893,10 +11722,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12909,21 +11739,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -12937,7 +11766,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -12947,10 +11776,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12963,14 +11793,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -12984,10 +11813,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13000,21 +11830,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -13028,7 +11857,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -13048,10 +11877,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13064,21 +11894,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -13087,17 +11916,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_uintptr_t=$ac_lo;; -'') if test "$ac_cv_type_uintptr_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) +?*) ac_cv_sizeof_long_double=$ac_lo;; +'') if test "$ac_cv_type_long_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (uintptr_t) +echo "$as_me: error: cannot compute sizeof (long double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_uintptr_t=0 + ac_cv_sizeof_long_double=0 fi ;; esac else @@ -13108,8 +11935,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (uintptr_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); } + typedef long 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 @@ -13119,22 +11947,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (uintptr_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (uintptr_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (uintptr_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -13147,67 +11973,170 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_uintptr_t=`cat conftest.val` + ac_cv_sizeof_long_double=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_uintptr_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) +if test "$ac_cv_type_long_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (uintptr_t) +echo "$as_me: error: cannot compute sizeof (long double) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_uintptr_t=0 + ac_cv_sizeof_long_double=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 -$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +_ACEOF + + +fi + + +{ 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. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +_Bool x; x = (_Bool)0; + ; + 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 + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_C99_BOOL 1 _ACEOF + have_c99_bool=yes + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +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; } +if test "${ac_cv_type__Bool+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. */ +$ac_includes_default +typedef _Bool ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type__Bool=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type__Bool=no fi +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5 -$as_echo_n "checking size of off_t... " >&6; } -if test "${ac_cv_sizeof_off_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -13217,16 +12146,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -13239,14 +12164,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13259,16 +12183,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13281,21 +12201,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -13309,7 +12228,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -13318,16 +12237,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -13340,14 +12255,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13360,16 +12274,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13382,21 +12292,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -13410,7 +12319,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -13429,16 +12338,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - +$ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13451,21 +12356,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -13474,17 +12378,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_off_t=$ac_lo;; -'') if test "$ac_cv_type_off_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +?*) ac_cv_sizeof__Bool=$ac_lo;; +'') if test "$ac_cv_type__Bool" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (off_t) +echo "$as_me: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_off_t=0 + ac_cv_sizeof__Bool=0 fi ;; esac else @@ -13494,14 +12396,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - - -static long int longval () { return (long int) (sizeof (off_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (off_t)); } +$ac_includes_default + 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 @@ -13511,110 +12409,203 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (off_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (off_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (off_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f 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>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof__Bool=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +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) +See \`config.log' for more details." >&2;} + { (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 +fi +{ 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 + + +fi + +{ 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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_STDINT_H + #include + #endif + +typedef uintptr_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_uintptr_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uintptr_t=no +fi + +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; } +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; } +if test "${ac_cv_type_uintptr_t+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. */ +$ac_includes_default +typedef uintptr_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_off_t=`cat conftest.val` + 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_type_uintptr_t=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -if test "$ac_cv_type_off_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (off_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_off_t=0 - fi + ac_cv_type_uintptr_t=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -$as_echo "$ac_cv_sizeof_off_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF_T $ac_cv_sizeof_off_t -_ACEOF - - - -{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5 -$as_echo_n "checking whether to enable large file support... " >&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 -cat >>confdefs.h <<\_ACEOF -#define HAVE_LARGEFILE_SUPPORT 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +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; } # 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. -{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5 -$as_echo_n "checking size of time_t... " >&6; } -if test "${ac_cv_sizeof_time_t+set}" = set; then - $as_echo_n "(cached) " >&6 +{ 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 "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -13624,19 +12615,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -13649,14 +12633,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13669,19 +12652,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13694,21 +12670,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -13722,7 +12697,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -13731,19 +12706,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -13756,14 +12724,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -13776,19 +12743,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13801,21 +12761,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -13829,7 +12788,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -13848,19 +12807,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - +$ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13873,21 +12825,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -13896,17 +12847,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_time_t=$ac_lo;; -'') if test "$ac_cv_type_time_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +?*) ac_cv_sizeof_uintptr_t=$ac_lo;; +'') 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 -$as_echo "$as_me: error: cannot compute sizeof (time_t) +echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_time_t=0 + ac_cv_sizeof_uintptr_t=0 fi ;; esac else @@ -13916,17 +12865,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - - -static long int longval () { return (long int) (sizeof (time_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (time_t)); } +$ac_includes_default + 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 @@ -13936,22 +12878,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (time_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (time_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (time_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -13964,356 +12904,234 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_time_t=`cat conftest.val` + ac_cv_sizeof_uintptr_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_time_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +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 -$as_echo "$as_me: error: cannot compute sizeof (time_t) +echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else - ac_cv_sizeof_time_t=0 + ac_cv_sizeof_uintptr_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 -$as_echo "$ac_cv_sizeof_time_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_TIME_T $ac_cv_sizeof_time_t -_ACEOF - - - -# if have pthread_t then define SIZEOF_PTHREAD_T -ac_save_cc="$CC" -if test "$ac_cv_kpthread" = "yes" -then CC="$CC -Kpthread" -elif test "$ac_cv_kthread" = "yes" -then CC="$CC -Kthread" -elif test "$ac_cv_pthread" = "yes" -then CC="$CC -pthread" -fi - -{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5 -$as_echo_n "checking for pthread_t... " >&6; } -have_pthread_t=no -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 () -{ -pthread_t x; x = *(pthread_t*)0; - ; - return 0; -} +#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - have_pthread_t=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5 -$as_echo "$have_pthread_t" >&6; } -if test "$have_pthread_t" = yes ; then - # 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. -{ $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5 -$as_echo_n "checking size of pthread_t... " >&6; } -if test "${ac_cv_sizeof_pthread_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= 0)]; -test_array [0] = 0 - - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; -test_array [0] = 0 - - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_hi=$ac_mid; break -else - $as_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` -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +# 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; } +if test "${ac_cv_sizeof_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_off_t=4 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -int -main () +#include +#include +main() { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) < 0)]; -test_array [0] = 0 - - ; - return 0; + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(off_t)); + exit(0); } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof_off_t=`cat conftestval` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_sizeof_off_t=0 +fi +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; } + +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; } +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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LARGEFILE_SUPPORT 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; } +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; } +if test "${ac_cv_sizeof_time_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_time_t=4 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -int -main () +#include +#include +main() { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(time_t)); + exit(0); } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_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_lo=$ac_mid; break + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof_time_t=`cat conftestval` else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +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` +( exit $ac_status ) +ac_cv_sizeof_time_t=0 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -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` - cat >conftest.$ac_ext <<_ACEOF +{ 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 +_ACEOF + + + +# if have pthread_t then define SIZEOF_PTHREAD_T +ac_save_cc="$CC" +if test "$ac_cv_kpthread" = "yes" +then CC="$CC -Kpthread" +elif test "$ac_cv_kthread" = "yes" +then CC="$CC -Kthread" +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; } +have_pthread_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H #include -#endif - - int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; -test_array [0] = 0 - +pthread_t x; x = *(pthread_t*)0; ; return 0; } @@ -14324,42 +13142,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid + have_pthread_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_pthread_t=$ac_lo;; -'') if test "$ac_cv_type_pthread_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (pthread_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_pthread_t=0 - fi ;; -esac +{ 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; } + if test "${ac_cv_sizeof_pthread_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_pthread_t=4 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14367,44 +13180,15 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#ifdef HAVE_PTHREAD_H -#include -#endif - - -static long int longval () { return (long int) (sizeof (pthread_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (pthread_t)); } #include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (pthread_t))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (pthread_t)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (pthread_t)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} +#include + main() + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(pthread_t)); + exit(0); + } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -14412,60 +13196,49 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pthread_t=`cat conftest.val` + ac_cv_sizeof_pthread_t=`cat conftestval` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_pthread_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (pthread_t) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_pthread_t=0 - fi +ac_cv_sizeof_pthread_t=0 fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 -$as_echo "$ac_cv_sizeof_pthread_t" >&6; } +fi + + { 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 _ACEOF - fi CC="$ac_save_cc" + + case $ac_sys_system/$ac_sys_release in Darwin/[01567]\..*) OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000" @@ -14499,8 +13272,8 @@ LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac -{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5 -$as_echo_n "checking for --enable-framework... " >&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" @@ -14511,21 +13284,21 @@ #define WITH_NEXT_FRAMEWORK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } if test $enable_shared = "yes" then - { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5 -$as_echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;} + { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5 +echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for dyld" >&5 -$as_echo_n "checking for dyld... " >&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/*) @@ -14533,12 +13306,12 @@ #define WITH_DYLD 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5 -$as_echo "always on for Darwin" >&6; } + { echo "$as_me:$LINENO: result: always on for Darwin" >&5 +echo "${ECHO_T}always on for Darwin" >&6; } ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ;; esac @@ -14550,8 +13323,8 @@ # SO is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin -{ $as_echo "$as_me:$LINENO: checking SO" >&5 -$as_echo_n "checking SO... " >&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 @@ -14576,8 +13349,8 @@ echo '=====================================================================' sleep 10 fi -{ $as_echo "$as_me:$LINENO: result: $SO" >&5 -$as_echo "$SO" >&6; } +{ echo "$as_me:$LINENO: result: $SO" >&5 +echo "${ECHO_T}$SO" >&6; } cat >>confdefs.h <<_ACEOF @@ -14588,8 +13361,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.) -{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5 -$as_echo_n "checking LDSHARED... " >&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 @@ -14691,13 +13464,13 @@ *) LDSHARED="ld";; esac fi -{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5 -$as_echo_n "checking CCSHARED... " >&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 @@ -14732,12 +13505,12 @@ atheos*) CCSHARED="-fPIC";; esac fi -{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5 -$as_echo_n "checking LINKFORSHARED... " >&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 @@ -14784,13 +13557,13 @@ LINKFORSHARED='-Wl,-E -N 2048K';; esac fi -{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 -$as_echo "$LINKFORSHARED" >&6; } +{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 +echo "${ECHO_T}$LINKFORSHARED" >&6; } -{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5 -$as_echo_n "checking CFLAGSFORSHARED... " >&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 @@ -14802,8 +13575,8 @@ CFLAGSFORSHARED='$(CCSHARED)' esac fi -{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5 -$as_echo "$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). @@ -14814,22 +13587,22 @@ # don't need to link LIBS explicitly. The default should be only changed # on systems where this approach causes problems. -{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5 -$as_echo_n "checking SHLIBS... " >&6; } +{ echo "$as_me:$LINENO: checking SHLIBS" >&5 +echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; } case "$ac_sys_system" in *) SHLIBS='$(LIBS)';; esac -{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5 -$as_echo "$SHLIBS" >&6; } +{ echo "$as_me:$LINENO: result: $SHLIBS" >&5 +echo "${ECHO_T}$SHLIBS" >&6; } # checks for libraries -{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -14861,37 +13634,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +{ 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 _ACEOF @@ -14901,10 +13670,10 @@ fi # Dynamic linking for SunOS/Solaris and SYSV -{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -14936,37 +13705,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then +{ 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 _ACEOF @@ -14978,10 +13743,10 @@ # only check for sem_init if thread support is requested if test "$with_threads" = "yes" -o -z "$with_threads"; then - { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5 -$as_echo_n "checking for library containing sem_init... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -15019,30 +13784,26 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_search_sem_init=$ac_res else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -rf conftest.dSYM 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 @@ -15057,8 +13818,8 @@ rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5 -$as_echo "$ac_cv_search_sem_init" >&6; } +{ 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" @@ -15070,10 +13831,10 @@ fi # check if we need libintl for locale functions -{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 -$as_echo_n "checking for textdomain in -lintl... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" @@ -15105,37 +13866,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_textdomain=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_textdomain=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5 -$as_echo "$ac_cv_lib_intl_textdomain" >&6; } -if test "x$ac_cv_lib_intl_textdomain" = x""yes; then +{ 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 #define WITH_LIBINTL 1 @@ -15147,8 +13904,8 @@ # checks for system dependent C++ extensions support case "$ac_sys_system" in - AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5 -$as_echo_n "checking for genuine AIX C++ extensions support... " >&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 @@ -15170,47 +13927,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define AIX_GENUINE_CPLUSPLUS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM 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. -{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 -$as_echo_n "checking for t_open in -lnsl... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" @@ -15242,44 +13995,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_t_open=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_t_open=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 -$as_echo "$ac_cv_lib_nsl_t_open" >&6; } -if test "x$ac_cv_lib_nsl_t_open" = x""yes; then +{ 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 -{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS $LIBS" @@ -15311,60 +14060,56 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_socket=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = x""yes; then +{ 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 # SVR4 sockets -{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5 -$as_echo_n "checking for --with-libs... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-libs" >&5 +echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; } # Check whether --with-libs was given. if test "${with_libs+set}" = set; then withval=$with_libs; -{ $as_echo "$as_me:$LINENO: result: $withval" >&5 -$as_echo "$withval" >&6; } +{ echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6; } LIBS="$withval $LIBS" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Check for use of the system libffi library -{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5 -$as_echo_n "checking for --with-system-ffi... " >&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 was given. if test "${with_system_ffi+set}" = set; then @@ -15372,41 +14117,41 @@ fi -{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5 -$as_echo "$with_system_ffi" >&6; } +{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5 +echo "${ECHO_T}$with_system_ffi" >&6; } # Check for --with-dbmliborder -{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5 -$as_echo_n "checking for --with-dbmliborder... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5 +echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; } # Check whether --with-dbmliborder was given. if test "${with_dbmliborder+set}" = set; then withval=$with_dbmliborder; if test x$with_dbmliborder = xyes then -{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 -$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} +{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 +echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} { (exit 1); exit 1; }; } else for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb then - { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 -$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} + { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5 +echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;} { (exit 1); exit 1; }; } fi done fi fi -{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5 -$as_echo "$with_dbmliborder" >&6; } +{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5 +echo "${ECHO_T}$with_dbmliborder" >&6; } # Determine if signalmodule should be used. -{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5 -$as_echo_n "checking for --with-signal-module... " >&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 was given. if test "${with_signal_module+set}" = set; then @@ -15417,8 +14162,8 @@ if test -z "$with_signal_module" then with_signal_module="yes" fi -{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5 -$as_echo "$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="" @@ -15432,22 +14177,22 @@ USE_THREAD_MODULE="" -{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5 -$as_echo_n "checking for --with-dec-threads... " >&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 was given. if test "${with_dec_threads+set}" = set; then withval=$with_dec_threads; -{ $as_echo "$as_me:$LINENO: result: $withval" >&5 -$as_echo "$withval" >&6; } +{ 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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -15460,8 +14205,8 @@ -{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5 -$as_echo_n "checking for --with-threads... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-threads" >&5 +echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; } # Check whether --with-threads was given. if test "${with_threads+set}" = set; then @@ -15480,8 +14225,8 @@ if test -z "$with_threads" then with_threads="yes" fi -{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5 -$as_echo "$with_threads" >&6; } +{ echo "$as_me:$LINENO: result: $with_threads" >&5 +echo "${ECHO_T}$with_threads" >&6; } if test "$with_threads" = "no" @@ -15547,8 +14292,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) - { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5 -$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&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 @@ -15570,25 +14315,25 @@ fi rm -f conftest* - { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 -$as_echo "$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 - { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5 -$as_echo_n "checking for cthreads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5 -$as_echo_n "checking cthreads.h usability... " >&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 @@ -15604,33 +14349,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5 -$as_echo_n "checking cthreads.h presence... " >&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 @@ -15644,52 +14388,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -15698,18 +14441,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5 -$as_echo_n "checking for cthreads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_cthreads_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 -$as_echo "$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 "x$ac_cv_header_cthreads_h" = x""yes; then +if test $ac_cv_header_cthreads_h = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15728,17 +14471,17 @@ else if test "${ac_cv_header_mach_cthreads_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 -$as_echo_n "checking for mach/cthreads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5 -$as_echo_n "checking mach/cthreads.h usability... " >&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 @@ -15754,33 +14497,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5 -$as_echo_n "checking mach/cthreads.h presence... " >&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 @@ -15794,52 +14536,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -15848,18 +14589,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 -$as_echo_n "checking for mach/cthreads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mach_cthreads_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 -$as_echo "$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 "x$ac_cv_header_mach_cthreads_h" = x""yes; then +if test $ac_cv_header_mach_cthreads_h = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15876,13 +14617,13 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5 -$as_echo_n "checking for --with-pth... " >&6; } + { echo "$as_me:$LINENO: checking for --with-pth" >&5 +echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; } # Check whether --with-pth was given. if test "${with_pth+set}" = set; then - withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5 -$as_echo "$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 @@ -15895,16 +14636,16 @@ LIBS="-lpth $LIBS" THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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" - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 -$as_echo_n "checking for pthread_create in -lpthread... " >&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 @@ -15929,24 +14670,21 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -15954,15 +14692,15 @@ posix_threads=yes THREADOBJ="Python/thread.o" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$_libs - { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5 -$as_echo_n "checking for pthread_detach... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16015,36 +14753,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_pthread_detach=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_pthread_detach=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5 -$as_echo "$ac_cv_func_pthread_detach" >&6; } -if test "x$ac_cv_func_pthread_detach" = x""yes; then +{ 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 _ACEOF @@ -16054,17 +14788,17 @@ else if test "${ac_cv_header_atheos_threads_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 -$as_echo_n "checking for atheos/threads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5 -$as_echo_n "checking atheos/threads.h usability... " >&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 @@ -16080,33 +14814,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5 -$as_echo_n "checking atheos/threads.h presence... " >&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 @@ -16120,52 +14853,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -16174,18 +14906,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 -$as_echo_n "checking for atheos/threads.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_atheos_threads_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 -$as_echo "$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 "x$ac_cv_header_atheos_threads_h" = x""yes; then +if test $ac_cv_header_atheos_threads_h = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -16198,10 +14930,10 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5 -$as_echo_n "checking for pthread_create in -lpthreads... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthreads $LIBS" @@ -16233,37 +14965,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthreads_pthread_create=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5 -$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } -if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then +{ 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 _ACEOF @@ -16273,10 +15001,10 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 -$as_echo_n "checking for pthread_create in -lc_r... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" @@ -16308,37 +15036,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_r_pthread_create=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 -$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } -if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then +{ 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 _ACEOF @@ -16348,10 +15072,10 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5 -$as_echo_n "checking for __pthread_create_system in -lpthread... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" @@ -16383,37 +15107,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_create_system=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread___pthread_create_system=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5 -$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } -if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then +{ 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 _ACEOF @@ -16423,10 +15143,10 @@ THREADOBJ="Python/thread.o" else - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5 -$as_echo_n "checking for pthread_create in -lcma... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcma $LIBS" @@ -16458,37 +15178,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_cma_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cma_pthread_create=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5 -$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } -if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then +{ 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 _ACEOF @@ -16515,7 +15231,6 @@ fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi @@ -16527,10 +15242,10 @@ - { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5 -$as_echo_n "checking for usconfig in -lmpc... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpc $LIBS" @@ -16562,37 +15277,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_mpc_usconfig=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpc_usconfig=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5 -$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } -if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then +{ 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 _ACEOF @@ -16604,10 +15315,10 @@ if test "$posix_threads" != "yes"; then - { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 -$as_echo_n "checking for thr_create in -lthread... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lthread $LIBS" @@ -16639,37 +15350,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_thread_thr_create=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_thread_thr_create=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 -$as_echo "$ac_cv_lib_thread_thr_create" >&6; } -if test "x$ac_cv_lib_thread_thr_create" = x""yes; then +{ 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 _ACEOF @@ -16722,10 +15429,10 @@ ;; esac - { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 -$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_pthread_system_supported=no @@ -16755,32 +15462,29 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_pthread_system_supported=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_pthread_system_supported=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi @@ -16788,8 +15492,8 @@ fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5 -$as_echo "$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 @@ -16800,11 +15504,11 @@ for ac_func in pthread_sigmask do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16857,42 +15561,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF case $ac_sys_system in CYGWIN*) @@ -16912,18 +15609,18 @@ # Check for enable-ipv6 -{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5 -$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } +{ 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 no) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no ;; - *) { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + *) { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define ENABLE_IPV6 1 _ACEOF @@ -16934,8 +15631,8 @@ else if test "$cross_compiling" = yes; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no else @@ -16963,44 +15660,41 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ipv6=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no fi -rm -rf conftest.dSYM 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 - { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5 -$as_echo_n "checking if RFC2553 API is available... " >&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 @@ -17024,27 +15718,26 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ipv6=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no fi @@ -17066,8 +15759,8 @@ ipv6trylibc=no if test "$ipv6" = "yes"; then - { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5 -$as_echo_n "checking ipv6 stack type... " >&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 @@ -17223,8 +15916,8 @@ break fi done - { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5 -$as_echo "$ipv6type" >&6; } + { echo "$as_me:$LINENO: result: $ipv6type" >&5 +echo "${ECHO_T}$ipv6type" >&6; } fi if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then @@ -17243,8 +15936,8 @@ fi fi -{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5 -$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; } +{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5 +echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17266,14 +15959,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17283,22 +15975,22 @@ #define HAVE_OSX105_SDK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Check for --with-doc-strings -{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5 -$as_echo_n "checking for --with-doc-strings... " >&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 was given. if test "${with_doc_strings+set}" = set; then @@ -17317,12 +16009,12 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5 -$as_echo_n "checking for --with-tsc... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-tsc" >&5 +echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; } # Check whether --with-tsc was given. if test "${with_tsc+set}" = set; then @@ -17334,20 +16026,20 @@ #define WITH_TSC 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Check for Python-specific malloc support -{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5 -$as_echo_n "checking for --with-pymalloc... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5 +echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; } # Check whether --with-pymalloc was given. if test "${with_pymalloc+set}" = set; then @@ -17366,12 +16058,12 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5 -$as_echo "$with_pymalloc" >&6; } +{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5 +echo "${ECHO_T}$with_pymalloc" >&6; } # Check for --with-wctype-functions -{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5 -$as_echo_n "checking for --with-wctype-functions... " >&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 was given. if test "${with_wctype_functions+set}" = set; then @@ -17383,14 +16075,14 @@ #define WANT_WCTYPE_FUNCTIONS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -17403,11 +16095,11 @@ for ac_func in dlopen do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17460,42 +16152,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -17505,8 +16190,8 @@ # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic # loading of modules. -{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5 -$as_echo_n "checking DYNLOADFILE... " >&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 @@ -17530,8 +16215,8 @@ ;; esac fi -{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 -$as_echo "$DYNLOADFILE" >&6; } +{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 +echo "${ECHO_T}$DYNLOADFILE" >&6; } if test "$DYNLOADFILE" != "dynload_stub.o" then @@ -17544,16 +16229,16 @@ # MACHDEP_OBJS can be set to platform-specific object files needed by Python -{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5 -$as_echo_n "checking MACHDEP_OBJS... " >&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 -{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5 -$as_echo "MACHDEP_OBJS" >&6; } +{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5 +echo "${ECHO_T}MACHDEP_OBJS" >&6; } # checks for library functions @@ -17660,11 +16345,11 @@ truncate uname unsetenv utimes waitpid wait3 wait4 \ wcscoll wcsftime wcsxfrm _getpty do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17717,42 +16402,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -17761,8 +16439,8 @@ # For some functions, having a definition is not sufficient, since # we want to take their address. -{ $as_echo "$as_me:$LINENO: checking for chroot" >&5 -$as_echo_n "checking for chroot... " >&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 @@ -17784,14 +16462,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17801,20 +16478,20 @@ #define HAVE_CHROOT 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for link" >&5 -$as_echo_n "checking for link... " >&6; } +{ 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 @@ -17836,14 +16513,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17853,20 +16529,20 @@ #define HAVE_LINK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for symlink" >&5 -$as_echo_n "checking for symlink... " >&6; } +{ 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 @@ -17888,14 +16564,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17905,20 +16580,20 @@ #define HAVE_SYMLINK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5 -$as_echo_n "checking for fchdir... " >&6; } +{ 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 @@ -17940,14 +16615,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -17957,20 +16631,20 @@ #define HAVE_FCHDIR 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for fsync" >&5 -$as_echo_n "checking for fsync... " >&6; } +{ 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 @@ -17992,14 +16666,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18009,20 +16682,20 @@ #define HAVE_FSYNC 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5 -$as_echo_n "checking for fdatasync... " >&6; } +{ 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 @@ -18044,14 +16717,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18061,20 +16733,20 @@ #define HAVE_FDATASYNC 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for epoll" >&5 -$as_echo_n "checking for epoll... " >&6; } +{ echo "$as_me:$LINENO: checking for epoll" >&5 +echo $ECHO_N "checking for epoll... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18096,14 +16768,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18113,20 +16784,20 @@ #define HAVE_EPOLL 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5 -$as_echo_n "checking for kqueue... " >&6; } +{ echo "$as_me:$LINENO: checking for kqueue" >&5 +echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18151,14 +16822,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18168,14 +16838,14 @@ #define HAVE_KQUEUE 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -18186,8 +16856,8 @@ # address to avoid compiler warnings and potential miscompilations # because of the missing prototypes. -{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5 -$as_echo_n "checking for ctermid_r... " >&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 @@ -18212,14 +16882,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18229,21 +16898,21 @@ #define HAVE_CTERMID_R 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for flock" >&5 -$as_echo_n "checking for flock... " >&6; } +{ 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 @@ -18268,14 +16937,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18285,21 +16953,21 @@ #define HAVE_FLOCK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5 -$as_echo_n "checking for getpagesize... " >&6; } +{ 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 @@ -18324,14 +16992,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18341,14 +17008,14 @@ #define HAVE_GETPAGESIZE 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -18358,10 +17025,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$TRUE"; then ac_cv_prog_TRUE="$TRUE" # Let the user override the test. @@ -18374,7 +17041,7 @@ for ac_exec_ext in '' $ac_executable_extensions; do 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -18385,11 +17052,11 @@ fi TRUE=$ac_cv_prog_TRUE if test -n "$TRUE"; then - { $as_echo "$as_me:$LINENO: result: $TRUE" >&5 -$as_echo "$TRUE" >&6; } + { echo "$as_me:$LINENO: result: $TRUE" >&5 +echo "${ECHO_T}$TRUE" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -18398,10 +17065,10 @@ test -n "$TRUE" || TRUE="/bin/true" -{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5 -$as_echo_n "checking for inet_aton in -lc... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" @@ -18433,44 +17100,40 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_inet_aton=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_inet_aton=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5 -$as_echo "$ac_cv_lib_c_inet_aton" >&6; } -if test "x$ac_cv_lib_c_inet_aton" = x""yes; then +{ 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 -{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 -$as_echo_n "checking for inet_aton in -lresolv... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" @@ -18502,37 +17165,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_resolv_inet_aton=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_resolv_inet_aton=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 -$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } -if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then +{ 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 _ACEOF @@ -18547,13 +17206,14 @@ # On Tru64, chflags seems to be present, but calling it will # exit Python -{ $as_echo "$as_me:$LINENO: checking for chflags" >&5 -$as_echo_n "checking for chflags... " >&6; } -if test "${ac_cv_have_chflags+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_have_chflags=no +{ echo "$as_me:$LINENO: checking for chflags" >&5 +echo $ECHO_N "checking for chflags... $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 +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. */ @@ -18578,57 +17238,50 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_chflags=yes + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHFLAGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_have_chflags=no +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5 -$as_echo "$ac_cv_have_chflags" >&6; } -if test $ac_cv_have_chflags = yes -then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHFLAGS 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5 -$as_echo_n "checking for lchflags... " >&6; } -if test "${ac_cv_have_lchflags+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_have_lchflags=no +{ echo "$as_me:$LINENO: checking for lchflags" >&5 +echo $ECHO_N "checking for lchflags... $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 +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. */ @@ -18653,50 +17306,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_lchflags=yes + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LCHFLAGS 1 +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_have_lchflags=no +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5 -$as_echo "$ac_cv_have_lchflags" >&6; } -if test $ac_cv_have_lchflags = yes -then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LCHFLAGS 1 -_ACEOF - -fi - case $ac_sys_system/$ac_sys_release in Darwin/*) _CUR_CFLAGS="${CFLAGS}" @@ -18706,10 +17351,10 @@ ;; esac -{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5 -$as_echo_n "checking for inflateCopy in -lz... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -18741,37 +17386,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_z_inflateCopy=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_inflateCopy=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5 -$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } -if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then +{ 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 #define HAVE_ZLIB_COPY 1 @@ -18787,8 +17428,8 @@ ;; esac -{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5 -$as_echo_n "checking for hstrerror... " >&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 @@ -18813,43 +17454,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_HSTRERROR 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5 -$as_echo_n "checking for inet_aton... " >&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 @@ -18877,43 +17514,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_INET_ATON 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5 -$as_echo_n "checking for inet_pton... " >&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 @@ -18941,14 +17574,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -18958,22 +17590,22 @@ #define HAVE_INET_PTON 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # On some systems, setgroups is in unistd.h, on others, in grp.h -{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5 -$as_echo_n "checking for setgroups... " >&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 @@ -19001,14 +17633,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -19018,14 +17649,14 @@ #define HAVE_SETGROUPS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -19036,11 +17667,11 @@ for ac_func in openpty do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19093,49 +17724,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 -$as_echo_n "checking for openpty in -lutil... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" @@ -19167,46 +17791,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_util_openpty=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_openpty=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 -$as_echo "$ac_cv_lib_util_openpty" >&6; } -if test "x$ac_cv_lib_util_openpty" = x""yes; then +{ 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 - { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5 -$as_echo_n "checking for openpty in -lbsd... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -19238,37 +17858,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_openpty=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_openpty=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5 -$as_echo "$ac_cv_lib_bsd_openpty" >&6; } -if test "x$ac_cv_lib_bsd_openpty" = x""yes; then +{ 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 _ACEOF @@ -19285,11 +17901,11 @@ for ac_func in forkpty do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19342,49 +17958,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5 -$as_echo_n "checking for forkpty in -lutil... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" @@ -19416,46 +18025,42 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_util_forkpty=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_forkpty=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5 -$as_echo "$ac_cv_lib_util_forkpty" >&6; } -if test "x$ac_cv_lib_util_forkpty" = x""yes; then +{ 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 - { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5 -$as_echo_n "checking for forkpty in -lbsd... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -19487,37 +18092,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_forkpty=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_forkpty=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5 -$as_echo "$ac_cv_lib_bsd_forkpty" >&6; } -if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then +{ 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 _ACEOF @@ -19536,11 +18137,11 @@ for ac_func in memmove do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19593,42 +18194,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -19644,11 +18238,11 @@ for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19701,42 +18295,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -19748,11 +18335,11 @@ for ac_func in dup2 getcwd strdup do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19805,42 +18392,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else @@ -19857,11 +18437,11 @@ for ac_func in getpgrp do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19914,42 +18494,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19972,14 +18545,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -19991,7 +18563,7 @@ else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20005,11 +18577,11 @@ for ac_func in setpgrp do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20062,42 +18634,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20120,14 +18685,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -20139,7 +18703,7 @@ else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20153,11 +18717,11 @@ for ac_func in gettimeofday do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20210,42 +18774,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20268,21 +18825,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20299,8 +18855,8 @@ done -{ $as_echo "$as_me:$LINENO: checking for major" >&5 -$as_echo_n "checking for major... " >&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 @@ -20332,48 +18888,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_MACROS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM 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. -{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -$as_echo_n "checking for getaddrinfo... " >&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 @@ -20389,7 +18941,9 @@ int main () { + getaddrinfo(NULL, NULL, NULL, NULL); + ; return 0; } @@ -20400,43 +18954,27 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - have_getaddrinfo=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_getaddrinfo=no -fi + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 -$as_echo "$have_getaddrinfo" >&6; } -if test $have_getaddrinfo = yes -then - { $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 -$as_echo_n "checking getaddrinfo bug... " >&6; } - if test "${ac_cv_buggy_getaddrinfo+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_buggy_getaddrinfo=yes +{ 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; } +buggygetaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20451,7 +18989,7 @@ #include #include -int main() +main() { int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; @@ -20523,12 +19061,12 @@ if (aitop) freeaddrinfo(aitop); - return 0; + exit(0); bad: if (aitop) freeaddrinfo(aitop); - return 1; + exit(1); } _ACEOF @@ -20538,44 +19076,53 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_buggy_getaddrinfo=no + { echo "$as_me:$LINENO: result: good" >&5 +echo "${ECHO_T}good" >&6; } +buggygetaddrinfo=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_buggy_getaddrinfo=yes +{ echo "$as_me:$LINENO: result: buggy" >&5 +echo "${ECHO_T}buggy" >&6; } +buggygetaddrinfo=yes fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -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; } +buggygetaddrinfo=yes fi -if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes -then - if test $ipv6 = yes - then +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +if test "$buggygetaddrinfo" = "yes"; then + if test "$ipv6" = "yes"; then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 @@ -20590,11 +19137,11 @@ for ac_func in getnameinfo do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20647,42 +19194,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -20690,10 +19230,10 @@ # checks for structures -{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20720,21 +19260,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_time=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no @@ -20742,8 +19281,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -$as_echo "$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 @@ -20752,10 +19291,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20771,7 +19310,7 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + return !p; ; return 0; } @@ -20782,21 +19321,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_tm=time.h else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h @@ -20804,8 +19342,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -$as_echo "$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 @@ -20814,10 +19352,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -$as_echo_n "checking for struct tm.tm_zone... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20845,21 +19383,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_tm_tm_zone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -20888,21 +19425,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_tm_tm_zone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no @@ -20913,9 +19449,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then +{ 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 #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -20931,10 +19467,10 @@ _ACEOF else - { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -$as_echo_n "checking whether tzname is declared... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20961,21 +19497,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no @@ -20983,9 +19518,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -$as_echo "$ac_cv_have_decl_tzname" >&6; } -if test "x$ac_cv_have_decl_tzname" = x""yes; then +{ 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 @@ -21001,10 +19536,10 @@ fi - { $as_echo "$as_me:$LINENO: checking for tzname" >&5 -$as_echo_n "checking for tzname... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21031,35 +19566,31 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -$as_echo "$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 @@ -21069,10 +19600,10 @@ fi fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -$as_echo_n "checking for struct stat.st_rdev... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21097,21 +19628,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_rdev=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21137,21 +19667,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_rdev=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_rdev=no @@ -21162,9 +19691,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; } -if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_RDEV 1 @@ -21173,10 +19702,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -$as_echo_n "checking for struct stat.st_blksize... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21201,21 +19730,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_blksize=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21241,21 +19769,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_blksize=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blksize=no @@ -21266,9 +19793,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -21277,10 +19804,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 -$as_echo_n "checking for struct stat.st_flags... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21305,21 +19832,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_flags=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21345,21 +19871,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_flags=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_flags=no @@ -21370,9 +19895,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5 -$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; } -if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_FLAGS 1 @@ -21381,10 +19906,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 -$as_echo_n "checking for struct stat.st_gen... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21409,21 +19934,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_gen=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21449,21 +19973,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_gen=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_gen=no @@ -21474,9 +19997,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5 -$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; } -if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_GEN 1 @@ -21485,10 +20008,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5 -$as_echo_n "checking for struct stat.st_birthtime... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21513,21 +20036,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_birthtime=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21553,21 +20075,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_birthtime=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_birthtime=no @@ -21578,9 +20099,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5 -$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; } -if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 @@ -21589,10 +20110,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -$as_echo_n "checking for struct stat.st_blocks... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21617,21 +20138,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_blocks=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -21657,21 +20177,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_stat_st_blocks=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blocks=no @@ -21682,9 +20201,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; } -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then +{ 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 #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -21706,10 +20225,10 @@ -{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5 -$as_echo_n "checking for time.h that defines altzone... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21732,21 +20251,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_time_altzone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time_altzone=no @@ -21755,8 +20273,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5 -$as_echo "$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 @@ -21766,8 +20284,8 @@ fi was_it_defined=no -{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&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 @@ -21793,14 +20311,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -21814,20 +20331,20 @@ was_it_defined=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5 -$as_echo "$was_it_defined" >&6; } +{ echo "$as_me:$LINENO: result: $was_it_defined" >&5 +echo "${ECHO_T}$was_it_defined" >&6; } -{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5 -$as_echo_n "checking for addrinfo... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21851,21 +20368,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_addrinfo=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_addrinfo=no @@ -21874,8 +20390,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5 -$as_echo "$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 @@ -21884,10 +20400,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 -$as_echo_n "checking for sockaddr_storage... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21912,21 +20428,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_sockaddr_storage=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_sockaddr_storage=no @@ -21935,8 +20450,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5 -$as_echo "$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 @@ -21948,10 +20463,10 @@ # checks for compiler characteristics -{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -$as_echo_n "checking whether char is unsigned... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21976,21 +20491,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_char_unsigned=no else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_char_unsigned=yes @@ -21998,8 +20512,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -$as_echo "$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 @@ -22007,10 +20521,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22082,21 +20596,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_const=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no @@ -22104,20 +20617,20 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -$as_echo "$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 -#define const /**/ +#define const _ACEOF fi works=no -{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&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 @@ -22139,38 +20652,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 works=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF -#define volatile /**/ +#define volatile _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $works" >&5 -$as_echo "$works" >&6; } +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } works=no -{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5 -$as_echo_n "checking for working signed char... " >&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 @@ -22192,38 +20704,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 works=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF -#define signed /**/ +#define signed _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $works" >&5 -$as_echo "$works" >&6; } +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } have_prototypes=no -{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5 -$as_echo_n "checking for prototypes... " >&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 @@ -22245,14 +20756,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22266,19 +20776,19 @@ have_prototypes=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5 -$as_echo "$have_prototypes" >&6; } +{ echo "$as_me:$LINENO: result: $have_prototypes" >&5 +echo "${ECHO_T}$have_prototypes" >&6; } works=no -{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5 -$as_echo_n "checking for variable length prototypes and stdarg.h... " >&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 @@ -22310,14 +20820,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22331,19 +20840,19 @@ works=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $works" >&5 -$as_echo "$works" >&6; } +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } # check for socketpair -{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5 -$as_echo_n "checking for socketpair... " >&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 @@ -22368,14 +20877,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22385,22 +20893,22 @@ #define HAVE_SOCKETPAIR 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # check if sockaddr has sa_len member -{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5 -$as_echo_n "checking if sockaddr has sa_len member... " >&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 @@ -22424,38 +20932,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 _ACEOF else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext va_list_is_array=no -{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5 -$as_echo_n "checking whether va_list is an array... " >&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 @@ -22483,21 +20990,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -22511,17 +21017,17 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5 -$as_echo "$va_list_is_array" >&6; } +{ 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 :-( -{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -$as_echo_n "checking for gethostbyname_r... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22574,43 +21080,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname_r=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -$as_echo "$ac_cv_func_gethostbyname_r" >&6; } -if test "x$ac_cv_func_gethostbyname_r" = x""yes; then +{ 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 - { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5 -$as_echo_n "checking gethostbyname_r with 6 args... " >&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 @@ -22644,14 +21146,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22666,18 +21167,18 @@ #define HAVE_GETHOSTBYNAME_R_6_ARG 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5 -$as_echo_n "checking gethostbyname_r with 5 args... " >&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 @@ -22709,14 +21210,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22731,18 +21231,18 @@ #define HAVE_GETHOSTBYNAME_R_5_ARG 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5 -$as_echo_n "checking gethostbyname_r with 3 args... " >&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 @@ -22772,14 +21272,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -22794,16 +21293,16 @@ #define HAVE_GETHOSTBYNAME_R_3_ARG 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -22823,11 +21322,11 @@ for ac_func in gethostbyname do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22880,42 +21379,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -22934,10 +21426,10 @@ # (none yet) # Linux requires this for correct f.p. operations -{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5 -$as_echo_n "checking for __fpu_control... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22990,43 +21482,39 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func___fpu_control=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func___fpu_control=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5 -$as_echo "$ac_cv_func___fpu_control" >&6; } -if test "x$ac_cv_func___fpu_control" = x""yes; then +{ 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 -{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5 -$as_echo_n "checking for __fpu_control in -lieee... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" @@ -23058,37 +21546,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee___fpu_control=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ieee___fpu_control=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5 -$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } -if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then +{ 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 _ACEOF @@ -23102,8 +21586,8 @@ # Check for --with-fpectl -{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5 -$as_echo_n "checking for --with-fpectl... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5 +echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; } # Check whether --with-fpectl was given. if test "${with_fpectl+set}" = set; then @@ -23115,14 +21599,14 @@ #define WANT_SIGFPE_HANDLER 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -23132,53 +21616,53 @@ Darwin) ;; *) LIBM=-lm esac -{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5 -$as_echo_n "checking for --with-libm=STRING... " >&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 was given. if test "${with_libm+set}" = set; then withval=$with_libm; if test "$withval" = no then LIBM= - { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5 -$as_echo "set LIBM=\"$withval\"" >&6; } -else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5 -$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;} + { 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 - { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5 -$as_echo "default LIBM=\"$LIBM\"" >&6; } + { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5 +echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; } fi # check for --with-libc=... -{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5 -$as_echo_n "checking for --with-libc=STRING... " >&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 was given. if test "${with_libc+set}" = set; then withval=$with_libc; if test "$withval" = no then LIBC= - { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5 -$as_echo "set LIBC=\"$withval\"" >&6; } -else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5 -$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;} + { 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 - { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5 -$as_echo "default LIBC=\"$LIBC\"" >&6; } + { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5 +echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; } fi @@ -23186,10 +21670,10 @@ # * Check for various properties of floating point * # ************************************************** -{ $as_echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5 -$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; } +{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5 +echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; } if test "${ac_cv_little_endian_double+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -23218,40 +21702,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_little_endian_double=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_little_endian_double=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5 -$as_echo "$ac_cv_little_endian_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5 +echo "${ECHO_T}$ac_cv_little_endian_double" >&6; } if test "$ac_cv_little_endian_double" = yes then @@ -23261,10 +21742,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5 -$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; } +{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5 +echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; } if test "${ac_cv_big_endian_double+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -23293,40 +21774,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_big_endian_double=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_big_endian_double=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5 -$as_echo "$ac_cv_big_endian_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5 +echo "${ECHO_T}$ac_cv_big_endian_double" >&6; } if test "$ac_cv_big_endian_double" = yes then @@ -23340,10 +21818,10 @@ # While Python doesn't currently have full support for these platforms # (see e.g., issue 1762561), we can at least make sure that float <-> string # conversions work. -{ $as_echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5 -$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; } +{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5 +echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; } if test "${ac_cv_mixed_endian_double+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -23372,40 +21850,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_mixed_endian_double=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_mixed_endian_double=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5 -$as_echo "$ac_cv_mixed_endian_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5 +echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; } if test "$ac_cv_mixed_endian_double" = yes then @@ -23425,8 +21900,8 @@ then # Check that it's okay to use gcc inline assembler to get and set # x87 control word. It should be, but you never know... - { $as_echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 -$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } + { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 +echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23452,29 +21927,28 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 have_gcc_asm_for_x87=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_gcc_asm_for_x87=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5 -$as_echo "$have_gcc_asm_for_x87" >&6; } + { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5 +echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; } if test "$have_gcc_asm_for_x87" = yes then @@ -23490,8 +21964,8 @@ # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding # mode is round-to-nearest and double rounding issues are present, and # 0 otherwise. See http://bugs.python.org/issue2937 for more info. -{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5 -$as_echo_n "checking for x87-style double rounding... " >&6; } +{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5 +echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; } # $BASECFLAGS may affect the result ac_save_cc="$CC" CC="$CC $BASECFLAGS" @@ -23531,39 +22005,36 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_x87_double_rounding=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_x87_double_rounding=yes fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CC="$ac_save_cc" -{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5 -$as_echo "$ac_cv_x87_double_rounding" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5 +echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; } if test "$ac_cv_x87_double_rounding" = yes then @@ -23582,10 +22053,10 @@ # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of # -0. on some architectures. -{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5 -$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; } +{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5 +echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; } if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -23616,40 +22087,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_tanh_preserves_zero_sign=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_tanh_preserves_zero_sign=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5 -$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5 +echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; } if test "$ac_cv_tanh_preserves_zero_sign" = yes then @@ -23670,11 +22138,11 @@ for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23727,51 +22195,44 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5 -$as_echo_n "checking whether isinf is declared... " >&6; } +{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5 +echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_isinf+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23798,21 +22259,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_isinf=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isinf=no @@ -23820,9 +22280,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5 -$as_echo "$ac_cv_have_decl_isinf" >&6; } -if test "x$ac_cv_have_decl_isinf" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5 +echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; } +if test $ac_cv_have_decl_isinf = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISINF 1 @@ -23836,10 +22296,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5 -$as_echo_n "checking whether isnan is declared... " >&6; } +{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5 +echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_isnan+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23866,21 +22326,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_isnan=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isnan=no @@ -23888,9 +22347,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5 -$as_echo "$ac_cv_have_decl_isnan" >&6; } -if test "x$ac_cv_have_decl_isnan" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5 +echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; } +if test $ac_cv_have_decl_isnan = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISNAN 1 @@ -23904,10 +22363,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5 -$as_echo_n "checking whether isfinite is declared... " >&6; } +{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5 +echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_isfinite+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23934,21 +22393,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_isfinite=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isfinite=no @@ -23956,9 +22414,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5 -$as_echo "$ac_cv_have_decl_isfinite" >&6; } -if test "x$ac_cv_have_decl_isfinite" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5 +echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; } +if test $ac_cv_have_decl_isfinite = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISFINITE 1 @@ -23978,13 +22436,14 @@ LIBS=$LIBS_SAVE # Multiprocessing check for broken sem_getvalue -{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 -$as_echo_n "checking for broken sem_getvalue... " >&6; } -if test "${ac_cv_broken_sem_getvalue+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_broken_sem_getvalue=yes +{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 +echo $ECHO_N "checking for broken sem_getvalue... $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 +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. */ @@ -24013,6 +22472,7 @@ return res==-1 ? 1 : 0; } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -24020,53 +22480,45 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_broken_sem_getvalue=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_broken_sem_getvalue=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5 -$as_echo "$ac_cv_broken_sem_getvalue" >&6; } -if test $ac_cv_broken_sem_getvalue = yes -then +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_SEM_GETVALUE 1 _ACEOF + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + # determine what size digit to use for Python's longs -{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 -$as_echo_n "checking digit size for Python's longs... " >&6; } +{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 +echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; } # Check whether --enable-big-digits was given. if test "${enable_big_digits+set}" = set; then enableval=$enable_big_digits; case $enable_big_digits in @@ -24077,12 +22529,12 @@ 15|30) ;; *) - { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5 -$as_echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;} + { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5 +echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;} { (exit 1); exit 1; }; } ;; esac -{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5 -$as_echo "$enable_big_digits" >&6; } +{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5 +echo "${ECHO_T}$enable_big_digits" >&6; } cat >>confdefs.h <<_ACEOF #define PYLONG_BITS_IN_DIGIT $enable_big_digits @@ -24090,24 +22542,24 @@ else - { $as_echo "$as_me:$LINENO: result: no value specified" >&5 -$as_echo "no value specified" >&6; } + { echo "$as_me:$LINENO: result: no value specified" >&5 +echo "${ECHO_T}no value specified" >&6; } fi # check for wchar.h if test "${ac_cv_header_wchar_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5 -$as_echo_n "checking for wchar.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -$as_echo "$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? -{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5 -$as_echo_n "checking wchar.h usability... " >&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 @@ -24123,33 +22575,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5 -$as_echo_n "checking wchar.h presence... " >&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 @@ -24163,52 +22614,51 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$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 yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 +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 ## -------------------------------------- ## ## Report this to http://bugs.python.org/ ## @@ -24217,18 +22667,18 @@ ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5 -$as_echo_n "checking for wchar.h... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_wchar_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -$as_echo "$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 "x$ac_cv_header_wchar_h" = x""yes; then +if test $ac_cv_header_wchar_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -24247,14 +22697,69 @@ # determine wchar_t size if test "$wchar_h" = yes then - # The cast to long int works around a bug in the HP C Compiler + { 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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +typedef wchar_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_wchar_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_wchar_t=no +fi + +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; } + +# 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. -{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5 -$as_echo_n "checking size of wchar_t... " >&6; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -24266,10 +22771,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -24282,14 +22788,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -24304,10 +22809,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -24320,21 +22826,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -24348,7 +22853,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -24359,10 +22864,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -24375,14 +22881,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -24397,10 +22902,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -24413,21 +22919,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -24441,7 +22946,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -24462,10 +22967,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -24478,21 +22984,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -24503,13 +23008,11 @@ case $ac_lo in ?*) ac_cv_sizeof_wchar_t=$ac_lo;; '') if test "$ac_cv_type_wchar_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (wchar_t) +echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_wchar_t=0 fi ;; @@ -24523,8 +23026,9 @@ /* end confdefs.h. */ #include -static long int longval () { return (long int) (sizeof (wchar_t)); } -static unsigned long int ulongval () { return (long int) (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 @@ -24534,22 +23038,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (wchar_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (wchar_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%ld", i); + fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (wchar_t)))) + if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; - fprintf (f, "%lu", i); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -24562,48 +23064,43 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_wchar_t=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_wchar_t" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (wchar_t) +echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_wchar_t=0 fi fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5 -$as_echo "$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; } @@ -24614,8 +23111,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 -$as_echo_n "checking for UCS-4 tcl... " >&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. */ @@ -24642,14 +23139,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -24663,24 +23159,24 @@ have_ucs4_tcl=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5 -$as_echo "$have_ucs4_tcl" >&6; } +{ 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 - { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5 -$as_echo_n "checking whether wchar_t is signed... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -24707,44 +23203,41 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_wchar_t_signed=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_wchar_t_signed=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5 -$as_echo "$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 -{ $as_echo "$as_me:$LINENO: checking what type to use for str" >&5 -$as_echo_n "checking what type to use for str... " >&6; } +{ echo "$as_me:$LINENO: checking what type to use for str" >&5 +echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; } # Check whether --with-wide-unicode was given. if test "${with_wide_unicode+set}" = set; then @@ -24811,178 +23304,32 @@ else PY_UNICODE_TYPE="no type found" fi -{ $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 -$as_echo "$PY_UNICODE_TYPE" >&6; } +{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 +echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; } # check for endianness - - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&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 - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - - # Check for potential -arch flags. It is not universal unless - # there are some -arch flags. Note that *ppc* also matches - # ppc64. This check is also rather less than ideal. - case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( - *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; - esac -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 - # It does; now see whether it defined to BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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_c_bigendian=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat >conftest.$ac_ext <<_ACEOF + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include +#include int main () { -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif ; return 0; @@ -24994,33 +23341,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include +#include int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif ; return 0; @@ -25032,21 +23379,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no @@ -25054,44 +23400,29 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then - # Try to guess by grepping values from an object file. - cat >conftest.$ac_ext <<_ACEOF + # 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 + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - +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 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 () { -return use_ascii (foo) == use_ebcdic (foo); + _ascii (); _ebcdic (); ; return 0; } @@ -25102,31 +23433,30 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -25145,14 +23475,14 @@ main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; ; return 0; @@ -25164,70 +23494,63 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF -;; #( - no) - ;; #( - universal) + +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; } +case $ac_cv_c_bigendian in + yes) cat >>confdefs.h <<\_ACEOF -#define AC_APPLE_UNIVERSAL_BUILD 1 +#define WORDS_BIGENDIAN 1 _ACEOF - - ;; #( - *) - { { $as_echo "$as_me:$LINENO: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -$as_echo "$as_me: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; - esac +esac # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). -{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5 -$as_echo_n "checking whether right shift extends the sign bit... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -25252,40 +23575,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_rshift_extends_sign=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_rshift_extends_sign=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5 -$as_echo "$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 @@ -25296,10 +23616,10 @@ fi # check for getc_unlocked and related locking functions -{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5 -$as_echo_n "checking for getc_unlocked() and friends... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -25328,36 +23648,32 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_have_getc_unlocked=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_getc_unlocked=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5 -$as_echo "$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 @@ -25375,8 +23691,8 @@ # library. NOTE: Keep the precedence of listed libraries synchronised # with setup.py. py_cv_lib_readline=no -{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5 -$as_echo_n "checking how to link readline libs... " >&6; } +{ echo "$as_me:$LINENO: checking how to link readline libs" >&5 +echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; } for py_libtermcap in "" ncursesw ncurses curses termcap; do if test -z "$py_libtermcap"; then READLINE_LIBS="-lreadline" @@ -25412,30 +23728,26 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then py_cv_lib_readline=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test $py_cv_lib_readline = yes; then @@ -25445,11 +23757,11 @@ # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts #AC_SUBST([READLINE_LIBS]) if test $py_cv_lib_readline = no; then - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5 -$as_echo "$READLINE_LIBS" >&6; } + { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5 +echo "${ECHO_T}$READLINE_LIBS" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 @@ -25458,10 +23770,10 @@ fi # check for readline 2.1 -{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5 -$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -25493,37 +23805,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_callback_handler_install=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_callback_handler_install=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 -$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; } -if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then +{ 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 #define HAVE_RL_CALLBACK 1 @@ -25546,21 +23854,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_readline=no @@ -25591,10 +23898,10 @@ fi # check for readline 4.0 -{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5 -$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -25626,37 +23933,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_pre_input_hook=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_pre_input_hook=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5 -$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; } -if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then +{ 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 #define HAVE_RL_PRE_INPUT_HOOK 1 @@ -25666,10 +23969,10 @@ # also in 4.0 -{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5 -$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; } +{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5 +echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; } if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -25701,37 +24004,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_completion_display_matches_hook=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_completion_display_matches_hook=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5 -$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } -if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } +if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1 @@ -25741,10 +24040,10 @@ # check for readline 4.2 -{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5 -$as_echo_n "checking for rl_completion_matches in -lreadline... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_LIBS $LIBS" @@ -25776,37 +24075,33 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_completion_matches=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_rl_completion_matches=no fi -rm -rf conftest.dSYM 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5 -$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; } -if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then +{ 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 #define HAVE_RL_COMPLETION_MATCHES 1 @@ -25829,21 +24124,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 have_readline=no @@ -25876,10 +24170,10 @@ # End of readline checks: restore LIBS LIBS=$LIBS_no_readline -{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5 -$as_echo_n "checking for broken nice()... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -25907,40 +24201,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_nice=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_nice=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5 -$as_echo "$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 @@ -25950,12 +24241,9 @@ fi -{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5 -$as_echo_n "checking for broken poll()... " >&6; } -if test "${ac_cv_broken_poll+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then +{ 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 cat >conftest.$ac_ext <<_ACEOF @@ -25967,21 +24255,27 @@ #include -int main() -{ +int main (void) + { struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; - int poll_test; close (42); - poll_test = poll(&poll_struct, 1, 0); + int poll_test = poll (&poll_struct, 1, 0); + if (poll_test < 0) - return 0; + { + exit(0); + } else if (poll_test == 0 && poll_struct.revents != POLLNVAL) - return 0; + { + exit(0); + } else - return 1; -} + { + exit(1); + } + } _ACEOF rm -f conftest$ac_exeext @@ -25990,40 +24284,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_poll=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_poll=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5 -$as_echo "$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 @@ -26036,10 +24325,10 @@ # 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[] -{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -$as_echo_n "checking for struct tm.tm_zone... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26067,21 +24356,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_tm_tm_zone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -26110,21 +24398,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_member_struct_tm_tm_zone=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no @@ -26135,9 +24422,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then +{ 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 #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -26153,10 +24440,10 @@ _ACEOF else - { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -$as_echo_n "checking whether tzname is declared... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26183,21 +24470,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no @@ -26205,9 +24491,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -$as_echo "$ac_cv_have_decl_tzname" >&6; } -if test "x$ac_cv_have_decl_tzname" = x""yes; then +{ 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 @@ -26223,10 +24509,10 @@ fi - { $as_echo "$as_me:$LINENO: checking for tzname" >&5 -$as_echo_n "checking for tzname... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26253,35 +24539,31 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -$as_echo "$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 @@ -26293,10 +24575,10 @@ # check tzset(3) exists and works like we expect it to -{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5 -$as_echo_n "checking for working tzset()... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -26379,40 +24661,37 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_tzset=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_working_tzset=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5 -$as_echo "$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 @@ -26423,10 +24702,10 @@ fi # Look for subsecond timestamps in struct stat -{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5 -$as_echo_n "checking for tv_nsec in struct stat... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26452,21 +24731,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_stat_tv_nsec=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_stat_tv_nsec=no @@ -26475,8 +24753,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5 -$as_echo "$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 @@ -26487,10 +24765,10 @@ fi # Look for BSD style subsecond timestamps in struct stat -{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5 -$as_echo_n "checking for tv_nsec2 in struct stat... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26516,21 +24794,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_stat_tv_nsec2=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_stat_tv_nsec2=no @@ -26539,8 +24816,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5 -$as_echo "$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 @@ -26551,10 +24828,10 @@ fi # On HP/UX 11.0, mvwdelch is a block with a return statement -{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5 -$as_echo_n "checking whether mvwdelch is an expression... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26580,21 +24857,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_mvwdelch_is_expression=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_mvwdelch_is_expression=no @@ -26603,8 +24879,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5 -$as_echo "$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 @@ -26615,10 +24891,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5 -$as_echo_n "checking whether WINDOW has _flags... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26644,21 +24920,20 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_window_has_flags=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_window_has_flags=no @@ -26667,8 +24942,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5 -$as_echo "$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 @@ -26680,8 +24955,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5 -$as_echo_n "checking for is_term_resized... " >&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 @@ -26703,14 +24978,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -26720,21 +24994,21 @@ #define HAVE_CURSES_IS_TERM_RESIZED 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5 -$as_echo_n "checking for resize_term... " >&6; } +{ 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 @@ -26756,14 +25030,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -26773,21 +25046,21 @@ #define HAVE_CURSES_RESIZE_TERM 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5 -$as_echo_n "checking for resizeterm... " >&6; } +{ 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 @@ -26809,14 +25082,13 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -26826,60 +25098,61 @@ #define HAVE_CURSES_RESIZETERM 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5 -$as_echo_n "checking for /dev/ptmx... " >&6; } +{ 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 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5 -$as_echo_n "checking for /dev/ptc... " >&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 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 -$as_echo_n "checking for %zd printf() format support... " >&6; } -if test "${ac_cv_have_size_t_format+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_have_size_t_format=no +{ 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 +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. */ @@ -26887,7 +25160,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include #include #include @@ -26922,7 +25194,6 @@ return 0; } - _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -26930,98 +25201,46 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_size_t_format=yes + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define PY_FORMAT_SIZE_T "z" +_ACEOF + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_have_size_t_format=no +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5 -$as_echo "$ac_cv_have_size_t_format" >&6; } -if test $ac_cv_have_size_t_format = yes -then - -cat >>confdefs.h <<\_ACEOF -#define PY_FORMAT_SIZE_T "z" -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 -$as_echo_n "checking for socklen_t... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_socklen_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - - -int -main () -{ -if (sizeof (socklen_t)) - return 0; - ; - 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$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 - $as_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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27037,11 +25256,14 @@ #endif +typedef socklen_t ac__type_new_; int main () { -if (sizeof ((socklen_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -27052,39 +25274,30 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +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 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_socklen_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_socklen_t=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_socklen_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -$as_echo "$ac_cv_type_socklen_t" >&6; } -if test "x$ac_cv_type_socklen_t" = x""yes; then +{ 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 @@ -27095,12 +25308,9 @@ fi -{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 -$as_echo_n "checking for broken mbstowcs... " >&6; } -if test "${ac_cv_broken_mbstowcs+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then +{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 +echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; } +if test "$cross_compiling" = yes; then ac_cv_broken_mbstowcs=no else cat >conftest.$ac_ext <<_ACEOF @@ -27125,40 +25335,35 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_broken_mbstowcs=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_broken_mbstowcs=yes fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5 -$as_echo "$ac_cv_broken_mbstowcs" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5 +echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; } if test "$ac_cv_broken_mbstowcs" = yes then @@ -27169,8 +25374,8 @@ fi # Check for --with-computed-gotos -{ $as_echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5 -$as_echo_n "checking for --with-computed-gotos... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5 +echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; } # Check whether --with-computed-gotos was given. if test "${with_computed_gotos+set}" = set; then @@ -27182,14 +25387,14 @@ #define USE_COMPUTED_GOTOS 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -27203,15 +25408,15 @@ SRCDIRS="Parser Grammar Objects Python Modules Mac" -{ $as_echo "$as_me:$LINENO: checking for build directories" >&5 -$as_echo_n "checking for build directories... " >&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 -{ $as_echo "$as_me:$LINENO: result: done" >&5 -$as_echo "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 Misc/python.pc" @@ -27243,12 +25448,11 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_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) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -27281,12 +25485,12 @@ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { 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 @@ -27302,7 +25506,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + 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" @@ -27314,14 +25518,12 @@ - : ${CONFIG_STATUS=./config.status} -ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -27334,7 +25536,7 @@ SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -27344,7 +25546,7 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # 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 @@ -27366,45 +25568,17 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + 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 # Support unset when possible. @@ -27420,6 +25594,8 @@ # 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. @@ -27442,7 +25618,7 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -27455,10 +25631,17 @@ PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + 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) >/dev/null 2>&1 && $as_unset $as_var + fi +done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -27480,7 +25663,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -27531,7 +25714,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { 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 @@ -27559,6 +25742,7 @@ *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -27571,22 +25755,19 @@ rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + mkdir conf$$.dir fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - 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' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + 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' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -27611,10 +25792,10 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -27637,7 +25818,7 @@ # values after options handling. ac_log=" This file was extended by python $as_me 3.2, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -27650,39 +25831,29 @@ _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -27693,24 +25864,24 @@ Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ python config.status 3.2 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2008 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." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' -test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do @@ -27732,36 +25903,30 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 + { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + 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. - -*) { $as_echo "$as_me: error: unrecognized option: $1 + -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -27780,32 +25945,30 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' + 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 "\$@" + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets @@ -27820,8 +25983,8 @@ "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;; "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { 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 @@ -27861,144 +26024,224 @@ (umask 077 && mkdir "$tmp") } || { - $as_echo "$as_me: cannot create a temporary directory in ." >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - +# +# Set up the sed scripts for CONFIG_FILES section. +# -ac_cr=`echo X | tr X '\015'` -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi +# 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 -echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + 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 +ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim +PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim +PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$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 +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 +GNULD!$GNULD$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +ARFLAGS!$ARFLAGS$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 +UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$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 +_ACEOF - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { { 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 -rm -f conf$$subs.sh -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" +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 -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } +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 - print line -} -_ACAWK +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHLIBS!$SHLIBS$ac_delim +USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim +SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim +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 +THREADHEADERS!$THREADHEADERS$ac_delim +SRCDIRS!$SRCDIRS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; 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 @@ -28014,133 +26257,19 @@ }' fi -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # 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. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -shift -for ac_tag +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*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + :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;; @@ -28169,38 +26298,26 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { { 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 - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + ac_file_inputs="$ac_file_inputs $ac_f" done # 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 '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' + 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" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac @@ -28210,7 +26327,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -28236,7 +26353,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -28245,7 +26362,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -28266,17 +26383,17 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || 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=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + 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/ ;; @@ -28316,13 +26433,12 @@ esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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= -ac_sed_dataroot=' -/datarootdir/ { +case `sed -n '/datarootdir/ { p q } @@ -28331,14 +26447,13 @@ /@infodir@/p /@localedir@/p /@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { 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_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -28352,16 +26467,15 @@ # 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 || ac_write_fail=1 -ac_sed_extra="$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t +s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -28371,58 +26485,119 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +" $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"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { 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 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +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;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + -) 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=' ,' + +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 + +# 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. +# (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"' + +while : +do + # 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"' "$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 conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + 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 - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + rm -f $ac_file + mv "$tmp/config.h" $ac_file fi else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + echo "/* $configure_input */" + cat "$ac_result" fi + rm -f "$tmp/out12" ;; @@ -28436,11 +26611,6 @@ chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -28462,10 +26632,6 @@ # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi echo "creating Modules/Setup" Modified: python/branches/py3k/pyconfig.h.in ============================================================================== --- python/branches/py3k/pyconfig.h.in (original) +++ python/branches/py3k/pyconfig.h.in Sat Jul 18 01:11:52 2009 @@ -5,9 +5,6 @@ #define Py_PYCONFIG_H -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - /* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want support for AIX C++ shared extension modules. */ #undef AIX_GENUINE_CPLUSPLUS @@ -949,13 +946,13 @@ /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The size of `off_t', as computed by sizeof. */ +/* The number of bytes in an off_t. */ #undef SIZEOF_OFF_T /* The size of `pid_t', as computed by sizeof. */ #undef SIZEOF_PID_T -/* The size of `pthread_t', as computed by sizeof. */ +/* The number of bytes in a pthread_t. */ #undef SIZEOF_PTHREAD_T /* The size of `short', as computed by sizeof. */ @@ -964,7 +961,7 @@ /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* The size of `time_t', as computed by sizeof. */ +/* The number of bytes in a time_t. */ #undef SIZEOF_TIME_T /* The size of `uintptr_t', as computed by sizeof. */ @@ -998,28 +995,6 @@ /* Define if you want to use computed gotos in ceval.c. */ #undef USE_COMPUTED_GOTOS -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - /* Define if a va_list is an array of some kind */ #undef VA_LIST_IS_ARRAY @@ -1057,21 +1032,20 @@ /* Define to profile with the Pentium timestamp counter */ #undef WITH_TSC -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN /* Define if arithmetic is subject to x87-style double rounding issue */ #undef X87_DOUBLE_ROUNDING +/* Define to 1 if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif + /* Define on OpenBSD to activate all library features */ #undef _BSD_SOURCE @@ -1090,25 +1064,15 @@ /* This must be defined on some systems to enable large file support. */ #undef _LARGEFILE_SOURCE -/* Define to 1 if on MINIX. */ -#undef _MINIX - /* Define on NetBSD to activate all library features */ #undef _NETBSD_SOURCE /* Define _OSF_SOURCE to get the makedev macro. */ #undef _OSF_SOURCE -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - /* Define to activate features from IEEE Stds 1003.1-2001 */ #undef _POSIX_C_SOURCE -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - /* Define if you have POSIX threads, and your system does not define that. */ #undef _POSIX_THREADS @@ -1116,12 +1080,12 @@ #undef _REENTRANT /* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the + , or is not used. If the typedef was allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef were allowed, the + , or is not used. If the typedef was allowed, the #define below would cause a syntax error. */ #undef _UINT64_T From python-checkins at python.org Sat Jul 18 01:17:49 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 23:17:49 -0000 Subject: [Python-checkins] r74069 - in python/trunk: configure pyconfig.h.in Message-ID: Author: alexandre.vassalotti Date: Sat Jul 18 01:17:48 2009 New Revision: 74069 Log: Regenerate configure script using autoconf 2.61. Modified: python/trunk/configure python/trunk/pyconfig.h.in Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Sat Jul 18 01:17:48 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 72898 . +# From configure.in Revision: 74044 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -4623,7 +4623,10 @@ 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 + if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then ac_cv_no_strict_aliasing_ok=no else cat >conftest.$ac_ext <<_ACEOF @@ -4667,6 +4670,8 @@ fi +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; } @@ -13004,186 +13009,1283 @@ fi - -# 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; } -if test "${ac_cv_sizeof_off_t+set}" = set; then +{ 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 - if test "$cross_compiling" = yes; then - ac_cv_sizeof_off_t=4 -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#ifdef HAVE_SYS_TYPES_H #include -main() +#endif + + +typedef off_t ac__type_new_; +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(off_t)); - exit(0); +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_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 + (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 - ac_cv_sizeof_off_t=`cat conftestval` + (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: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_sizeof_off_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - + ac_cv_type_off_t=no fi -{ 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; } -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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LARGEFILE_SUPPORT 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; } +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; } -# 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; } -if test "${ac_cv_sizeof_time_t+set}" = set; then +# 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 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 if test "$cross_compiling" = yes; then - ac_cv_sizeof_time_t=4 -else - cat >conftest.$ac_ext <<_ACEOF + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -main() + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_t ac__type_sizeof_; +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(time_t)); - exit(0); +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&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='./conftest$ac_exeext' - { (case "(($ac_try" in + (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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_try") 2>&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 - ac_cv_sizeof_time_t=`cat conftestval` + (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: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_sizeof_time_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + 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 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +#include +#endif -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; } + typedef off_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_TIME_T $ac_cv_sizeof_time_t + ; + 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + ; + 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_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` +fi + +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= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +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` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_off_t=$ac_lo;; +'') if test "$ac_cv_type_off_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_off_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_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 +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f 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>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof_off_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_off_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_off_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 +fi +{ 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; } +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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LARGEFILE_SUPPORT 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; } +fi + +{ echo "$as_me:$LINENO: checking for time_t" >&5 +echo $ECHO_N "checking for time_t... $ECHO_C" >&6; } +if test "${ac_cv_type_time_t+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. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + +typedef time_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_time_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_time_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 +echo "${ECHO_T}$ac_cv_type_time_t" >&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 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 + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_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` +fi + +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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + 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_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` +fi + +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= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +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` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_time_t=$ac_lo;; +'') if test "$ac_cv_type_time_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_time_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_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 +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f 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>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof_time_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_time_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_time_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 +fi +{ 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 +_ACEOF + + + +# if have pthread_t then define SIZEOF_PTHREAD_T +ac_save_cc="$CC" +if test "$ac_cv_kpthread" = "yes" +then CC="$CC -Kpthread" +elif test "$ac_cv_kthread" = "yes" +then CC="$CC -Kthread" +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; } +have_pthread_t=no +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 () +{ +pthread_t x; x = *(pthread_t*)0; + ; + 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 + have_pthread_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +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 + { echo "$as_me:$LINENO: checking for pthread_t" >&5 +echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pthread_t+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. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +typedef pthread_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_pthread_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_pthread_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5 +echo "${ECHO_T}$ac_cv_type_pthread_t" >&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 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 + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + + typedef pthread_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + + typedef pthread_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_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` +fi + +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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + + typedef pthread_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + + typedef pthread_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + 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_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` +fi + +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= +fi -# if have pthread_t then define SIZEOF_PTHREAD_T -ac_save_cc="$CC" -if test "$ac_cv_kpthread" = "yes" -then CC="$CC -Kpthread" -elif test "$ac_cv_kthread" = "yes" -then CC="$CC -Kthread" -elif test "$ac_cv_pthread" = "yes" -then CC="$CC -pthread" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ 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 + +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` + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H #include +#endif + + + typedef pthread_t ac__type_sizeof_; int main () { -pthread_t x; x = *(pthread_t*)0; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -13205,26 +14307,28 @@ test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - have_pthread_t=yes + ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_lo=`expr '(' $ac_mid ')' + 1` fi 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; } - if test "${ac_cv_sizeof_pthread_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_pthread_t=4 +done +case $ac_lo in +?*) ac_cv_sizeof_pthread_t=$ac_lo;; +'') if test "$ac_cv_type_pthread_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_pthread_t=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -13232,15 +14336,43 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#ifdef HAVE_PTHREAD_H #include - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(pthread_t)); - exit(0); - } +#endif + + + typedef pthread_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 +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -13262,29 +14394,37 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pthread_t=`cat conftestval` + ac_cv_sizeof_pthread_t=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_sizeof_pthread_t=0 +if test "$ac_cv_type_pthread_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_pthread_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 fi - - { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 +{ 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 _ACEOF + fi CC="$ac_save_cc" @@ -17518,12 +18658,11 @@ # exit Python { echo "$as_me:$LINENO: checking for chflags" >&5 echo $ECHO_N "checking for chflags... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +if test "${ac_cv_have_chflags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_chflags=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17562,36 +18701,40 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHFLAGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ac_cv_have_chflags=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - +ac_cv_have_chflags=no fi 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_have_chflags" >&5 +echo "${ECHO_T}$ac_cv_have_chflags" >&6; } +if test $ac_cv_have_chflags = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHFLAGS 1 +_ACEOF + +fi + { echo "$as_me:$LINENO: checking for lchflags" >&5 echo $ECHO_N "checking for lchflags... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +if test "${ac_cv_have_lchflags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_lchflags=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17630,28 +18773,33 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LCHFLAGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ac_cv_have_lchflags=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - +ac_cv_have_lchflags=no fi 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_have_lchflags" >&5 +echo "${ECHO_T}$ac_cv_have_lchflags" >&6; } +if test $ac_cv_have_lchflags = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LCHFLAGS 1 +_ACEOF + +fi + case $ac_sys_system/$ac_sys_release in Darwin/*) _CUR_CFLAGS="${CFLAGS}" @@ -19251,9 +20399,7 @@ int main () { - getaddrinfo(NULL, NULL, NULL, NULL); - ; return 0; } @@ -19276,15 +20422,27 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then + have_getaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 + have_getaddrinfo=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 +echo "${ECHO_T}$have_getaddrinfo" >&6; } +if test $have_getaddrinfo = yes +then + { 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; } -buggygetaddrinfo=yes + if test "${ac_cv_buggy_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_buggy_getaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19299,7 +20457,7 @@ #include #include -main() +int main() { int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; @@ -19371,12 +20529,12 @@ if (aitop) freeaddrinfo(aitop); - exit(0); + return 0; bad: if (aitop) freeaddrinfo(aitop); - exit(1); + return 1; } _ACEOF @@ -19400,39 +20558,27 @@ 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; } -buggygetaddrinfo=no + ac_cv_buggy_getaddrinfo=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: buggy" >&5 -echo "${ECHO_T}buggy" >&6; } -buggygetaddrinfo=yes +ac_cv_buggy_getaddrinfo=yes fi 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; } -buggygetaddrinfo=yes - fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +fi -if test "$buggygetaddrinfo" = "yes"; then - if test "$ipv6" = "yes"; then +if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes +then + if test $ipv6 = yes + then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 @@ -22074,12 +23220,11 @@ # Multiprocessing check for broken sem_getvalue { echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 echo $ECHO_N "checking for broken sem_getvalue... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +if test "${ac_cv_broken_sem_getvalue+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_broken_sem_getvalue=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22108,7 +23253,6 @@ return res==-1 ? 1 : 0; } - _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -22130,27 +23274,32 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + ac_cv_broken_sem_getvalue=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +ac_cv_broken_sem_getvalue=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_BROKEN_SEM_GETVALUE 1 -_ACEOF fi -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_sem_getvalue" >&5 +echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; } +if test $ac_cv_broken_sem_getvalue = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BROKEN_SEM_GETVALUE 1 +_ACEOF +fi # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of # -0. on some architectures. @@ -24282,7 +25431,10 @@ { 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 +if test "${ac_cv_broken_poll+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then ac_cv_broken_poll=no else cat >conftest.$ac_ext <<_ACEOF @@ -24294,27 +25446,21 @@ #include -int main (void) - { +int main() +{ struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; + int poll_test; close (42); - int poll_test = poll (&poll_struct, 1, 0); - + poll_test = poll(&poll_struct, 1, 0); if (poll_test < 0) - { - exit(0); - } + return 0; else if (poll_test == 0 && poll_struct.revents != POLLNVAL) - { - exit(0); - } + return 0; else - { - exit(1); - } - } + return 1; +} _ACEOF rm -f conftest$ac_exeext @@ -24350,6 +25496,8 @@ fi +fi + { 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 @@ -25186,12 +26334,11 @@ { 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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +if test "${ac_cv_have_size_t_format+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_size_t_format=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25199,6 +26346,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include #include @@ -25233,6 +26381,7 @@ return 0; } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -25254,27 +26403,33 @@ 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; } - -cat >>confdefs.h <<\_ACEOF -#define PY_FORMAT_SIZE_T "z" -_ACEOF - + ac_cv_have_size_t_format=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +ac_cv_have_size_t_format=no fi 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_have_size_t_format" >&5 +echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; } +if test $ac_cv_have_size_t_format = yes +then + +cat >>confdefs.h <<\_ACEOF +#define PY_FORMAT_SIZE_T "z" +_ACEOF + +fi + { 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 Modified: python/trunk/pyconfig.h.in ============================================================================== --- python/trunk/pyconfig.h.in (original) +++ python/trunk/pyconfig.h.in Sat Jul 18 01:17:48 2009 @@ -5,9 +5,6 @@ #define Py_PYCONFIG_H -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - /* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want support for AIX C++ shared extension modules. */ #undef AIX_GENUINE_CPLUSPLUS @@ -923,13 +920,13 @@ /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The number of bytes in an off_t. */ +/* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* The size of `pid_t', as computed by sizeof. */ #undef SIZEOF_PID_T -/* The number of bytes in a pthread_t. */ +/* The size of `pthread_t', as computed by sizeof. */ #undef SIZEOF_PTHREAD_T /* The size of `short', as computed by sizeof. */ @@ -938,7 +935,7 @@ /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* The number of bytes in a time_t. */ +/* The size of `time_t', as computed by sizeof. */ #undef SIZEOF_TIME_T /* The size of `uintptr_t', as computed by sizeof. */ @@ -969,28 +966,6 @@ /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - /* Define if you want to use MacPython modules on MacOSX in unix-Python. */ #undef USE_TOOLBOX_OBJECT_GLUE @@ -1031,21 +1006,20 @@ /* Define to profile with the Pentium timestamp counter */ #undef WITH_TSC -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN /* Define if arithmetic is subject to x87-style double rounding issue */ #undef X87_DOUBLE_ROUNDING +/* Define to 1 if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif + /* Define on OpenBSD to activate all library features */ #undef _BSD_SOURCE @@ -1064,25 +1038,15 @@ /* This must be defined on some systems to enable large file support. */ #undef _LARGEFILE_SOURCE -/* Define to 1 if on MINIX. */ -#undef _MINIX - /* Define on NetBSD to activate all library features */ #undef _NETBSD_SOURCE /* Define _OSF_SOURCE to get the makedev macro. */ #undef _OSF_SOURCE -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - /* Define to activate features from IEEE Stds 1003.1-2001 */ #undef _POSIX_C_SOURCE -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - /* Define if you have POSIX threads, and your system does not define that. */ #undef _POSIX_THREADS @@ -1090,12 +1054,12 @@ #undef _REENTRANT /* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the + , or is not used. If the typedef was allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef were allowed, the + , or is not used. If the typedef was allowed, the #define below would cause a syntax error. */ #undef _UINT64_T From python-checkins at python.org Sat Jul 18 01:19:37 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 23:19:37 -0000 Subject: [Python-checkins] r74070 - in python/branches/py3k: configure pyconfig.h.in Message-ID: Author: alexandre.vassalotti Date: Sat Jul 18 01:19:37 2009 New Revision: 74070 Log: Regenerate configure script using autoconf 2.61. Modified: python/branches/py3k/configure python/branches/py3k/pyconfig.h.in Modified: python/branches/py3k/configure ============================================================================== --- python/branches/py3k/configure (original) +++ python/branches/py3k/configure Sat Jul 18 01:19:37 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 73307 . +# From configure.in Revision: 74045 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.2. # @@ -4570,7 +4570,10 @@ 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 + if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then ac_cv_no_strict_aliasing_ok=no else cat >conftest.$ac_ext <<_ACEOF @@ -4614,6 +4617,8 @@ fi +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; } @@ -12952,186 +12957,1284 @@ fi - -# 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; } -if test "${ac_cv_sizeof_off_t+set}" = set; then +{ 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 - if test "$cross_compiling" = yes; then - ac_cv_sizeof_off_t=4 -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#ifdef HAVE_SYS_TYPES_H #include -main() +#endif + + +typedef off_t ac__type_new_; +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(off_t)); - exit(0); +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_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 + (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 - ac_cv_sizeof_off_t=`cat conftestval` + (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: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_sizeof_off_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - + ac_cv_type_off_t=no fi -{ 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; } -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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LARGEFILE_SUPPORT 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; } +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; } -# 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; } -if test "${ac_cv_sizeof_time_t+set}" = set; then +# 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 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 if test "$cross_compiling" = yes; then - ac_cv_sizeof_time_t=4 -else - cat >conftest.$ac_ext <<_ACEOF + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -main() + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_t ac__type_sizeof_; +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(time_t)); - exit(0); +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&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='./conftest$ac_exeext' - { (case "(($ac_try" in + (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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_try") 2>&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 - ac_cv_sizeof_time_t=`cat conftestval` + (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: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_sizeof_time_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + 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 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +#include +#endif -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; } + typedef off_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_TIME_T $ac_cv_sizeof_time_t + ; + 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + typedef off_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 -# if have pthread_t then define SIZEOF_PTHREAD_T -ac_save_cc="$CC" -if test "$ac_cv_kpthread" = "yes" -then CC="$CC -Kpthread" -elif test "$ac_cv_kthread" = "yes" -then CC="$CC -Kthread" -elif test "$ac_cv_pthread" = "yes" -then CC="$CC -pthread" + ; + 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_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` +fi + +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= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +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` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_off_t=$ac_lo;; +'') if test "$ac_cv_type_off_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_off_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + + + typedef off_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 +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f 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>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof_off_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_off_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_off_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 +fi +{ 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; } +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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LARGEFILE_SUPPORT 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; } +fi + +{ echo "$as_me:$LINENO: checking for time_t" >&5 +echo $ECHO_N "checking for time_t... $ECHO_C" >&6; } +if test "${ac_cv_type_time_t+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. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + +typedef time_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_time_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_time_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 +echo "${ECHO_T}$ac_cv_type_time_t" >&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 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 + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_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` +fi + +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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + 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_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` +fi + +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= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +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` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_time_t=$ac_lo;; +'') if test "$ac_cv_type_time_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_time_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + + + typedef time_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 +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f 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>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_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 + ac_cv_sizeof_time_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_time_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_time_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 +fi +{ 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 +_ACEOF + + + +# if have pthread_t then define SIZEOF_PTHREAD_T +ac_save_cc="$CC" +if test "$ac_cv_kpthread" = "yes" +then CC="$CC -Kpthread" +elif test "$ac_cv_kthread" = "yes" +then CC="$CC -Kthread" +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; } +have_pthread_t=no +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 () +{ +pthread_t x; x = *(pthread_t*)0; + ; + 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 + have_pthread_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +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 + { echo "$as_me:$LINENO: checking for pthread_t" >&5 +echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pthread_t+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. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + +typedef pthread_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + 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_type_pthread_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_pthread_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5 +echo "${ECHO_T}$ac_cv_type_pthread_t" >&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 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 + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + + typedef pthread_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + 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_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + + typedef pthread_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + 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_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` +fi + +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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + + typedef pthread_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + 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_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H +#include +#endif + + + typedef pthread_t ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + 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_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` +fi + +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= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ 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 + +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` + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +#ifdef HAVE_PTHREAD_H #include +#endif + + + typedef pthread_t ac__type_sizeof_; int main () { -pthread_t x; x = *(pthread_t*)0; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -13153,26 +14256,28 @@ test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - have_pthread_t=yes + ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_lo=`expr '(' $ac_mid ')' + 1` fi 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; } - if test "${ac_cv_sizeof_pthread_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_pthread_t=4 +done +case $ac_lo in +?*) ac_cv_sizeof_pthread_t=$ac_lo;; +'') if test "$ac_cv_type_pthread_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_pthread_t=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -13180,15 +14285,43 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#ifdef HAVE_PTHREAD_H #include - main() - { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(pthread_t)); - exit(0); - } +#endif + + + typedef pthread_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 +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -13210,35 +14343,41 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_pthread_t=`cat conftestval` + ac_cv_sizeof_pthread_t=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_sizeof_pthread_t=0 +if test "$ac_cv_type_pthread_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (pthread_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_pthread_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 fi - - { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 +{ 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 _ACEOF + fi CC="$ac_save_cc" - - case $ac_sys_system/$ac_sys_release in Darwin/[01567]\..*) OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000" @@ -17208,12 +18347,11 @@ # exit Python { echo "$as_me:$LINENO: checking for chflags" >&5 echo $ECHO_N "checking for chflags... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +if test "${ac_cv_have_chflags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_chflags=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17252,36 +18390,40 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHFLAGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ac_cv_have_chflags=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - +ac_cv_have_chflags=no fi 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_have_chflags" >&5 +echo "${ECHO_T}$ac_cv_have_chflags" >&6; } +if test $ac_cv_have_chflags = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHFLAGS 1 +_ACEOF + +fi + { echo "$as_me:$LINENO: checking for lchflags" >&5 echo $ECHO_N "checking for lchflags... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +if test "${ac_cv_have_lchflags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_lchflags=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17320,28 +18462,33 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LCHFLAGS 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + ac_cv_have_lchflags=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - +ac_cv_have_lchflags=no fi 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_have_lchflags" >&5 +echo "${ECHO_T}$ac_cv_have_lchflags" >&6; } +if test $ac_cv_have_lchflags = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LCHFLAGS 1 +_ACEOF + +fi + case $ac_sys_system/$ac_sys_release in Darwin/*) _CUR_CFLAGS="${CFLAGS}" @@ -18941,9 +20088,7 @@ int main () { - getaddrinfo(NULL, NULL, NULL, NULL); - ; return 0; } @@ -18966,15 +20111,27 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then + have_getaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 + have_getaddrinfo=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 +echo "${ECHO_T}$have_getaddrinfo" >&6; } +if test $have_getaddrinfo = yes +then + { 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; } -buggygetaddrinfo=yes + if test "${ac_cv_buggy_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_buggy_getaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18989,7 +20146,7 @@ #include #include -main() +int main() { int passive, gaierr, inet4 = 0, inet6 = 0; struct addrinfo hints, *ai, *aitop; @@ -19061,12 +20218,12 @@ if (aitop) freeaddrinfo(aitop); - exit(0); + return 0; bad: if (aitop) freeaddrinfo(aitop); - exit(1); + return 1; } _ACEOF @@ -19090,39 +20247,27 @@ 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; } -buggygetaddrinfo=no + ac_cv_buggy_getaddrinfo=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: buggy" >&5 -echo "${ECHO_T}buggy" >&6; } -buggygetaddrinfo=yes +ac_cv_buggy_getaddrinfo=yes fi 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; } -buggygetaddrinfo=yes - fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +fi -if test "$buggygetaddrinfo" = "yes"; then - if test "$ipv6" = "yes"; then +if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes +then + if test $ipv6 = yes + then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 @@ -22438,12 +23583,11 @@ # Multiprocessing check for broken sem_getvalue { echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 echo $ECHO_N "checking for broken sem_getvalue... $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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +if test "${ac_cv_broken_sem_getvalue+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_broken_sem_getvalue=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22472,7 +23616,6 @@ return res==-1 ? 1 : 0; } - _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -22494,27 +23637,32 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + ac_cv_broken_sem_getvalue=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +ac_cv_broken_sem_getvalue=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_BROKEN_SEM_GETVALUE 1 -_ACEOF fi -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_sem_getvalue" >&5 +echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; } +if test $ac_cv_broken_sem_getvalue = yes +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BROKEN_SEM_GETVALUE 1 +_ACEOF +fi # determine what size digit to use for Python's longs { echo "$as_me:$LINENO: checking digit size for Python's longs" >&5 @@ -24243,7 +25391,10 @@ { 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 +if test "${ac_cv_broken_poll+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then ac_cv_broken_poll=no else cat >conftest.$ac_ext <<_ACEOF @@ -24255,27 +25406,21 @@ #include -int main (void) - { +int main() +{ struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; + int poll_test; close (42); - int poll_test = poll (&poll_struct, 1, 0); - + poll_test = poll(&poll_struct, 1, 0); if (poll_test < 0) - { - exit(0); - } + return 0; else if (poll_test == 0 && poll_struct.revents != POLLNVAL) - { - exit(0); - } + return 0; else - { - exit(1); - } - } + return 1; +} _ACEOF rm -f conftest$ac_exeext @@ -24311,6 +25456,8 @@ fi +fi + { 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 @@ -25147,12 +26294,11 @@ { 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 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +if test "${ac_cv_have_size_t_format+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_have_size_t_format=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25160,6 +26306,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include #include @@ -25194,6 +26341,7 @@ return 0; } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -25215,27 +26363,33 @@ 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; } - -cat >>confdefs.h <<\_ACEOF -#define PY_FORMAT_SIZE_T "z" -_ACEOF - + ac_cv_have_size_t_format=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +ac_cv_have_size_t_format=no fi 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_have_size_t_format" >&5 +echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; } +if test $ac_cv_have_size_t_format = yes +then + +cat >>confdefs.h <<\_ACEOF +#define PY_FORMAT_SIZE_T "z" +_ACEOF + +fi + { 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 @@ -25310,7 +26464,10 @@ { echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then +if test "${ac_cv_broken_mbstowcs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then ac_cv_broken_mbstowcs=no else cat >conftest.$ac_ext <<_ACEOF @@ -25362,6 +26519,8 @@ fi +fi + { echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5 echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; } if test "$ac_cv_broken_mbstowcs" = yes Modified: python/branches/py3k/pyconfig.h.in ============================================================================== --- python/branches/py3k/pyconfig.h.in (original) +++ python/branches/py3k/pyconfig.h.in Sat Jul 18 01:19:37 2009 @@ -946,13 +946,13 @@ /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The number of bytes in an off_t. */ +/* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* The size of `pid_t', as computed by sizeof. */ #undef SIZEOF_PID_T -/* The number of bytes in a pthread_t. */ +/* The size of `pthread_t', as computed by sizeof. */ #undef SIZEOF_PTHREAD_T /* The size of `short', as computed by sizeof. */ @@ -961,7 +961,7 @@ /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* The number of bytes in a time_t. */ +/* The size of `time_t', as computed by sizeof. */ #undef SIZEOF_TIME_T /* The size of `uintptr_t', as computed by sizeof. */ From python-checkins at python.org Sat Jul 18 01:27:40 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 17 Jul 2009 23:27:40 -0000 Subject: [Python-checkins] r74071 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Sat Jul 18 01:27:40 2009 New Revision: 74071 Log: Blocked revisions 74067,74069 via svnmerge ........ r74067 | alexandre.vassalotti | 2009-07-17 19:09:02 -0400 (Fri, 17 Jul 2009) | 2 lines Revert r74048. ........ r74069 | alexandre.vassalotti | 2009-07-17 19:17:48 -0400 (Fri, 17 Jul 2009) | 2 lines Regenerate configure script using autoconf 2.61. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Sat Jul 18 02:31:06 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sat, 18 Jul 2009 00:31:06 -0000 Subject: [Python-checkins] r74072 - python/trunk/configure.in Message-ID: Author: alexandre.vassalotti Date: Sat Jul 18 02:31:06 2009 New Revision: 74072 Log: Add a check to ensure the correct autoconf version is used for generating the configure script. Original idea by Martin von L?wis. Modified: python/trunk/configure.in Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Sat Jul 18 02:31:06 2009 @@ -6,8 +6,16 @@ # Set VERSION so we only need to edit in one place (i.e., here) m4_define(PYTHON_VERSION, 2.7) +dnl Some m4 magic to ensure that the configure script is generated +dnl by the correct autoconf version. +m4_define([version_required], +[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), 0, + [], + [m4_fatal([Autoconf version $1 is required for Python], 63)]) +]) +version_required(2.61) + AC_REVISION($Revision$) -AC_PREREQ(2.61) AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) AC_CONFIG_SRCDIR([Include/object.h]) AC_CONFIG_HEADER(pyconfig.h) From python-checkins at python.org Sat Jul 18 02:33:23 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Sat, 18 Jul 2009 00:33:23 -0000 Subject: [Python-checkins] r74073 - in python/branches/py3k: configure.in Message-ID: Author: alexandre.vassalotti Date: Sat Jul 18 02:33:23 2009 New Revision: 74073 Log: Merged revisions 74072 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74072 | alexandre.vassalotti | 2009-07-17 20:31:06 -0400 (Fri, 17 Jul 2009) | 5 lines Add a check to ensure the correct autoconf version is used for generating the configure script. Original idea by Martin von L?wis. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/configure.in Modified: python/branches/py3k/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Sat Jul 18 02:33:23 2009 @@ -6,8 +6,16 @@ # Set VERSION so we only need to edit in one place (i.e., here) m4_define(PYTHON_VERSION, 3.2) +dnl Some m4 magic to ensure that the configure script is generated +dnl by the correct autoconf version. +m4_define([version_required], +[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), 0, + [], + [m4_fatal([Autoconf version $1 is required for Python], 63)]) +]) +version_required(2.61) + AC_REVISION($Revision$) -AC_PREREQ(2.61) AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) AC_CONFIG_SRCDIR([Include/object.h]) AC_CONFIG_HEADER(pyconfig.h) From buildbot at python.org Sat Jul 18 02:57:52 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 18 Jul 2009 00:57:52 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1332 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_pydoc ====================================================================== FAIL: test_html_doc (test.test_pydoc.PyDocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/test/test_pydoc.py", line 229, in test_html_doc self.fail("outputs are not equal, see diff above") AssertionError: outputs are not equal, see diff above ====================================================================== FAIL: test_text_doc (test.test_pydoc.PyDocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/test/test_pydoc.py", line 237, in test_text_doc self.fail("outputs are not equal, see diff above") AssertionError: outputs are not equal, see diff above make: *** [buildbottest] Error 1 sincerely, -The Buildbot From alexandre at peadrop.com Sat Jul 18 02:58:45 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Fri, 17 Jul 2009 20:58:45 -0400 Subject: [Python-checkins] r74040 - in python/trunk: Lib/test/test_warnings.py Python/_warnings.c In-Reply-To: <20090717062051.2DB2F4D3F5@spunkymail-mx8.g.dreamhost.com> References: <20090717062051.2DB2F4D3F5@spunkymail-mx8.g.dreamhost.com> Message-ID: On Fri, Jul 17, 2009 at 2:20 AM, hirokazu.yamamoto wrote: > Author: hirokazu.yamamoto > Date: Fri Jul 17 08:20:46 2009 > New Revision: 74040 > > Log: > Issue #6415: Fixed warnings.warn sagfault on bad formatted string. > > Modified: > ? python/trunk/Lib/test/test_warnings.py > ? python/trunk/Python/_warnings.c > > Modified: python/trunk/Lib/test/test_warnings.py > ============================================================================== > --- python/trunk/Lib/test/test_warnings.py ? ? ?(original) > +++ python/trunk/Lib/test/test_warnings.py ? ? ?Fri Jul 17 08:20:46 2009 > @@ -327,6 +327,19 @@ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? self.module.warn_explicit, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? None, Warning, None, 1, registry=42) > > + ? ?def test_bad_str(self): > + ? ? ? ?# issue 6415 > + ? ? ? ?# Warnings instance with a bad format string for __str__ should not > + ? ? ? ?# trigger a bus error. > + ? ? ? ?class BadStrWarning(Warning): > + ? ? ? ? ? ?"""Warning with a bad format string for __str__.""" > + ? ? ? ? ? ?def __str__(self): > + ? ? ? ? ? ? ? ?return ("A bad formatted string %(err)" % > + ? ? ? ? ? ? ? ? ? ? ? ?{"err" : "there is no %(err)s"}) > + > + ? ? ? ?with self.assertRaises(ValueError): > + ? ? ? ? ? ?self.module.warn(BadStrWarning()) > + > assertRaises() takes two arguments on 2.6. Also, you cannot use assertRaises() as a context manager on 2.6. > ?class CWarnTests(BaseTest, WarnTests): > ? ? module = c_warnings > > Modified: python/trunk/Python/_warnings.c > ============================================================================== > --- python/trunk/Python/_warnings.c ? ? (original) > +++ python/trunk/Python/_warnings.c ? ? Fri Jul 17 08:20:46 2009 > @@ -317,6 +317,8 @@ > ? ? } > ? ? if (rc == 1) { > ? ? ? ? text = PyObject_Str(message); > + ? ? ? ?if (text == NULL) > + ? ? ? ? ? ?goto cleanup; > ? ? ? ? category = (PyObject*)message->ob_type; > ? ? } > ? ? else { > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins > -- -- Alexandre From buildbot at python.org Sat Jul 18 03:55:08 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 18 Jul 2009 01:55:08 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2338 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() Author: georg.brandl Date: Sat Jul 18 11:03:10 2009 New Revision: 74074 Log: #6513: fix example code: warning categories are classes, not instances. Modified: python/trunk/Doc/library/warnings.rst Modified: python/trunk/Doc/library/warnings.rst ============================================================================== --- python/trunk/Doc/library/warnings.rst (original) +++ python/trunk/Doc/library/warnings.rst Sat Jul 18 11:03:10 2009 @@ -204,7 +204,7 @@ fxn() # Verify some things assert len(w) == 1 - assert isinstance(w[-1].category, DeprecationWarning) + assert issubclass(w[-1].category, DeprecationWarning) assert "deprecated" in str(w[-1].message) One can also cause all warnings to be exceptions by using ``error`` instead of From python-checkins at python.org Sat Jul 18 11:06:31 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 18 Jul 2009 09:06:31 -0000 Subject: [Python-checkins] r74075 - python/trunk/Doc/tutorial/inputoutput.rst Message-ID: Author: georg.brandl Date: Sat Jul 18 11:06:31 2009 New Revision: 74075 Log: #6505: fix typos. Modified: python/trunk/Doc/tutorial/inputoutput.rst Modified: python/trunk/Doc/tutorial/inputoutput.rst ============================================================================== --- python/trunk/Doc/tutorial/inputoutput.rst (original) +++ python/trunk/Doc/tutorial/inputoutput.rst Sat Jul 18 11:06:31 2009 @@ -148,9 +148,9 @@ ... other='Georg') The story of Bill, Manfred, and Georg. -An optional ``':'`` and format specifier can follow the field name. This also +An optional ``':'`` and format specifier can follow the field name. This allows greater control over how the value is formatted. The following example -truncates the Pi to three places after the decimal. +truncates Pi to three places after the decimal. >>> import math >>> print 'The value of PI is approximately {0:.3f}.'.format(math.pi) @@ -204,8 +204,8 @@ The value of PI is approximately 3.142. Since :meth:`str.format` is quite new, a lot of Python code still uses the ``%`` -operator. However, because this old style of formatting will eventually removed -from the language :meth:`str.format` should generally be used. +operator. However, because this old style of formatting will eventually be +removed from the language, :meth:`str.format` should generally be used. More information can be found in the :ref:`string-formatting` section. From python-checkins at python.org Sat Jul 18 11:07:49 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 18 Jul 2009 09:07:49 -0000 Subject: [Python-checkins] r74076 - python/branches/py3k/Objects/codeobject.c Message-ID: Author: georg.brandl Date: Sat Jul 18 11:07:48 2009 New Revision: 74076 Log: #6502: add missing comma in docstring. Modified: python/branches/py3k/Objects/codeobject.c Modified: python/branches/py3k/Objects/codeobject.c ============================================================================== --- python/branches/py3k/Objects/codeobject.c (original) +++ python/branches/py3k/Objects/codeobject.c Sat Jul 18 11:07:48 2009 @@ -179,7 +179,7 @@ } PyDoc_STRVAR(code_doc, -"code(argcount, kwonlyargcount nlocals, stacksize, flags, codestring,\n\ +"code(argcount, kwonlyargcount, nlocals, stacksize, flags, codestring,\n\ constants, names, varnames, filename, name, firstlineno,\n\ lnotab[, freevars[, cellvars]])\n\ \n\ From buildbot at python.org Sat Jul 18 11:36:55 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 18 Jul 2009 09:36:55 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/981 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: georg.brandl BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jul 18 11:43:40 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 18 Jul 2009 09:43:40 -0000 Subject: [Python-checkins] r74077 - python/trunk/Doc/library/xml.etree.elementtree.rst Message-ID: Author: georg.brandl Date: Sat Jul 18 11:43:40 2009 New Revision: 74077 Log: #6489: fix an ambiguity in getiterator() documentation. Modified: python/trunk/Doc/library/xml.etree.elementtree.rst Modified: python/trunk/Doc/library/xml.etree.elementtree.rst ============================================================================== --- python/trunk/Doc/library/xml.etree.elementtree.rst (original) +++ python/trunk/Doc/library/xml.etree.elementtree.rst Sat Jul 18 11:43:40 2009 @@ -262,9 +262,9 @@ .. method:: Element.getiterator([tag=None]) Creates a tree iterator with the current element as the root. The iterator - iterates over this element and all elements below it that match the given tag. - If tag is ``None`` or ``'*'`` then all elements are iterated over. Returns an - iterable that provides element objects in document (depth first) order. + iterates over this element and all elements below it, in document (depth first) + order. If *tag* is not ``None`` or ``'*'``, only elements whose tag equals + *tag* are returned from the iterator. .. method:: Element.insert(index, element) From python-checkins at python.org Sat Jul 18 16:41:42 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 18 Jul 2009 14:41:42 -0000 Subject: [Python-checkins] r74078 - in python/branches/py3k: Lib/fractions.py Lib/test/test_fractions.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Sat Jul 18 16:41:42 2009 New Revision: 74078 Log: Issue #6431: Fix Fraction comparisons to return NotImplemented when the Fraction type doesn't know how to handle the comparison without loss of accuracy. Also, make sure that comparisons between Fractions and float infinities or nans do the right thing. Modified: python/branches/py3k/Lib/fractions.py python/branches/py3k/Lib/test/test_fractions.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/fractions.py ============================================================================== --- python/branches/py3k/Lib/fractions.py (original) +++ python/branches/py3k/Lib/fractions.py Sat Jul 18 16:41:42 2009 @@ -501,54 +501,56 @@ if isinstance(b, numbers.Complex) and b.imag == 0: b = b.real if isinstance(b, float): - return a == a.from_float(b) + if math.isnan(b) or math.isinf(b): + # comparisons with an infinity or nan should behave in + # the same way for any finite a, so treat a as zero. + return 0.0 == b + else: + return a == a.from_float(b) else: - # XXX: If b.__eq__ is implemented like this method, it may - # give the wrong answer after float(a) changes a's - # value. Better ways of doing this are welcome. - return float(a) == b - - def _subtractAndCompareToZero(a, b, op): - """Helper function for comparison operators. - - Subtracts b from a, exactly if possible, and compares the - result with 0 using op, in such a way that the comparison - won't recurse. If the difference raises a TypeError, returns - NotImplemented instead. + # Since a doesn't know how to compare with b, let's give b + # a chance to compare itself with a. + return NotImplemented + + def _richcmp(self, other, op): + """Helper for comparison operators, for internal use only. + + Implement comparison between a Rational instance `self`, and + either another Rational instance or a float `other`. If + `other` is not a Rational instance or a float, return + NotImplemented. `op` should be one of the six standard + comparison operators. """ - if isinstance(b, numbers.Complex) and b.imag == 0: - b = b.real - if isinstance(b, float): - b = a.from_float(b) - try: - # XXX: If b <: Real but not <: Rational, this is likely - # to fall back to a float. If the actual values differ by - # less than MIN_FLOAT, this could falsely call them equal, - # which would make <= inconsistent with ==. Better ways of - # doing this are welcome. - diff = a - b - except TypeError: + # convert other to a Rational instance where reasonable. + if isinstance(other, numbers.Rational): + return op(self._numerator * other.denominator, + self._denominator * other.numerator) + if isinstance(other, numbers.Complex) and other.imag == 0: + other = other.real + if isinstance(other, float): + if math.isnan(other) or math.isinf(other): + return op(0.0, other) + else: + return op(self, self.from_float(other)) + else: return NotImplemented - if isinstance(diff, numbers.Rational): - return op(diff.numerator, 0) - return op(diff, 0) def __lt__(a, b): """a < b""" - return a._subtractAndCompareToZero(b, operator.lt) + return a._richcmp(b, operator.lt) def __gt__(a, b): """a > b""" - return a._subtractAndCompareToZero(b, operator.gt) + return a._richcmp(b, operator.gt) def __le__(a, b): """a <= b""" - return a._subtractAndCompareToZero(b, operator.le) + return a._richcmp(b, operator.le) def __ge__(a, b): """a >= b""" - return a._subtractAndCompareToZero(b, operator.ge) + return a._richcmp(b, operator.ge) def __bool__(a): """a != 0""" Modified: python/branches/py3k/Lib/test/test_fractions.py ============================================================================== --- python/branches/py3k/Lib/test/test_fractions.py (original) +++ python/branches/py3k/Lib/test/test_fractions.py Sat Jul 18 16:41:42 2009 @@ -3,6 +3,7 @@ from decimal import Decimal from test.support import run_unittest import math +import numbers import operator import fractions import unittest @@ -11,6 +12,69 @@ F = fractions.Fraction gcd = fractions.gcd +class DummyFloat(object): + """Dummy float class for testing comparisons with Fractions""" + + def __init__(self, value): + if not isinstance(value, float): + raise TypeError("DummyFloat can only be initialized from float") + self.value = value + + def _richcmp(self, other, op): + if isinstance(other, numbers.Rational): + return op(F.from_float(self.value), other) + elif isinstance(other, DummyFloat): + return op(self.value, other.value) + else: + return NotImplemented + + def __eq__(self, other): return self._richcmp(other, operator.eq) + def __le__(self, other): return self._richcmp(other, operator.le) + def __lt__(self, other): return self._richcmp(other, operator.lt) + def __ge__(self, other): return self._richcmp(other, operator.ge) + def __gt__(self, other): return self._richcmp(other, operator.gt) + + # shouldn't be calling __float__ at all when doing comparisons + def __float__(self): + assert False, "__float__ should not be invoked for comparisons" + + # same goes for subtraction + def __sub__(self, other): + assert False, "__sub__ should not be invoked for comparisons" + __rsub__ = __sub__ + + +class DummyRational(object): + """Test comparison of Fraction with a naive rational implementation.""" + + def __init__(self, num, den): + g = gcd(num, den) + self.num = num // g + self.den = den // g + + def __eq__(self, other): + if isinstance(other, fractions.Fraction): + return (self.num == other._numerator and + self.den == other._denominator) + else: + return NotImplemented + + def __lt__(self, other): + return(self.num * other._denominator < self.den * other._numerator) + + def __gt__(self, other): + return(self.num * other._denominator > self.den * other._numerator) + + def __le__(self, other): + return(self.num * other._denominator <= self.den * other._numerator) + + def __ge__(self, other): + return(self.num * other._denominator >= self.den * other._numerator) + + # this class is for testing comparisons; conversion to float + # should never be used for a comparison, since it loses accuracy + def __float__(self): + assert False, "__float__ should not be invoked" class GcdTest(unittest.TestCase): @@ -324,6 +388,50 @@ self.assertFalse(F(1, 2) != F(1, 2)) self.assertTrue(F(1, 2) != F(1, 3)) + def testComparisonsDummyRational(self): + self.assertTrue(F(1, 2) == DummyRational(1, 2)) + self.assertTrue(DummyRational(1, 2) == F(1, 2)) + self.assertFalse(F(1, 2) == DummyRational(3, 4)) + self.assertFalse(DummyRational(3, 4) == F(1, 2)) + + self.assertTrue(F(1, 2) < DummyRational(3, 4)) + self.assertFalse(F(1, 2) < DummyRational(1, 2)) + self.assertFalse(F(1, 2) < DummyRational(1, 7)) + self.assertFalse(F(1, 2) > DummyRational(3, 4)) + self.assertFalse(F(1, 2) > DummyRational(1, 2)) + self.assertTrue(F(1, 2) > DummyRational(1, 7)) + self.assertTrue(F(1, 2) <= DummyRational(3, 4)) + self.assertTrue(F(1, 2) <= DummyRational(1, 2)) + self.assertFalse(F(1, 2) <= DummyRational(1, 7)) + self.assertFalse(F(1, 2) >= DummyRational(3, 4)) + self.assertTrue(F(1, 2) >= DummyRational(1, 2)) + self.assertTrue(F(1, 2) >= DummyRational(1, 7)) + + self.assertTrue(DummyRational(1, 2) < F(3, 4)) + self.assertFalse(DummyRational(1, 2) < F(1, 2)) + self.assertFalse(DummyRational(1, 2) < F(1, 7)) + self.assertFalse(DummyRational(1, 2) > F(3, 4)) + self.assertFalse(DummyRational(1, 2) > F(1, 2)) + self.assertTrue(DummyRational(1, 2) > F(1, 7)) + self.assertTrue(DummyRational(1, 2) <= F(3, 4)) + self.assertTrue(DummyRational(1, 2) <= F(1, 2)) + self.assertFalse(DummyRational(1, 2) <= F(1, 7)) + self.assertFalse(DummyRational(1, 2) >= F(3, 4)) + self.assertTrue(DummyRational(1, 2) >= F(1, 2)) + self.assertTrue(DummyRational(1, 2) >= F(1, 7)) + + def testComparisonsDummyFloat(self): + x = DummyFloat(1./3.) + y = F(1, 3) + self.assertTrue(x != y) + self.assertTrue(x < y or x > y) + self.assertFalse(x == y) + self.assertFalse(x <= y and x >= y) + self.assertTrue(y != x) + self.assertTrue(y < x or y > x) + self.assertFalse(y == x) + self.assertFalse(y <= x and y >= x) + def testMixedLess(self): self.assertTrue(2 < F(5, 2)) self.assertFalse(2 < F(4, 2)) @@ -335,6 +443,13 @@ self.assertTrue(0.4 < F(1, 2)) self.assertFalse(0.5 < F(1, 2)) + self.assertFalse(float('inf') < F(1, 2)) + self.assertTrue(float('-inf') < F(0, 10)) + self.assertFalse(float('nan') < F(-3, 7)) + self.assertTrue(F(1, 2) < float('inf')) + self.assertFalse(F(17, 12) < float('-inf')) + self.assertFalse(F(144, -89) < float('nan')) + def testMixedLessEqual(self): self.assertTrue(0.5 <= F(1, 2)) self.assertFalse(0.6 <= F(1, 2)) @@ -345,6 +460,13 @@ self.assertTrue(F(4, 2) <= 2) self.assertFalse(F(5, 2) <= 2) + self.assertFalse(float('inf') <= F(1, 2)) + self.assertTrue(float('-inf') <= F(0, 10)) + self.assertFalse(float('nan') <= F(-3, 7)) + self.assertTrue(F(1, 2) <= float('inf')) + self.assertFalse(F(17, 12) <= float('-inf')) + self.assertFalse(F(144, -89) <= float('nan')) + def testBigFloatComparisons(self): # Because 10**23 can't be represented exactly as a float: self.assertFalse(F(10**23) == float(10**23)) @@ -369,6 +491,10 @@ self.assertFalse(2 == F(3, 2)) self.assertTrue(F(4, 2) == 2) self.assertFalse(F(5, 2) == 2) + self.assertFalse(F(5, 2) == float('nan')) + self.assertFalse(float('nan') == F(3, 7)) + self.assertFalse(F(5, 2) == float('inf')) + self.assertFalse(float('-inf') == F(2, 5)) def testStringification(self): self.assertEquals("Fraction(7, 3)", repr(F(7, 3))) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sat Jul 18 16:41:42 2009 @@ -40,6 +40,10 @@ Library ------- +- Issue #6431: Make Fraction type return NotImplemented when it doesn't + know how to handle a comparison without loss of precision. Also add + correct handling of infinities and nans for comparisons with float. + - Issue #6415: Fixed warnings.warn sagfault on bad formatted string. - Issue #6358: The exit status of a command started with os.popen() was From python-checkins at python.org Sat Jul 18 16:43:11 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 18 Jul 2009 14:43:11 -0000 Subject: [Python-checkins] r74079 - in python/branches/release31-maint: Lib/fractions.py Lib/test/test_fractions.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Sat Jul 18 16:43:10 2009 New Revision: 74079 Log: Merged revisions 74078 via svnmerge from svn+ssh://pythondev at www.python.org/python/branches/py3k ........ r74078 | mark.dickinson | 2009-07-18 15:41:42 +0100 (Sat, 18 Jul 2009) | 5 lines Issue #6431: Fix Fraction comparisons to return NotImplemented when the Fraction type doesn't know how to handle the comparison without loss of accuracy. Also, make sure that comparisons between Fractions and float infinities or nans do the right thing. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/fractions.py python/branches/release31-maint/Lib/test/test_fractions.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/fractions.py ============================================================================== --- python/branches/release31-maint/Lib/fractions.py (original) +++ python/branches/release31-maint/Lib/fractions.py Sat Jul 18 16:43:10 2009 @@ -501,54 +501,56 @@ if isinstance(b, numbers.Complex) and b.imag == 0: b = b.real if isinstance(b, float): - return a == a.from_float(b) + if math.isnan(b) or math.isinf(b): + # comparisons with an infinity or nan should behave in + # the same way for any finite a, so treat a as zero. + return 0.0 == b + else: + return a == a.from_float(b) else: - # XXX: If b.__eq__ is implemented like this method, it may - # give the wrong answer after float(a) changes a's - # value. Better ways of doing this are welcome. - return float(a) == b - - def _subtractAndCompareToZero(a, b, op): - """Helper function for comparison operators. - - Subtracts b from a, exactly if possible, and compares the - result with 0 using op, in such a way that the comparison - won't recurse. If the difference raises a TypeError, returns - NotImplemented instead. + # Since a doesn't know how to compare with b, let's give b + # a chance to compare itself with a. + return NotImplemented + + def _richcmp(self, other, op): + """Helper for comparison operators, for internal use only. + + Implement comparison between a Rational instance `self`, and + either another Rational instance or a float `other`. If + `other` is not a Rational instance or a float, return + NotImplemented. `op` should be one of the six standard + comparison operators. """ - if isinstance(b, numbers.Complex) and b.imag == 0: - b = b.real - if isinstance(b, float): - b = a.from_float(b) - try: - # XXX: If b <: Real but not <: Rational, this is likely - # to fall back to a float. If the actual values differ by - # less than MIN_FLOAT, this could falsely call them equal, - # which would make <= inconsistent with ==. Better ways of - # doing this are welcome. - diff = a - b - except TypeError: + # convert other to a Rational instance where reasonable. + if isinstance(other, numbers.Rational): + return op(self._numerator * other.denominator, + self._denominator * other.numerator) + if isinstance(other, numbers.Complex) and other.imag == 0: + other = other.real + if isinstance(other, float): + if math.isnan(other) or math.isinf(other): + return op(0.0, other) + else: + return op(self, self.from_float(other)) + else: return NotImplemented - if isinstance(diff, numbers.Rational): - return op(diff.numerator, 0) - return op(diff, 0) def __lt__(a, b): """a < b""" - return a._subtractAndCompareToZero(b, operator.lt) + return a._richcmp(b, operator.lt) def __gt__(a, b): """a > b""" - return a._subtractAndCompareToZero(b, operator.gt) + return a._richcmp(b, operator.gt) def __le__(a, b): """a <= b""" - return a._subtractAndCompareToZero(b, operator.le) + return a._richcmp(b, operator.le) def __ge__(a, b): """a >= b""" - return a._subtractAndCompareToZero(b, operator.ge) + return a._richcmp(b, operator.ge) def __bool__(a): """a != 0""" Modified: python/branches/release31-maint/Lib/test/test_fractions.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_fractions.py (original) +++ python/branches/release31-maint/Lib/test/test_fractions.py Sat Jul 18 16:43:10 2009 @@ -3,6 +3,7 @@ from decimal import Decimal from test.support import run_unittest import math +import numbers import operator import fractions import unittest @@ -11,6 +12,69 @@ F = fractions.Fraction gcd = fractions.gcd +class DummyFloat(object): + """Dummy float class for testing comparisons with Fractions""" + + def __init__(self, value): + if not isinstance(value, float): + raise TypeError("DummyFloat can only be initialized from float") + self.value = value + + def _richcmp(self, other, op): + if isinstance(other, numbers.Rational): + return op(F.from_float(self.value), other) + elif isinstance(other, DummyFloat): + return op(self.value, other.value) + else: + return NotImplemented + + def __eq__(self, other): return self._richcmp(other, operator.eq) + def __le__(self, other): return self._richcmp(other, operator.le) + def __lt__(self, other): return self._richcmp(other, operator.lt) + def __ge__(self, other): return self._richcmp(other, operator.ge) + def __gt__(self, other): return self._richcmp(other, operator.gt) + + # shouldn't be calling __float__ at all when doing comparisons + def __float__(self): + assert False, "__float__ should not be invoked for comparisons" + + # same goes for subtraction + def __sub__(self, other): + assert False, "__sub__ should not be invoked for comparisons" + __rsub__ = __sub__ + + +class DummyRational(object): + """Test comparison of Fraction with a naive rational implementation.""" + + def __init__(self, num, den): + g = gcd(num, den) + self.num = num // g + self.den = den // g + + def __eq__(self, other): + if isinstance(other, fractions.Fraction): + return (self.num == other._numerator and + self.den == other._denominator) + else: + return NotImplemented + + def __lt__(self, other): + return(self.num * other._denominator < self.den * other._numerator) + + def __gt__(self, other): + return(self.num * other._denominator > self.den * other._numerator) + + def __le__(self, other): + return(self.num * other._denominator <= self.den * other._numerator) + + def __ge__(self, other): + return(self.num * other._denominator >= self.den * other._numerator) + + # this class is for testing comparisons; conversion to float + # should never be used for a comparison, since it loses accuracy + def __float__(self): + assert False, "__float__ should not be invoked" class GcdTest(unittest.TestCase): @@ -324,6 +388,50 @@ self.assertFalse(F(1, 2) != F(1, 2)) self.assertTrue(F(1, 2) != F(1, 3)) + def testComparisonsDummyRational(self): + self.assertTrue(F(1, 2) == DummyRational(1, 2)) + self.assertTrue(DummyRational(1, 2) == F(1, 2)) + self.assertFalse(F(1, 2) == DummyRational(3, 4)) + self.assertFalse(DummyRational(3, 4) == F(1, 2)) + + self.assertTrue(F(1, 2) < DummyRational(3, 4)) + self.assertFalse(F(1, 2) < DummyRational(1, 2)) + self.assertFalse(F(1, 2) < DummyRational(1, 7)) + self.assertFalse(F(1, 2) > DummyRational(3, 4)) + self.assertFalse(F(1, 2) > DummyRational(1, 2)) + self.assertTrue(F(1, 2) > DummyRational(1, 7)) + self.assertTrue(F(1, 2) <= DummyRational(3, 4)) + self.assertTrue(F(1, 2) <= DummyRational(1, 2)) + self.assertFalse(F(1, 2) <= DummyRational(1, 7)) + self.assertFalse(F(1, 2) >= DummyRational(3, 4)) + self.assertTrue(F(1, 2) >= DummyRational(1, 2)) + self.assertTrue(F(1, 2) >= DummyRational(1, 7)) + + self.assertTrue(DummyRational(1, 2) < F(3, 4)) + self.assertFalse(DummyRational(1, 2) < F(1, 2)) + self.assertFalse(DummyRational(1, 2) < F(1, 7)) + self.assertFalse(DummyRational(1, 2) > F(3, 4)) + self.assertFalse(DummyRational(1, 2) > F(1, 2)) + self.assertTrue(DummyRational(1, 2) > F(1, 7)) + self.assertTrue(DummyRational(1, 2) <= F(3, 4)) + self.assertTrue(DummyRational(1, 2) <= F(1, 2)) + self.assertFalse(DummyRational(1, 2) <= F(1, 7)) + self.assertFalse(DummyRational(1, 2) >= F(3, 4)) + self.assertTrue(DummyRational(1, 2) >= F(1, 2)) + self.assertTrue(DummyRational(1, 2) >= F(1, 7)) + + def testComparisonsDummyFloat(self): + x = DummyFloat(1./3.) + y = F(1, 3) + self.assertTrue(x != y) + self.assertTrue(x < y or x > y) + self.assertFalse(x == y) + self.assertFalse(x <= y and x >= y) + self.assertTrue(y != x) + self.assertTrue(y < x or y > x) + self.assertFalse(y == x) + self.assertFalse(y <= x and y >= x) + def testMixedLess(self): self.assertTrue(2 < F(5, 2)) self.assertFalse(2 < F(4, 2)) @@ -335,6 +443,13 @@ self.assertTrue(0.4 < F(1, 2)) self.assertFalse(0.5 < F(1, 2)) + self.assertFalse(float('inf') < F(1, 2)) + self.assertTrue(float('-inf') < F(0, 10)) + self.assertFalse(float('nan') < F(-3, 7)) + self.assertTrue(F(1, 2) < float('inf')) + self.assertFalse(F(17, 12) < float('-inf')) + self.assertFalse(F(144, -89) < float('nan')) + def testMixedLessEqual(self): self.assertTrue(0.5 <= F(1, 2)) self.assertFalse(0.6 <= F(1, 2)) @@ -345,6 +460,13 @@ self.assertTrue(F(4, 2) <= 2) self.assertFalse(F(5, 2) <= 2) + self.assertFalse(float('inf') <= F(1, 2)) + self.assertTrue(float('-inf') <= F(0, 10)) + self.assertFalse(float('nan') <= F(-3, 7)) + self.assertTrue(F(1, 2) <= float('inf')) + self.assertFalse(F(17, 12) <= float('-inf')) + self.assertFalse(F(144, -89) <= float('nan')) + def testBigFloatComparisons(self): # Because 10**23 can't be represented exactly as a float: self.assertFalse(F(10**23) == float(10**23)) @@ -369,6 +491,10 @@ self.assertFalse(2 == F(3, 2)) self.assertTrue(F(4, 2) == 2) self.assertFalse(F(5, 2) == 2) + self.assertFalse(F(5, 2) == float('nan')) + self.assertFalse(float('nan') == F(3, 7)) + self.assertFalse(F(5, 2) == float('inf')) + self.assertFalse(float('-inf') == F(2, 5)) def testStringification(self): self.assertEquals("Fraction(7, 3)", repr(F(7, 3))) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sat Jul 18 16:43:10 2009 @@ -34,6 +34,10 @@ Library ------- +- Issue #6431: Make Fraction type return NotImplemented when it doesn't + know how to handle a comparison without loss of precision. Also add + correct handling of infinities and nans for comparisons with float. + - Issue #6415: Fixed warnings.warn sagfault on bad formatted string. - Issue #6358: The exit status of a command started with os.popen() was From buildbot at python.org Sat Jul 18 17:17:36 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 18 Jul 2009 15:17:36 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1194 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: mark.dickinson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jul 18 17:18:18 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 18 Jul 2009 15:18:18 -0000 Subject: [Python-checkins] r74080 - in python/trunk: Lib/fractions.py Lib/test/test_fractions.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Sat Jul 18 17:18:18 2009 New Revision: 74080 Log: Issue #6431: Fix Fraction comparisons with unknown types, and with float infinities and nans. Backport of r74078 from py3k. Modified: python/trunk/Lib/fractions.py python/trunk/Lib/test/test_fractions.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/fractions.py ============================================================================== --- python/trunk/Lib/fractions.py (original) +++ python/trunk/Lib/fractions.py Sat Jul 18 17:18:18 2009 @@ -486,54 +486,56 @@ if isinstance(b, numbers.Complex) and b.imag == 0: b = b.real if isinstance(b, float): - return a == a.from_float(b) + if math.isnan(b) or math.isinf(b): + # comparisons with an infinity or nan should behave in + # the same way for any finite a, so treat a as zero. + return 0.0 == b + else: + return a == a.from_float(b) else: - # XXX: If b.__eq__ is implemented like this method, it may - # give the wrong answer after float(a) changes a's - # value. Better ways of doing this are welcome. - return float(a) == b - - def _subtractAndCompareToZero(a, b, op): - """Helper function for comparison operators. - - Subtracts b from a, exactly if possible, and compares the - result with 0 using op, in such a way that the comparison - won't recurse. If the difference raises a TypeError, returns - NotImplemented instead. + # Since a doesn't know how to compare with b, let's give b + # a chance to compare itself with a. + return NotImplemented + + def _richcmp(self, other, op): + """Helper for comparison operators, for internal use only. + + Implement comparison between a Rational instance `self`, and + either another Rational instance or a float `other`. If + `other` is not a Rational instance or a float, return + NotImplemented. `op` should be one of the six standard + comparison operators. """ - if isinstance(b, numbers.Complex) and b.imag == 0: - b = b.real - if isinstance(b, float): - b = a.from_float(b) - try: - # XXX: If b <: Real but not <: Rational, this is likely - # to fall back to a float. If the actual values differ by - # less than MIN_FLOAT, this could falsely call them equal, - # which would make <= inconsistent with ==. Better ways of - # doing this are welcome. - diff = a - b - except TypeError: + # convert other to a Rational instance where reasonable. + if isinstance(other, Rational): + return op(self._numerator * other.denominator, + self._denominator * other.numerator) + if isinstance(other, numbers.Complex) and other.imag == 0: + other = other.real + if isinstance(other, float): + if math.isnan(other) or math.isinf(other): + return op(0.0, other) + else: + return op(self, self.from_float(other)) + else: return NotImplemented - if isinstance(diff, Rational): - return op(diff.numerator, 0) - return op(diff, 0) def __lt__(a, b): """a < b""" - return a._subtractAndCompareToZero(b, operator.lt) + return a._richcmp(b, operator.lt) def __gt__(a, b): """a > b""" - return a._subtractAndCompareToZero(b, operator.gt) + return a._richcmp(b, operator.gt) def __le__(a, b): """a <= b""" - return a._subtractAndCompareToZero(b, operator.le) + return a._richcmp(b, operator.le) def __ge__(a, b): """a >= b""" - return a._subtractAndCompareToZero(b, operator.ge) + return a._richcmp(b, operator.ge) def __nonzero__(a): """a != 0""" Modified: python/trunk/Lib/test/test_fractions.py ============================================================================== --- python/trunk/Lib/test/test_fractions.py (original) +++ python/trunk/Lib/test/test_fractions.py Sat Jul 18 17:18:18 2009 @@ -3,6 +3,7 @@ from decimal import Decimal from test.test_support import run_unittest import math +import numbers import operator import fractions import unittest @@ -11,6 +12,69 @@ F = fractions.Fraction gcd = fractions.gcd +class DummyFloat(object): + """Dummy float class for testing comparisons with Fractions""" + + def __init__(self, value): + if not isinstance(value, float): + raise TypeError("DummyFloat can only be initialized from float") + self.value = value + + def _richcmp(self, other, op): + if isinstance(other, numbers.Rational): + return op(F.from_float(self.value), other) + elif isinstance(other, DummyFloat): + return op(self.value, other.value) + else: + return NotImplemented + + def __eq__(self, other): return self._richcmp(other, operator.eq) + def __le__(self, other): return self._richcmp(other, operator.le) + def __lt__(self, other): return self._richcmp(other, operator.lt) + def __ge__(self, other): return self._richcmp(other, operator.ge) + def __gt__(self, other): return self._richcmp(other, operator.gt) + + # shouldn't be calling __float__ at all when doing comparisons + def __float__(self): + assert False, "__float__ should not be invoked for comparisons" + + # same goes for subtraction + def __sub__(self, other): + assert False, "__sub__ should not be invoked for comparisons" + __rsub__ = __sub__ + + +class DummyRational(object): + """Test comparison of Fraction with a naive rational implementation.""" + + def __init__(self, num, den): + g = gcd(num, den) + self.num = num // g + self.den = den // g + + def __eq__(self, other): + if isinstance(other, fractions.Fraction): + return (self.num == other._numerator and + self.den == other._denominator) + else: + return NotImplemented + + def __lt__(self, other): + return(self.num * other._denominator < self.den * other._numerator) + + def __gt__(self, other): + return(self.num * other._denominator > self.den * other._numerator) + + def __le__(self, other): + return(self.num * other._denominator <= self.den * other._numerator) + + def __ge__(self, other): + return(self.num * other._denominator >= self.den * other._numerator) + + # this class is for testing comparisons; conversion to float + # should never be used for a comparison, since it loses accuracy + def __float__(self): + assert False, "__float__ should not be invoked" class GcdTest(unittest.TestCase): @@ -311,6 +375,50 @@ self.assertFalse(F(1, 2) != F(1, 2)) self.assertTrue(F(1, 2) != F(1, 3)) + def testComparisonsDummyRational(self): + self.assertTrue(F(1, 2) == DummyRational(1, 2)) + self.assertTrue(DummyRational(1, 2) == F(1, 2)) + self.assertFalse(F(1, 2) == DummyRational(3, 4)) + self.assertFalse(DummyRational(3, 4) == F(1, 2)) + + self.assertTrue(F(1, 2) < DummyRational(3, 4)) + self.assertFalse(F(1, 2) < DummyRational(1, 2)) + self.assertFalse(F(1, 2) < DummyRational(1, 7)) + self.assertFalse(F(1, 2) > DummyRational(3, 4)) + self.assertFalse(F(1, 2) > DummyRational(1, 2)) + self.assertTrue(F(1, 2) > DummyRational(1, 7)) + self.assertTrue(F(1, 2) <= DummyRational(3, 4)) + self.assertTrue(F(1, 2) <= DummyRational(1, 2)) + self.assertFalse(F(1, 2) <= DummyRational(1, 7)) + self.assertFalse(F(1, 2) >= DummyRational(3, 4)) + self.assertTrue(F(1, 2) >= DummyRational(1, 2)) + self.assertTrue(F(1, 2) >= DummyRational(1, 7)) + + self.assertTrue(DummyRational(1, 2) < F(3, 4)) + self.assertFalse(DummyRational(1, 2) < F(1, 2)) + self.assertFalse(DummyRational(1, 2) < F(1, 7)) + self.assertFalse(DummyRational(1, 2) > F(3, 4)) + self.assertFalse(DummyRational(1, 2) > F(1, 2)) + self.assertTrue(DummyRational(1, 2) > F(1, 7)) + self.assertTrue(DummyRational(1, 2) <= F(3, 4)) + self.assertTrue(DummyRational(1, 2) <= F(1, 2)) + self.assertFalse(DummyRational(1, 2) <= F(1, 7)) + self.assertFalse(DummyRational(1, 2) >= F(3, 4)) + self.assertTrue(DummyRational(1, 2) >= F(1, 2)) + self.assertTrue(DummyRational(1, 2) >= F(1, 7)) + + def testComparisonsDummyFloat(self): + x = DummyFloat(1./3.) + y = F(1, 3) + self.assertTrue(x != y) + self.assertTrue(x < y or x > y) + self.assertFalse(x == y) + self.assertFalse(x <= y and x >= y) + self.assertTrue(y != x) + self.assertTrue(y < x or y > x) + self.assertFalse(y == x) + self.assertFalse(y <= x and y >= x) + def testMixedLess(self): self.assertTrue(2 < F(5, 2)) self.assertFalse(2 < F(4, 2)) @@ -322,6 +430,13 @@ self.assertTrue(0.4 < F(1, 2)) self.assertFalse(0.5 < F(1, 2)) + self.assertFalse(float('inf') < F(1, 2)) + self.assertTrue(float('-inf') < F(0, 10)) + self.assertFalse(float('nan') < F(-3, 7)) + self.assertTrue(F(1, 2) < float('inf')) + self.assertFalse(F(17, 12) < float('-inf')) + self.assertFalse(F(144, -89) < float('nan')) + def testMixedLessEqual(self): self.assertTrue(0.5 <= F(1, 2)) self.assertFalse(0.6 <= F(1, 2)) @@ -332,6 +447,13 @@ self.assertTrue(F(4, 2) <= 2) self.assertFalse(F(5, 2) <= 2) + self.assertFalse(float('inf') <= F(1, 2)) + self.assertTrue(float('-inf') <= F(0, 10)) + self.assertFalse(float('nan') <= F(-3, 7)) + self.assertTrue(F(1, 2) <= float('inf')) + self.assertFalse(F(17, 12) <= float('-inf')) + self.assertFalse(F(144, -89) <= float('nan')) + def testBigFloatComparisons(self): # Because 10**23 can't be represented exactly as a float: self.assertFalse(F(10**23) == float(10**23)) @@ -356,6 +478,10 @@ self.assertFalse(2 == F(3, 2)) self.assertTrue(F(4, 2) == 2) self.assertFalse(F(5, 2) == 2) + self.assertFalse(F(5, 2) == float('nan')) + self.assertFalse(float('nan') == F(3, 7)) + self.assertFalse(F(5, 2) == float('inf')) + self.assertFalse(float('-inf') == F(2, 5)) def testStringification(self): self.assertEquals("Fraction(7, 3)", repr(F(7, 3))) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jul 18 17:18:18 2009 @@ -352,6 +352,10 @@ Library ------- +- Issue #6431: Make Fraction type return NotImplemented when it doesn't + know how to handle a comparison without loss of precision. Also add + correct handling of infinities and nans for comparisons with float. + - Issue #6415: Fixed warnings.warn sagfault on bad formatted string. - Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler From python-checkins at python.org Sat Jul 18 17:19:06 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 18 Jul 2009 15:19:06 -0000 Subject: [Python-checkins] r74081 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Sat Jul 18 17:19:06 2009 New Revision: 74081 Log: Blocked revisions 74080 via svnmerge ........ r74080 | mark.dickinson | 2009-07-18 16:18:18 +0100 (Sat, 18 Jul 2009) | 3 lines Issue #6431: Fix Fraction comparisons with unknown types, and with float infinities and nans. Backport of r74078 from py3k. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Sat Jul 18 17:19:43 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 18 Jul 2009 15:19:43 -0000 Subject: [Python-checkins] r74082 - python/branches/py3k Message-ID: Author: mark.dickinson Date: Sat Jul 18 17:19:43 2009 New Revision: 74082 Log: Blocked revisions 74080 via svnmerge ........ r74080 | mark.dickinson | 2009-07-18 16:18:18 +0100 (Sat, 18 Jul 2009) | 3 lines Issue #6431: Fix Fraction comparisons with unknown types, and with float infinities and nans. Backport of r74078 from py3k. ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Sat Jul 18 17:56:12 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 18 Jul 2009 15:56:12 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5179 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: georg.brandl,mark.dickinson BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Sat Jul 18 18:01:58 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 18 Jul 2009 16:01:58 -0000 Subject: [Python-checkins] r74083 - python/trunk/Misc/ACKS Message-ID: Author: mark.dickinson Date: Sat Jul 18 18:01:57 2009 New Revision: 74083 Log: Add Case Van Horsen to Misc/ACKS, for fractions module patches and other work Modified: python/trunk/Misc/ACKS Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Sat Jul 18 18:01:57 2009 @@ -743,6 +743,7 @@ Michael Urman Hector Urtubia Andi Vajda +Case Van Horsen Atul Varma Dmitry Vasiliev Alexandre Vassalotti From python-checkins at python.org Sat Jul 18 18:03:05 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 18 Jul 2009 16:03:05 -0000 Subject: [Python-checkins] r74084 - in python/branches/py3k: Misc/ACKS Message-ID: Author: mark.dickinson Date: Sat Jul 18 18:03:04 2009 New Revision: 74084 Log: Merged revisions 74083 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74083 | mark.dickinson | 2009-07-18 17:01:57 +0100 (Sat, 18 Jul 2009) | 1 line Add Case Van Horsen to Misc/ACKS, for fractions module patches and other work ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Misc/ACKS Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Sat Jul 18 18:03:04 2009 @@ -750,6 +750,7 @@ Michael Urman Hector Urtubia Andi Vajda +Case Van Horsen Atul Varma Dmitry Vasiliev Alexandre Vassalotti From buildbot at python.org Sat Jul 18 18:50:02 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 18 Jul 2009 16:50:02 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/983 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: mark.dickinson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Sat Jul 18 19:12:28 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 18 Jul 2009 17:12:28 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.1 Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.1/builds/18 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: mark.dickinson BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' 1 test failed: test_import ====================================================================== ERROR: testImport (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 60, in test_with_extension mod = __import__(TESTFN) ImportError: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 62, in test_with_extension self.fail("import from %s failed: %s" % (ext, err)) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\unittest.py", line 540, in fail raise self.failureException(msg) AssertionError: import from .PY failed: No module named @test Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 79, in testImport test_with_extension(ext) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_import.py", line 72, in test_with_extension del sys.modules[TESTFN] KeyError: '@test' sincerely, -The Buildbot From buildbot at python.org Sat Jul 18 21:34:08 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 18 Jul 2009 19:34:08 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2340 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: georg.brandl,mark.dickinson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() Author: r.david.murray Date: Sun Jul 19 03:44:23 2009 New Revision: 74085 Log: Merged revisions 73870,73879,73899-73900,73905-73906 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73870 | r.david.murray | 2009-07-06 21:06:13 -0400 (Mon, 06 Jul 2009) | 5 lines Issue 6070: when creating a compiled file, after copying the mode bits, on posix zap the execute bit in case it was set on the .py file, since the compiled files are not directly executable on posix. Patch by Marco N. ........ r73879 | r.david.murray | 2009-07-07 05:54:16 -0400 (Tue, 07 Jul 2009) | 3 lines Update issue 6070 patch to match the patch that was actually tested on Windows. ........ r73899 | r.david.murray | 2009-07-08 21:43:41 -0400 (Wed, 08 Jul 2009) | 3 lines Conditionalize test cleanup code to eliminate traceback, which will hopefully reveal the real problem. ........ r73900 | r.david.murray | 2009-07-08 22:06:17 -0400 (Wed, 08 Jul 2009) | 2 lines Make test work with -O. ........ r73905 | r.david.murray | 2009-07-09 09:55:44 -0400 (Thu, 09 Jul 2009) | 3 lines Specify umask in execute bit test to get consistent results and make sure we test resetting all three execute bits. ........ r73906 | r.david.murray | 2009-07-09 11:35:33 -0400 (Thu, 09 Jul 2009) | 5 lines Curdir needs to be in the path for the test to work on all buildbots. (I copied this from another import test, but currently this will fail if TESTFN ends up in /tmp...see issue 2609). ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_import.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Python/import.c Modified: python/branches/release26-maint/Lib/test/test_import.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_import.py (original) +++ python/branches/release26-maint/Lib/test/test_import.py Sun Jul 19 03:44:23 2009 @@ -1,12 +1,14 @@ import unittest import os +import stat import random import shutil import sys import py_compile import warnings import marshal -from test.test_support import unlink, TESTFN, unload, run_unittest, check_warnings +from test.test_support import (unlink, TESTFN, unload, run_unittest, + check_warnings, TestFailed) def remove_files(name): @@ -91,6 +93,32 @@ finally: del sys.path[0] + if os.name == 'posix': + def test_execute_bit_not_copied(self): + # Issue 6070: under posix .pyc files got their execute bit set if + # the .py file had the execute bit set, but they aren't executable. + oldmask = os.umask(022) + sys.path.insert(0, os.curdir) + try: + fname = TESTFN + os.extsep + "py" + f = open(fname, 'w').close() + os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | + stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) + __import__(TESTFN) + fn = fname + 'c' + if not os.path.exists(fn): + fn = fname + 'o' + if not os.path.exists(fn): raise TestFailed("__import__ did " + "not result in creation of either a .pyc or .pyo file") + s = os.stat(fn) + self.assertEquals(stat.S_IMODE(s.st_mode), + stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) + finally: + os.umask(oldmask) + remove_files(TESTFN) + if TESTFN in sys.modules: del sys.modules[TESTFN] + del sys.path[0] + def testImpModule(self): # Verify that the imp module can correctly load and find .py files import imp @@ -232,6 +260,7 @@ else: self.fail("import by path didn't raise an exception") + class TestPycRewriting(unittest.TestCase): # Test that the `co_filename` attribute on code objects always points # to the right file, even when various things happen (e.g. both the .py Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Jul 19 03:44:23 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6070: On posix platforms import no longer copies the execute bit + from the .py file to the .pyc file if it is set. + - Issue #4547: When debugging a very large function, it was not always possible to update the lineno attribute of the current frame. Modified: python/branches/release26-maint/Python/import.c ============================================================================== --- python/branches/release26-maint/Python/import.c (original) +++ python/branches/release26-maint/Python/import.c Sun Jul 19 03:44:23 2009 @@ -879,7 +879,11 @@ { FILE *fp; time_t mtime = srcstat->st_mtime; - mode_t mode = srcstat->st_mode; +#ifdef MS_WINDOWS /* since Windows uses different permissions */ + mode_t mode = srcstat->st_mode & ~S_IEXEC; +#else + mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH; +#endif fp = open_exclusive(cpathname, mode); if (fp == NULL) { From python-checkins at python.org Sun Jul 19 03:59:05 2009 From: python-checkins at python.org (r.david.murray) Date: Sun, 19 Jul 2009 01:59:05 -0000 Subject: [Python-checkins] r74086 - in python/branches/release31-maint: Lib/test/test_import.py Python/import.c Message-ID: Author: r.david.murray Date: Sun Jul 19 03:59:05 2009 New Revision: 74086 Log: Merged revisions 74058 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74058 | alexandre.vassalotti | 2009-07-17 06:55:50 -0400 (Fri, 17 Jul 2009) | 36 lines Merged revisions 73870,73879,73899-73900,73905-73906 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73870 | r.david.murray | 2009-07-06 21:06:13 -0400 (Mon, 06 Jul 2009) | 5 lines Issue 6070: when creating a compiled file, after copying the mode bits, on posix zap the execute bit in case it was set on the .py file, since the compiled files are not directly executable on posix. Patch by Marco N. ........ r73879 | r.david.murray | 2009-07-07 05:54:16 -0400 (Tue, 07 Jul 2009) | 3 lines Update issue 6070 patch to match the patch that was actually tested on Windows. ........ r73899 | r.david.murray | 2009-07-08 21:43:41 -0400 (Wed, 08 Jul 2009) | 3 lines Conditionalize test cleanup code to eliminate traceback, which will hopefully reveal the real problem. ........ r73900 | r.david.murray | 2009-07-08 22:06:17 -0400 (Wed, 08 Jul 2009) | 2 lines Make test work with -O. ........ r73905 | r.david.murray | 2009-07-09 09:55:44 -0400 (Thu, 09 Jul 2009) | 3 lines Specify umask in execute bit test to get consistent results and make sure we test resetting all three execute bits. ........ r73906 | r.david.murray | 2009-07-09 11:35:33 -0400 (Thu, 09 Jul 2009) | 5 lines Curdir needs to be in the path for the test to work on all buildbots. (I copied this from another import test, but currently this will fail if TESTFN ends up in /tmp...see issue 2609). ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_import.py python/branches/release31-maint/Python/import.c Modified: python/branches/release31-maint/Lib/test/test_import.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_import.py (original) +++ python/branches/release31-maint/Lib/test/test_import.py Sun Jul 19 03:59:05 2009 @@ -1,5 +1,6 @@ import unittest import os +import stat import random import shutil import sys @@ -7,7 +8,7 @@ import warnings import imp import marshal -from test.support import unlink, TESTFN, unload, run_unittest +from test.support import unlink, TESTFN, unload, run_unittest, TestFailed def remove_files(name): @@ -80,6 +81,32 @@ finally: del sys.path[0] + @unittest.skipUnless(os.name == 'posix', "test meaningful only on posix systems") + def test_execute_bit_not_copied(self): + # Issue 6070: under posix .pyc files got their execute bit set if + # the .py file had the execute bit set, but they aren't executable. + oldmask = os.umask(0o022) + sys.path.insert(0, os.curdir) + try: + fname = TESTFN + os.extsep + "py" + f = open(fname, 'w').close() + os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | + stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) + __import__(TESTFN) + fn = fname + 'c' + if not os.path.exists(fn): + fn = fname + 'o' + if not os.path.exists(fn): raise TestFailed("__import__ did " + "not result in creation of either a .pyc or .pyo file") + s = os.stat(fn) + self.assertEquals(stat.S_IMODE(s.st_mode), + stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) + finally: + os.umask(oldmask) + remove_files(TESTFN) + if TESTFN in sys.modules: del sys.modules[TESTFN] + del sys.path[0] + def testImpModule(self): # Verify that the imp module can correctly load and find .py files import imp @@ -230,6 +257,7 @@ else: self.fail("import by path didn't raise an exception") + class TestPycRewriting(unittest.TestCase): # Test that the `co_filename` attribute on code objects always points # to the right file, even when various things happen (e.g. both the .py Modified: python/branches/release31-maint/Python/import.c ============================================================================== --- python/branches/release31-maint/Python/import.c (original) +++ python/branches/release31-maint/Python/import.c Sun Jul 19 03:59:05 2009 @@ -930,7 +930,11 @@ { FILE *fp; time_t mtime = srcstat->st_mtime; - mode_t mode = srcstat->st_mode; +#ifdef MS_WINDOWS /* since Windows uses different permissions */ + mode_t mode = srcstat->st_mode & ~S_IEXEC; +#else + mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH; +#endif fp = open_exclusive(cpathname, mode); if (fp == NULL) { From python-checkins at python.org Sun Jul 19 04:22:05 2009 From: python-checkins at python.org (r.david.murray) Date: Sun, 19 Jul 2009 02:22:05 -0000 Subject: [Python-checkins] r74087 - python/branches/py3k/Misc/NEWS Message-ID: Author: r.david.murray Date: Sun Jul 19 04:22:05 2009 New Revision: 74087 Log: News item for issue 6070 fix that was omitted from r74058 merge. Modified: python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Jul 19 04:22:05 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6070: On posix platforms import no longer copies the execute bit + from the .py file to the .pyc file if it is set. + - Issue #1616979: Added the cp720 (Arabic DOS) encoding. - Issue #6428: Since Python 3.0, the __bool__ method must return a bool From python-checkins at python.org Sun Jul 19 04:25:02 2009 From: python-checkins at python.org (r.david.murray) Date: Sun, 19 Jul 2009 02:25:02 -0000 Subject: [Python-checkins] r74088 - in python/branches/release31-maint: Misc/NEWS Message-ID: Author: r.david.murray Date: Sun Jul 19 04:25:02 2009 New Revision: 74088 Log: Merged revisions 74087 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74087 | r.david.murray | 2009-07-18 22:22:05 -0400 (Sat, 18 Jul 2009) | 2 lines News item for issue 6070 fix that was omitted from r74058 merge. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sun Jul 19 04:25:02 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6070: On posix platforms import no longer copies the execute bit + from the .py file to the .pyc file if it is set. + - Issue #6428: Since Python 3.0, the __bool__ method must return a bool object, and not an int. Fix the corresponding error message, and the documentation. From buildbot at python.org Sun Jul 19 04:35:42 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 02:35:42 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.1 Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.1/builds/21 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: r.david.murray BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_codecs test_io ====================================================================== ERROR: test_basics (test.test_codecs.BasicUnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_codecs.py", line 1360, in test_basics encodedresult += encoder.encode(c) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_decoder_state (test.test_codecs.BasicUnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_codecs.py", line 1445, in test_decoder_state self.check_state_handling_decode(encoding, u, u.encode(encoding)) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_codecs.py", line 30, in check_state_handling_decode part1 = d.decode(s[:i]) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1753, in test_basic_io self.assertEquals(f.read(), "abc") File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/unittest.py", line 589, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1748, in test_basic_io self.assertEquals(f.write("abc"), 3) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_destructor (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1698, in test_destructor t.write("abc") File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_detach (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1531, in test_detach t.write("howdy") File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/unittest.py", line 589, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1796, in read decoder.decode(self.buffer.read(), final=True)) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_writing (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1593, in test_encoding_errors_writing self.assertRaises(UnicodeError, t.write, "\xff") File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/unittest.py", line 589, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1805, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 493, in readlines return list(self) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1811, in __next__ line = self.readline() File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1888, in readline while self._read_chunk(): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1612, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1318, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_output (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_io.py", line 1682, in test_newlines_output txt.write("AAA\nB") File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/_pyio.py", line 1541, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Sun Jul 19 04:37:08 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 02:37:08 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.1 Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.1/builds/21 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: r.david.murray BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_import test_userstring make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Sun Jul 19 04:41:14 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 02:41:14 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 3.1 Message-ID: The Buildbot has detected a new failure of x86 gentoo 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%203.1/builds/22 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: r.david.murray BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Unknown signal 32 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 19 04:43:43 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sun, 19 Jul 2009 02:43:43 -0000 Subject: [Python-checkins] r74089 - in python/trunk/Lib: test/test_urllib2.py urllib2.py Message-ID: Author: senthil.kumaran Date: Sun Jul 19 04:43:43 2009 New Revision: 74089 Log: Fix for issue5102, timeout value propages between redirects, proxy, digest and auth handlers. Fixed tests to reflect the same. Modified: python/trunk/Lib/test/test_urllib2.py python/trunk/Lib/urllib2.py Modified: python/trunk/Lib/test/test_urllib2.py ============================================================================== --- python/trunk/Lib/test/test_urllib2.py (original) +++ python/trunk/Lib/test/test_urllib2.py Sun Jul 19 04:43:43 2009 @@ -224,8 +224,8 @@ class MockOpener: addheaders = [] - def open(self, req, data=None): - self.req, self.data = req, data + def open(self, req, data=None,timeout=socket._GLOBAL_DEFAULT_TIMEOUT): + self.req, self.data, self.timeout = req, data, timeout def error(self, proto, *args): self.proto, self.args = proto, args @@ -850,6 +850,7 @@ method = getattr(h, "http_error_%s" % code) req = Request(from_url, data) req.add_header("Nonsense", "viking=withhold") + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT if data is not None: req.add_header("Content-Length", str(len(data))) req.add_unredirected_header("Spam", "spam") @@ -878,6 +879,7 @@ # loop detection req = Request(from_url) + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT def redirect(h, req, url=to_url): h.http_error_302(req, MockFile(), 302, "Blah", MockHeaders({"location": url})) @@ -887,6 +889,7 @@ # detect infinite loop redirect of a URL to itself req = Request(from_url, origin_req_host="example.com") count = 0 + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT try: while 1: redirect(h, req, "http://example.com/") @@ -898,6 +901,7 @@ # detect endless non-repeating chain of redirects req = Request(from_url, origin_req_host="example.com") count = 0 + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT try: while 1: redirect(h, req, "http://example.com/%d" % count) Modified: python/trunk/Lib/urllib2.py ============================================================================== --- python/trunk/Lib/urllib2.py (original) +++ python/trunk/Lib/urllib2.py Sun Jul 19 04:43:43 2009 @@ -600,7 +600,7 @@ fp.read() fp.close() - return self.parent.open(new) + return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 @@ -716,7 +716,7 @@ # {'http': 'ftp://proxy.example.com'}, we may end up turning # a request for http://acme.example.com/a into one for # ftp://proxy.example.com/a - return self.parent.open(req) + return self.parent.open(req, timeout=req.timeout) class HTTPPasswordMgr: @@ -832,7 +832,7 @@ if req.headers.get(self.auth_header, None) == auth: return None req.add_header(self.auth_header, auth) - return self.parent.open(req) + return self.parent.open(req, timeout=req.timeout) else: return None @@ -923,7 +923,7 @@ if req.headers.get(self.auth_header, None) == auth_val: return None req.add_unredirected_header(self.auth_header, auth_val) - resp = self.parent.open(req) + resp = self.parent.open(req, timeout=req.timeout) return resp def get_cnonce(self, nonce): From python-checkins at python.org Sun Jul 19 04:44:19 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sun, 19 Jul 2009 02:44:19 -0000 Subject: [Python-checkins] r74090 - in python/branches/py3k/Lib: test/test_urllib2.py urllib/request.py Message-ID: Author: senthil.kumaran Date: Sun Jul 19 04:44:19 2009 New Revision: 74090 Log: Fix for issue5102, timeout value propages between redirects, proxy, digest and auth handlers. Fixed tests to reflect the same. Modified: python/branches/py3k/Lib/test/test_urllib2.py python/branches/py3k/Lib/urllib/request.py Modified: python/branches/py3k/Lib/test/test_urllib2.py ============================================================================== --- python/branches/py3k/Lib/test/test_urllib2.py (original) +++ python/branches/py3k/Lib/test/test_urllib2.py Sun Jul 19 04:44:19 2009 @@ -222,8 +222,8 @@ class MockOpener: addheaders = [] - def open(self, req, data=None): - self.req, self.data = req, data + def open(self, req, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): + self.req, self.data, self.timeout = req, data, timeout def error(self, proto, *args): self.proto, self.args = proto, args @@ -854,6 +854,7 @@ for data in None, "blah\nblah\n": method = getattr(h, "http_error_%s" % code) req = Request(from_url, data) + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT req.add_header("Nonsense", "viking=withhold") if data is not None: req.add_header("Content-Length", str(len(data))) @@ -883,6 +884,7 @@ # loop detection req = Request(from_url) + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT def redirect(h, req, url=to_url): h.http_error_302(req, MockFile(), 302, "Blah", MockHeaders({"location": url})) @@ -892,6 +894,7 @@ # detect infinite loop redirect of a URL to itself req = Request(from_url, origin_req_host="example.com") count = 0 + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT try: while 1: redirect(h, req, "http://example.com/") @@ -903,6 +906,7 @@ # detect endless non-repeating chain of redirects req = Request(from_url, origin_req_host="example.com") count = 0 + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT try: while 1: redirect(h, req, "http://example.com/%d" % count) Modified: python/branches/py3k/Lib/urllib/request.py ============================================================================== --- python/branches/py3k/Lib/urllib/request.py (original) +++ python/branches/py3k/Lib/urllib/request.py Sun Jul 19 04:44:19 2009 @@ -552,7 +552,7 @@ fp.read() fp.close() - return self.parent.open(new) + return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 @@ -669,7 +669,7 @@ # {'http': 'ftp://proxy.example.com'}, we may end up turning # a request for http://acme.example.com/a into one for # ftp://proxy.example.com/a - return self.parent.open(req) + return self.parent.open(req, timeout=req.timeout) class HTTPPasswordMgr: @@ -785,7 +785,7 @@ if req.headers.get(self.auth_header, None) == auth: return None req.add_header(self.auth_header, auth) - return self.parent.open(req) + return self.parent.open(req, timeout=req.timeout) else: return None @@ -866,7 +866,7 @@ if req.headers.get(self.auth_header, None) == auth_val: return None req.add_unredirected_header(self.auth_header, auth_val) - resp = self.parent.open(req) + resp = self.parent.open(req, timeout=req.timeout) return resp def get_cnonce(self, nonce): From buildbot at python.org Sun Jul 19 05:22:18 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 03:22:18 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.1 Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.1/builds/21 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: r.david.murray BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 19 05:39:55 2009 From: python-checkins at python.org (hirokazu.yamamoto) Date: Sun, 19 Jul 2009 03:39:55 -0000 Subject: [Python-checkins] r74091 - python/branches/release26-maint/Lib/test/test_warnings.py Message-ID: Author: hirokazu.yamamoto Date: Sun Jul 19 05:39:54 2009 New Revision: 74091 Log: assertRaises can't be used as a context manager in 2.6. Modified: python/branches/release26-maint/Lib/test/test_warnings.py Modified: python/branches/release26-maint/Lib/test/test_warnings.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_warnings.py (original) +++ python/branches/release26-maint/Lib/test/test_warnings.py Sun Jul 19 05:39:54 2009 @@ -347,8 +347,7 @@ return ("A bad formatted string %(err)" % {"err" : "there is no %(err)s"}) - with self.assertRaises(ValueError): - self.module.warn(BadStrWarning()) + self.assertRaises(ValueError, self.module.warn, BadStrWarning()) class CWarnTests(BaseTest, WarnTests): From python-checkins at python.org Sun Jul 19 06:20:12 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sun, 19 Jul 2009 04:20:12 -0000 Subject: [Python-checkins] r74092 - in python/branches/release31-maint/Lib: test/test_urllib2.py urllib/request.py Message-ID: Author: senthil.kumaran Date: Sun Jul 19 06:20:12 2009 New Revision: 74092 Log: Fix for issue5102, timeout value propages between redirects, proxy, digest and auth handlers. Fixed tests to reflect the same. Modified: python/branches/release31-maint/Lib/test/test_urllib2.py python/branches/release31-maint/Lib/urllib/request.py Modified: python/branches/release31-maint/Lib/test/test_urllib2.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_urllib2.py (original) +++ python/branches/release31-maint/Lib/test/test_urllib2.py Sun Jul 19 06:20:12 2009 @@ -222,8 +222,8 @@ class MockOpener: addheaders = [] - def open(self, req, data=None): - self.req, self.data = req, data + def open(self, req, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): + self.req, self.data, self.timeout = req, data, timeout def error(self, proto, *args): self.proto, self.args = proto, args @@ -854,6 +854,7 @@ for data in None, "blah\nblah\n": method = getattr(h, "http_error_%s" % code) req = Request(from_url, data) + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT req.add_header("Nonsense", "viking=withhold") if data is not None: req.add_header("Content-Length", str(len(data))) @@ -883,6 +884,7 @@ # loop detection req = Request(from_url) + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT def redirect(h, req, url=to_url): h.http_error_302(req, MockFile(), 302, "Blah", MockHeaders({"location": url})) @@ -892,6 +894,7 @@ # detect infinite loop redirect of a URL to itself req = Request(from_url, origin_req_host="example.com") count = 0 + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT try: while 1: redirect(h, req, "http://example.com/") @@ -903,6 +906,7 @@ # detect endless non-repeating chain of redirects req = Request(from_url, origin_req_host="example.com") count = 0 + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT try: while 1: redirect(h, req, "http://example.com/%d" % count) Modified: python/branches/release31-maint/Lib/urllib/request.py ============================================================================== --- python/branches/release31-maint/Lib/urllib/request.py (original) +++ python/branches/release31-maint/Lib/urllib/request.py Sun Jul 19 06:20:12 2009 @@ -552,7 +552,7 @@ fp.read() fp.close() - return self.parent.open(new) + return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 @@ -669,7 +669,7 @@ # {'http': 'ftp://proxy.example.com'}, we may end up turning # a request for http://acme.example.com/a into one for # ftp://proxy.example.com/a - return self.parent.open(req) + return self.parent.open(req, timeout=req.timeout) class HTTPPasswordMgr: @@ -785,7 +785,7 @@ if req.headers.get(self.auth_header, None) == auth: return None req.add_header(self.auth_header, auth) - return self.parent.open(req) + return self.parent.open(req, timeout=req.timeout) else: return None @@ -866,7 +866,7 @@ if req.headers.get(self.auth_header, None) == auth_val: return None req.add_unredirected_header(self.auth_header, auth_val) - resp = self.parent.open(req) + resp = self.parent.open(req, timeout=req.timeout) return resp def get_cnonce(self, nonce): From python-checkins at python.org Sun Jul 19 06:20:46 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sun, 19 Jul 2009 04:20:46 -0000 Subject: [Python-checkins] r74093 - in python/branches/release26-maint/Lib: test/test_urllib2.py urllib2.py Message-ID: Author: senthil.kumaran Date: Sun Jul 19 06:20:46 2009 New Revision: 74093 Log: Fix for issue5102, timeout value propages between redirects, proxy, digest and auth handlers. Fixed tests to reflect the same. Modified: python/branches/release26-maint/Lib/test/test_urllib2.py python/branches/release26-maint/Lib/urllib2.py Modified: python/branches/release26-maint/Lib/test/test_urllib2.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_urllib2.py (original) +++ python/branches/release26-maint/Lib/test/test_urllib2.py Sun Jul 19 06:20:46 2009 @@ -224,8 +224,8 @@ class MockOpener: addheaders = [] - def open(self, req, data=None): - self.req, self.data = req, data + def open(self, req, data=None,timeout=socket._GLOBAL_DEFAULT_TIMEOUT): + self.req, self.data, self.timeout = req, data, timeout def error(self, proto, *args): self.proto, self.args = proto, args @@ -850,6 +850,7 @@ method = getattr(h, "http_error_%s" % code) req = Request(from_url, data) req.add_header("Nonsense", "viking=withhold") + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT if data is not None: req.add_header("Content-Length", str(len(data))) req.add_unredirected_header("Spam", "spam") @@ -878,6 +879,7 @@ # loop detection req = Request(from_url) + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT def redirect(h, req, url=to_url): h.http_error_302(req, MockFile(), 302, "Blah", MockHeaders({"location": url})) @@ -887,6 +889,7 @@ # detect infinite loop redirect of a URL to itself req = Request(from_url, origin_req_host="example.com") count = 0 + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT try: while 1: redirect(h, req, "http://example.com/") @@ -898,6 +901,7 @@ # detect endless non-repeating chain of redirects req = Request(from_url, origin_req_host="example.com") count = 0 + req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT try: while 1: redirect(h, req, "http://example.com/%d" % count) Modified: python/branches/release26-maint/Lib/urllib2.py ============================================================================== --- python/branches/release26-maint/Lib/urllib2.py (original) +++ python/branches/release26-maint/Lib/urllib2.py Sun Jul 19 06:20:46 2009 @@ -594,7 +594,7 @@ fp.read() fp.close() - return self.parent.open(new) + return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 @@ -710,7 +710,7 @@ # {'http': 'ftp://proxy.example.com'}, we may end up turning # a request for http://acme.example.com/a into one for # ftp://proxy.example.com/a - return self.parent.open(req) + return self.parent.open(req, timeout=req.timeout) class HTTPPasswordMgr: @@ -826,7 +826,7 @@ if req.headers.get(self.auth_header, None) == auth: return None req.add_header(self.auth_header, auth) - return self.parent.open(req) + return self.parent.open(req, timeout=req.timeout) else: return None @@ -917,7 +917,7 @@ if req.headers.get(self.auth_header, None) == auth_val: return None req.add_unredirected_header(self.auth_header, auth_val) - resp = self.parent.open(req) + resp = self.parent.open(req, timeout=req.timeout) return resp def get_cnonce(self, nonce): From buildbot at python.org Sun Jul 19 06:58:37 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 04:58:37 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.1 Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.1/builds/23 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: senthil.kumaran BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.1.heller-x86-osx5/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 19 09:25:56 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 19 Jul 2009 07:25:56 -0000 Subject: [Python-checkins] r74094 - python/branches/py3k Message-ID: Author: georg.brandl Date: Sun Jul 19 09:25:56 2009 New Revision: 74094 Log: Recorded merge of revisions 74089 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74089 | senthil.kumaran | 2009-07-19 04:43:43 +0200 (So, 19 Jul 2009) | 3 lines Fix for issue5102, timeout value propages between redirects, proxy, digest and auth handlers. Fixed tests to reflect the same. ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Sun Jul 19 09:56:00 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 07:56:00 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/986 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: georg.brandl BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From alexandre at peadrop.com Sun Jul 19 18:51:25 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Sun, 19 Jul 2009 12:51:25 -0400 Subject: [Python-checkins] r74086 - in python/branches/release31-maint: Lib/test/test_import.py Python/import.c In-Reply-To: <20090719015913.6BE104D2D1@spunkymail-mx8.g.dreamhost.com> References: <20090719015913.6BE104D2D1@spunkymail-mx8.g.dreamhost.com> Message-ID: David, could you investigate the test failure on the amd64-gentoo-linux buildbot? http://www.python.org/dev/buildbot/3.x.stable/amd64%20gentoo%203.x/builds/986/step-test/0 Thanks, -- Alexandre On Sat, Jul 18, 2009 at 9:59 PM, r.david.murray wrote: > Author: r.david.murray > Date: Sun Jul 19 03:59:05 2009 > New Revision: 74086 > > Log: > Merged revisions 74058 via svnmerge from > svn+ssh://pythondev at svn.python.org/python/branches/py3k > > ................ > ?r74058 | alexandre.vassalotti | 2009-07-17 06:55:50 -0400 (Fri, 17 Jul 2009) | 36 lines > > ?Merged revisions 73870,73879,73899-73900,73905-73906 via svnmerge from > ?svn+ssh://pythondev at svn.python.org/python/trunk > > ?........ > ? ?r73870 | r.david.murray | 2009-07-06 21:06:13 -0400 (Mon, 06 Jul 2009) | 5 lines > > ? ?Issue 6070: when creating a compiled file, after copying the mode bits, on > ? ?posix zap the execute bit in case it was set on the .py file, since the > ? ?compiled files are not directly executable on posix. ?Patch by Marco N. > ?........ > ? ?r73879 | r.david.murray | 2009-07-07 05:54:16 -0400 (Tue, 07 Jul 2009) | 3 lines > > ? ?Update issue 6070 patch to match the patch that was actually tested > ? ?on Windows. > ?........ > ? ?r73899 | r.david.murray | 2009-07-08 21:43:41 -0400 (Wed, 08 Jul 2009) | 3 lines > > ? ?Conditionalize test cleanup code to eliminate traceback, which will > ? ?hopefully reveal the real problem. > ?........ > ? ?r73900 | r.david.murray | 2009-07-08 22:06:17 -0400 (Wed, 08 Jul 2009) | 2 lines > > ? ?Make test work with -O. > ?........ > ? ?r73905 | r.david.murray | 2009-07-09 09:55:44 -0400 (Thu, 09 Jul 2009) | 3 lines > > ? ?Specify umask in execute bit test to get consistent results > ? ?and make sure we test resetting all three execute bits. > ?........ > ? ?r73906 | r.david.murray | 2009-07-09 11:35:33 -0400 (Thu, 09 Jul 2009) | 5 lines > > ? ?Curdir needs to be in the path for the test to work on all buildbots. > ? ?(I copied this from another import test, but currently this will fail if > ? ?TESTFN ends up in /tmp...see issue 2609). > ?........ > ................ > > > Modified: > ? python/branches/release31-maint/ ? (props changed) > ? python/branches/release31-maint/Lib/test/test_import.py > ? python/branches/release31-maint/Python/import.c > From python-checkins at python.org Sun Jul 19 22:18:21 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 19 Jul 2009 20:18:21 -0000 Subject: [Python-checkins] r74095 - in python/trunk: Lib/test/test_doctest.py Lib/test/test_linecache.py Lib/test/test_pyclbr.py Lib/test/test_unittest.py Lib/unittest Lib/unittest.py Lib/unittest/__init__.py Lib/unittest/__main__.py Lib/unittest/case.py Lib/unittest/loader.py Lib/unittest/main.py Lib/unittest/result.py Lib/unittest/runner.py Lib/unittest/suite.py Lib/unittest/util.py Misc/NEWS Message-ID: Author: benjamin.peterson Date: Sun Jul 19 22:18:21 2009 New Revision: 74095 Log: split unittest.py into a package Added: python/trunk/Lib/unittest/ python/trunk/Lib/unittest/__init__.py (contents, props changed) python/trunk/Lib/unittest/__main__.py (contents, props changed) python/trunk/Lib/unittest/case.py (contents, props changed) python/trunk/Lib/unittest/loader.py (contents, props changed) python/trunk/Lib/unittest/main.py (contents, props changed) python/trunk/Lib/unittest/result.py (contents, props changed) python/trunk/Lib/unittest/runner.py (contents, props changed) python/trunk/Lib/unittest/suite.py (contents, props changed) python/trunk/Lib/unittest/util.py (contents, props changed) Removed: python/trunk/Lib/unittest.py Modified: python/trunk/Lib/test/test_doctest.py python/trunk/Lib/test/test_linecache.py python/trunk/Lib/test/test_pyclbr.py python/trunk/Lib/test/test_unittest.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/test/test_doctest.py ============================================================================== --- python/trunk/Lib/test/test_doctest.py (original) +++ python/trunk/Lib/test/test_doctest.py Sun Jul 19 22:18:21 2009 @@ -1809,19 +1809,19 @@ >>> import test.sample_doctest >>> suite = doctest.DocTestSuite(test.sample_doctest) >>> suite.run(unittest.TestResult()) - + We can also supply the module by name: >>> suite = doctest.DocTestSuite('test.sample_doctest') >>> suite.run(unittest.TestResult()) - + We can use the current module: >>> suite = test.sample_doctest.test_suite() >>> suite.run(unittest.TestResult()) - + We can supply global variables. If we pass globs, they will be used instead of the module globals. Here we'll pass an empty @@ -1829,7 +1829,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', globs={}) >>> suite.run(unittest.TestResult()) - + Alternatively, we can provide extra globals. Here we'll make an error go away by providing an extra global variable: @@ -1837,7 +1837,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', ... extraglobs={'y': 1}) >>> suite.run(unittest.TestResult()) - + You can pass option flags. Here we'll cause an extra error by disabling the blank-line feature: @@ -1845,7 +1845,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', ... optionflags=doctest.DONT_ACCEPT_BLANKLINE) >>> suite.run(unittest.TestResult()) - + You can supply setUp and tearDown functions: @@ -1862,7 +1862,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', ... setUp=setUp, tearDown=tearDown) >>> suite.run(unittest.TestResult()) - + But the tearDown restores sanity: @@ -1880,7 +1880,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', setUp=setUp) >>> suite.run(unittest.TestResult()) - + Here, we didn't need to use a tearDown function because we modified the test globals, which are a copy of the @@ -1899,7 +1899,7 @@ ... 'test_doctest2.txt', ... 'test_doctest4.txt') >>> suite.run(unittest.TestResult()) - + The test files are looked for in the directory containing the calling module. A package keyword argument can be provided to @@ -1911,7 +1911,7 @@ ... 'test_doctest4.txt', ... package='test') >>> suite.run(unittest.TestResult()) - + Support for using a package's __loader__.get_data() is also provided. @@ -1930,14 +1930,14 @@ ... finally: ... if added_loader: ... del test.__loader__ - + '/' should be used as a path separator. It will be converted to a native separator at run time: >>> suite = doctest.DocFileSuite('../test/test_doctest.txt') >>> suite.run(unittest.TestResult()) - + If DocFileSuite is used from an interactive session, then files are resolved relative to the directory of sys.argv[0]: @@ -1962,7 +1962,7 @@ >>> suite = doctest.DocFileSuite(test_file, module_relative=False) >>> suite.run(unittest.TestResult()) - + It is an error to specify `package` when `module_relative=False`: @@ -1978,7 +1978,7 @@ ... 'test_doctest4.txt', ... globs={'favorite_color': 'blue'}) >>> suite.run(unittest.TestResult()) - + In this case, we supplied a missing favorite color. You can provide doctest options: @@ -1989,7 +1989,7 @@ ... optionflags=doctest.DONT_ACCEPT_BLANKLINE, ... globs={'favorite_color': 'blue'}) >>> suite.run(unittest.TestResult()) - + And, you can provide setUp and tearDown functions: @@ -2008,7 +2008,7 @@ ... 'test_doctest4.txt', ... setUp=setUp, tearDown=tearDown) >>> suite.run(unittest.TestResult()) - + But the tearDown restores sanity: @@ -2027,7 +2027,7 @@ >>> suite = doctest.DocFileSuite('test_doctest.txt', setUp=setUp) >>> suite.run(unittest.TestResult()) - + Here, we didn't need to use a tearDown function because we modified the test globals. The test globals are @@ -2039,7 +2039,7 @@ >>> suite = doctest.DocFileSuite('test_doctest3.txt') >>> suite.run(unittest.TestResult()) - + If the tests contain non-ASCII characters, we have to specify which encoding the file is encoded with. We do so by using the `encoding` @@ -2050,7 +2050,7 @@ ... 'test_doctest4.txt', ... encoding='utf-8') >>> suite.run(unittest.TestResult()) - + """ Modified: python/trunk/Lib/test/test_linecache.py ============================================================================== --- python/trunk/Lib/test/test_linecache.py (original) +++ python/trunk/Lib/test/test_linecache.py Sun Jul 19 22:18:21 2009 @@ -12,7 +12,7 @@ TESTS = 'cjkencodings_test inspect_fodder inspect_fodder2 mapping_tests' TESTS = TESTS.split() TEST_PATH = os.path.dirname(support.__file__) -MODULES = "linecache unittest".split() +MODULES = "linecache abc".split() MODULE_PATH = os.path.dirname(FILENAME) SOURCE_1 = ''' Modified: python/trunk/Lib/test/test_pyclbr.py ============================================================================== --- python/trunk/Lib/test/test_pyclbr.py (original) +++ python/trunk/Lib/test/test_pyclbr.py Sun Jul 19 22:18:21 2009 @@ -148,7 +148,7 @@ def test_easy(self): self.checkModule('pyclbr') - self.checkModule('doctest') + self.checkModule('doctest', ignore=("DocTestCase",)) self.checkModule('rfc822') self.checkModule('difflib') Modified: python/trunk/Lib/test/test_unittest.py ============================================================================== --- python/trunk/Lib/test/test_unittest.py (original) +++ python/trunk/Lib/test/test_unittest.py Sun Jul 19 22:18:21 2009 @@ -7,6 +7,7 @@ """ from StringIO import StringIO +import __builtin__ import os import re import sys @@ -3410,9 +3411,10 @@ def test_get_module_from_path(self): loader = unittest.TestLoader() + old_import = __import__ def restore_import(): - unittest.__import__ = __import__ - unittest.__import__ = lambda *_: None + __builtin__.__import__ = old_import + __builtin__.__import__ = lambda *_: None self.addCleanup(restore_import) expected_module = object() Deleted: python/trunk/Lib/unittest.py ============================================================================== --- python/trunk/Lib/unittest.py Sun Jul 19 22:18:21 2009 +++ (empty file) @@ -1,1759 +0,0 @@ -#!/usr/bin/env python -''' -Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's -Smalltalk testing framework. - -This module contains the core framework classes that form the basis of -specific test cases and suites (TestCase, TestSuite etc.), and also a -text-based utility class for running the tests and reporting the results - (TextTestRunner). - -Simple usage: - - import unittest - - class IntegerArithmenticTestCase(unittest.TestCase): - def testAdd(self): ## test method names begin 'test*' - self.assertEqual((1 + 2), 3) - self.assertEqual(0 + 1, 1) - def testMultiply(self): - self.assertEqual((0 * 10), 0) - self.assertEqual((5 * 8), 40) - - if __name__ == '__main__': - unittest.main() - -Further information is available in the bundled documentation, and from - - http://docs.python.org/library/unittest.html - -Copyright (c) 1999-2003 Steve Purcell -Copyright (c) 2003-2009 Python Software Foundation -This module is free software, and you may redistribute it and/or modify -it under the same terms as Python itself, so long as this copyright message -and disclaimer are retained in their original form. - -IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF -THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, -AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, -SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -''' - -import difflib -import functools -import os -import pprint -import re -import sys -import time -import traceback -import types -import warnings - -from fnmatch import fnmatch - - -############################################################################## -# Exported classes and functions -############################################################################## -__all__ = ['TestResult', 'TestCase', 'TestSuite', - 'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main', - 'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless', - 'expectedFailure'] - -# Expose obsolete functions for backwards compatibility -__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) - - -############################################################################## -# Backward compatibility -############################################################################## - -def _CmpToKey(mycmp): - 'Convert a cmp= function into a key= function' - class K(object): - def __init__(self, obj): - self.obj = obj - def __lt__(self, other): - return mycmp(self.obj, other.obj) == -1 - return K - -############################################################################## -# Test framework core -############################################################################## - -def _strclass(cls): - return "%s.%s" % (cls.__module__, cls.__name__) - - -class SkipTest(Exception): - """ - Raise this exception in a test to skip it. - - Usually you can use TestResult.skip() or one of the skipping decorators - instead of raising this directly. - """ - pass - -class _ExpectedFailure(Exception): - """ - Raise this when a test is expected to fail. - - This is an implementation detail. - """ - - def __init__(self, exc_info): - super(_ExpectedFailure, self).__init__() - self.exc_info = exc_info - -class _UnexpectedSuccess(Exception): - """ - The test was supposed to fail, but it didn't! - """ - pass - -def _id(obj): - return obj - -def skip(reason): - """ - Unconditionally skip a test. - """ - def decorator(test_item): - if isinstance(test_item, type) and issubclass(test_item, TestCase): - test_item.__unittest_skip__ = True - test_item.__unittest_skip_why__ = reason - return test_item - @functools.wraps(test_item) - def skip_wrapper(*args, **kwargs): - raise SkipTest(reason) - return skip_wrapper - return decorator - -def skipIf(condition, reason): - """ - Skip a test if the condition is true. - """ - if condition: - return skip(reason) - return _id - -def skipUnless(condition, reason): - """ - Skip a test unless the condition is true. - """ - if not condition: - return skip(reason) - return _id - - -def expectedFailure(func): - @functools.wraps(func) - def wrapper(*args, **kwargs): - try: - func(*args, **kwargs) - except Exception: - raise _ExpectedFailure(sys.exc_info()) - raise _UnexpectedSuccess - return wrapper - -__unittest = 1 - -class TestResult(object): - """Holder for test result information. - - Test results are automatically managed by the TestCase and TestSuite - classes, and do not need to be explicitly manipulated by writers of tests. - - Each instance holds the total number of tests run, and collections of - failures and errors that occurred among those test runs. The collections - contain tuples of (testcase, exceptioninfo), where exceptioninfo is the - formatted traceback of the error that occurred. - """ - def __init__(self): - self.failures = [] - self.errors = [] - self.testsRun = 0 - self.skipped = [] - self.expectedFailures = [] - self.unexpectedSuccesses = [] - self.shouldStop = False - - def startTest(self, test): - "Called when the given test is about to be run" - self.testsRun = self.testsRun + 1 - - def startTestRun(self): - """Called once before any tests are executed. - - See startTest for a method called before each test. - """ - - def stopTest(self, test): - "Called when the given test has been run" - pass - - def stopTestRun(self): - """Called once after all tests are executed. - - See stopTest for a method called after each test. - """ - - def addError(self, test, err): - """Called when an error has occurred. 'err' is a tuple of values as - returned by sys.exc_info(). - """ - self.errors.append((test, self._exc_info_to_string(err, test))) - - def addFailure(self, test, err): - """Called when an error has occurred. 'err' is a tuple of values as - returned by sys.exc_info().""" - self.failures.append((test, self._exc_info_to_string(err, test))) - - def addSuccess(self, test): - "Called when a test has completed successfully" - pass - - def addSkip(self, test, reason): - """Called when a test is skipped.""" - self.skipped.append((test, reason)) - - def addExpectedFailure(self, test, err): - """Called when an expected failure/error occured.""" - self.expectedFailures.append( - (test, self._exc_info_to_string(err, test))) - - def addUnexpectedSuccess(self, test): - """Called when a test was expected to fail, but succeed.""" - self.unexpectedSuccesses.append(test) - - def wasSuccessful(self): - "Tells whether or not this result was a success" - return len(self.failures) == len(self.errors) == 0 - - def stop(self): - "Indicates that the tests should be aborted" - self.shouldStop = True - - def _exc_info_to_string(self, err, test): - """Converts a sys.exc_info()-style tuple of values into a string.""" - exctype, value, tb = err - # Skip test runner traceback levels - while tb and self._is_relevant_tb_level(tb): - tb = tb.tb_next - if exctype is test.failureException: - # Skip assert*() traceback levels - length = self._count_relevant_tb_levels(tb) - return ''.join(traceback.format_exception(exctype, value, tb, length)) - return ''.join(traceback.format_exception(exctype, value, tb)) - - def _is_relevant_tb_level(self, tb): - return '__unittest' in tb.tb_frame.f_globals - - def _count_relevant_tb_levels(self, tb): - length = 0 - while tb and not self._is_relevant_tb_level(tb): - length += 1 - tb = tb.tb_next - return length - - def __repr__(self): - return "<%s run=%i errors=%i failures=%i>" % \ - (_strclass(self.__class__), self.testsRun, len(self.errors), - len(self.failures)) - - -class _AssertRaisesContext(object): - """A context manager used to implement TestCase.assertRaises* methods.""" - - def __init__(self, expected, test_case, expected_regexp=None): - self.expected = expected - self.failureException = test_case.failureException - self.expected_regex = expected_regexp - - def __enter__(self): - pass - - def __exit__(self, exc_type, exc_value, tb): - if exc_type is None: - try: - exc_name = self.expected.__name__ - except AttributeError: - exc_name = str(self.expected) - raise self.failureException( - "{0} not raised".format(exc_name)) - if not issubclass(exc_type, self.expected): - # let unexpected exceptions pass through - return False - if self.expected_regex is None: - return True - - expected_regexp = self.expected_regex - if isinstance(expected_regexp, basestring): - expected_regexp = re.compile(expected_regexp) - if not expected_regexp.search(str(exc_value)): - raise self.failureException('"%s" does not match "%s"' % - (expected_regexp.pattern, str(exc_value))) - return True - - -class _AssertWrapper(object): - """Wrap entries in the _type_equality_funcs registry to make them deep - copyable.""" - - def __init__(self, function): - self.function = function - - def __deepcopy__(self, memo): - memo[id(self)] = self - - -class TestCase(object): - """A class whose instances are single test cases. - - By default, the test code itself should be placed in a method named - 'runTest'. - - If the fixture may be used for many test cases, create as - many test methods as are needed. When instantiating such a TestCase - subclass, specify in the constructor arguments the name of the test method - that the instance is to execute. - - Test authors should subclass TestCase for their own tests. Construction - and deconstruction of the test's environment ('fixture') can be - implemented by overriding the 'setUp' and 'tearDown' methods respectively. - - If it is necessary to override the __init__ method, the base class - __init__ method must always be called. It is important that subclasses - should not change the signature of their __init__ method, since instances - of the classes are instantiated automatically by parts of the framework - in order to be run. - """ - - # This attribute determines which exception will be raised when - # the instance's assertion methods fail; test methods raising this - # exception will be deemed to have 'failed' rather than 'errored' - - failureException = AssertionError - - # This attribute determines whether long messages (including repr of - # objects used in assert methods) will be printed on failure in *addition* - # to any explicit message passed. - - longMessage = False - - - def __init__(self, methodName='runTest'): - """Create an instance of the class that will use the named test - method when executed. Raises a ValueError if the instance does - not have a method with the specified name. - """ - self._testMethodName = methodName - self._resultForDoCleanups = None - try: - testMethod = getattr(self, methodName) - except AttributeError: - raise ValueError("no such test method in %s: %s" % \ - (self.__class__, methodName)) - self._testMethodDoc = testMethod.__doc__ - self._cleanups = [] - - # Map types to custom assertEqual functions that will compare - # instances of said type in more detail to generate a more useful - # error message. - self._type_equality_funcs = {} - self.addTypeEqualityFunc(dict, self.assertDictEqual) - self.addTypeEqualityFunc(list, self.assertListEqual) - self.addTypeEqualityFunc(tuple, self.assertTupleEqual) - self.addTypeEqualityFunc(set, self.assertSetEqual) - self.addTypeEqualityFunc(frozenset, self.assertSetEqual) - - def addTypeEqualityFunc(self, typeobj, function): - """Add a type specific assertEqual style function to compare a type. - - This method is for use by TestCase subclasses that need to register - their own type equality functions to provide nicer error messages. - - Args: - typeobj: The data type to call this function on when both values - are of the same type in assertEqual(). - function: The callable taking two arguments and an optional - msg= argument that raises self.failureException with a - useful error message when the two arguments are not equal. - """ - self._type_equality_funcs[typeobj] = _AssertWrapper(function) - - def addCleanup(self, function, *args, **kwargs): - """Add a function, with arguments, to be called when the test is - completed. Functions added are called on a LIFO basis and are - called after tearDown on test failure or success. - - Cleanup items are called even if setUp fails (unlike tearDown).""" - self._cleanups.append((function, args, kwargs)) - - def setUp(self): - "Hook method for setting up the test fixture before exercising it." - pass - - def tearDown(self): - "Hook method for deconstructing the test fixture after testing it." - pass - - def countTestCases(self): - return 1 - - def defaultTestResult(self): - return TestResult() - - def shortDescription(self): - """Returns both the test method name and first line of its docstring. - - If no docstring is given, only returns the method name. - - This method overrides unittest.TestCase.shortDescription(), which - only returns the first line of the docstring, obscuring the name - of the test upon failure. - """ - desc = str(self) - doc_first_line = None - - if self._testMethodDoc: - doc_first_line = self._testMethodDoc.split("\n")[0].strip() - if doc_first_line: - desc = '\n'.join((desc, doc_first_line)) - return desc - - def id(self): - return "%s.%s" % (_strclass(self.__class__), self._testMethodName) - - def __eq__(self, other): - if type(self) is not type(other): - return NotImplemented - - return self._testMethodName == other._testMethodName - - def __ne__(self, other): - return not self == other - - def __hash__(self): - return hash((type(self), self._testMethodName)) - - def __str__(self): - return "%s (%s)" % (self._testMethodName, _strclass(self.__class__)) - - def __repr__(self): - return "<%s testMethod=%s>" % \ - (_strclass(self.__class__), self._testMethodName) - - def run(self, result=None): - orig_result = result - if result is None: - result = self.defaultTestResult() - startTestRun = getattr(result, 'startTestRun', None) - if startTestRun is not None: - startTestRun() - - self._resultForDoCleanups = result - result.startTest(self) - if getattr(self.__class__, "__unittest_skip__", False): - # If the whole class was skipped. - try: - result.addSkip(self, self.__class__.__unittest_skip_why__) - finally: - result.stopTest(self) - return - testMethod = getattr(self, self._testMethodName) - try: - success = False - try: - self.setUp() - except SkipTest as e: - result.addSkip(self, str(e)) - except Exception: - result.addError(self, sys.exc_info()) - else: - try: - testMethod() - except self.failureException: - result.addFailure(self, sys.exc_info()) - except _ExpectedFailure as e: - result.addExpectedFailure(self, e.exc_info) - except _UnexpectedSuccess: - result.addUnexpectedSuccess(self) - except SkipTest as e: - result.addSkip(self, str(e)) - except Exception: - result.addError(self, sys.exc_info()) - else: - success = True - - try: - self.tearDown() - except Exception: - result.addError(self, sys.exc_info()) - success = False - - cleanUpSuccess = self.doCleanups() - success = success and cleanUpSuccess - if success: - result.addSuccess(self) - finally: - result.stopTest(self) - if orig_result is None: - stopTestRun = getattr(result, 'stopTestRun', None) - if stopTestRun is not None: - stopTestRun() - - def doCleanups(self): - """Execute all cleanup functions. Normally called for you after - tearDown.""" - result = self._resultForDoCleanups - ok = True - while self._cleanups: - function, args, kwargs = self._cleanups.pop(-1) - try: - function(*args, **kwargs) - except Exception: - ok = False - result.addError(self, sys.exc_info()) - return ok - - def __call__(self, *args, **kwds): - return self.run(*args, **kwds) - - def debug(self): - """Run the test without collecting errors in a TestResult""" - self.setUp() - getattr(self, self._testMethodName)() - self.tearDown() - - def skipTest(self, reason): - """Skip this test.""" - raise SkipTest(reason) - - def fail(self, msg=None): - """Fail immediately, with the given message.""" - raise self.failureException(msg) - - def assertFalse(self, expr, msg=None): - "Fail the test if the expression is true." - if expr: - msg = self._formatMessage(msg, "%r is not False" % expr) - raise self.failureException(msg) - - def assertTrue(self, expr, msg=None): - """Fail the test unless the expression is true.""" - if not expr: - msg = self._formatMessage(msg, "%r is not True" % expr) - raise self.failureException(msg) - - def _formatMessage(self, msg, standardMsg): - """Honour the longMessage attribute when generating failure messages. - If longMessage is False this means: - * Use only an explicit message if it is provided - * Otherwise use the standard message for the assert - - If longMessage is True: - * Use the standard message - * If an explicit message is provided, plus ' : ' and the explicit message - """ - if not self.longMessage: - return msg or standardMsg - if msg is None: - return standardMsg - return standardMsg + ' : ' + msg - - - def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown - by callableObj when invoked with arguments args and keyword - arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be - deemed to have suffered an error, exactly as for an - unexpected exception. - - If called with callableObj omitted or None, will return a - context object used like this:: - - with self.assertRaises(some_error_class): - do_something() - """ - context = _AssertRaisesContext(excClass, self) - if callableObj is None: - return context - with context: - callableObj(*args, **kwargs) - - def _getAssertEqualityFunc(self, first, second): - """Get a detailed comparison function for the types of the two args. - - Returns: A callable accepting (first, second, msg=None) that will - raise a failure exception if first != second with a useful human - readable error message for those types. - """ - # - # NOTE(gregory.p.smith): I considered isinstance(first, type(second)) - # and vice versa. I opted for the conservative approach in case - # subclasses are not intended to be compared in detail to their super - # class instances using a type equality func. This means testing - # subtypes won't automagically use the detailed comparison. Callers - # should use their type specific assertSpamEqual method to compare - # subclasses if the detailed comparison is desired and appropriate. - # See the discussion in http://bugs.python.org/issue2578. - # - if type(first) is type(second): - asserter = self._type_equality_funcs.get(type(first)) - if asserter is not None: - return asserter.function - - return self._baseAssertEqual - - def _baseAssertEqual(self, first, second, msg=None): - """The default assertEqual implementation, not type specific.""" - if not first == second: - standardMsg = '%r != %r' % (first, second) - msg = self._formatMessage(msg, standardMsg) - raise self.failureException(msg) - - def assertEqual(self, first, second, msg=None): - """Fail if the two objects are unequal as determined by the '==' - operator. - """ - assertion_func = self._getAssertEqualityFunc(first, second) - assertion_func(first, second, msg=msg) - - def assertNotEqual(self, first, second, msg=None): - """Fail if the two objects are equal as determined by the '==' - operator. - """ - if not first != second: - msg = self._formatMessage(msg, '%r == %r' % (first, second)) - raise self.failureException(msg) - - def assertAlmostEqual(self, first, second, places=7, msg=None): - """Fail if the two objects are unequal as determined by their - difference rounded to the given number of decimal places - (default 7) and comparing to zero. - - Note that decimal places (from zero) are usually not the same - as significant digits (measured from the most signficant digit). - """ - if round(abs(second-first), places) != 0: - standardMsg = '%r != %r within %r places' % (first, second, places) - msg = self._formatMessage(msg, standardMsg) - raise self.failureException(msg) - - def assertNotAlmostEqual(self, first, second, places=7, msg=None): - """Fail if the two objects are equal as determined by their - difference rounded to the given number of decimal places - (default 7) and comparing to zero. - - Note that decimal places (from zero) are usually not the same - as significant digits (measured from the most signficant digit). - """ - if round(abs(second-first), places) == 0: - standardMsg = '%r == %r within %r places' % (first, second, places) - msg = self._formatMessage(msg, standardMsg) - raise self.failureException(msg) - - # Synonyms for assertion methods - - # The plurals are undocumented. Keep them that way to discourage use. - # Do not add more. Do not remove. - # Going through a deprecation cycle on these would annoy many people. - assertEquals = assertEqual - assertNotEquals = assertNotEqual - assertAlmostEquals = assertAlmostEqual - assertNotAlmostEquals = assertNotAlmostEqual - assert_ = assertTrue - - # These fail* assertion method names are pending deprecation and will - # be a DeprecationWarning in 3.2; http://bugs.python.org/issue2578 - def _deprecate(original_func): - def deprecated_func(*args, **kwargs): - warnings.warn( - 'Please use {0} instead.'.format(original_func.__name__), - PendingDeprecationWarning, 2) - return original_func(*args, **kwargs) - return deprecated_func - - failUnlessEqual = _deprecate(assertEqual) - failIfEqual = _deprecate(assertNotEqual) - failUnlessAlmostEqual = _deprecate(assertAlmostEqual) - failIfAlmostEqual = _deprecate(assertNotAlmostEqual) - failUnless = _deprecate(assertTrue) - failUnlessRaises = _deprecate(assertRaises) - failIf = _deprecate(assertFalse) - - def assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None): - """An equality assertion for ordered sequences (like lists and tuples). - - For the purposes of this function, a valid orderd sequence type is one - which can be indexed, has a length, and has an equality operator. - - Args: - seq1: The first sequence to compare. - seq2: The second sequence to compare. - seq_type: The expected datatype of the sequences, or None if no - datatype should be enforced. - msg: Optional message to use on failure instead of a list of - differences. - """ - if seq_type != None: - seq_type_name = seq_type.__name__ - if not isinstance(seq1, seq_type): - raise self.failureException('First sequence is not a %s: %r' - % (seq_type_name, seq1)) - if not isinstance(seq2, seq_type): - raise self.failureException('Second sequence is not a %s: %r' - % (seq_type_name, seq2)) - else: - seq_type_name = "sequence" - - differing = None - try: - len1 = len(seq1) - except (TypeError, NotImplementedError): - differing = 'First %s has no length. Non-sequence?' % ( - seq_type_name) - - if differing is None: - try: - len2 = len(seq2) - except (TypeError, NotImplementedError): - differing = 'Second %s has no length. Non-sequence?' % ( - seq_type_name) - - if differing is None: - if seq1 == seq2: - return - - seq1_repr = repr(seq1) - seq2_repr = repr(seq2) - if len(seq1_repr) > 30: - seq1_repr = seq1_repr[:30] + '...' - if len(seq2_repr) > 30: - seq2_repr = seq2_repr[:30] + '...' - elements = (seq_type_name.capitalize(), seq1_repr, seq2_repr) - differing = '%ss differ: %s != %s\n' % elements - - for i in xrange(min(len1, len2)): - try: - item1 = seq1[i] - except (TypeError, IndexError, NotImplementedError): - differing += ('\nUnable to index element %d of first %s\n' % - (i, seq_type_name)) - break - - try: - item2 = seq2[i] - except (TypeError, IndexError, NotImplementedError): - differing += ('\nUnable to index element %d of second %s\n' % - (i, seq_type_name)) - break - - if item1 != item2: - differing += ('\nFirst differing element %d:\n%s\n%s\n' % - (i, item1, item2)) - break - else: - if (len1 == len2 and seq_type is None and - type(seq1) != type(seq2)): - # The sequences are the same, but have differing types. - return - - if len1 > len2: - differing += ('\nFirst %s contains %d additional ' - 'elements.\n' % (seq_type_name, len1 - len2)) - try: - differing += ('First extra element %d:\n%s\n' % - (len2, seq1[len2])) - except (TypeError, IndexError, NotImplementedError): - differing += ('Unable to index element %d ' - 'of first %s\n' % (len2, seq_type_name)) - elif len1 < len2: - differing += ('\nSecond %s contains %d additional ' - 'elements.\n' % (seq_type_name, len2 - len1)) - try: - differing += ('First extra element %d:\n%s\n' % - (len1, seq2[len1])) - except (TypeError, IndexError, NotImplementedError): - differing += ('Unable to index element %d ' - 'of second %s\n' % (len1, seq_type_name)) - standardMsg = differing + '\n' + '\n'.join(difflib.ndiff(pprint.pformat(seq1).splitlines(), - pprint.pformat(seq2).splitlines())) - msg = self._formatMessage(msg, standardMsg) - self.fail(msg) - - def assertListEqual(self, list1, list2, msg=None): - """A list-specific equality assertion. - - Args: - list1: The first list to compare. - list2: The second list to compare. - msg: Optional message to use on failure instead of a list of - differences. - - """ - self.assertSequenceEqual(list1, list2, msg, seq_type=list) - - def assertTupleEqual(self, tuple1, tuple2, msg=None): - """A tuple-specific equality assertion. - - Args: - tuple1: The first tuple to compare. - tuple2: The second tuple to compare. - msg: Optional message to use on failure instead of a list of - differences. - """ - self.assertSequenceEqual(tuple1, tuple2, msg, seq_type=tuple) - - def assertSetEqual(self, set1, set2, msg=None): - """A set-specific equality assertion. - - Args: - set1: The first set to compare. - set2: The second set to compare. - msg: Optional message to use on failure instead of a list of - differences. - - For more general containership equality, assertSameElements will work - with things other than sets. This uses ducktyping to support - different types of sets, and is optimized for sets specifically - (parameters must support a difference method). - """ - try: - difference1 = set1.difference(set2) - except TypeError, e: - self.fail('invalid type when attempting set difference: %s' % e) - except AttributeError, e: - self.fail('first argument does not support set difference: %s' % e) - - try: - difference2 = set2.difference(set1) - except TypeError, e: - self.fail('invalid type when attempting set difference: %s' % e) - except AttributeError, e: - self.fail('second argument does not support set difference: %s' % e) - - if not (difference1 or difference2): - return - - lines = [] - if difference1: - lines.append('Items in the first set but not the second:') - for item in difference1: - lines.append(repr(item)) - if difference2: - lines.append('Items in the second set but not the first:') - for item in difference2: - lines.append(repr(item)) - - standardMsg = '\n'.join(lines) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIn(self, member, container, msg=None): - """Just like self.assertTrue(a in b), but with a nicer default message.""" - if member not in container: - standardMsg = '%r not found in %r' % (member, container) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertNotIn(self, member, container, msg=None): - """Just like self.assertTrue(a not in b), but with a nicer default message.""" - if member in container: - standardMsg = '%r unexpectedly found in %r' % (member, container) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIs(self, expr1, expr2, msg=None): - """Just like self.assertTrue(a is b), but with a nicer default message.""" - if expr1 is not expr2: - standardMsg = '%r is not %r' % (expr1, expr2) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIsNot(self, expr1, expr2, msg=None): - """Just like self.assertTrue(a is not b), but with a nicer default message.""" - if expr1 is expr2: - standardMsg = 'unexpectedly identical: %r' % (expr1,) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertDictEqual(self, d1, d2, msg=None): - self.assert_(isinstance(d1, dict), 'First argument is not a dictionary') - self.assert_(isinstance(d2, dict), 'Second argument is not a dictionary') - - if d1 != d2: - standardMsg = ('\n' + '\n'.join(difflib.ndiff( - pprint.pformat(d1).splitlines(), - pprint.pformat(d2).splitlines()))) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertDictContainsSubset(self, expected, actual, msg=None): - """Checks whether actual is a superset of expected.""" - missing = [] - mismatched = [] - for key, value in expected.iteritems(): - if key not in actual: - missing.append(key) - elif value != actual[key]: - mismatched.append('%s, expected: %s, actual: %s' % (key, value, actual[key])) - - if not (missing or mismatched): - return - - standardMsg = '' - if missing: - standardMsg = 'Missing: %r' % ','.join(missing) - if mismatched: - if standardMsg: - standardMsg += '; ' - standardMsg += 'Mismatched values: %s' % ','.join(mismatched) - - self.fail(self._formatMessage(msg, standardMsg)) - - def assertSameElements(self, expected_seq, actual_seq, msg=None): - """An unordered sequence specific comparison. - - Raises with an error message listing which elements of expected_seq - are missing from actual_seq and vice versa if any. - """ - try: - expected = set(expected_seq) - actual = set(actual_seq) - missing = list(expected.difference(actual)) - unexpected = list(actual.difference(expected)) - missing.sort() - unexpected.sort() - except TypeError: - # Fall back to slower list-compare if any of the objects are - # not hashable. - expected = list(expected_seq) - actual = list(actual_seq) - expected.sort() - actual.sort() - missing, unexpected = _SortedListDifference(expected, actual) - errors = [] - if missing: - errors.append('Expected, but missing:\n %r' % missing) - if unexpected: - errors.append('Unexpected, but present:\n %r' % unexpected) - if errors: - standardMsg = '\n'.join(errors) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertMultiLineEqual(self, first, second, msg=None): - """Assert that two multi-line strings are equal.""" - self.assert_(isinstance(first, basestring), ( - 'First argument is not a string')) - self.assert_(isinstance(second, basestring), ( - 'Second argument is not a string')) - - if first != second: - standardMsg = '\n' + ''.join(difflib.ndiff(first.splitlines(True), second.splitlines(True))) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertLess(self, a, b, msg=None): - """Just like self.assertTrue(a < b), but with a nicer default message.""" - if not a < b: - standardMsg = '%r not less than %r' % (a, b) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertLessEqual(self, a, b, msg=None): - """Just like self.assertTrue(a <= b), but with a nicer default message.""" - if not a <= b: - standardMsg = '%r not less than or equal to %r' % (a, b) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertGreater(self, a, b, msg=None): - """Just like self.assertTrue(a > b), but with a nicer default message.""" - if not a > b: - standardMsg = '%r not greater than %r' % (a, b) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertGreaterEqual(self, a, b, msg=None): - """Just like self.assertTrue(a >= b), but with a nicer default message.""" - if not a >= b: - standardMsg = '%r not greater than or equal to %r' % (a, b) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIsNone(self, obj, msg=None): - """Same as self.assertTrue(obj is None), with a nicer default message.""" - if obj is not None: - standardMsg = '%r is not None' % obj - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIsNotNone(self, obj, msg=None): - """Included for symmetry with assertIsNone.""" - if obj is None: - standardMsg = 'unexpectedly None' - self.fail(self._formatMessage(msg, standardMsg)) - - def assertRaisesRegexp(self, expected_exception, expected_regexp, - callable_obj=None, *args, **kwargs): - """Asserts that the message in a raised exception matches a regexp. - - Args: - expected_exception: Exception class expected to be raised. - expected_regexp: Regexp (re pattern object or string) expected - to be found in error message. - callable_obj: Function to be called. - args: Extra args. - kwargs: Extra kwargs. - """ - context = _AssertRaisesContext(expected_exception, self, expected_regexp) - if callable_obj is None: - return context - with context: - callable_obj(*args, **kwargs) - - def assertRegexpMatches(self, text, expected_regex, msg=None): - if isinstance(expected_regex, basestring): - expected_regex = re.compile(expected_regex) - if not expected_regex.search(text): - msg = msg or "Regexp didn't match" - msg = '%s: %r not found in %r' % (msg, expected_regex.pattern, text) - raise self.failureException(msg) - - -def _SortedListDifference(expected, actual): - """Finds elements in only one or the other of two, sorted input lists. - - Returns a two-element tuple of lists. The first list contains those - elements in the "expected" list but not in the "actual" list, and the - second contains those elements in the "actual" list but not in the - "expected" list. Duplicate elements in either input list are ignored. - """ - i = j = 0 - missing = [] - unexpected = [] - while True: - try: - e = expected[i] - a = actual[j] - if e < a: - missing.append(e) - i += 1 - while expected[i] == e: - i += 1 - elif e > a: - unexpected.append(a) - j += 1 - while actual[j] == a: - j += 1 - else: - i += 1 - try: - while expected[i] == e: - i += 1 - finally: - j += 1 - while actual[j] == a: - j += 1 - except IndexError: - missing.extend(expected[i:]) - unexpected.extend(actual[j:]) - break - return missing, unexpected - - -class TestSuite(object): - """A test suite is a composite test consisting of a number of TestCases. - - For use, create an instance of TestSuite, then add test case instances. - When all tests have been added, the suite can be passed to a test - runner, such as TextTestRunner. It will run the individual test cases - in the order in which they were added, aggregating the results. When - subclassing, do not forget to call the base class constructor. - """ - def __init__(self, tests=()): - self._tests = [] - self.addTests(tests) - - def __repr__(self): - return "<%s tests=%s>" % (_strclass(self.__class__), list(self)) - - def __eq__(self, other): - if not isinstance(other, self.__class__): - return NotImplemented - return list(self) == list(other) - - def __ne__(self, other): - return not self == other - - # Can't guarantee hash invariant, so flag as unhashable - __hash__ = None - - def __iter__(self): - return iter(self._tests) - - def countTestCases(self): - cases = 0 - for test in self: - cases += test.countTestCases() - return cases - - def addTest(self, test): - # sanity checks - if not hasattr(test, '__call__'): - raise TypeError("the test to add must be callable") - 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) - - def addTests(self, tests): - if isinstance(tests, basestring): - raise TypeError("tests must be an iterable of tests, not a string") - for test in tests: - self.addTest(test) - - def run(self, result): - for test in self: - if result.shouldStop: - break - test(result) - return result - - def __call__(self, *args, **kwds): - return self.run(*args, **kwds) - - def debug(self): - """Run the tests without collecting errors in a TestResult""" - for test in self: - test.debug() - - -class FunctionTestCase(TestCase): - """A test case that wraps a test function. - - This is useful for slipping pre-existing test functions into the - unittest framework. Optionally, set-up and tidy-up functions can be - supplied. As with TestCase, the tidy-up ('tearDown') function will - always be called if the set-up ('setUp') function ran successfully. - """ - - def __init__(self, testFunc, setUp=None, tearDown=None, description=None): - super(FunctionTestCase, self).__init__() - self._setUpFunc = setUp - self._tearDownFunc = tearDown - self._testFunc = testFunc - self._description = description - - def setUp(self): - if self._setUpFunc is not None: - self._setUpFunc() - - def tearDown(self): - if self._tearDownFunc is not None: - self._tearDownFunc() - - def runTest(self): - self._testFunc() - - def id(self): - return self._testFunc.__name__ - - def __eq__(self, other): - if not isinstance(other, self.__class__): - return NotImplemented - - return self._setUpFunc == other._setUpFunc and \ - self._tearDownFunc == other._tearDownFunc and \ - self._testFunc == other._testFunc and \ - self._description == other._description - - def __ne__(self, other): - return not self == other - - def __hash__(self): - return hash((type(self), self._setUpFunc, self._tearDownFunc, - self._testFunc, self._description)) - - def __str__(self): - return "%s (%s)" % (_strclass(self.__class__), self._testFunc.__name__) - - def __repr__(self): - return "<%s testFunc=%s>" % (_strclass(self.__class__), self._testFunc) - - def shortDescription(self): - if self._description is not None: - return self._description - doc = self._testFunc.__doc__ - return doc and doc.split("\n")[0].strip() or None - - - -############################################################################## -# Locating and loading tests -############################################################################## - -class TestLoader(object): - """ - This class is responsible for loading tests according to various criteria - and returning them wrapped in a TestSuite - """ - testMethodPrefix = 'test' - sortTestMethodsUsing = cmp - suiteClass = TestSuite - _top_level_dir = None - - def loadTestsFromTestCase(self, testCaseClass): - """Return a suite of all tests cases contained in testCaseClass""" - if issubclass(testCaseClass, TestSuite): - raise TypeError("Test cases should not be derived from TestSuite." \ - " Maybe you meant to derive from TestCase?") - testCaseNames = self.getTestCaseNames(testCaseClass) - if not testCaseNames and hasattr(testCaseClass, 'runTest'): - testCaseNames = ['runTest'] - suite = self.suiteClass(map(testCaseClass, testCaseNames)) - return suite - - def loadTestsFromModule(self, module, use_load_tests=True): - """Return a suite of all tests cases contained in the given module""" - tests = [] - for name in dir(module): - obj = getattr(module, name) - if isinstance(obj, type) and issubclass(obj, TestCase): - tests.append(self.loadTestsFromTestCase(obj)) - - load_tests = getattr(module, 'load_tests', None) - if use_load_tests and load_tests is not None: - return load_tests(self, tests, None) - return self.suiteClass(tests) - - def loadTestsFromName(self, name, module=None): - """Return a suite of all tests cases given a string specifier. - - The name may resolve either to a module, a test case class, a - test method within a test case class, or a callable object which - returns a TestCase or TestSuite instance. - - The method optionally resolves the names relative to a given module. - """ - parts = name.split('.') - if module is None: - parts_copy = parts[:] - while parts_copy: - try: - module = __import__('.'.join(parts_copy)) - break - except ImportError: - del parts_copy[-1] - if not parts_copy: - raise - parts = parts[1:] - obj = module - for part in parts: - parent, obj = obj, getattr(obj, part) - - if isinstance(obj, types.ModuleType): - return self.loadTestsFromModule(obj) - elif isinstance(obj, type) and issubclass(obj, TestCase): - return self.loadTestsFromTestCase(obj) - elif (isinstance(obj, types.UnboundMethodType) and - isinstance(parent, type) and - issubclass(parent, TestCase)): - return TestSuite([parent(obj.__name__)]) - elif isinstance(obj, TestSuite): - return obj - elif hasattr(obj, '__call__'): - test = obj() - if isinstance(test, TestSuite): - return test - elif isinstance(test, TestCase): - return TestSuite([test]) - else: - raise TypeError("calling %s returned %s, not a test" % - (obj, test)) - else: - raise TypeError("don't know how to make test from: %s" % obj) - - def loadTestsFromNames(self, names, module=None): - """Return a suite of all tests cases found using the given sequence - of string specifiers. See 'loadTestsFromName()'. - """ - suites = [self.loadTestsFromName(name, module) for name in names] - return self.suiteClass(suites) - - def getTestCaseNames(self, testCaseClass): - """Return a sorted sequence of method names found within testCaseClass - """ - def isTestMethod(attrname, testCaseClass=testCaseClass, - prefix=self.testMethodPrefix): - return attrname.startswith(prefix) and \ - hasattr(getattr(testCaseClass, attrname), '__call__') - testFnNames = filter(isTestMethod, dir(testCaseClass)) - if self.sortTestMethodsUsing: - testFnNames.sort(key=_CmpToKey(self.sortTestMethodsUsing)) - return testFnNames - - def discover(self, start_dir, pattern='test*.py', top_level_dir=None): - """Find and return all test modules from the specified start - directory, recursing into subdirectories to find them. Only test files - that match the pattern will be loaded. (Using shell style pattern - matching.) - - All test modules must be importable from the top level of the project. - If the start directory is not the top level directory then the top - level directory must be specified separately. - - If a test package name (directory with '__init__.py') matches the - pattern then the package will be checked for a 'load_tests' function. If - this exists then it will be called with loader, tests, pattern. - - If load_tests exists then discovery does *not* recurse into the package, - load_tests is responsible for loading all tests in the package. - - The pattern is deliberately not stored as a loader attribute so that - packages can continue discovery themselves. top_level_dir is stored so - load_tests does not need to pass this argument in to loader.discover(). - """ - if top_level_dir is None and self._top_level_dir is not None: - # make top_level_dir optional if called from load_tests in a package - top_level_dir = self._top_level_dir - elif top_level_dir is None: - top_level_dir = start_dir - - top_level_dir = os.path.abspath(os.path.normpath(top_level_dir)) - start_dir = os.path.abspath(os.path.normpath(start_dir)) - - if not top_level_dir in sys.path: - # all test modules must be importable from the top level directory - sys.path.append(top_level_dir) - self._top_level_dir = top_level_dir - - if start_dir != top_level_dir and not os.path.isfile(os.path.join(start_dir, '__init__.py')): - # what about __init__.pyc or pyo (etc) - raise ImportError('Start directory is not importable: %r' % start_dir) - - tests = list(self._find_tests(start_dir, pattern)) - return self.suiteClass(tests) - - - def _get_module_from_path(self, path): - """Load a module from a path relative to the top-level directory - of a project. Used by discovery.""" - path = os.path.splitext(os.path.normpath(path))[0] - - relpath = os.path.relpath(path, self._top_level_dir) - assert not os.path.isabs(relpath), "Path must be within the project" - assert not relpath.startswith('..'), "Path must be within the project" - - name = relpath.replace(os.path.sep, '.') - __import__(name) - return sys.modules[name] - - def _find_tests(self, start_dir, pattern): - """Used by discovery. Yields test suites it loads.""" - paths = os.listdir(start_dir) - - for path in paths: - full_path = os.path.join(start_dir, path) - # what about __init__.pyc or pyo (etc) - # we would need to avoid loading the same tests multiple times - # from '.py', '.pyc' *and* '.pyo' - if os.path.isfile(full_path) and path.lower().endswith('.py'): - if fnmatch(path, pattern): - # if the test file matches, load it - module = self._get_module_from_path(full_path) - yield self.loadTestsFromModule(module) - elif os.path.isdir(full_path): - if not os.path.isfile(os.path.join(full_path, '__init__.py')): - continue - - load_tests = None - tests = None - if fnmatch(path, pattern): - # only check load_tests if the package directory itself matches the filter - package = self._get_module_from_path(full_path) - load_tests = getattr(package, 'load_tests', None) - tests = self.loadTestsFromModule(package, use_load_tests=False) - - if load_tests is None: - if tests is not None: - # tests loaded from package file - yield tests - # recurse into the package - for test in self._find_tests(full_path, pattern): - yield test - else: - yield load_tests(self, tests, pattern) - -defaultTestLoader = TestLoader() - - -############################################################################## -# Patches for old functions: these functions should be considered obsolete -############################################################################## - -def _makeLoader(prefix, sortUsing, suiteClass=None): - loader = TestLoader() - loader.sortTestMethodsUsing = sortUsing - loader.testMethodPrefix = prefix - if suiteClass: loader.suiteClass = suiteClass - return loader - -def getTestCaseNames(testCaseClass, prefix, sortUsing=cmp): - return _makeLoader(prefix, sortUsing).getTestCaseNames(testCaseClass) - -def makeSuite(testCaseClass, prefix='test', sortUsing=cmp, suiteClass=TestSuite): - return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromTestCase(testCaseClass) - -def findTestCases(module, prefix='test', sortUsing=cmp, suiteClass=TestSuite): - return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule(module) - - -############################################################################## -# Text UI -############################################################################## - -class _WritelnDecorator(object): - """Used to decorate file-like objects with a handy 'writeln' method""" - def __init__(self,stream): - self.stream = stream - - def __getattr__(self, attr): - return getattr(self.stream,attr) - - def writeln(self, arg=None): - if arg: - self.write(arg) - self.write('\n') # text-mode streams translate to \r\n if needed - - -class _TextTestResult(TestResult): - """A test result class that can print formatted text results to a stream. - - Used by TextTestRunner. - """ - separator1 = '=' * 70 - separator2 = '-' * 70 - - def __init__(self, stream, descriptions, verbosity): - super(_TextTestResult, self).__init__() - self.stream = stream - self.showAll = verbosity > 1 - self.dots = verbosity == 1 - self.descriptions = descriptions - - def getDescription(self, test): - if self.descriptions: - return test.shortDescription() or str(test) - else: - return str(test) - - def startTest(self, test): - super(_TextTestResult, self).startTest(test) - if self.showAll: - self.stream.write(self.getDescription(test)) - self.stream.write(" ... ") - self.stream.flush() - - def addSuccess(self, test): - super(_TextTestResult, self).addSuccess(test) - if self.showAll: - self.stream.writeln("ok") - elif self.dots: - self.stream.write('.') - self.stream.flush() - - def addError(self, test, err): - super(_TextTestResult, self).addError(test, err) - if self.showAll: - self.stream.writeln("ERROR") - elif self.dots: - self.stream.write('E') - self.stream.flush() - - def addFailure(self, test, err): - super(_TextTestResult, self).addFailure(test, err) - if self.showAll: - self.stream.writeln("FAIL") - elif self.dots: - self.stream.write('F') - self.stream.flush() - - def addSkip(self, test, reason): - super(_TextTestResult, self).addSkip(test, reason) - if self.showAll: - self.stream.writeln("skipped {0!r}".format(reason)) - elif self.dots: - self.stream.write("s") - self.stream.flush() - - def addExpectedFailure(self, test, err): - super(_TextTestResult, self).addExpectedFailure(test, err) - if self.showAll: - self.stream.writeln("expected failure") - elif self.dots: - self.stream.write("x") - self.stream.flush() - - def addUnexpectedSuccess(self, test): - super(_TextTestResult, self).addUnexpectedSuccess(test) - if self.showAll: - self.stream.writeln("unexpected success") - elif self.dots: - self.stream.write("u") - self.stream.flush() - - def printErrors(self): - if self.dots or self.showAll: - self.stream.writeln() - self.printErrorList('ERROR', self.errors) - self.printErrorList('FAIL', self.failures) - - def printErrorList(self, flavour, errors): - for test, err in errors: - self.stream.writeln(self.separator1) - self.stream.writeln("%s: %s" % (flavour,self.getDescription(test))) - self.stream.writeln(self.separator2) - self.stream.writeln("%s" % err) - - -class TextTestRunner(object): - """A test runner class that displays results in textual form. - - It prints out the names of tests as they are run, errors as they - occur, and a summary of the results at the end of the test run. - """ - def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1): - self.stream = _WritelnDecorator(stream) - self.descriptions = descriptions - self.verbosity = verbosity - - def _makeResult(self): - return _TextTestResult(self.stream, self.descriptions, self.verbosity) - - def run(self, test): - "Run the given test case or test suite." - result = self._makeResult() - startTime = time.time() - startTestRun = getattr(result, 'startTestRun', None) - if startTestRun is not None: - startTestRun() - try: - test(result) - finally: - stopTestRun = getattr(result, 'stopTestRun', None) - if stopTestRun is not None: - stopTestRun() - stopTime = time.time() - timeTaken = stopTime - startTime - result.printErrors() - self.stream.writeln(result.separator2) - run = result.testsRun - self.stream.writeln("Ran %d test%s in %.3fs" % - (run, run != 1 and "s" or "", timeTaken)) - self.stream.writeln() - results = map(len, (result.expectedFailures, - result.unexpectedSuccesses, - result.skipped)) - expectedFails, unexpectedSuccesses, skipped = results - infos = [] - if not result.wasSuccessful(): - self.stream.write("FAILED") - failed, errored = map(len, (result.failures, result.errors)) - if failed: - infos.append("failures=%d" % failed) - if errored: - infos.append("errors=%d" % errored) - else: - self.stream.write("OK") - if skipped: - infos.append("skipped=%d" % skipped) - if expectedFails: - infos.append("expected failures=%d" % expectedFails) - if unexpectedSuccesses: - infos.append("unexpected successes=%d" % unexpectedSuccesses) - if infos: - self.stream.writeln(" (%s)" % (", ".join(infos),)) - else: - self.stream.write("\n") - return result - - - -############################################################################## -# Facilities for running tests from the command line -############################################################################## - -USAGE_AS_MAIN = """\ -Usage: %(progName)s [options] [tests] - -Options: - -h, --help Show this message - -v, --verbose Verbose output - -q, --quiet Minimal output - -Examples: - %(progName)s test_module - run tests from test_module - %(progName)s test_module.TestClass - run tests from - test_module.TestClass - %(progName)s test_module.TestClass.test_method - run specified test method - -[tests] can be a list of any number of test modules, classes and test -methods. - -Alternative Usage: %(progName)s discover [options] - -Options: - -v, --verbose Verbose output - -s directory Directory to start discovery ('.' default) - -p pattern Pattern to match test files ('test*.py' default) - -t directory Top level directory of project (default to - start directory) - -For test discovery all test modules must be importable from the top -level directory of the project. -""" - -USAGE_FROM_MODULE = """\ -Usage: %(progName)s [options] [test] [...] - -Options: - -h, --help Show this message - -v, --verbose Verbose output - -q, --quiet Minimal output - -Examples: - %(progName)s - run default set of tests - %(progName)s MyTestSuite - run suite 'MyTestSuite' - %(progName)s MyTestCase.testSomething - run MyTestCase.testSomething - %(progName)s MyTestCase - run all 'test*' test methods - in MyTestCase -""" - -if __name__ == '__main__': - USAGE = USAGE_AS_MAIN -else: - USAGE = USAGE_FROM_MODULE - - -class TestProgram(object): - """A command-line program that runs a set of tests; this is primarily - for making test modules conveniently executable. - """ - USAGE = USAGE - def __init__(self, module='__main__', defaultTest=None, - argv=None, testRunner=None, - testLoader=defaultTestLoader, exit=True, - verbosity=1): - if isinstance(module, basestring): - self.module = __import__(module) - for part in module.split('.')[1:]: - self.module = getattr(self.module, part) - else: - self.module = module - if argv is None: - argv = sys.argv - - self.exit = exit - self.verbosity = verbosity - self.defaultTest = defaultTest - self.testRunner = testRunner - self.testLoader = testLoader - self.progName = os.path.basename(argv[0]) - self.parseArgs(argv) - self.runTests() - - def usageExit(self, msg=None): - if msg: - print msg - print self.USAGE % self.__dict__ - sys.exit(2) - - def parseArgs(self, argv): - if len(argv) > 1 and argv[1].lower() == 'discover': - self._do_discovery(argv[2:]) - return - - import getopt - long_opts = ['help','verbose','quiet'] - try: - options, args = getopt.getopt(argv[1:], 'hHvq', long_opts) - for opt, value in options: - if opt in ('-h','-H','--help'): - self.usageExit() - if opt in ('-q','--quiet'): - self.verbosity = 0 - if opt in ('-v','--verbose'): - self.verbosity = 2 - if len(args) == 0 and self.defaultTest is None: - self.test = self.testLoader.loadTestsFromModule(self.module) - return - if len(args) > 0: - self.testNames = args - if __name__ == '__main__': - # to support python -m unittest ... - self.module = None - else: - self.testNames = (self.defaultTest,) - self.createTests() - except getopt.error, msg: - self.usageExit(msg) - - def createTests(self): - self.test = self.testLoader.loadTestsFromNames(self.testNames, - self.module) - - def _do_discovery(self, argv, Loader=TestLoader): - # handle command line args for test discovery - import optparse - parser = optparse.OptionParser() - parser.add_option('-v', '--verbose', dest='verbose', default=False, - help='Verbose output', action='store_true') - parser.add_option('-s', '--start-directory', dest='start', default='.', - help="Directory to start discovery ('.' default)") - parser.add_option('-p', '--pattern', dest='pattern', default='test*.py', - help="Pattern to match tests ('test*.py' default)") - parser.add_option('-t', '--top-level-directory', dest='top', default=None, - help='Top level directory of project (defaults to start directory)') - - options, args = parser.parse_args(argv) - if len(args) > 3: - self.usageExit() - - for name, value in zip(('start', 'pattern', 'top'), args): - setattr(options, name, value) - - if options.verbose: - self.verbosity = 2 - - start_dir = options.start - pattern = options.pattern - top_level_dir = options.top - - loader = Loader() - self.test = loader.discover(start_dir, pattern, top_level_dir) - - def runTests(self): - if self.testRunner is None: - self.testRunner = TextTestRunner - if isinstance(self.testRunner, (type, types.ClassType)): - try: - testRunner = self.testRunner(verbosity=self.verbosity) - except TypeError: - # didn't accept the verbosity argument - testRunner = self.testRunner() - else: - # it is assumed to be a TestRunner instance - testRunner = self.testRunner - self.result = testRunner.run(self.test) - if self.exit: - sys.exit(not self.result.wasSuccessful()) - -main = TestProgram - - -############################################################################## -# Executing this module from the command line -############################################################################## - -if __name__ == "__main__": - sys.modules['unittest'] = sys.modules['__main__'] - main(module=None) Added: python/trunk/Lib/unittest/__init__.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/__init__.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,63 @@ +""" +Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's +Smalltalk testing framework. + +This module contains the core framework classes that form the basis of +specific test cases and suites (TestCase, TestSuite etc.), and also a +text-based utility class for running the tests and reporting the results + (TextTestRunner). + +Simple usage: + + import unittest + + class IntegerArithmenticTestCase(unittest.TestCase): + def testAdd(self): ## test method names begin 'test*' + self.assertEqual((1 + 2), 3) + self.assertEqual(0 + 1, 1) + def testMultiply(self): + self.assertEqual((0 * 10), 0) + self.assertEqual((5 * 8), 40) + + if __name__ == '__main__': + unittest.main() + +Further information is available in the bundled documentation, and from + + http://docs.python.org/library/unittest.html + +Copyright (c) 1999-2003 Steve Purcell +Copyright (c) 2003-2009 Python Software Foundation +This module is free software, and you may redistribute it and/or modify +it under the same terms as Python itself, so long as this copyright message +and disclaimer are retained in their original form. + +IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF +THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, +AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, +SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +""" + +__all__ = ['TestResult', 'TestCase', 'TestSuite', + 'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main', + 'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless', + 'expectedFailure'] + +# Expose obsolete functions for backwards compatibility +__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) + + +from .result import TestResult +from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf, + skipUnless, expectedFailure) +from .suite import TestSuite +from .loader import (TestLoader, defaultTestLoader, makeSuite, getTestCaseNames, + findTestCases) +from .main import TestProgram, main +from .runner import TextTestRunner Added: python/trunk/Lib/unittest/__main__.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/__main__.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,8 @@ +"""Main entry point""" + +import sys +if sys.argv[0].endswith("__main__.py"): + sys.argv[0] = "unittest" + +from .main import main +main(module=None) Added: python/trunk/Lib/unittest/case.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/case.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,893 @@ +"""Test case implementation""" + +import sys +import functools +import difflib +import pprint +import re +import warnings + +from . import result, util + + +class SkipTest(Exception): + """ + Raise this exception in a test to skip it. + + Usually you can use TestResult.skip() or one of the skipping decorators + instead of raising this directly. + """ + pass + +class _ExpectedFailure(Exception): + """ + Raise this when a test is expected to fail. + + This is an implementation detail. + """ + + def __init__(self, exc_info): + super(_ExpectedFailure, self).__init__() + self.exc_info = exc_info + +class _UnexpectedSuccess(Exception): + """ + The test was supposed to fail, but it didn't! + """ + pass + +def _id(obj): + return obj + +def skip(reason): + """ + Unconditionally skip a test. + """ + def decorator(test_item): + if isinstance(test_item, type) and issubclass(test_item, TestCase): + test_item.__unittest_skip__ = True + test_item.__unittest_skip_why__ = reason + return test_item + @functools.wraps(test_item) + def skip_wrapper(*args, **kwargs): + raise SkipTest(reason) + return skip_wrapper + return decorator + +def skipIf(condition, reason): + """ + Skip a test if the condition is true. + """ + if condition: + return skip(reason) + return _id + +def skipUnless(condition, reason): + """ + Skip a test unless the condition is true. + """ + if not condition: + return skip(reason) + return _id + + +def expectedFailure(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + try: + func(*args, **kwargs) + except Exception: + raise _ExpectedFailure(sys.exc_info()) + raise _UnexpectedSuccess + return wrapper + + +class _AssertRaisesContext(object): + """A context manager used to implement TestCase.assertRaises* methods.""" + + def __init__(self, expected, test_case, expected_regexp=None): + self.expected = expected + self.failureException = test_case.failureException + self.expected_regex = expected_regexp + + def __enter__(self): + pass + + def __exit__(self, exc_type, exc_value, tb): + if exc_type is None: + try: + exc_name = self.expected.__name__ + except AttributeError: + exc_name = str(self.expected) + raise self.failureException( + "{0} not raised".format(exc_name)) + if not issubclass(exc_type, self.expected): + # let unexpected exceptions pass through + return False + if self.expected_regex is None: + return True + + expected_regexp = self.expected_regex + if isinstance(expected_regexp, basestring): + expected_regexp = re.compile(expected_regexp) + if not expected_regexp.search(str(exc_value)): + raise self.failureException('"%s" does not match "%s"' % + (expected_regexp.pattern, str(exc_value))) + return True + + +class _AssertWrapper(object): + """Wrap entries in the _type_equality_funcs registry to make them deep + copyable.""" + + def __init__(self, function): + self.function = function + + def __deepcopy__(self, memo): + memo[id(self)] = self + + +class TestCase(object): + """A class whose instances are single test cases. + + By default, the test code itself should be placed in a method named + 'runTest'. + + If the fixture may be used for many test cases, create as + many test methods as are needed. When instantiating such a TestCase + subclass, specify in the constructor arguments the name of the test method + that the instance is to execute. + + Test authors should subclass TestCase for their own tests. Construction + and deconstruction of the test's environment ('fixture') can be + implemented by overriding the 'setUp' and 'tearDown' methods respectively. + + If it is necessary to override the __init__ method, the base class + __init__ method must always be called. It is important that subclasses + should not change the signature of their __init__ method, since instances + of the classes are instantiated automatically by parts of the framework + in order to be run. + """ + + # This attribute determines which exception will be raised when + # the instance's assertion methods fail; test methods raising this + # exception will be deemed to have 'failed' rather than 'errored' + + failureException = AssertionError + + # This attribute determines whether long messages (including repr of + # objects used in assert methods) will be printed on failure in *addition* + # to any explicit message passed. + + longMessage = False + + + def __init__(self, methodName='runTest'): + """Create an instance of the class that will use the named test + method when executed. Raises a ValueError if the instance does + not have a method with the specified name. + """ + self._testMethodName = methodName + self._resultForDoCleanups = None + try: + testMethod = getattr(self, methodName) + except AttributeError: + raise ValueError("no such test method in %s: %s" % \ + (self.__class__, methodName)) + self._testMethodDoc = testMethod.__doc__ + self._cleanups = [] + + # Map types to custom assertEqual functions that will compare + # instances of said type in more detail to generate a more useful + # error message. + self._type_equality_funcs = {} + self.addTypeEqualityFunc(dict, self.assertDictEqual) + self.addTypeEqualityFunc(list, self.assertListEqual) + self.addTypeEqualityFunc(tuple, self.assertTupleEqual) + self.addTypeEqualityFunc(set, self.assertSetEqual) + self.addTypeEqualityFunc(frozenset, self.assertSetEqual) + + def addTypeEqualityFunc(self, typeobj, function): + """Add a type specific assertEqual style function to compare a type. + + This method is for use by TestCase subclasses that need to register + their own type equality functions to provide nicer error messages. + + Args: + typeobj: The data type to call this function on when both values + are of the same type in assertEqual(). + function: The callable taking two arguments and an optional + msg= argument that raises self.failureException with a + useful error message when the two arguments are not equal. + """ + self._type_equality_funcs[typeobj] = _AssertWrapper(function) + + def addCleanup(self, function, *args, **kwargs): + """Add a function, with arguments, to be called when the test is + completed. Functions added are called on a LIFO basis and are + called after tearDown on test failure or success. + + Cleanup items are called even if setUp fails (unlike tearDown).""" + self._cleanups.append((function, args, kwargs)) + + def setUp(self): + "Hook method for setting up the test fixture before exercising it." + pass + + def tearDown(self): + "Hook method for deconstructing the test fixture after testing it." + pass + + def countTestCases(self): + return 1 + + def defaultTestResult(self): + return result.TestResult() + + def shortDescription(self): + """Returns both the test method name and first line of its docstring. + + If no docstring is given, only returns the method name. + + This method overrides unittest.TestCase.shortDescription(), which + only returns the first line of the docstring, obscuring the name + of the test upon failure. + """ + desc = str(self) + doc_first_line = None + + if self._testMethodDoc: + doc_first_line = self._testMethodDoc.split("\n")[0].strip() + if doc_first_line: + desc = '\n'.join((desc, doc_first_line)) + return desc + + def id(self): + return "%s.%s" % (util.strclass(self.__class__), self._testMethodName) + + def __eq__(self, other): + if type(self) is not type(other): + return NotImplemented + + return self._testMethodName == other._testMethodName + + def __ne__(self, other): + return not self == other + + def __hash__(self): + return hash((type(self), self._testMethodName)) + + def __str__(self): + return "%s (%s)" % (self._testMethodName, util.strclass(self.__class__)) + + def __repr__(self): + return "<%s testMethod=%s>" % \ + (util.strclass(self.__class__), self._testMethodName) + + def run(self, result=None): + orig_result = result + if result is None: + result = self.defaultTestResult() + startTestRun = getattr(result, 'startTestRun', None) + if startTestRun is not None: + startTestRun() + + self._resultForDoCleanups = result + result.startTest(self) + if getattr(self.__class__, "__unittest_skip__", False): + # If the whole class was skipped. + try: + result.addSkip(self, self.__class__.__unittest_skip_why__) + finally: + result.stopTest(self) + return + testMethod = getattr(self, self._testMethodName) + try: + success = False + try: + self.setUp() + except SkipTest as e: + result.addSkip(self, str(e)) + except Exception: + result.addError(self, sys.exc_info()) + else: + try: + testMethod() + except self.failureException: + result.addFailure(self, sys.exc_info()) + except _ExpectedFailure as e: + result.addExpectedFailure(self, e.exc_info) + except _UnexpectedSuccess: + result.addUnexpectedSuccess(self) + except SkipTest as e: + result.addSkip(self, str(e)) + except Exception: + result.addError(self, sys.exc_info()) + else: + success = True + + try: + self.tearDown() + except Exception: + result.addError(self, sys.exc_info()) + success = False + + cleanUpSuccess = self.doCleanups() + success = success and cleanUpSuccess + if success: + result.addSuccess(self) + finally: + result.stopTest(self) + if orig_result is None: + stopTestRun = getattr(result, 'stopTestRun', None) + if stopTestRun is not None: + stopTestRun() + + def doCleanups(self): + """Execute all cleanup functions. Normally called for you after + tearDown.""" + result = self._resultForDoCleanups + ok = True + while self._cleanups: + function, args, kwargs = self._cleanups.pop(-1) + try: + function(*args, **kwargs) + except Exception: + ok = False + result.addError(self, sys.exc_info()) + return ok + + def __call__(self, *args, **kwds): + return self.run(*args, **kwds) + + def debug(self): + """Run the test without collecting errors in a TestResult""" + self.setUp() + getattr(self, self._testMethodName)() + self.tearDown() + + def skipTest(self, reason): + """Skip this test.""" + raise SkipTest(reason) + + def fail(self, msg=None): + """Fail immediately, with the given message.""" + raise self.failureException(msg) + + def assertFalse(self, expr, msg=None): + "Fail the test if the expression is true." + if expr: + msg = self._formatMessage(msg, "%r is not False" % expr) + raise self.failureException(msg) + + def assertTrue(self, expr, msg=None): + """Fail the test unless the expression is true.""" + if not expr: + msg = self._formatMessage(msg, "%r is not True" % expr) + raise self.failureException(msg) + + def _formatMessage(self, msg, standardMsg): + """Honour the longMessage attribute when generating failure messages. + If longMessage is False this means: + * Use only an explicit message if it is provided + * Otherwise use the standard message for the assert + + If longMessage is True: + * Use the standard message + * If an explicit message is provided, plus ' : ' and the explicit message + """ + if not self.longMessage: + return msg or standardMsg + if msg is None: + return standardMsg + return standardMsg + ' : ' + msg + + + def assertRaises(self, excClass, callableObj=None, *args, **kwargs): + """Fail unless an exception of class excClass is thrown + by callableObj when invoked with arguments args and keyword + arguments kwargs. If a different type of exception is + thrown, it will not be caught, and the test case will be + deemed to have suffered an error, exactly as for an + unexpected exception. + + If called with callableObj omitted or None, will return a + context object used like this:: + + with self.assertRaises(some_error_class): + do_something() + """ + context = _AssertRaisesContext(excClass, self) + if callableObj is None: + return context + with context: + callableObj(*args, **kwargs) + + def _getAssertEqualityFunc(self, first, second): + """Get a detailed comparison function for the types of the two args. + + Returns: A callable accepting (first, second, msg=None) that will + raise a failure exception if first != second with a useful human + readable error message for those types. + """ + # + # NOTE(gregory.p.smith): I considered isinstance(first, type(second)) + # and vice versa. I opted for the conservative approach in case + # subclasses are not intended to be compared in detail to their super + # class instances using a type equality func. This means testing + # subtypes won't automagically use the detailed comparison. Callers + # should use their type specific assertSpamEqual method to compare + # subclasses if the detailed comparison is desired and appropriate. + # See the discussion in http://bugs.python.org/issue2578. + # + if type(first) is type(second): + asserter = self._type_equality_funcs.get(type(first)) + if asserter is not None: + return asserter.function + + return self._baseAssertEqual + + def _baseAssertEqual(self, first, second, msg=None): + """The default assertEqual implementation, not type specific.""" + if not first == second: + standardMsg = '%r != %r' % (first, second) + msg = self._formatMessage(msg, standardMsg) + raise self.failureException(msg) + + def assertEqual(self, first, second, msg=None): + """Fail if the two objects are unequal as determined by the '==' + operator. + """ + assertion_func = self._getAssertEqualityFunc(first, second) + assertion_func(first, second, msg=msg) + + def assertNotEqual(self, first, second, msg=None): + """Fail if the two objects are equal as determined by the '==' + operator. + """ + if not first != second: + msg = self._formatMessage(msg, '%r == %r' % (first, second)) + raise self.failureException(msg) + + def assertAlmostEqual(self, first, second, places=7, msg=None): + """Fail if the two objects are unequal as determined by their + difference rounded to the given number of decimal places + (default 7) and comparing to zero. + + Note that decimal places (from zero) are usually not the same + as significant digits (measured from the most signficant digit). + """ + if round(abs(second-first), places) != 0: + standardMsg = '%r != %r within %r places' % (first, second, places) + msg = self._formatMessage(msg, standardMsg) + raise self.failureException(msg) + + def assertNotAlmostEqual(self, first, second, places=7, msg=None): + """Fail if the two objects are equal as determined by their + difference rounded to the given number of decimal places + (default 7) and comparing to zero. + + Note that decimal places (from zero) are usually not the same + as significant digits (measured from the most signficant digit). + """ + if round(abs(second-first), places) == 0: + standardMsg = '%r == %r within %r places' % (first, second, places) + msg = self._formatMessage(msg, standardMsg) + raise self.failureException(msg) + + # Synonyms for assertion methods + + # The plurals are undocumented. Keep them that way to discourage use. + # Do not add more. Do not remove. + # Going through a deprecation cycle on these would annoy many people. + assertEquals = assertEqual + assertNotEquals = assertNotEqual + assertAlmostEquals = assertAlmostEqual + assertNotAlmostEquals = assertNotAlmostEqual + assert_ = assertTrue + + # These fail* assertion method names are pending deprecation and will + # be a DeprecationWarning in 3.2; http://bugs.python.org/issue2578 + def _deprecate(original_func): + def deprecated_func(*args, **kwargs): + warnings.warn( + 'Please use {0} instead.'.format(original_func.__name__), + PendingDeprecationWarning, 2) + return original_func(*args, **kwargs) + return deprecated_func + + failUnlessEqual = _deprecate(assertEqual) + failIfEqual = _deprecate(assertNotEqual) + failUnlessAlmostEqual = _deprecate(assertAlmostEqual) + failIfAlmostEqual = _deprecate(assertNotAlmostEqual) + failUnless = _deprecate(assertTrue) + failUnlessRaises = _deprecate(assertRaises) + failIf = _deprecate(assertFalse) + + def assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None): + """An equality assertion for ordered sequences (like lists and tuples). + + For the purposes of this function, a valid orderd sequence type is one + which can be indexed, has a length, and has an equality operator. + + Args: + seq1: The first sequence to compare. + seq2: The second sequence to compare. + seq_type: The expected datatype of the sequences, or None if no + datatype should be enforced. + msg: Optional message to use on failure instead of a list of + differences. + """ + if seq_type != None: + seq_type_name = seq_type.__name__ + if not isinstance(seq1, seq_type): + raise self.failureException('First sequence is not a %s: %r' + % (seq_type_name, seq1)) + if not isinstance(seq2, seq_type): + raise self.failureException('Second sequence is not a %s: %r' + % (seq_type_name, seq2)) + else: + seq_type_name = "sequence" + + differing = None + try: + len1 = len(seq1) + except (TypeError, NotImplementedError): + differing = 'First %s has no length. Non-sequence?' % ( + seq_type_name) + + if differing is None: + try: + len2 = len(seq2) + except (TypeError, NotImplementedError): + differing = 'Second %s has no length. Non-sequence?' % ( + seq_type_name) + + if differing is None: + if seq1 == seq2: + return + + seq1_repr = repr(seq1) + seq2_repr = repr(seq2) + if len(seq1_repr) > 30: + seq1_repr = seq1_repr[:30] + '...' + if len(seq2_repr) > 30: + seq2_repr = seq2_repr[:30] + '...' + elements = (seq_type_name.capitalize(), seq1_repr, seq2_repr) + differing = '%ss differ: %s != %s\n' % elements + + for i in xrange(min(len1, len2)): + try: + item1 = seq1[i] + except (TypeError, IndexError, NotImplementedError): + differing += ('\nUnable to index element %d of first %s\n' % + (i, seq_type_name)) + break + + try: + item2 = seq2[i] + except (TypeError, IndexError, NotImplementedError): + differing += ('\nUnable to index element %d of second %s\n' % + (i, seq_type_name)) + break + + if item1 != item2: + differing += ('\nFirst differing element %d:\n%s\n%s\n' % + (i, item1, item2)) + break + else: + if (len1 == len2 and seq_type is None and + type(seq1) != type(seq2)): + # The sequences are the same, but have differing types. + return + + if len1 > len2: + differing += ('\nFirst %s contains %d additional ' + 'elements.\n' % (seq_type_name, len1 - len2)) + try: + differing += ('First extra element %d:\n%s\n' % + (len2, seq1[len2])) + except (TypeError, IndexError, NotImplementedError): + differing += ('Unable to index element %d ' + 'of first %s\n' % (len2, seq_type_name)) + elif len1 < len2: + differing += ('\nSecond %s contains %d additional ' + 'elements.\n' % (seq_type_name, len2 - len1)) + try: + differing += ('First extra element %d:\n%s\n' % + (len1, seq2[len1])) + except (TypeError, IndexError, NotImplementedError): + differing += ('Unable to index element %d ' + 'of second %s\n' % (len1, seq_type_name)) + standardMsg = differing + '\n' + '\n'.join(difflib.ndiff(pprint.pformat(seq1).splitlines(), + pprint.pformat(seq2).splitlines())) + msg = self._formatMessage(msg, standardMsg) + self.fail(msg) + + def assertListEqual(self, list1, list2, msg=None): + """A list-specific equality assertion. + + Args: + list1: The first list to compare. + list2: The second list to compare. + msg: Optional message to use on failure instead of a list of + differences. + + """ + self.assertSequenceEqual(list1, list2, msg, seq_type=list) + + def assertTupleEqual(self, tuple1, tuple2, msg=None): + """A tuple-specific equality assertion. + + Args: + tuple1: The first tuple to compare. + tuple2: The second tuple to compare. + msg: Optional message to use on failure instead of a list of + differences. + """ + self.assertSequenceEqual(tuple1, tuple2, msg, seq_type=tuple) + + def assertSetEqual(self, set1, set2, msg=None): + """A set-specific equality assertion. + + Args: + set1: The first set to compare. + set2: The second set to compare. + msg: Optional message to use on failure instead of a list of + differences. + + For more general containership equality, assertSameElements will work + with things other than sets. This uses ducktyping to support + different types of sets, and is optimized for sets specifically + (parameters must support a difference method). + """ + try: + difference1 = set1.difference(set2) + except TypeError, e: + self.fail('invalid type when attempting set difference: %s' % e) + except AttributeError, e: + self.fail('first argument does not support set difference: %s' % e) + + try: + difference2 = set2.difference(set1) + except TypeError, e: + self.fail('invalid type when attempting set difference: %s' % e) + except AttributeError, e: + self.fail('second argument does not support set difference: %s' % e) + + if not (difference1 or difference2): + return + + lines = [] + if difference1: + lines.append('Items in the first set but not the second:') + for item in difference1: + lines.append(repr(item)) + if difference2: + lines.append('Items in the second set but not the first:') + for item in difference2: + lines.append(repr(item)) + + standardMsg = '\n'.join(lines) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertIn(self, member, container, msg=None): + """Just like self.assertTrue(a in b), but with a nicer default message.""" + if member not in container: + standardMsg = '%r not found in %r' % (member, container) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertNotIn(self, member, container, msg=None): + """Just like self.assertTrue(a not in b), but with a nicer default message.""" + if member in container: + standardMsg = '%r unexpectedly found in %r' % (member, container) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertIs(self, expr1, expr2, msg=None): + """Just like self.assertTrue(a is b), but with a nicer default message.""" + if expr1 is not expr2: + standardMsg = '%r is not %r' % (expr1, expr2) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertIsNot(self, expr1, expr2, msg=None): + """Just like self.assertTrue(a is not b), but with a nicer default message.""" + if expr1 is expr2: + standardMsg = 'unexpectedly identical: %r' % (expr1,) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertDictEqual(self, d1, d2, msg=None): + self.assert_(isinstance(d1, dict), 'First argument is not a dictionary') + self.assert_(isinstance(d2, dict), 'Second argument is not a dictionary') + + if d1 != d2: + standardMsg = ('\n' + '\n'.join(difflib.ndiff( + pprint.pformat(d1).splitlines(), + pprint.pformat(d2).splitlines()))) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertDictContainsSubset(self, expected, actual, msg=None): + """Checks whether actual is a superset of expected.""" + missing = [] + mismatched = [] + for key, value in expected.iteritems(): + if key not in actual: + missing.append(key) + elif value != actual[key]: + mismatched.append('%s, expected: %s, actual: %s' % (key, value, actual[key])) + + if not (missing or mismatched): + return + + standardMsg = '' + if missing: + standardMsg = 'Missing: %r' % ','.join(missing) + if mismatched: + if standardMsg: + standardMsg += '; ' + standardMsg += 'Mismatched values: %s' % ','.join(mismatched) + + self.fail(self._formatMessage(msg, standardMsg)) + + def assertSameElements(self, expected_seq, actual_seq, msg=None): + """An unordered sequence specific comparison. + + Raises with an error message listing which elements of expected_seq + are missing from actual_seq and vice versa if any. + """ + try: + expected = set(expected_seq) + actual = set(actual_seq) + missing = list(expected.difference(actual)) + unexpected = list(actual.difference(expected)) + missing.sort() + unexpected.sort() + except TypeError: + # Fall back to slower list-compare if any of the objects are + # not hashable. + expected = list(expected_seq) + actual = list(actual_seq) + expected.sort() + actual.sort() + missing, unexpected = util.sorted_list_difference(expected, actual) + errors = [] + if missing: + errors.append('Expected, but missing:\n %r' % missing) + if unexpected: + errors.append('Unexpected, but present:\n %r' % unexpected) + if errors: + standardMsg = '\n'.join(errors) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertMultiLineEqual(self, first, second, msg=None): + """Assert that two multi-line strings are equal.""" + self.assert_(isinstance(first, basestring), ( + 'First argument is not a string')) + self.assert_(isinstance(second, basestring), ( + 'Second argument is not a string')) + + if first != second: + standardMsg = '\n' + ''.join(difflib.ndiff(first.splitlines(True), second.splitlines(True))) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertLess(self, a, b, msg=None): + """Just like self.assertTrue(a < b), but with a nicer default message.""" + if not a < b: + standardMsg = '%r not less than %r' % (a, b) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertLessEqual(self, a, b, msg=None): + """Just like self.assertTrue(a <= b), but with a nicer default message.""" + if not a <= b: + standardMsg = '%r not less than or equal to %r' % (a, b) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertGreater(self, a, b, msg=None): + """Just like self.assertTrue(a > b), but with a nicer default message.""" + if not a > b: + standardMsg = '%r not greater than %r' % (a, b) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertGreaterEqual(self, a, b, msg=None): + """Just like self.assertTrue(a >= b), but with a nicer default message.""" + if not a >= b: + standardMsg = '%r not greater than or equal to %r' % (a, b) + self.fail(self._formatMessage(msg, standardMsg)) + + def assertIsNone(self, obj, msg=None): + """Same as self.assertTrue(obj is None), with a nicer default message.""" + if obj is not None: + standardMsg = '%r is not None' % obj + self.fail(self._formatMessage(msg, standardMsg)) + + def assertIsNotNone(self, obj, msg=None): + """Included for symmetry with assertIsNone.""" + if obj is None: + standardMsg = 'unexpectedly None' + self.fail(self._formatMessage(msg, standardMsg)) + + def assertRaisesRegexp(self, expected_exception, expected_regexp, + callable_obj=None, *args, **kwargs): + """Asserts that the message in a raised exception matches a regexp. + + Args: + expected_exception: Exception class expected to be raised. + expected_regexp: Regexp (re pattern object or string) expected + to be found in error message. + callable_obj: Function to be called. + args: Extra args. + kwargs: Extra kwargs. + """ + context = _AssertRaisesContext(expected_exception, self, expected_regexp) + if callable_obj is None: + return context + with context: + callable_obj(*args, **kwargs) + + def assertRegexpMatches(self, text, expected_regex, msg=None): + if isinstance(expected_regex, basestring): + expected_regex = re.compile(expected_regex) + if not expected_regex.search(text): + msg = msg or "Regexp didn't match" + msg = '%s: %r not found in %r' % (msg, expected_regex.pattern, text) + raise self.failureException(msg) + + +class FunctionTestCase(TestCase): + """A test case that wraps a test function. + + This is useful for slipping pre-existing test functions into the + unittest framework. Optionally, set-up and tidy-up functions can be + supplied. As with TestCase, the tidy-up ('tearDown') function will + always be called if the set-up ('setUp') function ran successfully. + """ + + def __init__(self, testFunc, setUp=None, tearDown=None, description=None): + super(FunctionTestCase, self).__init__() + self._setUpFunc = setUp + self._tearDownFunc = tearDown + self._testFunc = testFunc + self._description = description + + def setUp(self): + if self._setUpFunc is not None: + self._setUpFunc() + + def tearDown(self): + if self._tearDownFunc is not None: + self._tearDownFunc() + + def runTest(self): + self._testFunc() + + def id(self): + return self._testFunc.__name__ + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented + + return self._setUpFunc == other._setUpFunc and \ + self._tearDownFunc == other._tearDownFunc and \ + self._testFunc == other._testFunc and \ + self._description == other._description + + def __ne__(self, other): + return not self == other + + def __hash__(self): + return hash((type(self), self._setUpFunc, self._tearDownFunc, + self._testFunc, self._description)) + + def __str__(self): + return "%s (%s)" % (util.strclass(self.__class__), + self._testFunc.__name__) + + def __repr__(self): + return "<%s testFunc=%s>" % (util.strclass(self.__class__), + self._testFunc) + + def shortDescription(self): + if self._description is not None: + return self._description + doc = self._testFunc.__doc__ + return doc and doc.split("\n")[0].strip() or None Added: python/trunk/Lib/unittest/loader.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/loader.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,234 @@ +"""Loading unittests.""" + +import os +import sys +import types + +from fnmatch import fnmatch + +from . import case, suite + + +def _CmpToKey(mycmp): + 'Convert a cmp= function into a key= function' + class K(object): + def __init__(self, obj): + self.obj = obj + def __lt__(self, other): + return mycmp(self.obj, other.obj) == -1 + return K + + +class TestLoader(object): + """ + This class is responsible for loading tests according to various criteria + and returning them wrapped in a TestSuite + """ + testMethodPrefix = 'test' + sortTestMethodsUsing = cmp + suiteClass = suite.TestSuite + _top_level_dir = None + + def loadTestsFromTestCase(self, testCaseClass): + """Return a suite of all tests cases contained in testCaseClass""" + if issubclass(testCaseClass, suite.TestSuite): + raise TypeError("Test cases should not be derived from TestSuite." \ + " Maybe you meant to derive from TestCase?") + testCaseNames = self.getTestCaseNames(testCaseClass) + if not testCaseNames and hasattr(testCaseClass, 'runTest'): + testCaseNames = ['runTest'] + loaded_suite = self.suiteClass(map(testCaseClass, testCaseNames)) + return loaded_suite + + def loadTestsFromModule(self, module, use_load_tests=True): + """Return a suite of all tests cases contained in the given module""" + tests = [] + for name in dir(module): + obj = getattr(module, name) + if isinstance(obj, type) and issubclass(obj, case.TestCase): + tests.append(self.loadTestsFromTestCase(obj)) + + load_tests = getattr(module, 'load_tests', None) + if use_load_tests and load_tests is not None: + return load_tests(self, tests, None) + return self.suiteClass(tests) + + def loadTestsFromName(self, name, module=None): + """Return a suite of all tests cases given a string specifier. + + The name may resolve either to a module, a test case class, a + test method within a test case class, or a callable object which + returns a TestCase or TestSuite instance. + + The method optionally resolves the names relative to a given module. + """ + parts = name.split('.') + if module is None: + parts_copy = parts[:] + while parts_copy: + try: + module = __import__('.'.join(parts_copy)) + break + except ImportError: + del parts_copy[-1] + if not parts_copy: + raise + parts = parts[1:] + obj = module + for part in parts: + parent, obj = obj, getattr(obj, part) + + if isinstance(obj, types.ModuleType): + return self.loadTestsFromModule(obj) + elif isinstance(obj, type) and issubclass(obj, case.TestCase): + return self.loadTestsFromTestCase(obj) + elif (isinstance(obj, types.UnboundMethodType) and + isinstance(parent, type) and + issubclass(parent, case.TestCase)): + return suite.TestSuite([parent(obj.__name__)]) + elif isinstance(obj, suite.TestSuite): + return obj + elif hasattr(obj, '__call__'): + test = obj() + if isinstance(test, suite.TestSuite): + return test + elif isinstance(test, case.TestCase): + return suite.TestSuite([test]) + else: + raise TypeError("calling %s returned %s, not a test" % + (obj, test)) + else: + raise TypeError("don't know how to make test from: %s" % obj) + + def loadTestsFromNames(self, names, module=None): + """Return a suite of all tests cases found using the given sequence + of string specifiers. See 'loadTestsFromName()'. + """ + suites = [self.loadTestsFromName(name, module) for name in names] + return self.suiteClass(suites) + + def getTestCaseNames(self, testCaseClass): + """Return a sorted sequence of method names found within testCaseClass + """ + def isTestMethod(attrname, testCaseClass=testCaseClass, + prefix=self.testMethodPrefix): + return attrname.startswith(prefix) and \ + hasattr(getattr(testCaseClass, attrname), '__call__') + testFnNames = filter(isTestMethod, dir(testCaseClass)) + if self.sortTestMethodsUsing: + testFnNames.sort(key=_CmpToKey(self.sortTestMethodsUsing)) + return testFnNames + + def discover(self, start_dir, pattern='test*.py', top_level_dir=None): + """Find and return all test modules from the specified start + directory, recursing into subdirectories to find them. Only test files + that match the pattern will be loaded. (Using shell style pattern + matching.) + + All test modules must be importable from the top level of the project. + If the start directory is not the top level directory then the top + level directory must be specified separately. + + If a test package name (directory with '__init__.py') matches the + pattern then the package will be checked for a 'load_tests' function. If + this exists then it will be called with loader, tests, pattern. + + If load_tests exists then discovery does *not* recurse into the package, + load_tests is responsible for loading all tests in the package. + + The pattern is deliberately not stored as a loader attribute so that + packages can continue discovery themselves. top_level_dir is stored so + load_tests does not need to pass this argument in to loader.discover(). + """ + if top_level_dir is None and self._top_level_dir is not None: + # make top_level_dir optional if called from load_tests in a package + top_level_dir = self._top_level_dir + elif top_level_dir is None: + top_level_dir = start_dir + + top_level_dir = os.path.abspath(os.path.normpath(top_level_dir)) + start_dir = os.path.abspath(os.path.normpath(start_dir)) + + if not top_level_dir in sys.path: + # all test modules must be importable from the top level directory + sys.path.append(top_level_dir) + self._top_level_dir = top_level_dir + + if start_dir != top_level_dir and not os.path.isfile(os.path.join(start_dir, '__init__.py')): + # what about __init__.pyc or pyo (etc) + raise ImportError('Start directory is not importable: %r' % start_dir) + + tests = list(self._find_tests(start_dir, pattern)) + return self.suiteClass(tests) + + + def _get_module_from_path(self, path): + """Load a module from a path relative to the top-level directory + of a project. Used by discovery.""" + path = os.path.splitext(os.path.normpath(path))[0] + + relpath = os.path.relpath(path, self._top_level_dir) + assert not os.path.isabs(relpath), "Path must be within the project" + assert not relpath.startswith('..'), "Path must be within the project" + + name = relpath.replace(os.path.sep, '.') + __import__(name) + return sys.modules[name] + + def _find_tests(self, start_dir, pattern): + """Used by discovery. Yields test suites it loads.""" + paths = os.listdir(start_dir) + + for path in paths: + full_path = os.path.join(start_dir, path) + # what about __init__.pyc or pyo (etc) + # we would need to avoid loading the same tests multiple times + # from '.py', '.pyc' *and* '.pyo' + if os.path.isfile(full_path) and path.lower().endswith('.py'): + if fnmatch(path, pattern): + # if the test file matches, load it + module = self._get_module_from_path(full_path) + yield self.loadTestsFromModule(module) + elif os.path.isdir(full_path): + if not os.path.isfile(os.path.join(full_path, '__init__.py')): + continue + + load_tests = None + tests = None + if fnmatch(path, pattern): + # only check load_tests if the package directory itself matches the filter + package = self._get_module_from_path(full_path) + load_tests = getattr(package, 'load_tests', None) + tests = self.loadTestsFromModule(package, use_load_tests=False) + + if load_tests is None: + if tests is not None: + # tests loaded from package file + yield tests + # recurse into the package + for test in self._find_tests(full_path, pattern): + yield test + else: + yield load_tests(self, tests, pattern) + +defaultTestLoader = TestLoader() + + +def _makeLoader(prefix, sortUsing, suiteClass=None): + loader = TestLoader() + loader.sortTestMethodsUsing = sortUsing + loader.testMethodPrefix = prefix + if suiteClass: + loader.suiteClass = suiteClass + return loader + +def getTestCaseNames(testCaseClass, prefix, sortUsing=cmp): + return _makeLoader(prefix, sortUsing).getTestCaseNames(testCaseClass) + +def makeSuite(testCaseClass, prefix='test', sortUsing=cmp, + suiteClass=suite.TestSuite): + return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromTestCase(testCaseClass) + +def findTestCases(module, prefix='test', sortUsing=cmp, + suiteClass=suite.TestSuite): + return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule(module) Added: python/trunk/Lib/unittest/main.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/main.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,175 @@ +"""Unittest main program""" + +import sys +import os +import types + +from . import loader, runner + + +USAGE_AS_MAIN = """\ +Usage: %(progName)s [options] [tests] + +Options: + -h, --help Show this message + -v, --verbose Verbose output + -q, --quiet Minimal output + +Examples: + %(progName)s test_module - run tests from test_module + %(progName)s test_module.TestClass - run tests from + test_module.TestClass + %(progName)s test_module.TestClass.test_method - run specified test method + +[tests] can be a list of any number of test modules, classes and test +methods. + +Alternative Usage: %(progName)s discover [options] + +Options: + -v, --verbose Verbose output + -s directory Directory to start discovery ('.' default) + -p pattern Pattern to match test files ('test*.py' default) + -t directory Top level directory of project (default to + start directory) + +For test discovery all test modules must be importable from the top +level directory of the project. +""" + +USAGE_FROM_MODULE = """\ +Usage: %(progName)s [options] [test] [...] + +Options: + -h, --help Show this message + -v, --verbose Verbose output + -q, --quiet Minimal output + +Examples: + %(progName)s - run default set of tests + %(progName)s MyTestSuite - run suite 'MyTestSuite' + %(progName)s MyTestCase.testSomething - run MyTestCase.testSomething + %(progName)s MyTestCase - run all 'test*' test methods + in MyTestCase +""" + +if __name__ == '__main__': + USAGE = USAGE_AS_MAIN +else: + USAGE = USAGE_FROM_MODULE + + +class TestProgram(object): + """A command-line program that runs a set of tests; this is primarily + for making test modules conveniently executable. + """ + USAGE = USAGE + def __init__(self, module='__main__', defaultTest=None, + argv=None, testRunner=None, + testLoader=loader.defaultTestLoader, exit=True, + verbosity=1): + if isinstance(module, basestring): + self.module = __import__(module) + for part in module.split('.')[1:]: + self.module = getattr(self.module, part) + else: + self.module = module + if argv is None: + argv = sys.argv + + self.exit = exit + self.verbosity = verbosity + self.defaultTest = defaultTest + self.testRunner = testRunner + self.testLoader = testLoader + self.progName = os.path.basename(argv[0]) + self.parseArgs(argv) + self.runTests() + + def usageExit(self, msg=None): + if msg: + print msg + print self.USAGE % self.__dict__ + sys.exit(2) + + def parseArgs(self, argv): + if len(argv) > 1 and argv[1].lower() == 'discover': + self._do_discovery(argv[2:]) + return + + import getopt + long_opts = ['help','verbose','quiet'] + try: + options, args = getopt.getopt(argv[1:], 'hHvq', long_opts) + for opt, value in options: + if opt in ('-h','-H','--help'): + self.usageExit() + if opt in ('-q','--quiet'): + self.verbosity = 0 + if opt in ('-v','--verbose'): + self.verbosity = 2 + if len(args) == 0 and self.defaultTest is None: + self.test = self.testLoader.loadTestsFromModule(self.module) + return + if len(args) > 0: + self.testNames = args + if __name__ == '__main__': + # to support python -m unittest ... + self.module = None + else: + self.testNames = (self.defaultTest,) + self.createTests() + except getopt.error, msg: + self.usageExit(msg) + + def createTests(self): + self.test = self.testLoader.loadTestsFromNames(self.testNames, + self.module) + + def _do_discovery(self, argv, Loader=loader.TestLoader): + # handle command line args for test discovery + import optparse + parser = optparse.OptionParser() + parser.add_option('-v', '--verbose', dest='verbose', default=False, + help='Verbose output', action='store_true') + parser.add_option('-s', '--start-directory', dest='start', default='.', + help="Directory to start discovery ('.' default)") + parser.add_option('-p', '--pattern', dest='pattern', default='test*.py', + help="Pattern to match tests ('test*.py' default)") + parser.add_option('-t', '--top-level-directory', dest='top', default=None, + help='Top level directory of project (defaults to start directory)') + + options, args = parser.parse_args(argv) + if len(args) > 3: + self.usageExit() + + for name, value in zip(('start', 'pattern', 'top'), args): + setattr(options, name, value) + + if options.verbose: + self.verbosity = 2 + + start_dir = options.start + pattern = options.pattern + top_level_dir = options.top + + loader = Loader() + self.test = loader.discover(start_dir, pattern, top_level_dir) + + def runTests(self): + if self.testRunner is None: + self.testRunner = runner.TextTestRunner + if isinstance(self.testRunner, (type, types.ClassType)): + try: + testRunner = self.testRunner(verbosity=self.verbosity) + except TypeError: + # didn't accept the verbosity argument + testRunner = self.testRunner() + else: + # it is assumed to be a TestRunner instance + testRunner = self.testRunner + self.result = testRunner.run(self.test) + if self.exit: + sys.exit(not self.result.wasSuccessful()) + +main = TestProgram Added: python/trunk/Lib/unittest/result.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/result.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,113 @@ +"""Test result object""" + +import traceback + +from . import util + + +class TestResult(object): + """Holder for test result information. + + Test results are automatically managed by the TestCase and TestSuite + classes, and do not need to be explicitly manipulated by writers of tests. + + Each instance holds the total number of tests run, and collections of + failures and errors that occurred among those test runs. The collections + contain tuples of (testcase, exceptioninfo), where exceptioninfo is the + formatted traceback of the error that occurred. + """ + def __init__(self): + self.failures = [] + self.errors = [] + self.testsRun = 0 + self.skipped = [] + self.expectedFailures = [] + self.unexpectedSuccesses = [] + self.shouldStop = False + + def startTest(self, test): + "Called when the given test is about to be run" + self.testsRun = self.testsRun + 1 + + def startTestRun(self): + """Called once before any tests are executed. + + See startTest for a method called before each test. + """ + + def stopTest(self, test): + "Called when the given test has been run" + pass + + def stopTestRun(self): + """Called once after all tests are executed. + + See stopTest for a method called after each test. + """ + + def addError(self, test, err): + """Called when an error has occurred. 'err' is a tuple of values as + returned by sys.exc_info(). + """ + self.errors.append((test, self._exc_info_to_string(err, test))) + + def addFailure(self, test, err): + """Called when an error has occurred. 'err' is a tuple of values as + returned by sys.exc_info().""" + self.failures.append((test, self._exc_info_to_string(err, test))) + + def addSuccess(self, test): + "Called when a test has completed successfully" + pass + + def addSkip(self, test, reason): + """Called when a test is skipped.""" + self.skipped.append((test, reason)) + + def addExpectedFailure(self, test, err): + """Called when an expected failure/error occured.""" + self.expectedFailures.append( + (test, self._exc_info_to_string(err, test))) + + def addUnexpectedSuccess(self, test): + """Called when a test was expected to fail, but succeed.""" + self.unexpectedSuccesses.append(test) + + def wasSuccessful(self): + "Tells whether or not this result was a success" + return len(self.failures) == len(self.errors) == 0 + + def stop(self): + "Indicates that the tests should be aborted" + self.shouldStop = True + + def _exc_info_to_string(self, err, test): + """Converts a sys.exc_info()-style tuple of values into a string.""" + exctype, value, tb = err + # Skip test runner traceback levels + while tb and self._is_relevant_tb_level(tb): + tb = tb.tb_next + if exctype is test.failureException: + # Skip assert*() traceback levels + length = self._count_relevant_tb_levels(tb) + return ''.join(traceback.format_exception(exctype, value, tb, length)) + return ''.join(traceback.format_exception(exctype, value, tb)) + + def _is_relevant_tb_level(self, tb): + globs = tb.tb_frame.f_globals + is_relevant = '__name__' in globs and \ + globs["__name__"].startswith("unittest") + del globs + return is_relevant + + def _count_relevant_tb_levels(self, tb): + length = 0 + while tb and not self._is_relevant_tb_level(tb): + length += 1 + tb = tb.tb_next + return length + + def __repr__(self): + return "<%s run=%i errors=%i failures=%i>" % \ + (util.strclass(self.__class__), self.testsRun, len(self.errors), + len(self.failures)) Added: python/trunk/Lib/unittest/runner.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/runner.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,172 @@ +"""Running tests""" + +import sys +import time + +from . import result + + +class _WritelnDecorator(object): + """Used to decorate file-like objects with a handy 'writeln' method""" + def __init__(self,stream): + self.stream = stream + + def __getattr__(self, attr): + return getattr(self.stream,attr) + + def writeln(self, arg=None): + if arg: + self.write(arg) + self.write('\n') # text-mode streams translate to \r\n if needed + + +class _TextTestResult(result.TestResult): + """A test result class that can print formatted text results to a stream. + + Used by TextTestRunner. + """ + separator1 = '=' * 70 + separator2 = '-' * 70 + + def __init__(self, stream, descriptions, verbosity): + super(_TextTestResult, self).__init__() + self.stream = stream + self.showAll = verbosity > 1 + self.dots = verbosity == 1 + self.descriptions = descriptions + + def getDescription(self, test): + if self.descriptions: + return test.shortDescription() or str(test) + else: + return str(test) + + def startTest(self, test): + super(_TextTestResult, self).startTest(test) + if self.showAll: + self.stream.write(self.getDescription(test)) + self.stream.write(" ... ") + self.stream.flush() + + def addSuccess(self, test): + super(_TextTestResult, self).addSuccess(test) + if self.showAll: + self.stream.writeln("ok") + elif self.dots: + self.stream.write('.') + self.stream.flush() + + def addError(self, test, err): + super(_TextTestResult, self).addError(test, err) + if self.showAll: + self.stream.writeln("ERROR") + elif self.dots: + self.stream.write('E') + self.stream.flush() + + def addFailure(self, test, err): + super(_TextTestResult, self).addFailure(test, err) + if self.showAll: + self.stream.writeln("FAIL") + elif self.dots: + self.stream.write('F') + self.stream.flush() + + def addSkip(self, test, reason): + super(_TextTestResult, self).addSkip(test, reason) + if self.showAll: + self.stream.writeln("skipped {0!r}".format(reason)) + elif self.dots: + self.stream.write("s") + self.stream.flush() + + def addExpectedFailure(self, test, err): + super(_TextTestResult, self).addExpectedFailure(test, err) + if self.showAll: + self.stream.writeln("expected failure") + elif self.dots: + self.stream.write("x") + self.stream.flush() + + def addUnexpectedSuccess(self, test): + super(_TextTestResult, self).addUnexpectedSuccess(test) + if self.showAll: + self.stream.writeln("unexpected success") + elif self.dots: + self.stream.write("u") + self.stream.flush() + + def printErrors(self): + if self.dots or self.showAll: + self.stream.writeln() + self.printErrorList('ERROR', self.errors) + self.printErrorList('FAIL', self.failures) + + def printErrorList(self, flavour, errors): + for test, err in errors: + self.stream.writeln(self.separator1) + self.stream.writeln("%s: %s" % (flavour,self.getDescription(test))) + self.stream.writeln(self.separator2) + self.stream.writeln("%s" % err) + + +class TextTestRunner(object): + """A test runner class that displays results in textual form. + + It prints out the names of tests as they are run, errors as they + occur, and a summary of the results at the end of the test run. + """ + def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1): + self.stream = _WritelnDecorator(stream) + self.descriptions = descriptions + self.verbosity = verbosity + + def _makeResult(self): + return _TextTestResult(self.stream, self.descriptions, self.verbosity) + + def run(self, test): + "Run the given test case or test suite." + result = self._makeResult() + startTime = time.time() + startTestRun = getattr(result, 'startTestRun', None) + if startTestRun is not None: + startTestRun() + try: + test(result) + finally: + stopTestRun = getattr(result, 'stopTestRun', None) + if stopTestRun is not None: + stopTestRun() + stopTime = time.time() + timeTaken = stopTime - startTime + result.printErrors() + self.stream.writeln(result.separator2) + run = result.testsRun + self.stream.writeln("Ran %d test%s in %.3fs" % + (run, run != 1 and "s" or "", timeTaken)) + self.stream.writeln() + results = map(len, (result.expectedFailures, + result.unexpectedSuccesses, + result.skipped)) + expectedFails, unexpectedSuccesses, skipped = results + infos = [] + if not result.wasSuccessful(): + self.stream.write("FAILED") + failed, errored = map(len, (result.failures, result.errors)) + if failed: + infos.append("failures=%d" % failed) + if errored: + infos.append("errors=%d" % errored) + else: + self.stream.write("OK") + if skipped: + infos.append("skipped=%d" % skipped) + if expectedFails: + infos.append("expected failures=%d" % expectedFails) + if unexpectedSuccesses: + infos.append("unexpected successes=%d" % unexpectedSuccesses) + if infos: + self.stream.writeln(" (%s)" % (", ".join(infos),)) + else: + self.stream.write("\n") + return result Added: python/trunk/Lib/unittest/suite.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/suite.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,71 @@ +"""TestSuite""" + +from . import case + + +class TestSuite(object): + """A test suite is a composite test consisting of a number of TestCases. + + For use, create an instance of TestSuite, then add test case instances. + When all tests have been added, the suite can be passed to a test + runner, such as TextTestRunner. It will run the individual test cases + in the order in which they were added, aggregating the results. When + subclassing, do not forget to call the base class constructor. + """ + def __init__(self, tests=()): + self._tests = [] + self.addTests(tests) + + def __repr__(self): + return "<%s tests=%s>" % (_strclass(self.__class__), list(self)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented + return list(self) == list(other) + + def __ne__(self, other): + return not self == other + + # Can't guarantee hash invariant, so flag as unhashable + __hash__ = None + + def __iter__(self): + return iter(self._tests) + + def countTestCases(self): + cases = 0 + for test in self: + cases += test.countTestCases() + return cases + + def addTest(self, test): + # sanity checks + if not hasattr(test, '__call__'): + raise TypeError("the test to add must be callable") + if isinstance(test, type) and issubclass(test, + (case.TestCase, TestSuite)): + raise TypeError("TestCases and TestSuites must be instantiated " + "before passing them to addTest()") + self._tests.append(test) + + def addTests(self, tests): + if isinstance(tests, basestring): + raise TypeError("tests must be an iterable of tests, not a string") + for test in tests: + self.addTest(test) + + def run(self, result): + for test in self: + if result.shouldStop: + break + test(result) + return result + + def __call__(self, *args, **kwds): + return self.run(*args, **kwds) + + def debug(self): + """Run the tests without collecting errors in a TestResult""" + for test in self: + test.debug() Added: python/trunk/Lib/unittest/util.py ============================================================================== --- (empty file) +++ python/trunk/Lib/unittest/util.py Sun Jul 19 22:18:21 2009 @@ -0,0 +1,44 @@ +"""Various utility functions.""" + +def strclass(cls): + return "%s.%s" % (cls.__module__, cls.__name__) + +def sorted_list_difference(expected, actual): + """Finds elements in only one or the other of two, sorted input lists. + + Returns a two-element tuple of lists. The first list contains those + elements in the "expected" list but not in the "actual" list, and the + second contains those elements in the "actual" list but not in the + "expected" list. Duplicate elements in either input list are ignored. + """ + i = j = 0 + missing = [] + unexpected = [] + while True: + try: + e = expected[i] + a = actual[j] + if e < a: + missing.append(e) + i += 1 + while expected[i] == e: + i += 1 + elif e > a: + unexpected.append(a) + j += 1 + while actual[j] == a: + j += 1 + else: + i += 1 + try: + while expected[i] == e: + i += 1 + finally: + j += 1 + while actual[j] == a: + j += 1 + except IndexError: + missing.extend(expected[i:]) + unexpected.extend(actual[j:]) + break + return missing, unexpected Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Jul 19 22:18:21 2009 @@ -352,6 +352,8 @@ Library ------- +- unittest has been split up into a package. All old names should still work. + - Issue #6431: Make Fraction type return NotImplemented when it doesn't know how to handle a comparison without loss of precision. Also add correct handling of infinities and nans for comparisons with float. From buildbot at python.org Sun Jul 19 22:51:52 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 20:51:52 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/320 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_mailbox make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sun Jul 19 23:01:52 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 19 Jul 2009 21:01:52 -0000 Subject: [Python-checkins] r74096 - in python/branches/py3k: Lib/test/test_doctest.py Lib/test/test_linecache.py Lib/test/test_pyclbr.py Lib/test/test_unittest.py Lib/unittest Lib/unittest.py Lib/unittest/case.py Lib/unittest/loader.py Lib/unittest/main.py Lib/unittest/runner.py Lib/unittest/suite.py Lib/unittest/util.py Misc/NEWS Message-ID: Author: benjamin.peterson Date: Sun Jul 19 23:01:52 2009 New Revision: 74096 Log: Merged revisions 74095 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74095 | benjamin.peterson | 2009-07-19 15:18:21 -0500 (Sun, 19 Jul 2009) | 1 line split unittest.py into a package ........ Added: python/branches/py3k/Lib/unittest/ - copied from r74095, /python/trunk/Lib/unittest/ Removed: python/branches/py3k/Lib/unittest.py Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_doctest.py python/branches/py3k/Lib/test/test_linecache.py python/branches/py3k/Lib/test/test_pyclbr.py python/branches/py3k/Lib/test/test_unittest.py python/branches/py3k/Lib/unittest/case.py python/branches/py3k/Lib/unittest/loader.py python/branches/py3k/Lib/unittest/main.py python/branches/py3k/Lib/unittest/runner.py python/branches/py3k/Lib/unittest/suite.py python/branches/py3k/Lib/unittest/util.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/test/test_doctest.py ============================================================================== --- python/branches/py3k/Lib/test/test_doctest.py (original) +++ python/branches/py3k/Lib/test/test_doctest.py Sun Jul 19 23:01:52 2009 @@ -1813,19 +1813,19 @@ >>> import test.sample_doctest >>> suite = doctest.DocTestSuite(test.sample_doctest) >>> suite.run(unittest.TestResult()) - + We can also supply the module by name: >>> suite = doctest.DocTestSuite('test.sample_doctest') >>> suite.run(unittest.TestResult()) - + We can use the current module: >>> suite = test.sample_doctest.test_suite() >>> suite.run(unittest.TestResult()) - + We can supply global variables. If we pass globs, they will be used instead of the module globals. Here we'll pass an empty @@ -1833,7 +1833,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', globs={}) >>> suite.run(unittest.TestResult()) - + Alternatively, we can provide extra globals. Here we'll make an error go away by providing an extra global variable: @@ -1841,7 +1841,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', ... extraglobs={'y': 1}) >>> suite.run(unittest.TestResult()) - + You can pass option flags. Here we'll cause an extra error by disabling the blank-line feature: @@ -1849,7 +1849,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', ... optionflags=doctest.DONT_ACCEPT_BLANKLINE) >>> suite.run(unittest.TestResult()) - + You can supply setUp and tearDown functions: @@ -1866,7 +1866,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', ... setUp=setUp, tearDown=tearDown) >>> suite.run(unittest.TestResult()) - + But the tearDown restores sanity: @@ -1884,7 +1884,7 @@ >>> suite = doctest.DocTestSuite('test.sample_doctest', setUp=setUp) >>> suite.run(unittest.TestResult()) - + Here, we didn't need to use a tearDown function because we modified the test globals, which are a copy of the @@ -1903,7 +1903,7 @@ ... 'test_doctest2.txt', ... 'test_doctest4.txt') >>> suite.run(unittest.TestResult()) - + The test files are looked for in the directory containing the calling module. A package keyword argument can be provided to @@ -1915,7 +1915,7 @@ ... 'test_doctest4.txt', ... package='test') >>> suite.run(unittest.TestResult()) - + Support for using a package's __loader__.get_data() is also provided. @@ -1934,14 +1934,14 @@ ... finally: ... if added_loader: ... del test.__loader__ - + '/' should be used as a path separator. It will be converted to a native separator at run time: >>> suite = doctest.DocFileSuite('../test/test_doctest.txt') >>> suite.run(unittest.TestResult()) - + If DocFileSuite is used from an interactive session, then files are resolved relative to the directory of sys.argv[0]: @@ -1966,7 +1966,7 @@ >>> suite = doctest.DocFileSuite(test_file, module_relative=False) >>> suite.run(unittest.TestResult()) - + It is an error to specify `package` when `module_relative=False`: @@ -1982,7 +1982,7 @@ ... 'test_doctest4.txt', ... globs={'favorite_color': 'blue'}) >>> suite.run(unittest.TestResult()) - + In this case, we supplied a missing favorite color. You can provide doctest options: @@ -1993,7 +1993,7 @@ ... optionflags=doctest.DONT_ACCEPT_BLANKLINE, ... globs={'favorite_color': 'blue'}) >>> suite.run(unittest.TestResult()) - + And, you can provide setUp and tearDown functions: @@ -2012,7 +2012,7 @@ ... 'test_doctest4.txt', ... setUp=setUp, tearDown=tearDown) >>> suite.run(unittest.TestResult()) - + But the tearDown restores sanity: @@ -2031,7 +2031,7 @@ >>> suite = doctest.DocFileSuite('test_doctest.txt', setUp=setUp) >>> suite.run(unittest.TestResult()) - + Here, we didn't need to use a tearDown function because we modified the test globals. The test globals are @@ -2043,7 +2043,7 @@ >>> suite = doctest.DocFileSuite('test_doctest3.txt') >>> suite.run(unittest.TestResult()) - + If the tests contain non-ASCII characters, we have to specify which encoding the file is encoded with. We do so by using the `encoding` @@ -2054,7 +2054,7 @@ ... 'test_doctest4.txt', ... encoding='utf-8') >>> suite.run(unittest.TestResult()) - + """ Modified: python/branches/py3k/Lib/test/test_linecache.py ============================================================================== --- python/branches/py3k/Lib/test/test_linecache.py (original) +++ python/branches/py3k/Lib/test/test_linecache.py Sun Jul 19 23:01:52 2009 @@ -12,7 +12,7 @@ TESTS = 'cjkencodings_test inspect_fodder inspect_fodder2 mapping_tests' TESTS = TESTS.split() TEST_PATH = os.path.dirname(support.__file__) -MODULES = "linecache unittest".split() +MODULES = "linecache abc".split() MODULE_PATH = os.path.dirname(FILENAME) SOURCE_1 = ''' Modified: python/branches/py3k/Lib/test/test_pyclbr.py ============================================================================== --- python/branches/py3k/Lib/test/test_pyclbr.py (original) +++ python/branches/py3k/Lib/test/test_pyclbr.py Sun Jul 19 23:01:52 2009 @@ -141,7 +141,8 @@ def test_easy(self): self.checkModule('pyclbr') self.checkModule('ast') - self.checkModule('doctest', ignore=("TestResults", "_SpoofOut")) + self.checkModule('doctest', ignore=("TestResults", "_SpoofOut", + "DocTestCase")) self.checkModule('difflib', ignore=("Match",)) def test_decorators(self): Modified: python/branches/py3k/Lib/test/test_unittest.py ============================================================================== --- python/branches/py3k/Lib/test/test_unittest.py (original) +++ python/branches/py3k/Lib/test/test_unittest.py Sun Jul 19 23:01:52 2009 @@ -6,6 +6,7 @@ TestCase.{assert,fail}* methods (some are tested implicitly) """ +import builtins import os import re import sys @@ -3389,9 +3390,10 @@ def test_get_module_from_path(self): loader = unittest.TestLoader() + old_import = __import__ def restore_import(): - unittest.__import__ = __import__ - unittest.__import__ = lambda *_: None + builtins.__import__ = old_import + builtins.__import__ = lambda *_: None self.addCleanup(restore_import) expected_module = object() Deleted: python/branches/py3k/Lib/unittest.py ============================================================================== --- python/branches/py3k/Lib/unittest.py Sun Jul 19 23:01:52 2009 +++ (empty file) @@ -1,1800 +0,0 @@ -#!/usr/bin/env python -''' -Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's -Smalltalk testing framework. - -This module contains the core framework classes that form the basis of -specific test cases and suites (TestCase, TestSuite etc.), and also a -text-based utility class for running the tests and reporting the results - (TextTestRunner). - -Simple usage: - - import unittest - - class IntegerArithmenticTestCase(unittest.TestCase): - def testAdd(self): ## test method names begin 'test*' - self.assertEqual((1 + 2), 3) - self.assertEqual(0 + 1, 1) - def testMultiply(self): - self.assertEqual((0 * 10), 0) - self.assertEqual((5 * 8), 40) - - if __name__ == '__main__': - unittest.main() - -Further information is available in the bundled documentation, and from - - http://docs.python.org/library/unittest.html - -Copyright (c) 1999-2003 Steve Purcell -Copyright (c) 2003-2009 Python Software Foundation -This module is free software, and you may redistribute it and/or modify -it under the same terms as Python itself, so long as this copyright message -and disclaimer are retained in their original form. - -IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF -THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, -AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, -SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -''' - -import difflib -import functools -import os -import pprint -import re -import sys -import time -import traceback -import types -import warnings - -from fnmatch import fnmatch - - -############################################################################## -# Exported classes and functions -############################################################################## -__all__ = ['TestResult', 'TestCase', 'TestSuite', - 'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main', - 'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless', - 'expectedFailure'] - -# Expose obsolete functions for backwards compatibility -__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases']) - - -############################################################################## -# Test framework core -############################################################################## - -def _strclass(cls): - return "%s.%s" % (cls.__module__, cls.__name__) - - -class SkipTest(Exception): - """ - Raise this exception in a test to skip it. - - Usually you can use TestResult.skip() or one of the skipping decorators - instead of raising this directly. - """ - pass - -class _ExpectedFailure(Exception): - """ - Raise this when a test is expected to fail. - - This is an implementation detail. - """ - - def __init__(self, exc_info): - super(_ExpectedFailure, self).__init__() - self.exc_info = exc_info - -class _UnexpectedSuccess(Exception): - """ - The test was supposed to fail, but it didn't! - """ - pass - -def _id(obj): - return obj - -def skip(reason): - """ - Unconditionally skip a test. - """ - def decorator(test_item): - if isinstance(test_item, type) and issubclass(test_item, TestCase): - test_item.__unittest_skip__ = True - test_item.__unittest_skip_why__ = reason - return test_item - @functools.wraps(test_item) - def skip_wrapper(*args, **kwargs): - raise SkipTest(reason) - return skip_wrapper - return decorator - -def skipIf(condition, reason): - """ - Skip a test if the condition is true. - """ - if condition: - return skip(reason) - return _id - -def skipUnless(condition, reason): - """ - Skip a test unless the condition is true. - """ - if not condition: - return skip(reason) - return _id - - -def expectedFailure(func): - @functools.wraps(func) - def wrapper(*args, **kwargs): - try: - func(*args, **kwargs) - except Exception: - raise _ExpectedFailure(sys.exc_info()) - raise _UnexpectedSuccess - return wrapper - -__unittest = 1 - -class TestResult(object): - """Holder for test result information. - - Test results are automatically managed by the TestCase and TestSuite - classes, and do not need to be explicitly manipulated by writers of tests. - - Each instance holds the total number of tests run, and collections of - failures and errors that occurred among those test runs. The collections - contain tuples of (testcase, exceptioninfo), where exceptioninfo is the - formatted traceback of the error that occurred. - """ - def __init__(self): - self.failures = [] - self.errors = [] - self.testsRun = 0 - self.skipped = [] - self.expectedFailures = [] - self.unexpectedSuccesses = [] - self.shouldStop = False - - def startTest(self, test): - "Called when the given test is about to be run" - self.testsRun = self.testsRun + 1 - - def startTestRun(self): - """Called once before any tests are executed. - - See startTest for a method called before each test. - """ - - def stopTest(self, test): - "Called when the given test has been run" - pass - - def stopTestRun(self): - """Called once after all tests are executed. - - See stopTest for a method called after each test. - """ - - def addError(self, test, err): - """Called when an error has occurred. 'err' is a tuple of values as - returned by sys.exc_info(). - """ - self.errors.append((test, self._exc_info_to_string(err, test))) - - def addFailure(self, test, err): - """Called when an error has occurred. 'err' is a tuple of values as - returned by sys.exc_info().""" - self.failures.append((test, self._exc_info_to_string(err, test))) - - def addSuccess(self, test): - "Called when a test has completed successfully" - pass - - def addSkip(self, test, reason): - """Called when a test is skipped.""" - self.skipped.append((test, reason)) - - def addExpectedFailure(self, test, err): - """Called when an expected failure/error occured.""" - self.expectedFailures.append( - (test, self._exc_info_to_string(err, test))) - - def addUnexpectedSuccess(self, test): - """Called when a test was expected to fail, but succeed.""" - self.unexpectedSuccesses.append(test) - - def wasSuccessful(self): - "Tells whether or not this result was a success" - return len(self.failures) == len(self.errors) == 0 - - def stop(self): - "Indicates that the tests should be aborted" - self.shouldStop = True - - def _exc_info_to_string(self, err, test): - """Converts a sys.exc_info()-style tuple of values into a string.""" - exctype, value, tb = err - # Skip test runner traceback levels - while tb and self._is_relevant_tb_level(tb): - tb = tb.tb_next - if exctype is test.failureException: - # Skip assert*() traceback levels - length = self._count_relevant_tb_levels(tb) - return ''.join(traceback.format_exception(exctype, value, - tb, length)) - return ''.join(traceback.format_exception(exctype, value, tb)) - - def _is_relevant_tb_level(self, tb): - return '__unittest' in tb.tb_frame.f_globals - - def _count_relevant_tb_levels(self, tb): - length = 0 - while tb and not self._is_relevant_tb_level(tb): - length += 1 - tb = tb.tb_next - return length - - def __repr__(self): - return "<%s run=%i errors=%i failures=%i>" % \ - (_strclass(self.__class__), self.testsRun, len(self.errors), - len(self.failures)) - - -class _AssertRaisesContext(object): - """A context manager used to implement TestCase.assertRaises* methods.""" - - - def __init__(self, expected, test_case, callable_obj=None, - expected_regexp=None): - self.expected = expected - self.failureException = test_case.failureException - if callable_obj is not None: - try: - self.obj_name = callable_obj.__name__ - except AttributeError: - self.obj_name = str(callable_obj) - else: - self.obj_name = None - self.expected_regex = expected_regexp - - def __enter__(self): - pass - - def __exit__(self, exc_type, exc_value, tb): - if exc_type is None: - try: - exc_name = self.expected.__name__ - except AttributeError: - exc_name = str(self.expected) - if self.obj_name: - raise self.failureException("{0} not raised by {1}" - .format(exc_name, self.obj_name)) - else: - raise self.failureException("{0} not raised" - .format(exc_name)) - if not issubclass(exc_type, self.expected): - # let unexpected exceptions pass through - return False - if self.expected_regex is None: - return True - - expected_regexp = self.expected_regex - if isinstance(expected_regexp, (bytes, str)): - expected_regexp = re.compile(expected_regexp) - if not expected_regexp.search(str(exc_value)): - raise self.failureException('"%s" does not match "%s"' % - (expected_regexp.pattern, str(exc_value))) - return True - - -class _AssertWrapper(object): - """Wrap entries in the _type_equality_funcs registry to make them deep - copyable.""" - - def __init__(self, function): - self.function = function - - def __deepcopy__(self, memo): - memo[id(self)] = self - - -class TestCase(object): - """A class whose instances are single test cases. - - By default, the test code itself should be placed in a method named - 'runTest'. - - If the fixture may be used for many test cases, create as - many test methods as are needed. When instantiating such a TestCase - subclass, specify in the constructor arguments the name of the test method - that the instance is to execute. - - Test authors should subclass TestCase for their own tests. Construction - and deconstruction of the test's environment ('fixture') can be - implemented by overriding the 'setUp' and 'tearDown' methods respectively. - - If it is necessary to override the __init__ method, the base class - __init__ method must always be called. It is important that subclasses - should not change the signature of their __init__ method, since instances - of the classes are instantiated automatically by parts of the framework - in order to be run. - """ - - # This attribute determines which exception will be raised when - # the instance's assertion methods fail; test methods raising this - # exception will be deemed to have 'failed' rather than 'errored' - - failureException = AssertionError - - # This attribute determines whether long messages (including repr of - # objects used in assert methods) will be printed on failure in *addition* - # to any explicit message passed. - - longMessage = False - - - def __init__(self, methodName='runTest'): - """Create an instance of the class that will use the named test - method when executed. Raises a ValueError if the instance does - not have a method with the specified name. - """ - self._testMethodName = methodName - self._resultForDoCleanups = None - try: - testMethod = getattr(self, methodName) - except AttributeError: - raise ValueError("no such test method in %s: %s" % \ - (self.__class__, methodName)) - self._testMethodDoc = testMethod.__doc__ - self._cleanups = [] - - # Map types to custom assertEqual functions that will compare - # instances of said type in more detail to generate a more useful - # error message. - self._type_equality_funcs = {} - self.addTypeEqualityFunc(dict, self.assertDictEqual) - self.addTypeEqualityFunc(list, self.assertListEqual) - self.addTypeEqualityFunc(tuple, self.assertTupleEqual) - self.addTypeEqualityFunc(set, self.assertSetEqual) - self.addTypeEqualityFunc(frozenset, self.assertSetEqual) - - def addTypeEqualityFunc(self, typeobj, function): - """Add a type specific assertEqual style function to compare a type. - - This method is for use by TestCase subclasses that need to register - their own type equality functions to provide nicer error messages. - - Args: - typeobj: The data type to call this function on when both values - are of the same type in assertEqual(). - function: The callable taking two arguments and an optional - msg= argument that raises self.failureException with a - useful error message when the two arguments are not equal. - """ - self._type_equality_funcs[typeobj] = _AssertWrapper(function) - - def addCleanup(self, function, *args, **kwargs): - """Add a function, with arguments, to be called when the test is - completed. Functions added are called on a LIFO basis and are - called after tearDown on test failure or success. - - Cleanup items are called even if setUp fails (unlike tearDown).""" - self._cleanups.append((function, args, kwargs)) - - def setUp(self): - "Hook method for setting up the test fixture before exercising it." - pass - - def tearDown(self): - "Hook method for deconstructing the test fixture after testing it." - pass - - def countTestCases(self): - return 1 - - def defaultTestResult(self): - return TestResult() - - def shortDescription(self): - """Returns both the test method name and first line of its docstring. - - If no docstring is given, only returns the method name. - - This method overrides unittest.TestCase.shortDescription(), which - only returns the first line of the docstring, obscuring the name - of the test upon failure. - """ - desc = str(self) - doc_first_line = None - - if self._testMethodDoc: - doc_first_line = self._testMethodDoc.split("\n")[0].strip() - if doc_first_line: - desc = '\n'.join((desc, doc_first_line)) - return desc - - def id(self): - return "%s.%s" % (_strclass(self.__class__), self._testMethodName) - - def __eq__(self, other): - if type(self) is not type(other): - return NotImplemented - - return self._testMethodName == other._testMethodName - - def __ne__(self, other): - return not self == other - - def __hash__(self): - return hash((type(self), self._testMethodName)) - - def __str__(self): - return "%s (%s)" % (self._testMethodName, _strclass(self.__class__)) - - def __repr__(self): - return "<%s testMethod=%s>" % \ - (_strclass(self.__class__), self._testMethodName) - - def run(self, result=None): - orig_result = result - if result is None: - result = self.defaultTestResult() - startTestRun = getattr(result, 'startTestRun', None) - if startTestRun is not None: - startTestRun() - - self._resultForDoCleanups = result - result.startTest(self) - if getattr(self.__class__, "__unittest_skip__", False): - # If the whole class was skipped. - try: - result.addSkip(self, self.__class__.__unittest_skip_why__) - finally: - result.stopTest(self) - return - testMethod = getattr(self, self._testMethodName) - try: - success = False - try: - self.setUp() - except SkipTest as e: - result.addSkip(self, str(e)) - except Exception: - result.addError(self, sys.exc_info()) - else: - try: - testMethod() - except self.failureException: - result.addFailure(self, sys.exc_info()) - except _ExpectedFailure as e: - result.addExpectedFailure(self, e.exc_info) - except _UnexpectedSuccess: - result.addUnexpectedSuccess(self) - except SkipTest as e: - result.addSkip(self, str(e)) - except Exception: - result.addError(self, sys.exc_info()) - else: - success = True - - try: - self.tearDown() - except Exception: - result.addError(self, sys.exc_info()) - success = False - - cleanUpSuccess = self.doCleanups() - success = success and cleanUpSuccess - if success: - result.addSuccess(self) - finally: - result.stopTest(self) - if orig_result is None: - stopTestRun = getattr(result, 'stopTestRun', None) - if stopTestRun is not None: - stopTestRun() - - def doCleanups(self): - """Execute all cleanup functions. Normally called for you after - tearDown.""" - result = self._resultForDoCleanups - ok = True - while self._cleanups: - function, args, kwargs = self._cleanups.pop(-1) - try: - function(*args, **kwargs) - except Exception: - ok = False - result.addError(self, sys.exc_info()) - return ok - - def __call__(self, *args, **kwds): - return self.run(*args, **kwds) - - def debug(self): - """Run the test without collecting errors in a TestResult""" - self.setUp() - getattr(self, self._testMethodName)() - self.tearDown() - - def skipTest(self, reason): - """Skip this test.""" - raise SkipTest(reason) - - def fail(self, msg=None): - """Fail immediately, with the given message.""" - raise self.failureException(msg) - - def assertFalse(self, expr, msg=None): - "Fail the test if the expression is true." - if expr: - msg = self._formatMessage(msg, "%r is not False" % expr) - raise self.failureException(msg) - - def assertTrue(self, expr, msg=None): - """Fail the test unless the expression is true.""" - if not expr: - msg = self._formatMessage(msg, "%r is not True" % expr) - raise self.failureException(msg) - - def _formatMessage(self, msg, standardMsg): - """Honour the longMessage attribute when generating failure messages. - If longMessage is False this means: - * Use only an explicit message if it is provided - * Otherwise use the standard message for the assert - - If longMessage is True: - * Use the standard message - * If an explicit message is provided, plus ' : ' and the explicit message - """ - if not self.longMessage: - return msg or standardMsg - if msg is None: - return standardMsg - return standardMsg + ' : ' + msg - - - def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown - by callableObj when invoked with arguments args and keyword - arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be - deemed to have suffered an error, exactly as for an - unexpected exception. - - If called with callableObj omitted or None, will return a - context object used like this:: - - with self.assertRaises(some_error_class): - do_something() - """ - context = _AssertRaisesContext(excClass, self, callableObj) - if callableObj is None: - return context - with context: - callableObj(*args, **kwargs) - - def _getAssertEqualityFunc(self, first, second): - """Get a detailed comparison function for the types of the two args. - - Returns: A callable accepting (first, second, msg=None) that will - raise a failure exception if first != second with a useful human - readable error message for those types. - """ - # - # NOTE(gregory.p.smith): I considered isinstance(first, type(second)) - # and vice versa. I opted for the conservative approach in case - # subclasses are not intended to be compared in detail to their super - # class instances using a type equality func. This means testing - # subtypes won't automagically use the detailed comparison. Callers - # should use their type specific assertSpamEqual method to compare - # subclasses if the detailed comparison is desired and appropriate. - # See the discussion in http://bugs.python.org/issue2578. - # - if type(first) is type(second): - asserter = self._type_equality_funcs.get(type(first)) - if asserter is not None: - return asserter.function - - return self._baseAssertEqual - - def _baseAssertEqual(self, first, second, msg=None): - """The default assertEqual implementation, not type specific.""" - if not first == second: - standardMsg = '%r != %r' % (first, second) - msg = self._formatMessage(msg, standardMsg) - raise self.failureException(msg) - - def assertEqual(self, first, second, msg=None): - """Fail if the two objects are unequal as determined by the '==' - operator. - """ - assertion_func = self._getAssertEqualityFunc(first, second) - assertion_func(first, second, msg=msg) - - def assertNotEqual(self, first, second, msg=None): - """Fail if the two objects are equal as determined by the '==' - operator. - """ - if not first != second: - msg = self._formatMessage(msg, '%r == %r' % (first, second)) - raise self.failureException(msg) - - def assertAlmostEqual(self, first, second, *, places=7, msg=None): - """Fail if the two objects are unequal as determined by their - difference rounded to the given number of decimal places - (default 7) and comparing to zero. - - Note that decimal places (from zero) are usually not the same - as significant digits (measured from the most signficant digit). - """ - if round(abs(second-first), places) != 0: - standardMsg = '%r != %r within %r places' % (first, second, places) - msg = self._formatMessage(msg, standardMsg) - raise self.failureException(msg) - - def assertNotAlmostEqual(self, first, second, *, places=7, msg=None): - """Fail if the two objects are equal as determined by their - difference rounded to the given number of decimal places - (default 7) and comparing to zero. - - Note that decimal places (from zero) are usually not the same - as significant digits (measured from the most signficant digit). - """ - if round(abs(second-first), places) == 0: - standardMsg = '%r == %r within %r places' % (first, second, places) - msg = self._formatMessage(msg, standardMsg) - raise self.failureException(msg) - - # Synonyms for assertion methods - - # The plurals are undocumented. Keep them that way to discourage use. - # Do not add more. Do not remove. - # Going through a deprecation cycle on these would annoy many people. - assertEquals = assertEqual - assertNotEquals = assertNotEqual - assertAlmostEquals = assertAlmostEqual - assertNotAlmostEquals = assertNotAlmostEqual - assert_ = assertTrue - - # These fail* assertion method names are pending deprecation and will - # be a DeprecationWarning in 3.2; http://bugs.python.org/issue2578 - def _deprecate(original_func): - def deprecated_func(*args, **kwargs): - warnings.warn( - 'Please use {0} instead.'.format(original_func.__name__), - DeprecationWarning, 2) - return original_func(*args, **kwargs) - return deprecated_func - - failUnlessEqual = _deprecate(assertEqual) - failIfEqual = _deprecate(assertNotEqual) - failUnlessAlmostEqual = _deprecate(assertAlmostEqual) - failIfAlmostEqual = _deprecate(assertNotAlmostEqual) - failUnless = _deprecate(assertTrue) - failUnlessRaises = _deprecate(assertRaises) - failIf = _deprecate(assertFalse) - - def assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None): - """An equality assertion for ordered sequences (like lists and tuples). - - For the purposes of this function, a valid orderd sequence type is one - which can be indexed, has a length, and has an equality operator. - - Args: - seq1: The first sequence to compare. - seq2: The second sequence to compare. - seq_type: The expected datatype of the sequences, or None if no - datatype should be enforced. - msg: Optional message to use on failure instead of a list of - differences. - """ - if seq_type != None: - seq_type_name = seq_type.__name__ - if not isinstance(seq1, seq_type): - raise self.failureException('First sequence is not a %s: %r' - % (seq_type_name, seq1)) - if not isinstance(seq2, seq_type): - raise self.failureException('Second sequence is not a %s: %r' - % (seq_type_name, seq2)) - else: - seq_type_name = "sequence" - - differing = None - try: - len1 = len(seq1) - except (TypeError, NotImplementedError): - differing = 'First %s has no length. Non-sequence?' % ( - seq_type_name) - - if differing is None: - try: - len2 = len(seq2) - except (TypeError, NotImplementedError): - differing = 'Second %s has no length. Non-sequence?' % ( - seq_type_name) - - if differing is None: - if seq1 == seq2: - return - - seq1_repr = repr(seq1) - seq2_repr = repr(seq2) - if len(seq1_repr) > 30: - seq1_repr = seq1_repr[:30] + '...' - if len(seq2_repr) > 30: - seq2_repr = seq2_repr[:30] + '...' - elements = (seq_type_name.capitalize(), seq1_repr, seq2_repr) - differing = '%ss differ: %s != %s\n' % elements - - for i in range(min(len1, len2)): - try: - item1 = seq1[i] - except (TypeError, IndexError, NotImplementedError): - differing += ('\nUnable to index element %d of first %s\n' % - (i, seq_type_name)) - break - - try: - item2 = seq2[i] - except (TypeError, IndexError, NotImplementedError): - differing += ('\nUnable to index element %d of second %s\n' % - (i, seq_type_name)) - break - - if item1 != item2: - differing += ('\nFirst differing element %d:\n%s\n%s\n' % - (i, item1, item2)) - break - else: - if (len1 == len2 and seq_type is None and - type(seq1) != type(seq2)): - # The sequences are the same, but have differing types. - return - - if len1 > len2: - differing += ('\nFirst %s contains %d additional ' - 'elements.\n' % (seq_type_name, len1 - len2)) - try: - differing += ('First extra element %d:\n%s\n' % - (len2, seq1[len2])) - except (TypeError, IndexError, NotImplementedError): - differing += ('Unable to index element %d ' - 'of first %s\n' % (len2, seq_type_name)) - elif len1 < len2: - differing += ('\nSecond %s contains %d additional ' - 'elements.\n' % (seq_type_name, len2 - len1)) - try: - differing += ('First extra element %d:\n%s\n' % - (len1, seq2[len1])) - except (TypeError, IndexError, NotImplementedError): - differing += ('Unable to index element %d ' - 'of second %s\n' % (len1, seq_type_name)) - standardMsg = differing + '\n' + '\n'.join(difflib.ndiff(pprint.pformat(seq1).splitlines(), - pprint.pformat(seq2).splitlines())) - msg = self._formatMessage(msg, standardMsg) - self.fail(msg) - - def assertListEqual(self, list1, list2, msg=None): - """A list-specific equality assertion. - - Args: - list1: The first list to compare. - list2: The second list to compare. - msg: Optional message to use on failure instead of a list of - differences. - - """ - self.assertSequenceEqual(list1, list2, msg, seq_type=list) - - def assertTupleEqual(self, tuple1, tuple2, msg=None): - """A tuple-specific equality assertion. - - Args: - tuple1: The first tuple to compare. - tuple2: The second tuple to compare. - msg: Optional message to use on failure instead of a list of - differences. - """ - self.assertSequenceEqual(tuple1, tuple2, msg, seq_type=tuple) - - def assertSetEqual(self, set1, set2, msg=None): - """A set-specific equality assertion. - - Args: - set1: The first set to compare. - set2: The second set to compare. - msg: Optional message to use on failure instead of a list of - differences. - - For more general containership equality, assertSameElements will work - with things other than sets. This uses ducktyping to support - different types of sets, and is optimized for sets specifically - (parameters must support a difference method). - """ - try: - difference1 = set1.difference(set2) - except TypeError as e: - self.fail('invalid type when attempting set difference: %s' % e) - except AttributeError as e: - self.fail('first argument does not support set difference: %s' % e) - - try: - difference2 = set2.difference(set1) - except TypeError as e: - self.fail('invalid type when attempting set difference: %s' % e) - except AttributeError as e: - self.fail('second argument does not support set difference: %s' % e) - - if not (difference1 or difference2): - return - - lines = [] - if difference1: - lines.append('Items in the first set but not the second:') - for item in difference1: - lines.append(repr(item)) - if difference2: - lines.append('Items in the second set but not the first:') - for item in difference2: - lines.append(repr(item)) - - standardMsg = '\n'.join(lines) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIn(self, member, container, msg=None): - """Just like self.assertTrue(a in b), but with a nicer default message.""" - if member not in container: - standardMsg = '%r not found in %r' % (member, container) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertNotIn(self, member, container, msg=None): - """Just like self.assertTrue(a not in b), but with a nicer default message.""" - if member in container: - standardMsg = '%r unexpectedly found in %r' % (member, container) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIs(self, expr1, expr2, msg=None): - """Just like self.assertTrue(a is b), but with a nicer default message.""" - if expr1 is not expr2: - standardMsg = '%r is not %r' % (expr1, expr2) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIsNot(self, expr1, expr2, msg=None): - """Just like self.assertTrue(a is not b), but with a nicer default message.""" - if expr1 is expr2: - standardMsg = 'unexpectedly identical: %r' % (expr1,) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertDictEqual(self, d1, d2, msg=None): - self.assert_(isinstance(d1, dict), 'First argument is not a dictionary') - self.assert_(isinstance(d2, dict), 'Second argument is not a dictionary') - - if d1 != d2: - standardMsg = ('\n' + '\n'.join(difflib.ndiff( - pprint.pformat(d1).splitlines(), - pprint.pformat(d2).splitlines()))) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertDictContainsSubset(self, expected, actual, msg=None): - """Checks whether actual is a superset of expected.""" - missing = [] - mismatched = [] - for key, value in expected.items(): - if key not in actual: - missing.append(key) - elif value != actual[key]: - mismatched.append('%s, expected: %s, actual: %s' % (key, value, actual[key])) - - if not (missing or mismatched): - return - - standardMsg = '' - if missing: - standardMsg = 'Missing: %r' % ','.join(missing) - if mismatched: - if standardMsg: - standardMsg += '; ' - standardMsg += 'Mismatched values: %s' % ','.join(mismatched) - - self.fail(self._formatMessage(msg, standardMsg)) - - def assertSameElements(self, expected_seq, actual_seq, msg=None): - """An unordered sequence specific comparison. - - Raises with an error message listing which elements of expected_seq - are missing from actual_seq and vice versa if any. - """ - try: - expected = set(expected_seq) - actual = set(actual_seq) - missing = list(expected.difference(actual)) - unexpected = list(actual.difference(expected)) - missing.sort() - unexpected.sort() - except TypeError: - # Fall back to slower list-compare if any of the objects are - # not hashable. - expected = list(expected_seq) - actual = list(actual_seq) - try: - expected.sort() - actual.sort() - except TypeError: - missing, unexpected = _UnorderableListDifference(expected, actual) - else: - missing, unexpected = _SortedListDifference(expected, actual) - errors = [] - if missing: - errors.append('Expected, but missing:\n %r' % missing) - if unexpected: - errors.append('Unexpected, but present:\n %r' % unexpected) - if errors: - standardMsg = '\n'.join(errors) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertMultiLineEqual(self, first, second, msg=None): - """Assert that two multi-line strings are equal.""" - self.assert_(isinstance(first, str), ( - 'First argument is not a string')) - self.assert_(isinstance(second, str), ( - 'Second argument is not a string')) - - if first != second: - standardMsg = '\n' + ''.join(difflib.ndiff(first.splitlines(True), second.splitlines(True))) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertLess(self, a, b, msg=None): - """Just like self.assertTrue(a < b), but with a nicer default message.""" - if not a < b: - standardMsg = '%r not less than %r' % (a, b) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertLessEqual(self, a, b, msg=None): - """Just like self.assertTrue(a <= b), but with a nicer default message.""" - if not a <= b: - standardMsg = '%r not less than or equal to %r' % (a, b) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertGreater(self, a, b, msg=None): - """Just like self.assertTrue(a > b), but with a nicer default message.""" - if not a > b: - standardMsg = '%r not greater than %r' % (a, b) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertGreaterEqual(self, a, b, msg=None): - """Just like self.assertTrue(a >= b), but with a nicer default message.""" - if not a >= b: - standardMsg = '%r not greater than or equal to %r' % (a, b) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIsNone(self, obj, msg=None): - """Same as self.assertTrue(obj is None), with a nicer default message.""" - if obj is not None: - standardMsg = '%r is not None' % obj - self.fail(self._formatMessage(msg, standardMsg)) - - def assertIsNotNone(self, obj, msg=None): - """Included for symmetry with assertIsNone.""" - if obj is None: - standardMsg = 'unexpectedly None' - self.fail(self._formatMessage(msg, standardMsg)) - - def assertRaisesRegexp(self, expected_exception, expected_regexp, - callable_obj=None, *args, **kwargs): - """Asserts that the message in a raised exception matches a regexp. - - Args: - expected_exception: Exception class expected to be raised. - expected_regexp: Regexp (re pattern object or string) expected - to be found in error message. - callable_obj: Function to be called. - args: Extra args. - kwargs: Extra kwargs. - """ - context = _AssertRaisesContext(expected_exception, self, callable_obj, - expected_regexp) - if callable_obj is None: - return context - with context: - callable_obj(*args, **kwargs) - - def assertRegexpMatches(self, text, expected_regex, msg=None): - if isinstance(expected_regex, (str, bytes)): - expected_regex = re.compile(expected_regex) - if not expected_regex.search(text): - msg = msg or "Regexp didn't match" - msg = '%s: %r not found in %r' % (msg, expected_regex.pattern, text) - raise self.failureException(msg) - - -def _SortedListDifference(expected, actual): - """Finds elements in only one or the other of two, sorted input lists. - - Returns a two-element tuple of lists. The first list contains those - elements in the "expected" list but not in the "actual" list, and the - second contains those elements in the "actual" list but not in the - "expected" list. Duplicate elements in either input list are ignored. - """ - i = j = 0 - missing = [] - unexpected = [] - while True: - try: - e = expected[i] - a = actual[j] - if e < a: - missing.append(e) - i += 1 - while expected[i] == e: - i += 1 - elif e > a: - unexpected.append(a) - j += 1 - while actual[j] == a: - j += 1 - else: - i += 1 - try: - while expected[i] == e: - i += 1 - finally: - j += 1 - while actual[j] == a: - j += 1 - except IndexError: - missing.extend(expected[i:]) - unexpected.extend(actual[j:]) - break - return missing, unexpected - -def _UnorderableListDifference(expected, actual): - """Same behavior as _SortedListDifference but - for lists of unorderable items (like dicts). - - As it does a linear search per item (remove) it - has O(n*n) performance.""" - missing = [] - while expected: - item = expected.pop() - try: - actual.remove(item) - except ValueError: - missing.append(item) - - # anything left in actual is unexpected - return missing, actual - -class TestSuite(object): - """A test suite is a composite test consisting of a number of TestCases. - - For use, create an instance of TestSuite, then add test case instances. - When all tests have been added, the suite can be passed to a test - runner, such as TextTestRunner. It will run the individual test cases - in the order in which they were added, aggregating the results. When - subclassing, do not forget to call the base class constructor. - """ - def __init__(self, tests=()): - self._tests = [] - self.addTests(tests) - - def __repr__(self): - return "<%s tests=%s>" % (_strclass(self.__class__), list(self)) - - def __eq__(self, other): - if not isinstance(other, self.__class__): - return NotImplemented - return list(self) == list(other) - - def __ne__(self, other): - return not self == other - - def __iter__(self): - return iter(self._tests) - - def countTestCases(self): - cases = 0 - for test in self: - cases += test.countTestCases() - return cases - - def addTest(self, test): - # sanity checks - if not hasattr(test, '__call__'): - raise TypeError("the test to add must be callable") - 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) - - def addTests(self, tests): - if isinstance(tests, str): - raise TypeError("tests must be an iterable of tests, not a string") - for test in tests: - self.addTest(test) - - def run(self, result): - for test in self: - if result.shouldStop: - break - test(result) - return result - - def __call__(self, *args, **kwds): - return self.run(*args, **kwds) - - def debug(self): - """Run the tests without collecting errors in a TestResult""" - for test in self: - test.debug() - - -class FunctionTestCase(TestCase): - """A test case that wraps a test function. - - This is useful for slipping pre-existing test functions into the - unittest framework. Optionally, set-up and tidy-up functions can be - supplied. As with TestCase, the tidy-up ('tearDown') function will - always be called if the set-up ('setUp') function ran successfully. - """ - - def __init__(self, testFunc, setUp=None, tearDown=None, description=None): - super(FunctionTestCase, self).__init__() - self._setUpFunc = setUp - self._tearDownFunc = tearDown - self._testFunc = testFunc - self._description = description - - def setUp(self): - if self._setUpFunc is not None: - self._setUpFunc() - - def tearDown(self): - if self._tearDownFunc is not None: - self._tearDownFunc() - - def runTest(self): - self._testFunc() - - def id(self): - return self._testFunc.__name__ - - def __eq__(self, other): - if not isinstance(other, self.__class__): - return NotImplemented - - return self._setUpFunc == other._setUpFunc and \ - self._tearDownFunc == other._tearDownFunc and \ - self._testFunc == other._testFunc and \ - self._description == other._description - - def __ne__(self, other): - return not self == other - - def __hash__(self): - return hash((type(self), self._setUpFunc, self._tearDownFunc, - self._testFunc, self._description)) - - def __str__(self): - return "%s (%s)" % (_strclass(self.__class__), self._testFunc.__name__) - - def __repr__(self): - return "<%s testFunc=%s>" % (_strclass(self.__class__), self._testFunc) - - def shortDescription(self): - if self._description is not None: - return self._description - doc = self._testFunc.__doc__ - return doc and doc.split("\n")[0].strip() or None - - - -############################################################################## -# Locating and loading tests -############################################################################## - -def CmpToKey(mycmp): - 'Convert a cmp= function into a key= function' - class K(object): - def __init__(self, obj, *args): - self.obj = obj - def __lt__(self, other): - return mycmp(self.obj, other.obj) == -1 - return K - -def three_way_cmp(x, y): - """Return -1 if x < y, 0 if x == y and 1 if x > y""" - return (x > y) - (x < y) - -class TestLoader(object): - """ - This class is responsible for loading tests according to various criteria - and returning them wrapped in a TestSuite - """ - testMethodPrefix = 'test' - sortTestMethodsUsing = staticmethod(three_way_cmp) - suiteClass = TestSuite - _top_level_dir = None - - def loadTestsFromTestCase(self, testCaseClass): - """Return a suite of all tests cases contained in testCaseClass""" - if issubclass(testCaseClass, TestSuite): - raise TypeError("Test cases should not be derived from TestSuite." \ - " Maybe you meant to derive from TestCase?") - testCaseNames = self.getTestCaseNames(testCaseClass) - if not testCaseNames and hasattr(testCaseClass, 'runTest'): - testCaseNames = ['runTest'] - suite = self.suiteClass(map(testCaseClass, testCaseNames)) - return suite - - def loadTestsFromModule(self, module, use_load_tests=True): - """Return a suite of all tests cases contained in the given module""" - tests = [] - for name in dir(module): - obj = getattr(module, name) - if isinstance(obj, type) and issubclass(obj, TestCase): - tests.append(self.loadTestsFromTestCase(obj)) - - load_tests = getattr(module, 'load_tests', None) - if use_load_tests and load_tests is not None: - return load_tests(self, tests, None) - return self.suiteClass(tests) - - def loadTestsFromName(self, name, module=None): - """Return a suite of all tests cases given a string specifier. - - The name may resolve either to a module, a test case class, a - test method within a test case class, or a callable object which - returns a TestCase or TestSuite instance. - - The method optionally resolves the names relative to a given module. - """ - parts = name.split('.') - if module is None: - parts_copy = parts[:] - while parts_copy: - try: - module = __import__('.'.join(parts_copy)) - break - except ImportError: - del parts_copy[-1] - if not parts_copy: - raise - parts = parts[1:] - obj = module - for part in parts: - parent, obj = obj, getattr(obj, part) - - if isinstance(obj, types.ModuleType): - return self.loadTestsFromModule(obj) - elif isinstance(obj, type) and issubclass(obj, TestCase): - return self.loadTestsFromTestCase(obj) - elif (isinstance(obj, types.FunctionType) and - isinstance(parent, type) and - issubclass(parent, TestCase)): - name = obj.__name__ - inst = parent(name) - # static methods follow a different path - if not isinstance(getattr(inst, name), types.FunctionType): - return TestSuite([inst]) - elif isinstance(obj, TestSuite): - return obj - - if hasattr(obj, '__call__'): - test = obj() - if isinstance(test, TestSuite): - return test - elif isinstance(test, TestCase): - return TestSuite([test]) - else: - raise TypeError("calling %s returned %s, not a test" % - (obj, test)) - else: - raise TypeError("don't know how to make test from: %s" % obj) - - def loadTestsFromNames(self, names, module=None): - """Return a suite of all tests cases found using the given sequence - of string specifiers. See 'loadTestsFromName()'. - """ - suites = [self.loadTestsFromName(name, module) for name in names] - return self.suiteClass(suites) - - def getTestCaseNames(self, testCaseClass): - """Return a sorted sequence of method names found within testCaseClass - """ - def isTestMethod(attrname, testCaseClass=testCaseClass, - prefix=self.testMethodPrefix): - return attrname.startswith(prefix) and \ - hasattr(getattr(testCaseClass, attrname), '__call__') - testFnNames = list(filter(isTestMethod, dir(testCaseClass))) - if self.sortTestMethodsUsing: - testFnNames.sort(key=CmpToKey(self.sortTestMethodsUsing)) - return testFnNames - - def discover(self, start_dir, pattern='test*.py', top_level_dir=None): - """Find and return all test modules from the specified start - directory, recursing into subdirectories to find them. Only test files - that match the pattern will be loaded. (Using shell style pattern - matching.) - - All test modules must be importable from the top level of the project. - If the start directory is not the top level directory then the top - level directory must be specified separately. - - If a test package name (directory with '__init__.py') matches the - pattern then the package will be checked for a 'load_tests' function. If - this exists then it will be called with loader, tests, pattern. - - If load_tests exists then discovery does *not* recurse into the package, - load_tests is responsible for loading all tests in the package. - - The pattern is deliberately not stored as a loader attribute so that - packages can continue discovery themselves. top_level_dir is stored so - load_tests does not need to pass this argument in to loader.discover(). - """ - if top_level_dir is None and self._top_level_dir is not None: - # make top_level_dir optional if called from load_tests in a package - top_level_dir = self._top_level_dir - elif top_level_dir is None: - top_level_dir = start_dir - - top_level_dir = os.path.abspath(os.path.normpath(top_level_dir)) - start_dir = os.path.abspath(os.path.normpath(start_dir)) - - if not top_level_dir in sys.path: - # all test modules must be importable from the top level directory - sys.path.append(top_level_dir) - self._top_level_dir = top_level_dir - - if start_dir != top_level_dir and not os.path.isfile(os.path.join(start_dir, '__init__.py')): - # what about __init__.pyc or pyo (etc) - raise ImportError('Start directory is not importable: %r' % start_dir) - - tests = list(self._find_tests(start_dir, pattern)) - return self.suiteClass(tests) - - - def _get_module_from_path(self, path): - """Load a module from a path relative to the top-level directory - of a project. Used by discovery.""" - path = os.path.splitext(os.path.normpath(path))[0] - - relpath = os.path.relpath(path, self._top_level_dir) - assert not os.path.isabs(relpath), "Path must be within the project" - assert not relpath.startswith('..'), "Path must be within the project" - - name = relpath.replace(os.path.sep, '.') - __import__(name) - return sys.modules[name] - - def _find_tests(self, start_dir, pattern): - """Used by discovery. Yields test suites it loads.""" - paths = os.listdir(start_dir) - - for path in paths: - full_path = os.path.join(start_dir, path) - # what about __init__.pyc or pyo (etc) - # we would need to avoid loading the same tests multiple times - # from '.py', '.pyc' *and* '.pyo' - if os.path.isfile(full_path) and path.lower().endswith('.py'): - if fnmatch(path, pattern): - # if the test file matches, load it - module = self._get_module_from_path(full_path) - yield self.loadTestsFromModule(module) - elif os.path.isdir(full_path): - if not os.path.isfile(os.path.join(full_path, '__init__.py')): - continue - - load_tests = None - tests = None - if fnmatch(path, pattern): - # only check load_tests if the package directory itself matches the filter - package = self._get_module_from_path(full_path) - load_tests = getattr(package, 'load_tests', None) - tests = self.loadTestsFromModule(package, use_load_tests=False) - - if load_tests is None: - if tests is not None: - # tests loaded from package file - yield tests - # recurse into the package - for test in self._find_tests(full_path, pattern): - yield test - else: - yield load_tests(self, tests, pattern) - -defaultTestLoader = TestLoader() - - -############################################################################## -# Patches for old functions: these functions should be considered obsolete -############################################################################## - -def _makeLoader(prefix, sortUsing, suiteClass=None): - loader = TestLoader() - loader.sortTestMethodsUsing = sortUsing - loader.testMethodPrefix = prefix - if suiteClass: loader.suiteClass = suiteClass - return loader - -def getTestCaseNames(testCaseClass, prefix, sortUsing=three_way_cmp): - return _makeLoader(prefix, sortUsing).getTestCaseNames(testCaseClass) - -def makeSuite(testCaseClass, prefix='test', sortUsing=three_way_cmp, - suiteClass=TestSuite): - return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromTestCase( - testCaseClass) - -def findTestCases(module, prefix='test', sortUsing=three_way_cmp, - suiteClass=TestSuite): - return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule( - module) - - -############################################################################## -# Text UI -############################################################################## - -class _WritelnDecorator(object): - """Used to decorate file-like objects with a handy 'writeln' method""" - def __init__(self,stream): - self.stream = stream - - def __getattr__(self, attr): - return getattr(self.stream,attr) - - def writeln(self, arg=None): - if arg: - self.write(arg) - self.write('\n') # text-mode streams translate to \r\n if needed - - -class _TextTestResult(TestResult): - """A test result class that can print formatted text results to a stream. - - Used by TextTestRunner. - """ - separator1 = '=' * 70 - separator2 = '-' * 70 - - def __init__(self, stream, descriptions, verbosity): - super(_TextTestResult, self).__init__() - self.stream = stream - self.showAll = verbosity > 1 - self.dots = verbosity == 1 - self.descriptions = descriptions - - def getDescription(self, test): - if self.descriptions: - return test.shortDescription() or str(test) - else: - return str(test) - - def startTest(self, test): - super(_TextTestResult, self).startTest(test) - if self.showAll: - self.stream.write(self.getDescription(test)) - self.stream.write(" ... ") - self.stream.flush() - - def addSuccess(self, test): - super(_TextTestResult, self).addSuccess(test) - if self.showAll: - self.stream.writeln("ok") - elif self.dots: - self.stream.write('.') - self.stream.flush() - - def addError(self, test, err): - super(_TextTestResult, self).addError(test, err) - if self.showAll: - self.stream.writeln("ERROR") - elif self.dots: - self.stream.write('E') - self.stream.flush() - - def addFailure(self, test, err): - super(_TextTestResult, self).addFailure(test, err) - if self.showAll: - self.stream.writeln("FAIL") - elif self.dots: - self.stream.write('F') - self.stream.flush() - - def addSkip(self, test, reason): - super(_TextTestResult, self).addSkip(test, reason) - if self.showAll: - self.stream.writeln("skipped {0!r}".format(reason)) - elif self.dots: - self.stream.write("s") - self.stream.flush() - - def addExpectedFailure(self, test, err): - super(_TextTestResult, self).addExpectedFailure(test, err) - if self.showAll: - self.stream.writeln("expected failure") - elif self.dots: - self.stream.write("x") - self.stream.flush() - - def addUnexpectedSuccess(self, test): - super(_TextTestResult, self).addUnexpectedSuccess(test) - if self.showAll: - self.stream.writeln("unexpected success") - elif self.dots: - self.stream.write("u") - self.stream.flush() - - def printErrors(self): - if self.dots or self.showAll: - self.stream.writeln() - self.printErrorList('ERROR', self.errors) - self.printErrorList('FAIL', self.failures) - - def printErrorList(self, flavour, errors): - for test, err in errors: - self.stream.writeln(self.separator1) - self.stream.writeln("%s: %s" % (flavour,self.getDescription(test))) - self.stream.writeln(self.separator2) - self.stream.writeln("%s" % err) - - -class TextTestRunner(object): - """A test runner class that displays results in textual form. - - It prints out the names of tests as they are run, errors as they - occur, and a summary of the results at the end of the test run. - """ - def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1): - self.stream = _WritelnDecorator(stream) - self.descriptions = descriptions - self.verbosity = verbosity - - def _makeResult(self): - return _TextTestResult(self.stream, self.descriptions, self.verbosity) - - def run(self, test): - "Run the given test case or test suite." - result = self._makeResult() - startTime = time.time() - startTestRun = getattr(result, 'startTestRun', None) - if startTestRun is not None: - startTestRun() - try: - test(result) - finally: - stopTestRun = getattr(result, 'stopTestRun', None) - if stopTestRun is not None: - stopTestRun() - stopTime = time.time() - timeTaken = stopTime - startTime - result.printErrors() - self.stream.writeln(result.separator2) - run = result.testsRun - self.stream.writeln("Ran %d test%s in %.3fs" % - (run, run != 1 and "s" or "", timeTaken)) - self.stream.writeln() - results = map(len, (result.expectedFailures, - result.unexpectedSuccesses, - result.skipped)) - expectedFails, unexpectedSuccesses, skipped = results - infos = [] - if not result.wasSuccessful(): - self.stream.write("FAILED") - failed, errored = len(result.failures), len(result.errors) - if failed: - infos.append("failures=%d" % failed) - if errored: - infos.append("errors=%d" % errored) - else: - self.stream.write("OK") - if skipped: - infos.append("skipped=%d" % skipped) - if expectedFails: - infos.append("expected failures=%d" % expectedFails) - if unexpectedSuccesses: - infos.append("unexpected successes=%d" % unexpectedSuccesses) - if infos: - self.stream.writeln(" (%s)" % (", ".join(infos),)) - else: - self.stream.write("\n") - return result - - - -############################################################################## -# Facilities for running tests from the command line -############################################################################## - -USAGE_AS_MAIN = """\ -Usage: %(progName)s [options] [tests] - -Options: - -h, --help Show this message - -v, --verbose Verbose output - -q, --quiet Minimal output - -Examples: - %(progName)s test_module - run tests from test_module - %(progName)s test_module.TestClass - run tests from - test_module.TestClass - %(progName)s test_module.TestClass.test_method - run specified test method - -[tests] can be a list of any number of test modules, classes and test -methods. - -Alternative Usage: %(progName)s discover [options] - -Options: - -v, --verbose Verbose output - -s directory Directory to start discovery ('.' default) - -p pattern Pattern to match test files ('test*.py' default) - -t directory Top level directory of project (default to - start directory) - -For test discovery all test modules must be importable from the top -level directory of the project. -""" - -USAGE_FROM_MODULE = """\ -Usage: %(progName)s [options] [test] [...] - -Options: - -h, --help Show this message - -v, --verbose Verbose output - -q, --quiet Minimal output - -Examples: - %(progName)s - run default set of tests - %(progName)s MyTestSuite - run suite 'MyTestSuite' - %(progName)s MyTestCase.testSomething - run MyTestCase.testSomething - %(progName)s MyTestCase - run all 'test*' test methods - in MyTestCase -""" - -if __name__ == '__main__': - USAGE = USAGE_AS_MAIN -else: - USAGE = USAGE_FROM_MODULE - - -class TestProgram(object): - """A command-line program that runs a set of tests; this is primarily - for making test modules conveniently executable. - """ - USAGE = USAGE - def __init__(self, module='__main__', defaultTest=None, - argv=None, testRunner=None, - testLoader=defaultTestLoader, exit=True, - verbosity=1): - if isinstance(module, str): - self.module = __import__(module) - for part in module.split('.')[1:]: - self.module = getattr(self.module, part) - else: - self.module = module - if argv is None: - argv = sys.argv - - self.exit = exit - self.verbosity = verbosity - self.defaultTest = defaultTest - self.testRunner = testRunner - self.testLoader = testLoader - self.progName = os.path.basename(argv[0]) - self.parseArgs(argv) - self.runTests() - - def usageExit(self, msg=None): - if msg: - print(msg) - print(self.USAGE % self.__dict__) - sys.exit(2) - - def parseArgs(self, argv): - if len(argv) > 1 and argv[1].lower() == 'discover': - self._do_discovery(argv[2:]) - return - - import getopt - long_opts = ['help','verbose','quiet'] - try: - options, args = getopt.getopt(argv[1:], 'hHvq', long_opts) - for opt, value in options: - if opt in ('-h','-H','--help'): - self.usageExit() - if opt in ('-q','--quiet'): - self.verbosity = 0 - if opt in ('-v','--verbose'): - self.verbosity = 2 - if len(args) == 0 and self.defaultTest is None: - self.test = self.testLoader.loadTestsFromModule(self.module) - return - if len(args) > 0: - self.testNames = args - if __name__ == '__main__': - # to support python -m unittest ... - self.module = None - else: - self.testNames = (self.defaultTest,) - self.createTests() - except getopt.error as msg: - self.usageExit(msg) - - def createTests(self): - self.test = self.testLoader.loadTestsFromNames(self.testNames, - self.module) - - def _do_discovery(self, argv, Loader=TestLoader): - # handle command line args for test discovery - import optparse - parser = optparse.OptionParser() - parser.add_option('-v', '--verbose', dest='verbose', default=False, - help='Verbose output', action='store_true') - parser.add_option('-s', '--start-directory', dest='start', default='.', - help="Directory to start discovery ('.' default)") - parser.add_option('-p', '--pattern', dest='pattern', default='test*.py', - help="Pattern to match tests ('test*.py' default)") - parser.add_option('-t', '--top-level-directory', dest='top', default=None, - help='Top level directory of project (defaults to start directory)') - - options, args = parser.parse_args(argv) - if len(args) > 3: - self.usageExit() - - for name, value in zip(('start', 'pattern', 'top'), args): - setattr(options, name, value) - - if options.verbose: - self.verbosity = 2 - - start_dir = options.start - pattern = options.pattern - top_level_dir = options.top - - loader = Loader() - self.test = loader.discover(start_dir, pattern, top_level_dir) - - def runTests(self): - if self.testRunner is None: - self.testRunner = TextTestRunner - if isinstance(self.testRunner, type): - try: - testRunner = self.testRunner(verbosity=self.verbosity) - except TypeError: - # didn't accept the verbosity argument - testRunner = self.testRunner() - else: - # it is assumed to be a TestRunner instance - testRunner = self.testRunner - self.result = testRunner.run(self.test) - if self.exit: - sys.exit(not self.result.wasSuccessful()) - -main = TestProgram - - -############################################################################## -# Executing this module from the command line -############################################################################## - -if __name__ == "__main__": - sys.modules['unittest'] = sys.modules['__main__'] - main(module=None) Modified: python/branches/py3k/Lib/unittest/case.py ============================================================================== --- /python/trunk/Lib/unittest/case.py (original) +++ python/branches/py3k/Lib/unittest/case.py Sun Jul 19 23:01:52 2009 @@ -85,9 +85,17 @@ class _AssertRaisesContext(object): """A context manager used to implement TestCase.assertRaises* methods.""" - def __init__(self, expected, test_case, expected_regexp=None): + def __init__(self, expected, test_case, callable_obj=None, + expected_regexp=None): self.expected = expected self.failureException = test_case.failureException + if callable_obj is not None: + try: + self.obj_name = callable_obj.__name__ + except AttributeError: + self.obj_name = str(callable_obj) + else: + self.obj_name = None self.expected_regex = expected_regexp def __enter__(self): @@ -99,8 +107,12 @@ exc_name = self.expected.__name__ except AttributeError: exc_name = str(self.expected) - raise self.failureException( - "{0} not raised".format(exc_name)) + if self.obj_name: + raise self.failureException("{0} not raised by {1}" + .format(exc_name, self.obj_name)) + else: + raise self.failureException("{0} not raised" + .format(exc_name)) if not issubclass(exc_type, self.expected): # let unexpected exceptions pass through return False @@ -108,7 +120,7 @@ return True expected_regexp = self.expected_regex - if isinstance(expected_regexp, basestring): + if isinstance(expected_regexp, (bytes, str)): expected_regexp = re.compile(expected_regexp) if not expected_regexp.search(str(exc_value)): raise self.failureException('"%s" does not match "%s"' % @@ -397,7 +409,7 @@ with self.assertRaises(some_error_class): do_something() """ - context = _AssertRaisesContext(excClass, self) + context = _AssertRaisesContext(excClass, self, callableObj) if callableObj is None: return context with context: @@ -449,7 +461,7 @@ msg = self._formatMessage(msg, '%r == %r' % (first, second)) raise self.failureException(msg) - def assertAlmostEqual(self, first, second, places=7, msg=None): + def assertAlmostEqual(self, first, second, *, places=7, msg=None): """Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero. @@ -462,7 +474,7 @@ msg = self._formatMessage(msg, standardMsg) raise self.failureException(msg) - def assertNotAlmostEqual(self, first, second, places=7, msg=None): + def assertNotAlmostEqual(self, first, second, *, places=7, msg=None): """Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero. @@ -492,7 +504,7 @@ def deprecated_func(*args, **kwargs): warnings.warn( 'Please use {0} instead.'.format(original_func.__name__), - PendingDeprecationWarning, 2) + DeprecationWarning, 2) return original_func(*args, **kwargs) return deprecated_func @@ -556,7 +568,7 @@ elements = (seq_type_name.capitalize(), seq1_repr, seq2_repr) differing = '%ss differ: %s != %s\n' % elements - for i in xrange(min(len1, len2)): + for i in range(min(len1, len2)): try: item1 = seq1[i] except (TypeError, IndexError, NotImplementedError): @@ -643,16 +655,16 @@ """ try: difference1 = set1.difference(set2) - except TypeError, e: + except TypeError as e: self.fail('invalid type when attempting set difference: %s' % e) - except AttributeError, e: + except AttributeError as e: self.fail('first argument does not support set difference: %s' % e) try: difference2 = set2.difference(set1) - except TypeError, e: + except TypeError as e: self.fail('invalid type when attempting set difference: %s' % e) - except AttributeError, e: + except AttributeError as e: self.fail('second argument does not support set difference: %s' % e) if not (difference1 or difference2): @@ -709,7 +721,7 @@ """Checks whether actual is a superset of expected.""" missing = [] mismatched = [] - for key, value in expected.iteritems(): + for key, value in expected.items(): if key not in actual: missing.append(key) elif value != actual[key]: @@ -746,9 +758,15 @@ # not hashable. expected = list(expected_seq) actual = list(actual_seq) - expected.sort() - actual.sort() - missing, unexpected = util.sorted_list_difference(expected, actual) + try: + expected.sort() + actual.sort() + except TypeError: + missing, unexpected = util.unorderable_list_difference(expected, + actual) + else: + missing, unexpected = util.sorted_list_difference(expected, + actual) errors = [] if missing: errors.append('Expected, but missing:\n %r' % missing) @@ -760,9 +778,9 @@ def assertMultiLineEqual(self, first, second, msg=None): """Assert that two multi-line strings are equal.""" - self.assert_(isinstance(first, basestring), ( + self.assert_(isinstance(first, str), ( 'First argument is not a string')) - self.assert_(isinstance(second, basestring), ( + self.assert_(isinstance(second, str), ( 'Second argument is not a string')) if first != second: @@ -817,14 +835,15 @@ args: Extra args. kwargs: Extra kwargs. """ - context = _AssertRaisesContext(expected_exception, self, expected_regexp) + context = _AssertRaisesContext(expected_exception, self, callable_obj, + expected_regexp) if callable_obj is None: return context with context: callable_obj(*args, **kwargs) def assertRegexpMatches(self, text, expected_regex, msg=None): - if isinstance(expected_regex, basestring): + if isinstance(expected_regex, (str, bytes)): expected_regex = re.compile(expected_regex) if not expected_regex.search(text): msg = msg or "Regexp didn't match" Modified: python/branches/py3k/Lib/unittest/loader.py ============================================================================== --- /python/trunk/Lib/unittest/loader.py (original) +++ python/branches/py3k/Lib/unittest/loader.py Sun Jul 19 23:01:52 2009 @@ -6,17 +6,7 @@ from fnmatch import fnmatch -from . import case, suite - - -def _CmpToKey(mycmp): - 'Convert a cmp= function into a key= function' - class K(object): - def __init__(self, obj): - self.obj = obj - def __lt__(self, other): - return mycmp(self.obj, other.obj) == -1 - return K +from . import case, suite, util class TestLoader(object): @@ -25,7 +15,7 @@ and returning them wrapped in a TestSuite """ testMethodPrefix = 'test' - sortTestMethodsUsing = cmp + sortTestMethodsUsing = staticmethod(util.three_way_cmp) suiteClass = suite.TestSuite _top_level_dir = None @@ -82,13 +72,17 @@ return self.loadTestsFromModule(obj) elif isinstance(obj, type) and issubclass(obj, case.TestCase): return self.loadTestsFromTestCase(obj) - elif (isinstance(obj, types.UnboundMethodType) and + elif (isinstance(obj, types.FunctionType) and isinstance(parent, type) and issubclass(parent, case.TestCase)): - return suite.TestSuite([parent(obj.__name__)]) + name = obj.__name__ + inst = parent(name) + # static methods follow a different path + if not isinstance(getattr(inst, name), types.FunctionType): + return suite.TestSuite([inst]) elif isinstance(obj, suite.TestSuite): return obj - elif hasattr(obj, '__call__'): + if hasattr(obj, '__call__'): test = obj() if isinstance(test, suite.TestSuite): return test @@ -114,9 +108,10 @@ prefix=self.testMethodPrefix): return attrname.startswith(prefix) and \ hasattr(getattr(testCaseClass, attrname), '__call__') - testFnNames = filter(isTestMethod, dir(testCaseClass)) + testFnNames = testFnNames = list(filter(isTestMethod, + dir(testCaseClass))) if self.sortTestMethodsUsing: - testFnNames.sort(key=_CmpToKey(self.sortTestMethodsUsing)) + testFnNames.sort(key=util.CmpToKey(self.sortTestMethodsUsing)) return testFnNames def discover(self, start_dir, pattern='test*.py', top_level_dir=None): @@ -222,13 +217,15 @@ loader.suiteClass = suiteClass return loader -def getTestCaseNames(testCaseClass, prefix, sortUsing=cmp): +def getTestCaseNames(testCaseClass, prefix, sortUsing=util.three_way_cmp): return _makeLoader(prefix, sortUsing).getTestCaseNames(testCaseClass) -def makeSuite(testCaseClass, prefix='test', sortUsing=cmp, +def makeSuite(testCaseClass, prefix='test', sortUsing=util.three_way_cmp, suiteClass=suite.TestSuite): - return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromTestCase(testCaseClass) + return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromTestCase( + testCaseClass) -def findTestCases(module, prefix='test', sortUsing=cmp, +def findTestCases(module, prefix='test', sortUsing=util.three_way_cmp, suiteClass=suite.TestSuite): - return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule(module) + return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule(\ + module) Modified: python/branches/py3k/Lib/unittest/main.py ============================================================================== --- /python/trunk/Lib/unittest/main.py (original) +++ python/branches/py3k/Lib/unittest/main.py Sun Jul 19 23:01:52 2009 @@ -68,7 +68,7 @@ argv=None, testRunner=None, testLoader=loader.defaultTestLoader, exit=True, verbosity=1): - if isinstance(module, basestring): + if isinstance(module, str): self.module = __import__(module) for part in module.split('.')[1:]: self.module = getattr(self.module, part) @@ -88,8 +88,8 @@ def usageExit(self, msg=None): if msg: - print msg - print self.USAGE % self.__dict__ + print(msg) + print(self.USAGE % self.__dict__) sys.exit(2) def parseArgs(self, argv): @@ -119,7 +119,7 @@ else: self.testNames = (self.defaultTest,) self.createTests() - except getopt.error, msg: + except getopt.error as msg: self.usageExit(msg) def createTests(self): @@ -159,7 +159,7 @@ def runTests(self): if self.testRunner is None: self.testRunner = runner.TextTestRunner - if isinstance(self.testRunner, (type, types.ClassType)): + if isinstance(self.testRunner, type): try: testRunner = self.testRunner(verbosity=self.verbosity) except TypeError: Modified: python/branches/py3k/Lib/unittest/runner.py ============================================================================== --- /python/trunk/Lib/unittest/runner.py (original) +++ python/branches/py3k/Lib/unittest/runner.py Sun Jul 19 23:01:52 2009 @@ -152,7 +152,7 @@ infos = [] if not result.wasSuccessful(): self.stream.write("FAILED") - failed, errored = map(len, (result.failures, result.errors)) + failed, errored = len(result.failures), len(result.errors) if failed: infos.append("failures=%d" % failed) if errored: Modified: python/branches/py3k/Lib/unittest/suite.py ============================================================================== --- /python/trunk/Lib/unittest/suite.py (original) +++ python/branches/py3k/Lib/unittest/suite.py Sun Jul 19 23:01:52 2009 @@ -27,9 +27,6 @@ def __ne__(self, other): return not self == other - # Can't guarantee hash invariant, so flag as unhashable - __hash__ = None - def __iter__(self): return iter(self._tests) @@ -50,7 +47,7 @@ self._tests.append(test) def addTests(self, tests): - if isinstance(tests, basestring): + if isinstance(tests, str): raise TypeError("tests must be an iterable of tests, not a string") for test in tests: self.addTest(test) Modified: python/branches/py3k/Lib/unittest/util.py ============================================================================== --- /python/trunk/Lib/unittest/util.py (original) +++ python/branches/py3k/Lib/unittest/util.py Sun Jul 19 23:01:52 2009 @@ -42,3 +42,34 @@ unexpected.extend(actual[j:]) break return missing, unexpected + + +def unorderable_list_difference(expected, actual): + """Same behavior as sorted_list_difference but + for lists of unorderable items (like dicts). + + As it does a linear search per item (remove) it + has O(n*n) performance.""" + missing = [] + while expected: + item = expected.pop() + try: + actual.remove(item) + except ValueError: + missing.append(item) + + # anything left in actual is unexpected + return missing, actual + +def CmpToKey(mycmp): + 'Convert a cmp= function into a key= function' + class K(object): + def __init__(self, obj, *args): + self.obj = obj + def __lt__(self, other): + return mycmp(self.obj, other.obj) == -1 + return K + +def three_way_cmp(x, y): + """Return -1 if x < y, 0 if x == y and 1 if x > y""" + return (x > y) - (x < y) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Jul 19 23:01:52 2009 @@ -910,6 +910,8 @@ Library ------- +- unittest has been split up into a package. All old names should still work. + - Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler uses the same refactored function to get gcc/ld/dllwrap versions numbers. It's `distutils.util.get_compiler_versions`. Added deprecation warnings From buildbot at python.org Sun Jul 19 23:17:23 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 21:17:23 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1199 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Abort trap sincerely, -The Buildbot From python-checkins at python.org Sun Jul 19 23:52:07 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 19 Jul 2009 21:52:07 -0000 Subject: [Python-checkins] r74097 - python/branches/py3k/Lib/distutils/tests/test_register.py Message-ID: Author: benjamin.peterson Date: Sun Jul 19 23:52:02 2009 New Revision: 74097 Log: skip test when distutils is not made for py3k Modified: python/branches/py3k/Lib/distutils/tests/test_register.py Modified: python/branches/py3k/Lib/distutils/tests/test_register.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_register.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_register.py Sun Jul 19 23:52:02 2009 @@ -202,10 +202,10 @@ self.assertRaises(DistutilsSetupError, cmd.run) # we don't test the reSt feature if docutils - # is not installed + # is not installed or we our on py3k try: import docutils - except ImportError: + except Exception: return # metadata are OK but long_description is broken From python-checkins at python.org Mon Jul 20 00:14:01 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sun, 19 Jul 2009 22:14:01 -0000 Subject: [Python-checkins] r74098 - in python/trunk/Lib: SimpleXMLRPCServer.py test/test_xmlrpc.py xmlrpclib.py Message-ID: Author: kristjan.jonsson Date: Mon Jul 20 00:14:00 2009 New Revision: 74098 Log: http://bugs.python.org/issue6499 zlib/gzip may not be present for all builds. Make xmlrpclib gracefully not supporg gzip encoding in this case Modified: python/trunk/Lib/SimpleXMLRPCServer.py python/trunk/Lib/test/test_xmlrpc.py python/trunk/Lib/xmlrpclib.py Modified: python/trunk/Lib/SimpleXMLRPCServer.py ============================================================================== --- python/trunk/Lib/SimpleXMLRPCServer.py (original) +++ python/trunk/Lib/SimpleXMLRPCServer.py Mon Jul 20 00:14:00 2009 @@ -521,8 +521,11 @@ if len(response) > self.encode_threshold: q = self.accept_encodings().get("gzip", 0) if q: - response = xmlrpclib.gzip_encode(response) - self.send_header("Content-Encoding", "gzip") + try: + response = xmlrpclib.gzip_encode(response) + self.send_header("Content-Encoding", "gzip") + except NotImplementedError: + pass self.send_header("Content-length", str(len(response))) self.end_headers() self.wfile.write(response) @@ -535,6 +538,8 @@ if encoding == "gzip": try: return xmlrpclib.gzip_decode(data) + except NotImplementedError: + self.send_response(501, "encoding %r not supported" % encoding) except ValueError: self.send_response(400, "error decoding gzip content") else: Modified: python/trunk/Lib/test/test_xmlrpc.py ============================================================================== --- python/trunk/Lib/test/test_xmlrpc.py (original) +++ python/trunk/Lib/test/test_xmlrpc.py Mon Jul 20 00:14:00 2009 @@ -918,7 +918,11 @@ xmlrpc_tests.append(SimpleServerTestCase) xmlrpc_tests.append(KeepaliveServerTestCase1) xmlrpc_tests.append(KeepaliveServerTestCase2) - xmlrpc_tests.append(GzipServerTestCase) + try: + import gzip + xmlrpc_tests.append(GzipServerTestCase) + except ImportError: + pass #gzip not supported in this build xmlrpc_tests.append(ServerProxyTestCase) xmlrpc_tests.append(FailingServerTestCase) xmlrpc_tests.append(CGIHandlerTestCase) Modified: python/trunk/Lib/xmlrpclib.py ============================================================================== --- python/trunk/Lib/xmlrpclib.py (original) +++ python/trunk/Lib/xmlrpclib.py Mon Jul 20 00:14:00 2009 @@ -139,10 +139,13 @@ import re, string, time, operator from types import * -import gzip import socket import errno import httplib +try: + import gzip +except ImportError: + gzip = None #python can be built without zlib/gzip support # -------------------------------------------------------------------- # Internal stuff @@ -1146,6 +1149,8 @@ Encode data using the gzip content encoding as described in RFC 1952 """ + if not gzip: + raise NotImplementedError f = StringIO.StringIO() gzf = gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1) gzf.write(data) @@ -1168,6 +1173,8 @@ Decode data using the gzip content encoding as described in RFC 1952 """ + if not gzip: + raise NotImplementedError f = StringIO.StringIO(data) gzf = gzip.GzipFile(mode="rb", fileobj=f) try: @@ -1192,6 +1199,8 @@ def __init__(self, response): #response doesn't support tell() and read(), required by #GzipFile + if not gzip: + raise NotImplementedError self.stringio = StringIO.StringIO(response.read()) gzip.GzipFile.__init__(self, mode="rb", fileobj=self.stringio) @@ -1378,7 +1387,7 @@ # @param request_body XML-RPC body. def send_request(self, connection, handler, request_body): - if (self.accept_gzip_encoding): + if (self.accept_gzip_encoding and gzip): connection.putrequest("POST", handler, skip_accept_encoding=True) connection.putheader("Accept-Encoding", "gzip") else: @@ -1421,7 +1430,8 @@ #optionally encode the request if (self.encode_threshold is not None and - self.encode_threshold < len(request_body)): + self.encode_threshold < len(request_body) and + gzip): connection.putheader("Content-Encoding", "gzip") request_body = gzip_encode(request_body) From python-checkins at python.org Mon Jul 20 00:29:24 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sun, 19 Jul 2009 22:29:24 -0000 Subject: [Python-checkins] r74099 - in python/branches/py3k/Lib: test/test_xmlrpc.py xmlrpc/client.py xmlrpc/server.py Message-ID: Author: kristjan.jonsson Date: Mon Jul 20 00:29:24 2009 New Revision: 74099 Log: porting revision 74098 from trunk: http://bugs.python.org/issue6499 zlib/gzip may not be present for all builds. Make xmlrpclib gracefully not supporg gzip encoding in this case Modified: python/branches/py3k/Lib/test/test_xmlrpc.py python/branches/py3k/Lib/xmlrpc/client.py python/branches/py3k/Lib/xmlrpc/server.py Modified: python/branches/py3k/Lib/test/test_xmlrpc.py ============================================================================== --- python/branches/py3k/Lib/test/test_xmlrpc.py (original) +++ python/branches/py3k/Lib/test/test_xmlrpc.py Mon Jul 20 00:29:24 2009 @@ -799,7 +799,11 @@ xmlrpc_tests.append(SimpleServerTestCase) xmlrpc_tests.append(KeepaliveServerTestCase1) xmlrpc_tests.append(KeepaliveServerTestCase2) - xmlrpc_tests.append(GzipServerTestCase) + try: + import gzip + xmlrpc_tests.append(GzipServerTestCase) + except ImportError: + pass #gzip not supported in this build xmlrpc_tests.append(ServerProxyTestCase) xmlrpc_tests.append(FailingServerTestCase) xmlrpc_tests.append(CGIHandlerTestCase) Modified: python/branches/py3k/Lib/xmlrpc/client.py ============================================================================== --- python/branches/py3k/Lib/xmlrpc/client.py (original) +++ python/branches/py3k/Lib/xmlrpc/client.py Mon Jul 20 00:29:24 2009 @@ -136,10 +136,13 @@ import re, time, operator import http.client from xml.parsers import expat -import gzip import socket import errno from io import BytesIO +try: + import gzip +except ImportError: + gzip = None #python can be built without zlib/gzip support # -------------------------------------------------------------------- # Internal stuff @@ -1030,6 +1033,8 @@ Encode data using the gzip content encoding as described in RFC 1952 """ + if not gzip: + raise NotImplementedError f = BytesIO() gzf = gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1) gzf.write(data) @@ -1052,6 +1057,8 @@ Decode data using the gzip content encoding as described in RFC 1952 """ + if not gzip: + raise NotImplementedError f = BytesIO(data) gzf = gzip.GzipFile(mode="rb", fileobj=f) try: @@ -1076,6 +1083,8 @@ def __init__(self, response): #response doesn't support tell() and read(), required by #GzipFile + if not gzip: + raise NotImplementedError self.io = BytesIO(response.read()) gzip.GzipFile.__init__(self, mode="rb", fileobj=self.io) @@ -1253,7 +1262,7 @@ headers = self._extra_headers[:] if debug: connection.set_debuglevel(1) - if self.accept_gzip_encoding: + if self.accept_gzip_encoding and gzip: connection.putrequest("POST", handler, skip_accept_encoding=True) headers.append(("Accept-Encoding", "gzip")) else: @@ -1285,7 +1294,8 @@ def send_content(self, connection, request_body): #optionally encode the request if (self.encode_threshold is not None and - self.encode_threshold < len(request_body)): + self.encode_threshold < len(request_body) and + gzip): connection.putheader("Content-Encoding", "gzip") request_body = gzip_encode(request_body) Modified: python/branches/py3k/Lib/xmlrpc/server.py ============================================================================== --- python/branches/py3k/Lib/xmlrpc/server.py (original) +++ python/branches/py3k/Lib/xmlrpc/server.py Mon Jul 20 00:29:24 2009 @@ -509,8 +509,11 @@ if len(response) > self.encode_threshold: q = self.accept_encodings().get("gzip", 0) if q: - response = gzip_encode(response) - self.send_header("Content-Encoding", "gzip") + try: + response = gzip_encode(response) + self.send_header("Content-Encoding", "gzip") + except NotImplementedError: + pass self.send_header("Content-length", str(len(response))) self.end_headers() self.wfile.write(response) @@ -523,6 +526,8 @@ if encoding == "gzip": try: return gzip_decode(data) + except NotImplementedError: + self.send_response(501, "encoding %r not supported" % encoding) except ValueError: self.send_response(400, "error decoding gzip content") else: From python-checkins at python.org Mon Jul 20 00:35:45 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sun, 19 Jul 2009 22:35:45 -0000 Subject: [Python-checkins] r74100 - python/trunk/Lib/xmlrpclib.py Message-ID: Author: kristjan.jonsson Date: Mon Jul 20 00:35:44 2009 New Revision: 74100 Log: http://bugs.python.org/issue6499 gzip.GzipFile may not exist as a parent class Modified: python/trunk/Lib/xmlrpclib.py Modified: python/trunk/Lib/xmlrpclib.py ============================================================================== --- python/trunk/Lib/xmlrpclib.py (original) +++ python/trunk/Lib/xmlrpclib.py Mon Jul 20 00:35:44 2009 @@ -1192,7 +1192,7 @@ # @param response A stream supporting a read() method # @return a file-like object that the decoded data can be read() from -class GzipDecodedResponse(gzip.GzipFile): +class GzipDecodedResponse(gzip.GzipFile if gzip else object): """a file-like object to decode a response encoded with the gzip method, as described in RFC 1952. """ From python-checkins at python.org Mon Jul 20 00:38:38 2009 From: python-checkins at python.org (kristjan.jonsson) Date: Sun, 19 Jul 2009 22:38:38 -0000 Subject: [Python-checkins] r74101 - python/branches/py3k/Lib/xmlrpc/client.py Message-ID: Author: kristjan.jonsson Date: Mon Jul 20 00:38:38 2009 New Revision: 74101 Log: merging revision 74100 from trunk: http://bugs.python.org/issue6499 gzip.GzipFile may not exist as a parent class Modified: python/branches/py3k/Lib/xmlrpc/client.py Modified: python/branches/py3k/Lib/xmlrpc/client.py ============================================================================== --- python/branches/py3k/Lib/xmlrpc/client.py (original) +++ python/branches/py3k/Lib/xmlrpc/client.py Mon Jul 20 00:38:38 2009 @@ -1076,7 +1076,7 @@ # @param response A stream supporting a read() method # @return a file-like object that the decoded data can be read() from -class GzipDecodedResponse(gzip.GzipFile): +class GzipDecodedResponse(gzip.GzipFile if gzip else object): """a file-like object to decode a response encoded with the gzip method, as described in RFC 1952. """ From buildbot at python.org Mon Jul 20 01:14:03 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 23:14:03 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/989 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: kristjan.jonsson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Mon Jul 20 01:42:33 2009 From: buildbot at python.org (buildbot at python.org) Date: Sun, 19 Jul 2009 23:42:33 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/322 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: kristjan.jonsson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_re make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Mon Jul 20 01:43:46 2009 From: python-checkins at python.org (brett.cannon) Date: Sun, 19 Jul 2009 23:43:46 -0000 Subject: [Python-checkins] r74102 - python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py Message-ID: Author: brett.cannon Date: Mon Jul 20 01:43:45 2009 New Revision: 74102 Log: Update importlib.test.source.test_abc_loader to new features added in Python 3.1. Modified: python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py Modified: python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py (original) +++ python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py Mon Jul 20 01:43:45 2009 @@ -183,7 +183,8 @@ mock.source = b"1/0" with util.uncache(name): sys.modules[name] = module - self.assertRaises(ZeroDivisionError, mock.load_module, name) + with self.assertRaises(ZeroDivisionError): + mock.load_module(name) self.assertTrue(sys.modules[name] is module) self.assertTrue(hasattr(module, 'blah')) return mock @@ -193,7 +194,8 @@ mock = self.mocker({name: os.path.join('path', 'to', 'mod')}) mock.source = b"1/0" with util.uncache(name): - self.assertRaises(ZeroDivisionError, mock.load_module, name) + with self.assertRaises(ZeroDivisionError): + mock.load_module(name) self.assertTrue(name not in sys.modules) return mock @@ -207,14 +209,14 @@ # No source path should lead to ImportError. name = 'mod' mock = PyLoaderMock({}) - with util.uncache(name): - self.assertRaises(ImportError, mock.load_module, name) + with util.uncache(name), self.assertRaises(ImportError): + mock.load_module(name) def test_source_path_is_None(self): name = 'mod' mock = PyLoaderMock({name: None}) - with util.uncache(name): - self.assertRaises(ImportError, mock.load_module, name) + with util.uncache(name), self.assertRaises(ImportError): + mock.load_module(name) class PyLoaderGetSourceTests(unittest.TestCase): @@ -349,17 +351,17 @@ mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to', 'mod'), 'magic': bad_magic}}) - with util.uncache(name): - self.assertRaises(ImportError, mock.load_module, name) + with util.uncache(name), self.assertRaises(ImportError): + mock.load_module(name) def test_bad_bytecode(self): - # Bad code object bytecode should elad to an ImportError. + # Bad code object bytecode should lead to an ImportError. name = 'mod' mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to', 'mod'), 'bc': b''}}) - with util.uncache(name): - self.assertRaises(ImportError, mock.load_module, name) + with util.uncache(name), self.assertRaises(ImportError): + mock.load_module(name) def raise_ImportError(*args, **kwargs): @@ -387,16 +389,16 @@ # If all *_path methods return None, raise ImportError. name = 'mod' mock = PyPycLoaderMock({name: None}) - with util.uncache(name): - self.assertRaises(ImportError, mock.load_module, name) + with util.uncache(name), self.assertRaises(ImportError): + mock.load_module(name) def test_source_path_ImportError(self): # An ImportError from source_path should trigger an ImportError. name = 'mod' mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to', 'mod')}}) - with util.uncache(name): - self.assertRaises(ImportError, mock.load_module, name) + with util.uncache(name), self.assertRaises(ImportError): + mock.load_module(name) def test_bytecode_path_ImportError(self): # An ImportError from bytecode_path should trigger an ImportError. @@ -404,8 +406,8 @@ mock = PyPycLoaderMock({name: os.path.join('path', 'to', 'mod')}) bad_meth = types.MethodType(raise_ImportError, mock) mock.bytecode_path = bad_meth - with util.uncache(name): - self.assertRaises(ImportError, mock.load_module, name) + with util.uncache(name), self.assertRaises(ImportError): + mock.load_module(name) def test_main(): From python-checkins at python.org Mon Jul 20 02:14:30 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 00:14:30 -0000 Subject: [Python-checkins] r74103 - in python/branches/py3k: Lib/importlib/test/source/test_abc_loader.py Misc/NEWS Message-ID: Author: brett.cannon Date: Mon Jul 20 02:14:29 2009 New Revision: 74103 Log: Some tests in importlib.test.source.test_abc_loader were testing what happens when a loader is given missing or bad code object bytecode. Unfortunately an exception related to source paths was masking what the proper exception to test should be. Making the test explicitly set the environment fixed the test. The code being test was not affected. Modified: python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py (original) +++ python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py Mon Jul 20 02:14:29 2009 @@ -348,19 +348,27 @@ # A bad magic number should lead to an ImportError. name = 'mod' bad_magic = b'\x00\x00\x00\x00' - mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to', - 'mod'), - 'magic': bad_magic}}) + bc = {name: + {'path': os.path.join('path', 'to', 'mod'), + 'magic': bad_magic}} + mock = PyPycLoaderMock({name: None}, bc) with util.uncache(name), self.assertRaises(ImportError): mock.load_module(name) + def test_no_bytecode(self): + # Missing code object bytecode should lead to an EOFError. + name = 'mod' + bc = {name: {'path': os.path.join('path', 'to', 'mod'), 'bc': b''}} + mock = PyPycLoaderMock({name: None}, bc) + with util.uncache(name), self.assertRaises(EOFError): + mock.load_module(name) + def test_bad_bytecode(self): - # Bad code object bytecode should lead to an ImportError. + # Malformed code object bytecode should lead to a ValueError. name = 'mod' - mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to', - 'mod'), - 'bc': b''}}) - with util.uncache(name), self.assertRaises(ImportError): + bc = {name: {'path': os.path.join('path', 'to', 'mod'), 'bc': b'XXX'}} + mock = PyPycLoaderMock({name: None}, bc) + with util.uncache(name), self.assertRaises(ValueError): mock.load_module(name) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Jul 20 02:14:29 2009 @@ -88,6 +88,10 @@ Tests ----- +- Fixed tests in importlib.test.source.test_abc_loader that were masking + the proper exceptions that should be raised for missing or improper code + object bytecode. + - Removed importlib's custom test discovery code and switched to unittest.TestLoader.discover(). From python-checkins at python.org Mon Jul 20 02:16:40 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 00:16:40 -0000 Subject: [Python-checkins] r74104 - python/branches/release31-maint Message-ID: Author: brett.cannon Date: Mon Jul 20 02:16:40 2009 New Revision: 74104 Log: Blocked revisions 74102-74103 via svnmerge ........ r74102 | brett.cannon | 2009-07-19 16:43:45 -0700 (Sun, 19 Jul 2009) | 1 line Update importlib.test.source.test_abc_loader to new features added in Python 3.1. ........ r74103 | brett.cannon | 2009-07-19 17:14:29 -0700 (Sun, 19 Jul 2009) | 7 lines Some tests in importlib.test.source.test_abc_loader were testing what happens when a loader is given missing or bad code object bytecode. Unfortunately an exception related to source paths was masking what the proper exception to test should be. Making the test explicitly set the environment fixed the test. The code being test was not affected. ........ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Mon Jul 20 02:19:49 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 00:19:49 -0000 Subject: [Python-checkins] r74105 - in python/branches/release31-maint: Lib/importlib/test/source/test_abc_loader.py Misc/NEWS Message-ID: Author: brett.cannon Date: Mon Jul 20 02:19:49 2009 New Revision: 74105 Log: Backport of r74103. Modified: python/branches/release31-maint/Lib/importlib/test/source/test_abc_loader.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/importlib/test/source/test_abc_loader.py ============================================================================== --- python/branches/release31-maint/Lib/importlib/test/source/test_abc_loader.py (original) +++ python/branches/release31-maint/Lib/importlib/test/source/test_abc_loader.py Mon Jul 20 02:19:49 2009 @@ -346,20 +346,20 @@ # A bad magic number should lead to an ImportError. name = 'mod' bad_magic = b'\x00\x00\x00\x00' - mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to', - 'mod'), - 'magic': bad_magic}}) + mock = PyPycLoaderMock({name: None}, + {name: {'path': os.path.join('path', 'to', 'mod'), + 'magic': bad_magic}}) with util.uncache(name): self.assertRaises(ImportError, mock.load_module, name) def test_bad_bytecode(self): - # Bad code object bytecode should elad to an ImportError. + # Bad code object bytecode should lead to an ImportError. name = 'mod' - mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to', - 'mod'), - 'bc': b''}}) + mock = PyPycLoaderMock({name: None}, + {name: {'path': os.path.join('path', 'to', 'mod'), + 'bc': b''}}) with util.uncache(name): - self.assertRaises(ImportError, mock.load_module, name) + self.assertRaises(EOFError, mock.load_module, name) def raise_ImportError(*args, **kwargs): Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Mon Jul 20 02:19:49 2009 @@ -62,6 +62,12 @@ - Issue 5390: Add uninstall icon independent of whether file extensions are installed. +Test +---- + +- Fix a test in importlib.test.source.test_abc_loader that was incorrectly + testing when a .pyc file lacked an code object bytecode. + What's New in Python 3.1? ========================= From buildbot at python.org Mon Jul 20 02:36:08 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 00:36:08 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1202 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: kristjan.jonsson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Mon Jul 20 02:53:21 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 00:53:21 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.1 Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.1/builds/24 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: brett.cannon BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Mon Jul 20 03:05:40 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 01:05:40 -0000 Subject: [Python-checkins] r74106 - python/branches/py3k/Lib/importlib/test/util.py Message-ID: Author: brett.cannon Date: Mon Jul 20 03:05:40 2009 New Revision: 74106 Log: Remove custom test-skipping code in importlib tests for unittest code. Modified: python/branches/py3k/Lib/importlib/test/util.py Modified: python/branches/py3k/Lib/importlib/test/util.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/util.py (original) +++ python/branches/py3k/Lib/importlib/test/util.py Mon Jul 20 03:05:40 2009 @@ -6,21 +6,22 @@ import sys -def case_insensitive_tests(class_): +CASE_INSENSITIVE_FS = True +# Windows is the only OS that is *always* case-insensitive +# (OS X *can* be case-sensitive). +if sys.platform not in ('win32', 'cygwin'): + changed_name = __file__.upper() + if changed_name == __file__: + changed_name = __file__.lower() + if not os.path.exists(changed_name): + CASE_INSENSITIVE_FS = False + + +def case_insensitive_tests(test): """Class decorator that nullifies tests requiring a case-insensitive file system.""" - # Windows is the only OS that is *always* case-insensitive - # (OS X *can* be case-sensitive). - if sys.platform not in ('win32', 'cygwin'): - changed_name = __file__.upper() - if changed_name == __file__: - changed_name = __file__.lower() - if os.path.exists(changed_name): - return class_ - else: - return unittest.TestCase - else: - return class_ + return unittest.skipIf(not CASE_INSENSITIVE_FS, + "requires a case-insensitive filesystem")(test) @contextmanager From rdmurray at bitdance.com Mon Jul 20 03:33:18 2009 From: rdmurray at bitdance.com (R. David Murray) Date: Sun, 19 Jul 2009 21:33:18 -0400 (EDT) Subject: [Python-checkins] r74086 - in python/branches/release31-maint: Lib/test/test_import.py Python/import.c In-Reply-To: References: <20090719015913.6BE104D2D1@spunkymail-mx8.g.dreamhost.com> Message-ID: On Sun, 19 Jul 2009 at 12:51, Alexandre Vassalotti wrote: > David, could you investigate the test failure on the > amd64-gentoo-linux buildbot? > > http://www.python.org/dev/buildbot/3.x.stable/amd64%20gentoo%203.x/builds/986/step-test/0 Darn, I missed that amid all the other buildbot noise, or I wouldn't have applied that patch to 3.1 yet :( I will take a look tomorrow. --David From buildbot at python.org Mon Jul 20 03:41:47 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 01:41:47 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/993 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: brett.cannon BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From buildbot at python.org Mon Jul 20 03:52:06 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 01:52:06 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2343 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: kristjan.jonsson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() The Buildbot has detected a new failure of sparc solaris10 gcc 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.1/builds/24 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: brett.cannon BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/3.1.loewis-sun/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 sincerely, -The Buildbot From python-checkins at python.org Mon Jul 20 05:19:18 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 03:19:18 -0000 Subject: [Python-checkins] r74107 - in python/branches/py3k: Lib/importlib/abc.py Lib/importlib/test/test_abc.py Misc/NEWS Message-ID: Author: brett.cannon Date: Mon Jul 20 05:19:18 2009 New Revision: 74107 Log: Importlib's documentation said that importlib.abc.PyLoader inherited from importlib.abc.ResourceLoader, when in fact it did not. Fixed the ABC to inherit as documented. This does in introduce an backwards-incompatiblity as the code in PyLoader already required the single method ResourceLoader defined as an abstract method. Modified: python/branches/py3k/Lib/importlib/abc.py python/branches/py3k/Lib/importlib/test/test_abc.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/importlib/abc.py ============================================================================== --- python/branches/py3k/Lib/importlib/abc.py (original) +++ python/branches/py3k/Lib/importlib/abc.py Mon Jul 20 05:19:18 2009 @@ -76,7 +76,7 @@ InspectLoader.register(machinery.FrozenImporter) -class PyLoader(_bootstrap.PyLoader, InspectLoader): +class PyLoader(_bootstrap.PyLoader, ResourceLoader, InspectLoader): """Abstract base class to assist in loading source code by requiring only back-end storage methods to be implemented. Modified: python/branches/py3k/Lib/importlib/test/test_abc.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/test_abc.py (original) +++ python/branches/py3k/Lib/importlib/test/test_abc.py Mon Jul 20 05:19:18 2009 @@ -1,30 +1,77 @@ from importlib import abc from importlib import machinery +import inspect import unittest -class SubclassTests(unittest.TestCase): +class InheritanceTests: - """Test that the various classes in importlib are subclasses of the - expected ABCS.""" + """Test that the specified class is a subclass/superclass of the expected + classes.""" - def verify(self, ABC, *classes): - """Verify the classes are subclasses of the ABC.""" - for cls in classes: - self.assertTrue(issubclass(cls, ABC)) - - def test_Finder(self): - self.verify(abc.Finder, machinery.BuiltinImporter, - machinery.FrozenImporter, machinery.PathFinder) - - def test_Loader(self): - self.verify(abc.Loader, machinery.BuiltinImporter, - machinery.FrozenImporter) + subclasses = [] + superclasses = [] + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + assert self.subclasses or self.superclasses, self.__class__ + self.__test = getattr(abc, self.__class__.__name__) + + def test_subclasses(self): + # Test that the expected subclasses inherit. + for subclass in self.subclasses: + self.assertTrue(issubclass(subclass, self.__test), + "{0} is not a subclass of {1}".format(subclass, self.__test)) + + def test_superclasses(self): + # Test that the class inherits from the expected superclasses. + for superclass in self.superclasses: + self.assertTrue(issubclass(self.__test, superclass), + "{0} is not a superclass of {1}".format(superclass, self.__test)) + + +class Finder(InheritanceTests, unittest.TestCase): + + subclasses = [machinery.BuiltinImporter, machinery.FrozenImporter, + machinery.PathFinder] + + +class Loader(InheritanceTests, unittest.TestCase): + + subclasses = [abc.PyLoader] + + +class ResourceLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.Loader] + + +class InspectLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.Loader] + subclasses = [abc.PyLoader, machinery.BuiltinImporter, + machinery.FrozenImporter] + + +class PyLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.Loader, abc.ResourceLoader, abc.InspectLoader] + + +class PyPycLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.PyLoader] def test_main(): from test.support import run_unittest - run_unittest(SubclassTests) + classes = [] + for class_ in globals().values(): + if (inspect.isclass(class_) and + issubclass(class_, unittest.TestCase) and + issubclass(class_, InheritanceTests)): + classes.append(class_) + run_unittest(*classes) if __name__ == '__main__': Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Jul 20 05:19:18 2009 @@ -43,6 +43,10 @@ Library ------- +- importlib.abc.PyLoader did not inherit from importlib.abc.ResourceLoader like + the documentation said it did even though the code in PyLoader relied on the + abstract method required by ResourceLoader. + - Issue #6431: Make Fraction type return NotImplemented when it doesn't know how to handle a comparison without loss of precision. Also add correct handling of infinities and nans for comparisons with float. From python-checkins at python.org Mon Jul 20 05:22:43 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 03:22:43 -0000 Subject: [Python-checkins] r74108 - in python/branches/release31-maint: Lib/importlib/abc.py Lib/importlib/test/test_abc.py Misc/NEWS Message-ID: Author: brett.cannon Date: Mon Jul 20 05:22:43 2009 New Revision: 74108 Log: Merged revisions 74107 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74107 | brett.cannon | 2009-07-19 20:19:18 -0700 (Sun, 19 Jul 2009) | 8 lines Importlib's documentation said that importlib.abc.PyLoader inherited from importlib.abc.ResourceLoader, when in fact it did not. Fixed the ABC to inherit as documented. This does in introduce an backwards-incompatiblity as the code in PyLoader already required the single method ResourceLoader defined as an abstract method. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/importlib/abc.py python/branches/release31-maint/Lib/importlib/test/test_abc.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/importlib/abc.py ============================================================================== --- python/branches/release31-maint/Lib/importlib/abc.py (original) +++ python/branches/release31-maint/Lib/importlib/abc.py Mon Jul 20 05:22:43 2009 @@ -76,7 +76,7 @@ InspectLoader.register(machinery.FrozenImporter) -class PyLoader(_bootstrap.PyLoader, InspectLoader): +class PyLoader(_bootstrap.PyLoader, ResourceLoader, InspectLoader): """Abstract base class to assist in loading source code by requiring only back-end storage methods to be implemented. Modified: python/branches/release31-maint/Lib/importlib/test/test_abc.py ============================================================================== --- python/branches/release31-maint/Lib/importlib/test/test_abc.py (original) +++ python/branches/release31-maint/Lib/importlib/test/test_abc.py Mon Jul 20 05:22:43 2009 @@ -1,30 +1,77 @@ from importlib import abc from importlib import machinery +import inspect import unittest -class SubclassTests(unittest.TestCase): +class InheritanceTests: - """Test that the various classes in importlib are subclasses of the - expected ABCS.""" + """Test that the specified class is a subclass/superclass of the expected + classes.""" - def verify(self, ABC, *classes): - """Verify the classes are subclasses of the ABC.""" - for cls in classes: - self.assert_(issubclass(cls, ABC)) - - def test_Finder(self): - self.verify(abc.Finder, machinery.BuiltinImporter, - machinery.FrozenImporter, machinery.PathFinder) - - def test_Loader(self): - self.verify(abc.Loader, machinery.BuiltinImporter, - machinery.FrozenImporter) + subclasses = [] + superclasses = [] + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + assert self.subclasses or self.superclasses, self.__class__ + self.__test = getattr(abc, self.__class__.__name__) + + def test_subclasses(self): + # Test that the expected subclasses inherit. + for subclass in self.subclasses: + self.assertTrue(issubclass(subclass, self.__test), + "{0} is not a subclass of {1}".format(subclass, self.__test)) + + def test_superclasses(self): + # Test that the class inherits from the expected superclasses. + for superclass in self.superclasses: + self.assertTrue(issubclass(self.__test, superclass), + "{0} is not a superclass of {1}".format(superclass, self.__test)) + + +class Finder(InheritanceTests, unittest.TestCase): + + subclasses = [machinery.BuiltinImporter, machinery.FrozenImporter, + machinery.PathFinder] + + +class Loader(InheritanceTests, unittest.TestCase): + + subclasses = [abc.PyLoader] + + +class ResourceLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.Loader] + + +class InspectLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.Loader] + subclasses = [abc.PyLoader, machinery.BuiltinImporter, + machinery.FrozenImporter] + + +class PyLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.Loader, abc.ResourceLoader, abc.InspectLoader] + + +class PyPycLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.PyLoader] def test_main(): from test.support import run_unittest - run_unittest(SubclassTests) + classes = [] + for class_ in globals().values(): + if (inspect.isclass(class_) and + issubclass(class_, unittest.TestCase) and + issubclass(class_, InheritanceTests)): + classes.append(class_) + run_unittest(*classes) if __name__ == '__main__': Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Mon Jul 20 05:22:43 2009 @@ -37,6 +37,10 @@ Library ------- +- importlib.abc.PyLoader did not inherit from importlib.abc.ResourceLoader like + the documentation said it did even though the code in PyLoader relied on the + abstract method required by ResourceLoader. + - Issue #6431: Make Fraction type return NotImplemented when it doesn't know how to handle a comparison without loss of precision. Also add correct handling of infinities and nans for comparisons with float. From python-checkins at python.org Mon Jul 20 06:22:03 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 04:22:03 -0000 Subject: [Python-checkins] r74109 - python/branches/release31-maint/Doc/library/importlib.rst Message-ID: Author: brett.cannon Date: Mon Jul 20 06:22:03 2009 New Revision: 74109 Log: Fix some minor typos in the importlib docs. Modified: python/branches/release31-maint/Doc/library/importlib.rst Modified: python/branches/release31-maint/Doc/library/importlib.rst ============================================================================== --- python/branches/release31-maint/Doc/library/importlib.rst (original) +++ python/branches/release31-maint/Doc/library/importlib.rst Mon Jul 20 06:22:03 2009 @@ -238,7 +238,7 @@ A concrete implementation of :meth:`importlib.abc.InspectLoader.get_source`. Uses - :meth:`importlib.abc.InspectLoader.get_data` and :meth:`source_path` to + :meth:`importlib.abc.ResourceLoader.get_data` and :meth:`source_path` to get the source code. It tries to guess the source encoding using :func:`tokenize.detect_encoding`. @@ -253,7 +253,7 @@ An abstract method which returns the modification time for the source code of the specified module. The modification time should be an - integer. If there is no source code, return :keyword:`None. If the + integer. If there is no source code, return :keyword:`None`. If the module cannot be found then :exc:`ImportError` is raised. .. method:: bytecode_path(fullname) From python-checkins at python.org Mon Jul 20 06:23:49 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 04:23:49 -0000 Subject: [Python-checkins] r74110 - in python/branches/py3k: Doc/library/importlib.rst Lib/importlib/_bootstrap.py Lib/importlib/abc.py Lib/importlib/test/source/test_abc_loader.py Lib/importlib/test/test_abc.py Misc/NEWS Message-ID: Author: brett.cannon Date: Mon Jul 20 06:23:48 2009 New Revision: 74110 Log: Implement the PEP 302 protocol for get_filename() as importlib.abc.ExecutionLoader. PyLoader now inherits from this ABC instead of InspectLoader directly. Both PyLoader and PyPycLoader provide concrete implementations of get_filename in terms of source_path and bytecode_path. Modified: python/branches/py3k/Doc/library/importlib.rst python/branches/py3k/Lib/importlib/_bootstrap.py python/branches/py3k/Lib/importlib/abc.py python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py python/branches/py3k/Lib/importlib/test/test_abc.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Doc/library/importlib.rst ============================================================================== --- python/branches/py3k/Doc/library/importlib.rst (original) +++ python/branches/py3k/Doc/library/importlib.rst Mon Jul 20 06:23:48 2009 @@ -202,10 +202,24 @@ :term:`loader` cannot find the module. +.. class:: ExecutionLoader + + An abstract base class which inherits from :class:`InspectLoader` that, + when implemented, allows a module to be executed as a script. The ABC + represents an optional :pep:`302` protocol. + + .. method:: get_filename(fullname) + + An abstract method that is to return the value for :attr:`__file__` for + the specified module. If no path is available, :exc:`ImportError` is + raised. + + .. class:: PyLoader - An abstract base class inheriting from :class:`importlib.abc.InspectLoader` - and :class:`importlib.abc.ResourceLoader` designed to ease the loading of + An abstract base class inheriting from + :class:`importlib.abc.ExecutionLoader` and + :class:`importlib.abc.ResourceLoader` designed to ease the loading of Python source modules (bytecode is not handled; see :class:`importlib.abc.PyPycLoader` for a source/bytecode ABC). A subclass implementing this ABC will only need to worry about exposing how the source @@ -218,6 +232,13 @@ module. Should return :keyword:`None` if there is no source code. :exc:`ImportError` if the module cannot be found. + .. method:: get_filename(fullname) + + A concrete implementation of + :meth:`importlib.abc.ExecutionLoader.get_filename` that + relies on :meth:`source_path`. If :meth:`source_path` returns + :keyword:`None`, then :exc:`ImportError` is raised. + .. method:: load_module(fullname) A concrete implementation of :meth:`importlib.abc.Loader.load_module` @@ -238,8 +259,8 @@ A concrete implementation of :meth:`importlib.abc.InspectLoader.get_source`. Uses - :meth:`importlib.abc.InspectLoader.get_data` and :meth:`source_path` to - get the source code. It tries to guess the source encoding using + :meth:`importlib.abc.ResourceLoader.get_data` and :meth:`source_path` + to get the source code. It tries to guess the source encoding using :func:`tokenize.detect_encoding`. @@ -253,7 +274,7 @@ An abstract method which returns the modification time for the source code of the specified module. The modification time should be an - integer. If there is no source code, return :keyword:`None. If the + integer. If there is no source code, return :keyword:`None`. If the module cannot be found then :exc:`ImportError` is raised. .. method:: bytecode_path(fullname) @@ -263,6 +284,16 @@ if no bytecode exists (yet). Raises :exc:`ImportError` if the module is not found. + .. method:: get_filename(fullname) + + A concrete implementation of + :meth:`importlib.abc.ExecutionLoader.get_filename` that relies on + :meth:`importlib.abc.PyLoader.source_path` and :meth:`bytecode_path`. + If :meth:`source_path` returns a path, then that value is returned. + Else if :meth:`bytecode_path` returns a path, that path will be + returned. If a path is not available from both methods, + :exc:`ImportError` is raised. + .. method:: write_bytecode(fullname, bytecode) An abstract method which has the loader write *bytecode* for future Modified: python/branches/py3k/Lib/importlib/_bootstrap.py ============================================================================== --- python/branches/py3k/Lib/importlib/_bootstrap.py (original) +++ python/branches/py3k/Lib/importlib/_bootstrap.py Mon Jul 20 06:23:48 2009 @@ -315,16 +315,10 @@ @module_for_loader def load_module(self, module): - """Load a source module.""" - return self._load_module(module) - - def _load_module(self, module): - """Initialize a module from source.""" + """Initialize the module.""" name = module.__name__ code_object = self.get_code(module.__name__) - # __file__ may have been set by the caller, e.g. bytecode path. - if not hasattr(module, '__file__'): - module.__file__ = self.source_path(name) + module.__file__ = self.get_filename(name) if self.is_package(name): module.__path__ = [module.__file__.rsplit(path_sep, 1)[0]] module.__package__ = module.__name__ @@ -334,6 +328,15 @@ exec(code_object, module.__dict__) return module + def get_filename(self, fullname): + """Return the path to the source file, else raise ImportError.""" + path = self.source_path(fullname) + if path is not None: + return path + else: + raise ImportError("no source path available for " + "{0!r}".format(fullname)) + def get_code(self, fullname): """Get a code object from source.""" source_path = self.source_path(fullname) @@ -388,15 +391,16 @@ """ - @module_for_loader - def load_module(self, module): - """Load a module from source or bytecode.""" - name = module.__name__ - source_path = self.source_path(name) - bytecode_path = self.bytecode_path(name) - # get_code can worry about no viable paths existing. - module.__file__ = source_path or bytecode_path - return self._load_module(module) + def get_filename(self, fullname): + """Return the source or bytecode file path.""" + path = self.source_path(fullname) + if path is not None: + return path + path = self.bytecode_path(fullname) + if path is not None: + return path + raise ImportError("no source or bytecode path available for " + "{0!r}".format(fullname)) def get_code(self, fullname): """Get a code object from source or bytecode.""" Modified: python/branches/py3k/Lib/importlib/abc.py ============================================================================== --- python/branches/py3k/Lib/importlib/abc.py (original) +++ python/branches/py3k/Lib/importlib/abc.py Mon Jul 20 06:23:48 2009 @@ -76,7 +76,23 @@ InspectLoader.register(machinery.FrozenImporter) -class PyLoader(_bootstrap.PyLoader, ResourceLoader, InspectLoader): +class ExecutionLoader(InspectLoader): + + """Abstract base class for loaders that wish to support the execution of + modules as scripts. + + This ABC represents one of the optional protocols specified in PEP 302. + + """ + + @abc.abstractmethod + def get_filename(self, fullname:str) -> str: + """Abstract method which should return the value that __file__ is to be + set to.""" + raise NotImplementedError + + +class PyLoader(_bootstrap.PyLoader, ResourceLoader, ExecutionLoader): """Abstract base class to assist in loading source code by requiring only back-end storage methods to be implemented. Modified: python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py (original) +++ python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py Mon Jul 20 06:23:48 2009 @@ -218,6 +218,21 @@ with util.uncache(name), self.assertRaises(ImportError): mock.load_module(name) + def test_get_filename_with_source_path(self): + # get_filename() should return what source_path() returns. + name = 'mod' + path = os.path.join('path', 'to', 'source') + mock = PyLoaderMock({name: path}) + with util.uncache(name): + self.assertEqual(mock.get_filename(name), path) + + def test_get_filename_no_source_path(self): + # get_filename() should raise ImportError if source_path returns None. + name = 'mod' + mock = PyLoaderMock({name: None}) + with util.uncache(name), self.assertRaises(ImportError): + mock.get_filename(name) + class PyLoaderGetSourceTests(unittest.TestCase): @@ -283,6 +298,38 @@ super().test_unloadable() +class PyPycLoaderInterfaceTests(unittest.TestCase): + + """Test for the interface of importlib.abc.PyPycLoader.""" + + def get_filename_check(self, src_path, bc_path, expect): + name = 'mod' + mock = PyPycLoaderMock({name: src_path}, {name: {'path': bc_path}}) + with util.uncache(name): + assert mock.source_path(name) == src_path + assert mock.bytecode_path(name) == bc_path + self.assertEqual(mock.get_filename(name), expect) + + def test_filename_with_source_bc(self): + # When source and bytecode paths present, return the source path. + self.get_filename_check('source_path', 'bc_path', 'source_path') + + def test_filename_with_source_no_bc(self): + # With source but no bc, return source path. + self.get_filename_check('source_path', None, 'source_path') + + def test_filename_with_no_source_bc(self): + # With not source but bc, return the bc path. + self.get_filename_check(None, 'bc_path', 'bc_path') + + def test_filename_with_no_source_or_bc(self): + # With no source or bc, raise ImportError. + name = 'mod' + mock = PyPycLoaderMock({name: None}, {name: {'path': None}}) + with util.uncache(name), self.assertRaises(ImportError): + mock.get_filename(name) + + class SkipWritingBytecodeTests(unittest.TestCase): """Test that bytecode is properly handled based on @@ -421,9 +468,9 @@ def test_main(): from test.support import run_unittest run_unittest(PyLoaderTests, PyLoaderInterfaceTests, PyLoaderGetSourceTests, - PyPycLoaderTests, SkipWritingBytecodeTests, - RegeneratedBytecodeTests, BadBytecodeFailureTests, - MissingPathsTests) + PyPycLoaderTests, PyPycLoaderInterfaceTests, + SkipWritingBytecodeTests, RegeneratedBytecodeTests, + BadBytecodeFailureTests, MissingPathsTests) if __name__ == '__main__': Modified: python/branches/py3k/Lib/importlib/test/test_abc.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/test_abc.py (original) +++ python/branches/py3k/Lib/importlib/test/test_abc.py Mon Jul 20 06:23:48 2009 @@ -53,9 +53,15 @@ machinery.FrozenImporter] +class ExecutionLoader(InheritanceTests, unittest.TestCase): + + superclasses = [abc.InspectLoader] + subclasses = [abc.PyLoader] + + class PyLoader(InheritanceTests, unittest.TestCase): - superclasses = [abc.Loader, abc.ResourceLoader, abc.InspectLoader] + superclasses = [abc.Loader, abc.ResourceLoader, abc.ExecutionLoader] class PyPycLoader(InheritanceTests, unittest.TestCase): Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Jul 20 06:23:48 2009 @@ -43,6 +43,11 @@ Library ------- +- Add importlib.abc.ExecutionLoader to represent the PEP 302 protocol for + loaders that allow for modules to be executed. Both importlib.abc.PyLoader + and PyPycLoader inherit from this class and provide implementations in + relation to other methods required by the ABCs. + - importlib.abc.PyLoader did not inherit from importlib.abc.ResourceLoader like the documentation said it did even though the code in PyLoader relied on the abstract method required by ResourceLoader. From buildbot at python.org Mon Jul 20 06:29:16 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 04:29:16 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1206 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: brett.cannon BUILD FAILED: failed svn sincerely, -The Buildbot From buildbot at python.org Mon Jul 20 06:29:43 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 04:29:43 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/995 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: brett.cannon BUILD FAILED: failed svn sincerely, -The Buildbot From ncoghlan at gmail.com Mon Jul 20 14:15:31 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Mon, 20 Jul 2009 22:15:31 +1000 Subject: [Python-checkins] r74107 - in python/branches/py3k: Lib/importlib/abc.py Lib/importlib/test/test_abc.py Misc/NEWS In-Reply-To: <4a63e23c.1467f10a.5310.ffffe91dSMTPIN_ADDED@mx.google.com> References: <4a63e23c.1467f10a.5310.ffffe91dSMTPIN_ADDED@mx.google.com> Message-ID: <4A645FE3.8080802@gmail.com> brett.cannon wrote: > Author: brett.cannon > Date: Mon Jul 20 05:19:18 2009 > New Revision: 74107 > > Log: > Importlib's documentation said that importlib.abc.PyLoader inherited from > importlib.abc.ResourceLoader, when in fact it did not. Fixed the ABC to inherit > as documented. > > This does in introduce an backwards-incompatiblity as the code in PyLoader > already required the single method ResourceLoader defined as an abstract > method. s/does in/doesn't/? (Just making sure I understand the intent of the checkin correctly) Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From ncoghlan at gmail.com Mon Jul 20 14:22:41 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Mon, 20 Jul 2009 22:22:41 +1000 Subject: [Python-checkins] r74110 - in python/branches/py3k: Doc/library/importlib.rst Lib/importlib/_bootstrap.py Lib/importlib/abc.py Lib/importlib/test/source/test_abc_loader.py Lib/importlib/test/test_abc.py Misc/NEWS In-Reply-To: <4a63f15b.0b67f10a.38d2.fffffb7eSMTPIN_ADDED@mx.google.com> References: <4a63f15b.0b67f10a.38d2.fffffb7eSMTPIN_ADDED@mx.google.com> Message-ID: <4A646191.5000705@gmail.com> brett.cannon wrote: > Author: brett.cannon > Date: Mon Jul 20 06:23:48 2009 > New Revision: 74110 > > Log: > Implement the PEP 302 protocol for get_filename() as > importlib.abc.ExecutionLoader. PyLoader now inherits from this ABC instead of > InspectLoader directly. Both PyLoader and PyPycLoader provide concrete > implementations of get_filename in terms of source_path and bytecode_path. > > > Modified: > python/branches/py3k/Doc/library/importlib.rst > python/branches/py3k/Lib/importlib/_bootstrap.py > python/branches/py3k/Lib/importlib/abc.py > python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py > python/branches/py3k/Lib/importlib/test/test_abc.py > python/branches/py3k/Misc/NEWS > > Modified: python/branches/py3k/Doc/library/importlib.rst > ============================================================================== > --- python/branches/py3k/Doc/library/importlib.rst (original) > +++ python/branches/py3k/Doc/library/importlib.rst Mon Jul 20 06:23:48 2009 > @@ -202,10 +202,24 @@ > :term:`loader` cannot find the module. > > > +.. class:: ExecutionLoader > + > + An abstract base class which inherits from :class:`InspectLoader` that, > + when implemented, allows a module to be executed as a script. The ABC > + represents an optional :pep:`302` protocol. > + > + .. method:: get_filename(fullname) > + > + An abstract method that is to return the value for :attr:`__file__` for > + the specified module. If no path is available, :exc:`ImportError` is > + raised. This isn't quite accurate: 1. Modules that come from a loader without get_filename() can still be executed via the runpy module. They will just have __file__ set to None instead of the value that would have been set by load_module() (and if they were executed with -m then sys.argv[0] will be wrong as well). 2. There's an additional restriction on get_filename(): it isn't allowed to load the module (otherwise there is no point to the method - if loading the module was acceptable, then runpy could just do that and inspect __file__ itself as a fallback when the loader didn't provide get_filename()). I have a feeling that I didn't mention point 2 explicitly when I documented get_filename() in PEP 302 though. Regards, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From python-checkins at python.org Mon Jul 20 15:30:11 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 13:30:11 -0000 Subject: [Python-checkins] r74111 - python/trunk/Doc/library/2to3.rst Message-ID: Author: benjamin.peterson Date: Mon Jul 20 15:30:10 2009 New Revision: 74111 Log: remove docs for deprecated -p option Modified: python/trunk/Doc/library/2to3.rst Modified: python/trunk/Doc/library/2to3.rst ============================================================================== --- python/trunk/Doc/library/2to3.rst (original) +++ python/trunk/Doc/library/2to3.rst Mon Jul 20 15:30:10 2009 @@ -86,13 +86,6 @@ The :option:`-v` option enables output of more information on the translation process. -When the :option:`-p` is passed, the :2to3fixer:`print` fixer ``print`` as a -function instead of a statement. This is useful when ``from __future__ import -print_function`` is being used. If this option is not given, the print fixer -will surround print calls in an extra set of parentheses because it cannot -differentiate between the print statement with parentheses (such as ``print -("a" + "b" + "c")``) and a true function call. - .. _2to3-fixers: From python-checkins at python.org Mon Jul 20 15:33:05 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 13:33:05 -0000 Subject: [Python-checkins] r74112 - in python/branches/release26-maint: Doc/library/2to3.rst Message-ID: Author: benjamin.peterson Date: Mon Jul 20 15:33:05 2009 New Revision: 74112 Log: Merged revisions 74111 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74111 | benjamin.peterson | 2009-07-20 08:30:10 -0500 (Mon, 20 Jul 2009) | 1 line remove docs for deprecated -p option ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/2to3.rst Modified: python/branches/release26-maint/Doc/library/2to3.rst ============================================================================== --- python/branches/release26-maint/Doc/library/2to3.rst (original) +++ python/branches/release26-maint/Doc/library/2to3.rst Mon Jul 20 15:33:05 2009 @@ -84,13 +84,6 @@ The :option:`-v` option enables output of more information on the translation process. -When the :option:`-p` is passed, 2to3 treats ``print`` as a function instead of -a statement. This is useful when ``from __future__ import print_function`` is -being used. If this option is not given, the print fixer will surround print -calls in an extra set of parentheses because it cannot differentiate between the -print statement with parentheses (such as ``print ("a" + "b" + "c")``) and a -true function call. - :mod:`lib2to3` - 2to3's library ------------------------------- From python-checkins at python.org Mon Jul 20 15:56:57 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 13:56:57 -0000 Subject: [Python-checkins] r74113 - sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Message-ID: Author: benjamin.peterson Date: Mon Jul 20 15:56:57 2009 New Revision: 74113 Log: fix deprecation warnings in tests Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_fixers.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Mon Jul 20 15:56:57 2009 @@ -18,8 +18,6 @@ def setUp(self, fix_list=None, fixer_pkg="lib2to3", options=None): if fix_list is None: fix_list = [self.fixer] - if options is None: - options = {"print_function" : False} self.refactor = support.get_refactorer(fixer_pkg, fix_list, options) self.fixer_log = [] self.filename = u"" @@ -58,8 +56,7 @@ def assert_runs_after(self, *names): fixes = [self.fixer] fixes.extend(names) - options = {"print_function" : False} - r = support.get_refactorer("lib2to3", fixes, options) + r = support.get_refactorer("lib2to3", fixes) (pre, post) = r.get_fixers() n = "fix_" + self.fixer if post and post[-1].__class__.__module__.endswith(n): From python-checkins at python.org Mon Jul 20 17:33:10 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 15:33:10 -0000 Subject: [Python-checkins] r74114 - in python/trunk/Lib/lib2to3: fixer_base.py fixes/fix_import.py fixes/fix_imports.py fixes/fix_long.py fixes/fix_ne.py fixes/fix_numliterals.py fixes/fix_operator.py fixes/fix_print.py fixes/fix_urllib.py main.py patcomp.py pgen2/grammar.py pygram.py refactor.py tests/data/different_encoding.py tests/test_fixers.py tests/test_refactor.py tests/test_util.py Message-ID: Author: benjamin.peterson Date: Mon Jul 20 17:33:09 2009 New Revision: 74114 Log: Merged revisions 73771,73811,73840,73842,73848-73849,73861,73957-73960,73964-73969,73972-73974,73977,73981,73984,74065,74113 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r73771 | benjamin.peterson | 2009-07-02 10:56:55 -0500 (Thu, 02 Jul 2009) | 1 line force the imports fixer to be run after the import one #6400 ........ r73811 | benjamin.peterson | 2009-07-03 09:03:14 -0500 (Fri, 03 Jul 2009) | 1 line check for sep, not pathsep when looking for a subpackage #6408 ........ r73840 | benjamin.peterson | 2009-07-04 09:52:28 -0500 (Sat, 04 Jul 2009) | 1 line don't print diffs by default; it's annoying ........ r73842 | benjamin.peterson | 2009-07-04 09:58:46 -0500 (Sat, 04 Jul 2009) | 1 line complain when not showing diffs or writing ........ r73848 | alexandre.vassalotti | 2009-07-04 23:38:19 -0500 (Sat, 04 Jul 2009) | 2 lines Fix test_refactor_stdin to handle print_output() method with 4 arguments. ........ r73849 | alexandre.vassalotti | 2009-07-04 23:43:18 -0500 (Sat, 04 Jul 2009) | 5 lines Issue 2370: Add fixer for the removal of operator.isCallable() and operator.sequenceIncludes(). Patch contributed by Jeff Balogh (and updated by me). ........ r73861 | benjamin.peterson | 2009-07-05 09:15:53 -0500 (Sun, 05 Jul 2009) | 1 line cleanup and use unicode where appropiate ........ r73957 | benjamin.peterson | 2009-07-11 15:49:56 -0500 (Sat, 11 Jul 2009) | 1 line fix calls to str() with unicode() ........ r73958 | benjamin.peterson | 2009-07-11 15:51:51 -0500 (Sat, 11 Jul 2009) | 1 line more str() -> unicode() ........ r73959 | benjamin.peterson | 2009-07-11 16:40:08 -0500 (Sat, 11 Jul 2009) | 1 line add tests for refactor_dir() ........ r73960 | benjamin.peterson | 2009-07-11 16:44:32 -0500 (Sat, 11 Jul 2009) | 1 line don't parse files just because they end with 'py' (no dot) ........ r73964 | benjamin.peterson | 2009-07-11 17:30:15 -0500 (Sat, 11 Jul 2009) | 1 line simplify ........ r73965 | benjamin.peterson | 2009-07-11 17:31:30 -0500 (Sat, 11 Jul 2009) | 1 line remove usage of get_prefix() ........ r73966 | benjamin.peterson | 2009-07-11 17:33:35 -0500 (Sat, 11 Jul 2009) | 1 line revert unintended change in 73965 ........ r73967 | benjamin.peterson | 2009-07-11 17:34:44 -0500 (Sat, 11 Jul 2009) | 1 line avoid expensive checks and assume the node did change ........ r73968 | benjamin.peterson | 2009-07-11 20:46:46 -0500 (Sat, 11 Jul 2009) | 1 line use a regular dict for the heads to avoid adding lists in the loop ........ r73969 | benjamin.peterson | 2009-07-11 20:50:43 -0500 (Sat, 11 Jul 2009) | 1 line prefix headnode functions with '_' ........ r73972 | benjamin.peterson | 2009-07-11 21:25:45 -0500 (Sat, 11 Jul 2009) | 1 line try to make the head node dict as sparse as possible ........ r73973 | benjamin.peterson | 2009-07-11 21:59:49 -0500 (Sat, 11 Jul 2009) | 1 line a better idea; add an option to *not* print diffs ........ r73974 | benjamin.peterson | 2009-07-11 22:00:29 -0500 (Sat, 11 Jul 2009) | 1 line add space ........ r73977 | benjamin.peterson | 2009-07-12 10:16:07 -0500 (Sun, 12 Jul 2009) | 1 line update get_headnode_dict tests for recent changes ........ r73981 | benjamin.peterson | 2009-07-12 12:06:39 -0500 (Sun, 12 Jul 2009) | 4 lines detect when "from __future__ import print_function" is given Deprecate the 'print_function' option and the -p flag ........ r73984 | benjamin.peterson | 2009-07-12 16:16:37 -0500 (Sun, 12 Jul 2009) | 1 line add tests for Call; thanks Joe Amenta ........ r74065 | benjamin.peterson | 2009-07-17 12:52:49 -0500 (Fri, 17 Jul 2009) | 1 line pathname2url and url2pathname are in urllib.request not urllib.parse #6496 ........ r74113 | benjamin.peterson | 2009-07-20 08:56:57 -0500 (Mon, 20 Jul 2009) | 1 line fix deprecation warnings in tests ........ Added: python/trunk/Lib/lib2to3/fixes/fix_operator.py - copied unchanged from r74113, /sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py Modified: python/trunk/Lib/lib2to3/ (props changed) python/trunk/Lib/lib2to3/fixer_base.py python/trunk/Lib/lib2to3/fixes/fix_import.py python/trunk/Lib/lib2to3/fixes/fix_imports.py python/trunk/Lib/lib2to3/fixes/fix_long.py python/trunk/Lib/lib2to3/fixes/fix_ne.py python/trunk/Lib/lib2to3/fixes/fix_numliterals.py python/trunk/Lib/lib2to3/fixes/fix_print.py python/trunk/Lib/lib2to3/fixes/fix_urllib.py python/trunk/Lib/lib2to3/main.py python/trunk/Lib/lib2to3/patcomp.py python/trunk/Lib/lib2to3/pgen2/grammar.py python/trunk/Lib/lib2to3/pygram.py python/trunk/Lib/lib2to3/refactor.py python/trunk/Lib/lib2to3/tests/data/different_encoding.py python/trunk/Lib/lib2to3/tests/test_fixers.py python/trunk/Lib/lib2to3/tests/test_refactor.py python/trunk/Lib/lib2to3/tests/test_util.py Modified: python/trunk/Lib/lib2to3/fixer_base.py ============================================================================== --- python/trunk/Lib/lib2to3/fixer_base.py (original) +++ python/trunk/Lib/lib2to3/fixer_base.py Mon Jul 20 17:33:09 2009 @@ -33,6 +33,8 @@ explicit = False # Is this ignored by refactor.py -f all? run_order = 5 # Fixers will be sorted by run order before execution # Lower numbers will be run first. + _accept_type = None # [Advanced and not public] This tells RefactoringTool + # which node type to accept when there's not a pattern. # Shortcut for access to Python grammar symbols syms = pygram.python_symbols Modified: python/trunk/Lib/lib2to3/fixes/fix_import.py ============================================================================== --- python/trunk/Lib/lib2to3/fixes/fix_import.py (original) +++ python/trunk/Lib/lib2to3/fixes/fix_import.py Mon Jul 20 17:33:09 2009 @@ -12,7 +12,7 @@ # Local imports from .. import fixer_base -from os.path import dirname, join, exists, pathsep +from os.path import dirname, join, exists, sep from ..fixer_util import FromImport, syms, token @@ -84,7 +84,7 @@ # so can't be a relative import. if not exists(join(dirname(base_path), '__init__.py')): return False - for ext in ['.py', pathsep, '.pyc', '.so', '.sl', '.pyd']: + for ext in ['.py', sep, '.pyc', '.so', '.sl', '.pyd']: if exists(base_path + ext): return True return False Modified: python/trunk/Lib/lib2to3/fixes/fix_imports.py ============================================================================== --- python/trunk/Lib/lib2to3/fixes/fix_imports.py (original) +++ python/trunk/Lib/lib2to3/fixes/fix_imports.py Mon Jul 20 17:33:09 2009 @@ -84,8 +84,6 @@ class FixImports(fixer_base.BaseFix): - order = "pre" # Pre-order tree traversal - # This is overridden in fix_imports2. mapping = MAPPING Modified: python/trunk/Lib/lib2to3/fixes/fix_long.py ============================================================================== --- python/trunk/Lib/lib2to3/fixes/fix_long.py (original) +++ python/trunk/Lib/lib2to3/fixes/fix_long.py Mon Jul 20 17:33:09 2009 @@ -5,18 +5,15 @@ """ # Local imports -from .. import fixer_base -from ..fixer_util import Name, Number, is_probably_builtin +from lib2to3 import fixer_base +from lib2to3.fixer_util import is_probably_builtin class FixLong(fixer_base.BaseFix): PATTERN = "'long'" - static_int = Name(u"int") - def transform(self, node, results): if is_probably_builtin(node): - new = self.static_int.clone() - new.prefix = node.prefix - return new + node.value = u"int" + node.changed() Modified: python/trunk/Lib/lib2to3/fixes/fix_ne.py ============================================================================== --- python/trunk/Lib/lib2to3/fixes/fix_ne.py (original) +++ python/trunk/Lib/lib2to3/fixes/fix_ne.py Mon Jul 20 17:33:09 2009 @@ -12,9 +12,11 @@ class FixNe(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NOTEQUAL + def match(self, node): # Override - return node.type == token.NOTEQUAL and node.value == u"<>" + return node.value == u"<>" def transform(self, node, results): new = pytree.Leaf(token.NOTEQUAL, u"!=", prefix=node.prefix) Modified: python/trunk/Lib/lib2to3/fixes/fix_numliterals.py ============================================================================== --- python/trunk/Lib/lib2to3/fixes/fix_numliterals.py (original) +++ python/trunk/Lib/lib2to3/fixes/fix_numliterals.py Mon Jul 20 17:33:09 2009 @@ -12,10 +12,11 @@ class FixNumliterals(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NUMBER + def match(self, node): # Override - return (node.type == token.NUMBER and - (node.value.startswith(u"0") or node.value[-1] in u"Ll")) + return (node.value.startswith(u"0") or node.value[-1] in u"Ll") def transform(self, node, results): val = node.value Modified: python/trunk/Lib/lib2to3/fixes/fix_print.py ============================================================================== --- python/trunk/Lib/lib2to3/fixes/fix_print.py (original) +++ python/trunk/Lib/lib2to3/fixes/fix_print.py Mon Jul 20 17:33:09 2009 @@ -26,20 +26,15 @@ ) -class FixPrint(fixer_base.ConditionalFix): +class FixPrint(fixer_base.BaseFix): PATTERN = """ simple_stmt< any* bare='print' any* > | print_stmt """ - skip_on = '__future__.print_function' - def transform(self, node, results): assert results - if self.should_skip(node): - return - bare_print = results.get("bare") if bare_print: Modified: python/trunk/Lib/lib2to3/fixes/fix_urllib.py ============================================================================== --- python/trunk/Lib/lib2to3/fixes/fix_urllib.py (original) +++ python/trunk/Lib/lib2to3/fixes/fix_urllib.py Mon Jul 20 17:33:09 2009 @@ -12,13 +12,13 @@ MAPPING = {'urllib': [ ('urllib.request', ['URLOpener', 'FancyURLOpener', 'urlretrieve', - '_urlopener', 'urlopen', 'urlcleanup']), + '_urlopener', 'urlopen', 'urlcleanup', + 'pathname2url', 'url2pathname']), ('urllib.parse', ['quote', 'quote_plus', 'unquote', 'unquote_plus', - 'urlencode', 'pathname2url', 'url2pathname', 'splitattr', - 'splithost', 'splitnport', 'splitpasswd', 'splitport', - 'splitquery', 'splittag', 'splittype', 'splituser', - 'splitvalue', ]), + 'urlencode', 'splitattr', 'splithost', 'splitnport', + 'splitpasswd', 'splitport', 'splitquery', 'splittag', + 'splittype', 'splituser', 'splitvalue', ]), ('urllib.error', ['ContentTooShortError'])], 'urllib2' : [ Modified: python/trunk/Lib/lib2to3/main.py ============================================================================== --- python/trunk/Lib/lib2to3/main.py (original) +++ python/trunk/Lib/lib2to3/main.py Mon Jul 20 17:33:09 2009 @@ -4,19 +4,31 @@ import sys import os +import difflib import logging import shutil import optparse from . import refactor + +def diff_texts(a, b, filename): + """Return a unified diff of two strings.""" + a = a.splitlines() + b = b.splitlines() + return difflib.unified_diff(a, b, filename, filename, + "(original)", "(refactored)", + lineterm="") + + class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool): """ Prints output to stdout. """ - def __init__(self, fixers, options, explicit, nobackups): + def __init__(self, fixers, options, explicit, nobackups, show_diffs): self.nobackups = nobackups + self.show_diffs = show_diffs super(StdoutRefactoringTool, self).__init__(fixers, options, explicit) def log_error(self, msg, *args, **kwargs): @@ -42,9 +54,18 @@ if not self.nobackups: shutil.copymode(backup, filename) - def print_output(self, lines): - for line in lines: - print line + def print_output(self, old, new, filename, equal): + if equal: + self.log_message("No changes to %s", filename) + else: + self.log_message("Refactored %s", filename) + if self.show_diffs: + for line in diff_texts(old, new, filename): + print line + + +def warn(msg): + print >> sys.stderr, "WARNING: %s" % (msg,) def main(fixer_pkg, args=None): @@ -70,9 +91,12 @@ parser.add_option("-l", "--list-fixes", action="store_true", help="List available transformations (fixes/fix_*.py)") parser.add_option("-p", "--print-function", action="store_true", - help="Modify the grammar so that print() is a function") + help="DEPRECATED Modify the grammar so that print() is " + "a function") parser.add_option("-v", "--verbose", action="store_true", help="More verbose logging") + parser.add_option("--no-diffs", action="store_true", + help="Don't show diffs of the refactoring") parser.add_option("-w", "--write", action="store_true", help="Write back modified files") parser.add_option("-n", "--nobackups", action="store_true", default=False, @@ -81,6 +105,11 @@ # Parse command line arguments refactor_stdin = False options, args = parser.parse_args(args) + if not options.write and options.no_diffs: + warn("not writing files and not printing diffs; that's not very useful") + if options.print_function: + warn("-p is deprecated; " + "detection of from __future__ import print_function is automatic") if not options.write and options.nobackups: parser.error("Can't use -n without -w") if options.list_fixes: @@ -90,13 +119,13 @@ if not args: return 0 if not args: - print >>sys.stderr, "At least one file or directory argument required." - print >>sys.stderr, "Use --help to show usage." + print >> sys.stderr, "At least one file or directory argument required." + print >> sys.stderr, "Use --help to show usage." return 2 if "-" in args: refactor_stdin = True if options.write: - print >>sys.stderr, "Can't write to stdin." + print >> sys.stderr, "Can't write to stdin." return 2 # Set up logging handler @@ -104,7 +133,6 @@ logging.basicConfig(format='%(name)s: %(message)s', level=level) # Initialize the refactoring tool - rt_opts = {"print_function" : options.print_function} avail_fixes = set(refactor.get_fixers_from_package(fixer_pkg)) unwanted_fixes = set(fixer_pkg + ".fix_" + fix for fix in options.nofix) explicit = set() @@ -119,8 +147,8 @@ else: requested = avail_fixes.union(explicit) fixer_names = requested.difference(unwanted_fixes) - rt = StdoutRefactoringTool(sorted(fixer_names), rt_opts, sorted(explicit), - options.nobackups) + rt = StdoutRefactoringTool(sorted(fixer_names), None, sorted(explicit), + options.nobackups, not options.no_diffs) # Refactor all files and directories passed as arguments if not rt.errors: Modified: python/trunk/Lib/lib2to3/patcomp.py ============================================================================== --- python/trunk/Lib/lib2to3/patcomp.py (original) +++ python/trunk/Lib/lib2to3/patcomp.py Mon Jul 20 17:33:09 2009 @@ -14,7 +14,7 @@ import os # Fairly local imports -from .pgen2 import driver, literals, token, tokenize, parse +from .pgen2 import driver, literals, token, tokenize, parse, grammar # Really local imports from . import pytree @@ -138,7 +138,7 @@ node = nodes[0] if node.type == token.STRING: value = unicode(literals.evalString(node.value)) - return pytree.LeafPattern(content=value) + return pytree.LeafPattern(_type_of_literal(value), value) elif node.type == token.NAME: value = node.value if value.isupper(): @@ -179,6 +179,15 @@ "TOKEN": None} +def _type_of_literal(value): + if value[0].isalpha(): + return token.NAME + elif value in grammar.opmap: + return grammar.opmap[value] + else: + return None + + def pattern_convert(grammar, raw_node_info): """Converts raw node information to a Node or Leaf instance.""" type, value, context, children = raw_node_info Modified: python/trunk/Lib/lib2to3/pgen2/grammar.py ============================================================================== --- python/trunk/Lib/lib2to3/pgen2/grammar.py (original) +++ python/trunk/Lib/lib2to3/pgen2/grammar.py Mon Jul 20 17:33:09 2009 @@ -97,6 +97,19 @@ f.close() self.__dict__.update(d) + def copy(self): + """ + Copy the grammar. + """ + new = self.__class__() + for dict_attr in ("symbol2number", "number2symbol", "dfas", "keywords", + "tokens", "symbol2label"): + setattr(new, dict_attr, getattr(self, dict_attr).copy()) + new.labels = self.labels[:] + new.states = self.states[:] + new.start = self.start + return new + def report(self): """Dump the grammar tables to standard output, for debugging.""" from pprint import pprint Modified: python/trunk/Lib/lib2to3/pygram.py ============================================================================== --- python/trunk/Lib/lib2to3/pygram.py (original) +++ python/trunk/Lib/lib2to3/pygram.py Mon Jul 20 17:33:09 2009 @@ -28,4 +28,8 @@ python_grammar = driver.load_grammar(_GRAMMAR_FILE) + python_symbols = Symbols(python_grammar) + +python_grammar_no_print_statement = python_grammar.copy() +del python_grammar_no_print_statement.keywords["print"] Modified: python/trunk/Lib/lib2to3/refactor.py ============================================================================== --- python/trunk/Lib/lib2to3/refactor.py (original) +++ python/trunk/Lib/lib2to3/refactor.py Mon Jul 20 17:33:09 2009 @@ -14,14 +14,15 @@ # Python imports import os import sys -import difflib import logging import operator -from collections import defaultdict +import collections +import StringIO +import warnings from itertools import chain # Local imports -from .pgen2 import driver, tokenize +from .pgen2 import driver, tokenize, token from . import pytree, pygram @@ -37,7 +38,12 @@ fix_names.append(name[:-3]) return fix_names -def get_head_types(pat): + +class _EveryNode(Exception): + pass + + +def _get_head_types(pat): """ Accepts a pytree Pattern Node and returns a set of the pattern types which will match first. """ @@ -45,34 +51,50 @@ # NodePatters must either have no type and no content # or a type and content -- so they don't get any farther # Always return leafs + if pat.type is None: + raise _EveryNode return set([pat.type]) if isinstance(pat, pytree.NegatedPattern): if pat.content: - return get_head_types(pat.content) - return set([None]) # Negated Patterns don't have a type + return _get_head_types(pat.content) + raise _EveryNode # Negated Patterns don't have a type if isinstance(pat, pytree.WildcardPattern): # Recurse on each node in content r = set() for p in pat.content: for x in p: - r.update(get_head_types(x)) + r.update(_get_head_types(x)) return r raise Exception("Oh no! I don't understand pattern %s" %(pat)) -def get_headnode_dict(fixer_list): + +def _get_headnode_dict(fixer_list): """ Accepts a list of fixers and returns a dictionary of head node type --> fixer list. """ - head_nodes = defaultdict(list) + head_nodes = collections.defaultdict(list) + every = [] for fixer in fixer_list: - if not fixer.pattern: - head_nodes[None].append(fixer) - continue - for t in get_head_types(fixer.pattern): - head_nodes[t].append(fixer) - return head_nodes + if fixer.pattern: + try: + heads = _get_head_types(fixer.pattern) + except _EveryNode: + every.append(fixer) + else: + for node_type in heads: + head_nodes[node_type].append(fixer) + else: + if fixer._accept_type is not None: + head_nodes[fixer._accept_type].append(fixer) + else: + every.append(fixer) + for node_type in chain(pygram.python_grammar.symbol2number.itervalues(), + pygram.python_grammar.tokens): + head_nodes[node_type].extend(every) + return dict(head_nodes) + def get_fixers_from_package(pkg_name): """ @@ -101,13 +123,56 @@ _to_system_newlines = _identity +def _detect_future_print(source): + have_docstring = False + gen = tokenize.generate_tokens(StringIO.StringIO(source).readline) + def advance(): + tok = next(gen) + return tok[0], tok[1] + ignore = frozenset((token.NEWLINE, tokenize.NL, token.COMMENT)) + try: + while True: + tp, value = advance() + if tp in ignore: + continue + elif tp == token.STRING: + if have_docstring: + break + have_docstring = True + elif tp == token.NAME: + if value == u"from": + tp, value = advance() + if tp != token.NAME and value != u"__future__": + break + tp, value = advance() + if tp != token.NAME and value != u"import": + break + tp, value = advance() + if tp == token.OP and value == u"(": + tp, value = advance() + while tp == token.NAME: + if value == u"print_function": + return True + tp, value = advance() + if tp != token.OP and value != u",": + break + tp, value = advance() + else: + break + else: + break + except StopIteration: + pass + return False + + class FixerError(Exception): """A fixer could not be loaded.""" class RefactoringTool(object): - _default_options = {"print_function": False} + _default_options = {} CLASS_PREFIX = "Fix" # The prefix for fixer classes FILE_PREFIX = "fix_" # The prefix for modules with a fixer within @@ -124,20 +189,21 @@ self.explicit = explicit or [] self.options = self._default_options.copy() if options is not None: + if "print_function" in options: + warnings.warn("the 'print_function' option is deprecated", + DeprecationWarning) self.options.update(options) self.errors = [] self.logger = logging.getLogger("RefactoringTool") self.fixer_log = [] self.wrote = False - if self.options["print_function"]: - del pygram.python_grammar.keywords["print"] self.driver = driver.Driver(pygram.python_grammar, convert=pytree.convert, logger=self.logger) self.pre_order, self.post_order = self.get_fixers() - self.pre_order_heads = get_headnode_dict(self.pre_order) - self.post_order_heads = get_headnode_dict(self.post_order) + self.pre_order_heads = _get_headnode_dict(self.pre_order) + self.post_order_heads = _get_headnode_dict(self.post_order) self.files = [] # List of files that were or should be modified @@ -196,8 +262,9 @@ msg = msg % args self.logger.debug(msg) - def print_output(self, lines): - """Called with lines of output to give to the user.""" + def print_output(self, old_text, new_text, filename, equal): + """Called with the old version, new version, and filename of a + refactored file.""" pass def refactor(self, items, write=False, doctests_only=False): @@ -220,7 +287,8 @@ dirnames.sort() filenames.sort() for name in filenames: - if not name.startswith(".") and name.endswith("py"): + if not name.startswith(".") and \ + os.path.splitext(name)[1].endswith("py"): fullname = os.path.join(dirpath, name) self.refactor_file(fullname, write, doctests_only) # Modify dirnames in-place to remove subdirs with leading dots @@ -276,12 +344,16 @@ An AST corresponding to the refactored input stream; None if there were errors during the parse. """ + if _detect_future_print(data): + self.driver.grammar = pygram.python_grammar_no_print_statement try: tree = self.driver.parse_string(data) except Exception, err: self.log_error("Can't parse %s: %s: %s", name, err.__class__.__name__, err) return + finally: + self.driver.grammar = pygram.python_grammar self.log_debug("Refactoring %s", name) self.refactor_tree(tree, name) return tree @@ -298,7 +370,7 @@ else: tree = self.refactor_string(input, "") if tree and tree.was_changed: - self.processed_file(str(tree), "", input) + self.processed_file(unicode(tree), "", input) else: self.log_debug("No changes in stdin") @@ -338,12 +410,11 @@ if not fixers: return for node in traversal: - for fixer in fixers[node.type] + fixers[None]: + for fixer in fixers[node.type]: results = fixer.match(node) if results: new = fixer.transform(node, results) - if new is not None and (new != node or - str(new) != str(node)): + if new is not None: node.replace(new) node = new @@ -357,10 +428,11 @@ old_text = self._read_python_source(filename)[0] if old_text is None: return - if old_text == new_text: + equal = old_text == new_text + self.print_output(old_text, new_text, filename, equal) + if equal: self.log_debug("No changes to %s", filename) return - self.print_output(diff_texts(old_text, new_text, filename)) if write: self.write_file(new_text, filename, old_text, encoding) else: @@ -451,7 +523,7 @@ filename, lineno, err.__class__.__name__, err) return block if self.refactor_tree(tree, filename): - new = str(tree).splitlines(True) + new = unicode(tree).splitlines(True) # Undo the adjustment of the line numbers in wrap_toks() below. clipped, new = new[:lineno-1], new[lineno-1:] assert clipped == [u"\n"] * (lineno-1), clipped @@ -582,12 +654,3 @@ else: return super(MultiprocessRefactoringTool, self).refactor_file( *args, **kwargs) - - -def diff_texts(a, b, filename): - """Return a unified diff of two strings.""" - a = a.splitlines() - b = b.splitlines() - return difflib.unified_diff(a, b, filename, filename, - "(original)", "(refactored)", - lineterm="") Modified: python/trunk/Lib/lib2to3/tests/data/different_encoding.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/data/different_encoding.py (original) +++ python/trunk/Lib/lib2to3/tests/data/different_encoding.py Mon Jul 20 17:33:09 2009 @@ -1,3 +1,6 @@ #!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -print u'??????????????????????????????????????????????????????????????' +# -*- coding: utf-8 -*- +print u'????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' + +def f(x): + print '%s\t-> ??(%2i):%s ??(%s)' Modified: python/trunk/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_fixers.py (original) +++ python/trunk/Lib/lib2to3/tests/test_fixers.py Mon Jul 20 17:33:09 2009 @@ -18,8 +18,6 @@ def setUp(self, fix_list=None, fixer_pkg="lib2to3", options=None): if fix_list is None: fix_list = [self.fixer] - if options is None: - options = {"print_function" : False} self.refactor = support.get_refactorer(fixer_pkg, fix_list, options) self.fixer_log = [] self.filename = u"" @@ -58,8 +56,7 @@ def assert_runs_after(self, *names): fixes = [self.fixer] fixes.extend(names) - options = {"print_function" : False} - r = support.get_refactorer("lib2to3", fixes, options) + r = support.get_refactorer("lib2to3", fixes) (pre, post) = r.get_fixers() n = "fix_" + self.fixer if post and post[-1].__class__.__module__.endswith(n): @@ -379,18 +376,15 @@ self.unchanged(s) def test_idempotency_print_as_function(self): - print_stmt = pygram.python_grammar.keywords.pop("print") - try: - s = """print(1, 1+1, 1+1+1)""" - self.unchanged(s) + self.refactor.driver.grammar = pygram.python_grammar_no_print_statement + s = """print(1, 1+1, 1+1+1)""" + self.unchanged(s) - s = """print()""" - self.unchanged(s) + s = """print()""" + self.unchanged(s) - s = """print('')""" - self.unchanged(s) - finally: - pygram.python_grammar.keywords["print"] = print_stmt + s = """print('')""" + self.unchanged(s) def test_1(self): b = """print 1, 1+1, 1+1+1""" @@ -462,31 +456,15 @@ a = """print(file=sys.stderr)""" self.check(b, a) - # With from __future__ import print_function def test_with_future_print_function(self): - # XXX: These tests won't actually do anything until the parser - # is fixed so it won't crash when it sees print(x=y). - # When #2412 is fixed, the try/except block can be taken - # out and the tests can be run like normal. - # MvL: disable entirely for now, so that it doesn't print to stdout - return - try: - s = "from __future__ import print_function\n"\ - "print('Hai!', end=' ')" - self.unchanged(s) + s = "from __future__ import print_function\n" \ + "print('Hai!', end=' ')" + self.unchanged(s) - b = "print 'Hello, world!'" - a = "print('Hello, world!')" - self.check(b, a) + b = "print 'Hello, world!'" + a = "print('Hello, world!')" + self.check(b, a) - s = "from __future__ import *\n"\ - "print('Hai!', end=' ')" - self.unchanged(s) - except: - return - else: - self.assertFalse(True, "#2421 has been fixed -- printing tests "\ - "need to be updated!") class Test_exec(FixerTestCase): fixer = "exec" @@ -1705,6 +1683,11 @@ for key in ('dbhash', 'dumbdbm', 'dbm', 'gdbm'): self.modules[key] = mapping1[key] + def test_after_local_imports_refactoring(self): + for fix in ("imports", "imports2"): + self.fixer = fix + self.assert_runs_after("import") + class Test_urllib(FixerTestCase): fixer = "urllib" @@ -3504,6 +3487,7 @@ s = "from itertools import foo" self.unchanged(s) + class Test_import(FixerTestCase): fixer = "import" @@ -3538,8 +3522,7 @@ self.always_exists = False self.present_files = set(['__init__.py']) - expected_extensions = ('.py', os.path.pathsep, '.pyc', '.so', - '.sl', '.pyd') + expected_extensions = ('.py', os.path.sep, '.pyc', '.so', '.sl', '.pyd') names_to_test = (p("/spam/eggs.py"), "ni.py", p("../../shrubbery.py")) for name in names_to_test: @@ -3569,6 +3552,13 @@ self.present_files = set(["__init__.py", "bar.py"]) self.check(b, a) + def test_import_from_package(self): + b = "import bar" + a = "from . import bar" + self.always_exists = False + self.present_files = set(["__init__.py", "bar/"]) + self.check(b, a) + def test_comments_and_indent(self): b = "import bar # Foo" a = "from . import bar # Foo" @@ -4095,3 +4085,26 @@ b = """os.getcwdu ( )""" a = """os.getcwd ( )""" self.check(b, a) + + +class Test_operator(FixerTestCase): + + fixer = "operator" + + def test_operator_isCallable(self): + b = "operator.isCallable(x)" + a = "hasattr(x, '__call__')" + self.check(b, a) + + def test_operator_sequenceIncludes(self): + b = "operator.sequenceIncludes(x, y)" + a = "operator.contains(x, y)" + self.check(b, a) + + def test_bare_isCallable(self): + s = "isCallable(x)" + self.warns_unchanged(s, "You should use hasattr(x, '__call__') here.") + + def test_bare_sequenceIncludes(self): + s = "sequenceIncludes(x, y)" + self.warns_unchanged(s, "You should use operator.contains here.") Modified: python/trunk/Lib/lib2to3/tests/test_refactor.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_refactor.py (original) +++ python/trunk/Lib/lib2to3/tests/test_refactor.py Mon Jul 20 17:33:09 2009 @@ -7,9 +7,12 @@ import operator import StringIO import tempfile +import shutil import unittest +import warnings from lib2to3 import refactor, pygram, fixer_base +from lib2to3.pgen2 import token from . import support @@ -42,14 +45,11 @@ return refactor.RefactoringTool(fixers, options, explicit) def test_print_function_option(self): - gram = pygram.python_grammar - save = gram.keywords["print"] - try: - rt = self.rt({"print_function" : True}) - self.assertRaises(KeyError, operator.itemgetter("print"), - gram.keywords) - finally: - gram.keywords["print"] = save + with warnings.catch_warnings(record=True) as w: + refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) + self.assertEqual(len(w), 1) + msg, = w + self.assertTrue(msg.category is DeprecationWarning) def test_fixer_loading_helpers(self): contents = ["explicit", "first", "last", "parrot", "preorder"] @@ -61,19 +61,63 @@ self.assertEqual(full_names, ["myfixes.fix_" + name for name in contents]) + def test_detect_future_print(self): + run = refactor._detect_future_print + self.assertFalse(run("")) + self.assertTrue(run("from __future__ import print_function")) + self.assertFalse(run("from __future__ import generators")) + self.assertFalse(run("from __future__ import generators, feature")) + input = "from __future__ import generators, print_function" + self.assertTrue(run(input)) + input ="from __future__ import print_function, generators" + self.assertTrue(run(input)) + input = "from __future__ import (print_function,)" + self.assertTrue(run(input)) + input = "from __future__ import (generators, print_function)" + self.assertTrue(run(input)) + input = "from __future__ import (generators, nested_scopes)" + self.assertFalse(run(input)) + input = """from __future__ import generators +from __future__ import print_function""" + self.assertTrue(run(input)) + self.assertFalse(run("from")) + self.assertFalse(run("from 4")) + self.assertFalse(run("from x")) + self.assertFalse(run("from x 5")) + self.assertFalse(run("from x im")) + self.assertFalse(run("from x import")) + self.assertFalse(run("from x import 4")) + input = "'docstring'\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "'docstring'\n'somng'\nfrom __future__ import print_function" + self.assertFalse(run(input)) + input = "# comment\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "# comment\n'doc'\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "class x: pass\nfrom __future__ import print_function" + self.assertFalse(run(input)) + def test_get_headnode_dict(self): class NoneFix(fixer_base.BaseFix): - PATTERN = None + pass class FileInputFix(fixer_base.BaseFix): PATTERN = "file_input< any * >" + class SimpleFix(fixer_base.BaseFix): + PATTERN = "'name'" + no_head = NoneFix({}, []) with_head = FileInputFix({}, []) - d = refactor.get_headnode_dict([no_head, with_head]) - expected = {None: [no_head], - pygram.python_symbols.file_input : [with_head]} - self.assertEqual(d, expected) + simple = SimpleFix({}, []) + d = refactor._get_headnode_dict([no_head, with_head, simple]) + top_fixes = d.pop(pygram.python_symbols.file_input) + self.assertEqual(top_fixes, [with_head, no_head]) + name_fixes = d.pop(token.NAME) + self.assertEqual(name_fixes, [simple, no_head]) + for fixes in d.itervalues(): + self.assertEqual(fixes, [no_head]) def test_fixer_loading(self): from myfixes.fix_first import FixFirst @@ -106,10 +150,10 @@ class MyRT(refactor.RefactoringTool): - def print_output(self, lines): - diff_lines.extend(lines) + def print_output(self, old_text, new_text, filename, equal): + results.extend([old_text, new_text, filename, equal]) - diff_lines = [] + results = [] rt = MyRT(_DEFAULT_FIXERS) save = sys.stdin sys.stdin = StringIO.StringIO("def parrot(): pass\n\n") @@ -117,12 +161,10 @@ rt.refactor_stdin() finally: sys.stdin = save - expected = """--- (original) -+++ (refactored) -@@ -1,2 +1,2 @@ --def parrot(): pass -+def cheese(): pass""".splitlines() - self.assertEqual(diff_lines[:-1], expected) + expected = ["def parrot(): pass\n\n", + "def cheese(): pass\n\n", + "", False] + self.assertEqual(results, expected) def check_file_refactoring(self, test_file, fixers=_2TO3_FIXERS): def read_file(): @@ -145,6 +187,37 @@ test_file = os.path.join(FIXER_DIR, "parrot_example.py") self.check_file_refactoring(test_file, _DEFAULT_FIXERS) + def test_refactor_dir(self): + def check(structure, expected): + def mock_refactor_file(self, f, *args): + got.append(f) + save_func = refactor.RefactoringTool.refactor_file + refactor.RefactoringTool.refactor_file = mock_refactor_file + rt = self.rt() + got = [] + dir = tempfile.mkdtemp(prefix="2to3-test_refactor") + try: + os.mkdir(os.path.join(dir, "a_dir")) + for fn in structure: + open(os.path.join(dir, fn), "wb").close() + rt.refactor_dir(dir) + finally: + refactor.RefactoringTool.refactor_file = save_func + shutil.rmtree(dir) + self.assertEqual(got, + [os.path.join(dir, path) for path in expected]) + check([], []) + tree = ["nothing", + "hi.py", + ".dumb", + ".after.py", + "sappy"] + expected = ["hi.py"] + check(tree, expected) + tree = ["hi.py", + "a_dir/stuff.py"] + check(tree, tree) + def test_file_encoding(self): fn = os.path.join(TEST_DATA_DIR, "different_encoding.py") self.check_file_refactoring(fn) Modified: python/trunk/Lib/lib2to3/tests/test_util.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_util.py (original) +++ python/trunk/Lib/lib2to3/tests/test_util.py Mon Jul 20 17:33:09 2009 @@ -1,4 +1,4 @@ -""" Test suite for the code in fixes.util """ +""" Test suite for the code in fixer_util """ # Testing imports from . import support @@ -7,10 +7,10 @@ import os.path # Local imports -from .. import pytree -from .. import fixer_util -from ..fixer_util import Attr, Name - +from lib2to3.pytree import Node, Leaf +from lib2to3 import fixer_util +from lib2to3.fixer_util import Attr, Name, Call, Comma +from lib2to3.pgen2 import token def parse(code, strip_levels=0): # The topmost node is file_input, which we don't care about. @@ -24,7 +24,7 @@ class MacroTestCase(support.TestCase): def assertStr(self, node, string): if isinstance(node, (tuple, list)): - node = pytree.Node(fixer_util.syms.simple_stmt, node) + node = Node(fixer_util.syms.simple_stmt, node) self.assertEqual(str(node), string) @@ -78,6 +78,31 @@ self.assertStr(Name("a", prefix="b"), "ba") +class Test_Call(MacroTestCase): + def _Call(self, name, args=None, prefix=None): + """Help the next test""" + children = [] + if isinstance(args, list): + for arg in args: + children.append(arg) + children.append(Comma()) + children.pop() + return Call(Name(name), children, prefix) + + def test(self): + kids = [None, + [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 2), + Leaf(token.NUMBER, 3)], + [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 3), + Leaf(token.NUMBER, 2), Leaf(token.NUMBER, 4)], + [Leaf(token.STRING, "b"), Leaf(token.STRING, "j", prefix=" ")] + ] + self.assertStr(self._Call("A"), "A()") + self.assertStr(self._Call("b", kids[1]), "b(1,2,3)") + self.assertStr(self._Call("a.b().c", kids[2]), "a.b().c(1,3,2,4)") + self.assertStr(self._Call("d", kids[3], prefix=" "), " d(b, j)") + + class Test_does_tree_import(support.TestCase): def _find_bind_rec(self, name, node): # Search a tree for a binding -- used to find the starting From python-checkins at python.org Mon Jul 20 18:42:03 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 16:42:03 -0000 Subject: [Python-checkins] r74115 - in python/branches/py3k: Lib/lib2to3/fixer_base.py Lib/lib2to3/fixes/fix_import.py Lib/lib2to3/fixes/fix_imports.py Lib/lib2to3/fixes/fix_long.py Lib/lib2to3/fixes/fix_ne.py Lib/lib2to3/fixes/fix_numliterals.py Lib/lib2to3/fixes/fix_operator.py Lib/lib2to3/fixes/fix_print.py Lib/lib2to3/fixes/fix_urllib.py Lib/lib2to3/main.py Lib/lib2to3/patcomp.py Lib/lib2to3/pgen2/grammar.py Lib/lib2to3/pygram.py Lib/lib2to3/refactor.py Lib/lib2to3/tests/data/different_encoding.py Lib/lib2to3/tests/test_fixers.py Lib/lib2to3/tests/test_refactor.py Lib/lib2to3/tests/test_util.py Message-ID: Author: benjamin.peterson Date: Mon Jul 20 18:42:03 2009 New Revision: 74115 Log: Merged revisions 74114 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ................ r74114 | benjamin.peterson | 2009-07-20 10:33:09 -0500 (Mon, 20 Jul 2009) | 110 lines Merged revisions 73771,73811,73840,73842,73848-73849,73861,73957-73960,73964-73969,73972-73974,73977,73981,73984,74065,74113 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r73771 | benjamin.peterson | 2009-07-02 10:56:55 -0500 (Thu, 02 Jul 2009) | 1 line force the imports fixer to be run after the import one #6400 ........ r73811 | benjamin.peterson | 2009-07-03 09:03:14 -0500 (Fri, 03 Jul 2009) | 1 line check for sep, not pathsep when looking for a subpackage #6408 ........ r73840 | benjamin.peterson | 2009-07-04 09:52:28 -0500 (Sat, 04 Jul 2009) | 1 line don't print diffs by default; it's annoying ........ r73842 | benjamin.peterson | 2009-07-04 09:58:46 -0500 (Sat, 04 Jul 2009) | 1 line complain when not showing diffs or writing ........ r73848 | alexandre.vassalotti | 2009-07-04 23:38:19 -0500 (Sat, 04 Jul 2009) | 2 lines Fix test_refactor_stdin to handle print_output() method with 4 arguments. ........ r73849 | alexandre.vassalotti | 2009-07-04 23:43:18 -0500 (Sat, 04 Jul 2009) | 5 lines Issue 2370: Add fixer for the removal of operator.isCallable() and operator.sequenceIncludes(). Patch contributed by Jeff Balogh (and updated by me). ........ r73861 | benjamin.peterson | 2009-07-05 09:15:53 -0500 (Sun, 05 Jul 2009) | 1 line cleanup and use unicode where appropiate ........ r73957 | benjamin.peterson | 2009-07-11 15:49:56 -0500 (Sat, 11 Jul 2009) | 1 line fix calls to str() with unicode() ........ r73958 | benjamin.peterson | 2009-07-11 15:51:51 -0500 (Sat, 11 Jul 2009) | 1 line more str() -> unicode() ........ r73959 | benjamin.peterson | 2009-07-11 16:40:08 -0500 (Sat, 11 Jul 2009) | 1 line add tests for refactor_dir() ........ r73960 | benjamin.peterson | 2009-07-11 16:44:32 -0500 (Sat, 11 Jul 2009) | 1 line don't parse files just because they end with 'py' (no dot) ........ r73964 | benjamin.peterson | 2009-07-11 17:30:15 -0500 (Sat, 11 Jul 2009) | 1 line simplify ........ r73965 | benjamin.peterson | 2009-07-11 17:31:30 -0500 (Sat, 11 Jul 2009) | 1 line remove usage of get_prefix() ........ r73966 | benjamin.peterson | 2009-07-11 17:33:35 -0500 (Sat, 11 Jul 2009) | 1 line revert unintended change in 73965 ........ r73967 | benjamin.peterson | 2009-07-11 17:34:44 -0500 (Sat, 11 Jul 2009) | 1 line avoid expensive checks and assume the node did change ........ r73968 | benjamin.peterson | 2009-07-11 20:46:46 -0500 (Sat, 11 Jul 2009) | 1 line use a regular dict for the heads to avoid adding lists in the loop ........ r73969 | benjamin.peterson | 2009-07-11 20:50:43 -0500 (Sat, 11 Jul 2009) | 1 line prefix headnode functions with '_' ........ r73972 | benjamin.peterson | 2009-07-11 21:25:45 -0500 (Sat, 11 Jul 2009) | 1 line try to make the head node dict as sparse as possible ........ r73973 | benjamin.peterson | 2009-07-11 21:59:49 -0500 (Sat, 11 Jul 2009) | 1 line a better idea; add an option to *not* print diffs ........ r73974 | benjamin.peterson | 2009-07-11 22:00:29 -0500 (Sat, 11 Jul 2009) | 1 line add space ........ r73977 | benjamin.peterson | 2009-07-12 10:16:07 -0500 (Sun, 12 Jul 2009) | 1 line update get_headnode_dict tests for recent changes ........ r73981 | benjamin.peterson | 2009-07-12 12:06:39 -0500 (Sun, 12 Jul 2009) | 4 lines detect when "from __future__ import print_function" is given Deprecate the 'print_function' option and the -p flag ........ r73984 | benjamin.peterson | 2009-07-12 16:16:37 -0500 (Sun, 12 Jul 2009) | 1 line add tests for Call; thanks Joe Amenta ........ r74065 | benjamin.peterson | 2009-07-17 12:52:49 -0500 (Fri, 17 Jul 2009) | 1 line pathname2url and url2pathname are in urllib.request not urllib.parse #6496 ........ r74113 | benjamin.peterson | 2009-07-20 08:56:57 -0500 (Mon, 20 Jul 2009) | 1 line fix deprecation warnings in tests ........ ................ Added: python/branches/py3k/Lib/lib2to3/fixes/fix_operator.py - copied, changed from r74114, /python/trunk/Lib/lib2to3/fixes/fix_operator.py Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/lib2to3/fixer_base.py python/branches/py3k/Lib/lib2to3/fixes/fix_import.py python/branches/py3k/Lib/lib2to3/fixes/fix_imports.py python/branches/py3k/Lib/lib2to3/fixes/fix_long.py python/branches/py3k/Lib/lib2to3/fixes/fix_ne.py python/branches/py3k/Lib/lib2to3/fixes/fix_numliterals.py python/branches/py3k/Lib/lib2to3/fixes/fix_print.py python/branches/py3k/Lib/lib2to3/fixes/fix_urllib.py python/branches/py3k/Lib/lib2to3/main.py python/branches/py3k/Lib/lib2to3/patcomp.py python/branches/py3k/Lib/lib2to3/pgen2/grammar.py python/branches/py3k/Lib/lib2to3/pygram.py python/branches/py3k/Lib/lib2to3/refactor.py python/branches/py3k/Lib/lib2to3/tests/data/different_encoding.py python/branches/py3k/Lib/lib2to3/tests/test_fixers.py python/branches/py3k/Lib/lib2to3/tests/test_refactor.py python/branches/py3k/Lib/lib2to3/tests/test_util.py Modified: python/branches/py3k/Lib/lib2to3/fixer_base.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixer_base.py (original) +++ python/branches/py3k/Lib/lib2to3/fixer_base.py Mon Jul 20 18:42:03 2009 @@ -33,6 +33,8 @@ explicit = False # Is this ignored by refactor.py -f all? run_order = 5 # Fixers will be sorted by run order before execution # Lower numbers will be run first. + _accept_type = None # [Advanced and not public] This tells RefactoringTool + # which node type to accept when there's not a pattern. # Shortcut for access to Python grammar symbols syms = pygram.python_symbols Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_import.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixes/fix_import.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_import.py Mon Jul 20 18:42:03 2009 @@ -12,7 +12,7 @@ # Local imports from .. import fixer_base -from os.path import dirname, join, exists, pathsep +from os.path import dirname, join, exists, sep from ..fixer_util import FromImport, syms, token @@ -84,7 +84,7 @@ # so can't be a relative import. if not exists(join(dirname(base_path), '__init__.py')): return False - for ext in ['.py', pathsep, '.pyc', '.so', '.sl', '.pyd']: + for ext in ['.py', sep, '.pyc', '.so', '.sl', '.pyd']: if exists(base_path + ext): return True return False Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_imports.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixes/fix_imports.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_imports.py Mon Jul 20 18:42:03 2009 @@ -84,8 +84,6 @@ class FixImports(fixer_base.BaseFix): - order = "pre" # Pre-order tree traversal - # This is overridden in fix_imports2. mapping = MAPPING Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_long.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixes/fix_long.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_long.py Mon Jul 20 18:42:03 2009 @@ -5,18 +5,15 @@ """ # Local imports -from .. import fixer_base -from ..fixer_util import Name, Number, is_probably_builtin +from lib2to3 import fixer_base +from lib2to3.fixer_util import is_probably_builtin class FixLong(fixer_base.BaseFix): PATTERN = "'long'" - static_int = Name("int") - def transform(self, node, results): if is_probably_builtin(node): - new = self.static_int.clone() - new.prefix = node.prefix - return new + node.value = "int" + node.changed() Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_ne.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixes/fix_ne.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_ne.py Mon Jul 20 18:42:03 2009 @@ -12,9 +12,11 @@ class FixNe(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NOTEQUAL + def match(self, node): # Override - return node.type == token.NOTEQUAL and node.value == "<>" + return node.value == "<>" def transform(self, node, results): new = pytree.Leaf(token.NOTEQUAL, "!=", prefix=node.prefix) Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_numliterals.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixes/fix_numliterals.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_numliterals.py Mon Jul 20 18:42:03 2009 @@ -12,10 +12,11 @@ class FixNumliterals(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NUMBER + def match(self, node): # Override - return (node.type == token.NUMBER and - (node.value.startswith("0") or node.value[-1] in "Ll")) + return (node.value.startswith("0") or node.value[-1] in "Ll") def transform(self, node, results): val = node.value Copied: python/branches/py3k/Lib/lib2to3/fixes/fix_operator.py (from r74114, /python/trunk/Lib/lib2to3/fixes/fix_operator.py) ============================================================================== --- /python/trunk/Lib/lib2to3/fixes/fix_operator.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_operator.py Mon Jul 20 18:42:03 2009 @@ -22,19 +22,19 @@ def transform(self, node, results): method = results["method"][0] - if method.value == u"sequenceIncludes": + if method.value == "sequenceIncludes": if "module" not in results: # operator may not be in scope, so we can't make a change. self.warning(node, "You should use operator.contains here.") else: - method.value = u"contains" + method.value = "contains" method.changed() - elif method.value == u"isCallable": + elif method.value == "isCallable": if "module" not in results: self.warning(node, "You should use hasattr(%s, '__call__') here." % results["func"].value) else: func = results["func"] - args = [func.clone(), String(u", "), String(u"'__call__'")] - return Call(Name(u"hasattr"), args, prefix=node.prefix) + args = [func.clone(), String(", "), String("'__call__'")] + return Call(Name("hasattr"), args, prefix=node.prefix) Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_print.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixes/fix_print.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_print.py Mon Jul 20 18:42:03 2009 @@ -26,20 +26,15 @@ ) -class FixPrint(fixer_base.ConditionalFix): +class FixPrint(fixer_base.BaseFix): PATTERN = """ simple_stmt< any* bare='print' any* > | print_stmt """ - skip_on = '__future__.print_function' - def transform(self, node, results): assert results - if self.should_skip(node): - return - bare_print = results.get("bare") if bare_print: Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_urllib.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/fixes/fix_urllib.py (original) +++ python/branches/py3k/Lib/lib2to3/fixes/fix_urllib.py Mon Jul 20 18:42:03 2009 @@ -12,13 +12,13 @@ MAPPING = {'urllib': [ ('urllib.request', ['URLOpener', 'FancyURLOpener', 'urlretrieve', - '_urlopener', 'urlopen', 'urlcleanup']), + '_urlopener', 'urlopen', 'urlcleanup', + 'pathname2url', 'url2pathname']), ('urllib.parse', ['quote', 'quote_plus', 'unquote', 'unquote_plus', - 'urlencode', 'pathname2url', 'url2pathname', 'splitattr', - 'splithost', 'splitnport', 'splitpasswd', 'splitport', - 'splitquery', 'splittag', 'splittype', 'splituser', - 'splitvalue', ]), + 'urlencode', 'splitattr', 'splithost', 'splitnport', + 'splitpasswd', 'splitport', 'splitquery', 'splittag', + 'splittype', 'splituser', 'splitvalue', ]), ('urllib.error', ['ContentTooShortError'])], 'urllib2' : [ Modified: python/branches/py3k/Lib/lib2to3/main.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/main.py (original) +++ python/branches/py3k/Lib/lib2to3/main.py Mon Jul 20 18:42:03 2009 @@ -4,19 +4,31 @@ import sys import os +import difflib import logging import shutil import optparse from . import refactor + +def diff_texts(a, b, filename): + """Return a unified diff of two strings.""" + a = a.splitlines() + b = b.splitlines() + return difflib.unified_diff(a, b, filename, filename, + "(original)", "(refactored)", + lineterm="") + + class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool): """ Prints output to stdout. """ - def __init__(self, fixers, options, explicit, nobackups): + def __init__(self, fixers, options, explicit, nobackups, show_diffs): self.nobackups = nobackups + self.show_diffs = show_diffs super(StdoutRefactoringTool, self).__init__(fixers, options, explicit) def log_error(self, msg, *args, **kwargs): @@ -42,9 +54,17 @@ if not self.nobackups: shutil.copymode(backup, filename) - def print_output(self, lines): - for line in lines: - print(line) + def print_output(self, old, new, filename, equal): + if equal: + self.log_message("No changes to %s", filename) + else: + self.log_message("Refactored %s", filename) + if self.show_diffs: + for line in diff_texts(old, new, filename): + print(line) + +def warn(msg): + print >> sys.stderr, "WARNING: %s" % (msg,) def main(fixer_pkg, args=None): @@ -70,9 +90,12 @@ parser.add_option("-l", "--list-fixes", action="store_true", help="List available transformations (fixes/fix_*.py)") parser.add_option("-p", "--print-function", action="store_true", - help="Modify the grammar so that print() is a function") + help="DEPRECATED Modify the grammar so that print() is " + "a function") parser.add_option("-v", "--verbose", action="store_true", help="More verbose logging") + parser.add_option("--no-diffs", action="store_true", + help="Don't show diffs of the refactoring") parser.add_option("-w", "--write", action="store_true", help="Write back modified files") parser.add_option("-n", "--nobackups", action="store_true", default=False, @@ -81,6 +104,11 @@ # Parse command line arguments refactor_stdin = False options, args = parser.parse_args(args) + if not options.write and options.no_diffs: + warn("not writing files and not printing diffs; that's not very useful") + if options.print_function: + warn("-p is deprecated; " + "detection of from __future__ import print_function is automatic") if not options.write and options.nobackups: parser.error("Can't use -n without -w") if options.list_fixes: @@ -104,7 +132,6 @@ logging.basicConfig(format='%(name)s: %(message)s', level=level) # Initialize the refactoring tool - rt_opts = {"print_function" : options.print_function} avail_fixes = set(refactor.get_fixers_from_package(fixer_pkg)) unwanted_fixes = set(fixer_pkg + ".fix_" + fix for fix in options.nofix) explicit = set() @@ -119,8 +146,8 @@ else: requested = avail_fixes.union(explicit) fixer_names = requested.difference(unwanted_fixes) - rt = StdoutRefactoringTool(sorted(fixer_names), rt_opts, sorted(explicit), - options.nobackups) + rt = StdoutRefactoringTool(sorted(fixer_names), None, sorted(explicit), + options.nobackups, not options.no_diffs) # Refactor all files and directories passed as arguments if not rt.errors: Modified: python/branches/py3k/Lib/lib2to3/patcomp.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/patcomp.py (original) +++ python/branches/py3k/Lib/lib2to3/patcomp.py Mon Jul 20 18:42:03 2009 @@ -14,7 +14,7 @@ import os # Fairly local imports -from .pgen2 import driver, literals, token, tokenize, parse +from .pgen2 import driver, literals, token, tokenize, parse, grammar # Really local imports from . import pytree @@ -138,7 +138,7 @@ node = nodes[0] if node.type == token.STRING: value = str(literals.evalString(node.value)) - return pytree.LeafPattern(content=value) + return pytree.LeafPattern(_type_of_literal(value), value) elif node.type == token.NAME: value = node.value if value.isupper(): @@ -179,6 +179,15 @@ "TOKEN": None} +def _type_of_literal(value): + if value[0].isalpha(): + return token.NAME + elif value in grammar.opmap: + return grammar.opmap[value] + else: + return None + + def pattern_convert(grammar, raw_node_info): """Converts raw node information to a Node or Leaf instance.""" type, value, context, children = raw_node_info Modified: python/branches/py3k/Lib/lib2to3/pgen2/grammar.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/pgen2/grammar.py (original) +++ python/branches/py3k/Lib/lib2to3/pgen2/grammar.py Mon Jul 20 18:42:03 2009 @@ -97,6 +97,19 @@ f.close() self.__dict__.update(d) + def copy(self): + """ + Copy the grammar. + """ + new = self.__class__() + for dict_attr in ("symbol2number", "number2symbol", "dfas", "keywords", + "tokens", "symbol2label"): + setattr(new, dict_attr, getattr(self, dict_attr).copy()) + new.labels = self.labels[:] + new.states = self.states[:] + new.start = self.start + return new + def report(self): """Dump the grammar tables to standard output, for debugging.""" from pprint import pprint Modified: python/branches/py3k/Lib/lib2to3/pygram.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/pygram.py (original) +++ python/branches/py3k/Lib/lib2to3/pygram.py Mon Jul 20 18:42:03 2009 @@ -28,4 +28,8 @@ python_grammar = driver.load_grammar(_GRAMMAR_FILE) + python_symbols = Symbols(python_grammar) + +python_grammar_no_print_statement = python_grammar.copy() +del python_grammar_no_print_statement.keywords["print"] Modified: python/branches/py3k/Lib/lib2to3/refactor.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/refactor.py (original) +++ python/branches/py3k/Lib/lib2to3/refactor.py Mon Jul 20 18:42:03 2009 @@ -14,14 +14,15 @@ # Python imports import os import sys -import difflib import logging import operator -from collections import defaultdict +import collections +import io +import warnings from itertools import chain # Local imports -from .pgen2 import driver, tokenize +from .pgen2 import driver, tokenize, token from . import pytree, pygram @@ -37,7 +38,12 @@ fix_names.append(name[:-3]) return fix_names -def get_head_types(pat): + +class _EveryNode(Exception): + pass + + +def _get_head_types(pat): """ Accepts a pytree Pattern Node and returns a set of the pattern types which will match first. """ @@ -45,34 +51,50 @@ # NodePatters must either have no type and no content # or a type and content -- so they don't get any farther # Always return leafs + if pat.type is None: + raise _EveryNode return set([pat.type]) if isinstance(pat, pytree.NegatedPattern): if pat.content: - return get_head_types(pat.content) - return set([None]) # Negated Patterns don't have a type + return _get_head_types(pat.content) + raise _EveryNode # Negated Patterns don't have a type if isinstance(pat, pytree.WildcardPattern): # Recurse on each node in content r = set() for p in pat.content: for x in p: - r.update(get_head_types(x)) + r.update(_get_head_types(x)) return r raise Exception("Oh no! I don't understand pattern %s" %(pat)) -def get_headnode_dict(fixer_list): + +def _get_headnode_dict(fixer_list): """ Accepts a list of fixers and returns a dictionary of head node type --> fixer list. """ - head_nodes = defaultdict(list) + head_nodes = collections.defaultdict(list) + every = [] for fixer in fixer_list: - if not fixer.pattern: - head_nodes[None].append(fixer) - continue - for t in get_head_types(fixer.pattern): - head_nodes[t].append(fixer) - return head_nodes + if fixer.pattern: + try: + heads = _get_head_types(fixer.pattern) + except _EveryNode: + every.append(fixer) + else: + for node_type in heads: + head_nodes[node_type].append(fixer) + else: + if fixer._accept_type is not None: + head_nodes[fixer._accept_type].append(fixer) + else: + every.append(fixer) + for node_type in chain(pygram.python_grammar.symbol2number.values(), + pygram.python_grammar.tokens): + head_nodes[node_type].extend(every) + return dict(head_nodes) + def get_fixers_from_package(pkg_name): """ @@ -101,13 +123,56 @@ _to_system_newlines = _identity +def _detect_future_print(source): + have_docstring = False + gen = tokenize.generate_tokens(io.StringIO(source).readline) + def advance(): + tok = next(gen) + return tok[0], tok[1] + ignore = frozenset((token.NEWLINE, tokenize.NL, token.COMMENT)) + try: + while True: + tp, value = advance() + if tp in ignore: + continue + elif tp == token.STRING: + if have_docstring: + break + have_docstring = True + elif tp == token.NAME: + if value == "from": + tp, value = advance() + if tp != token.NAME and value != "__future__": + break + tp, value = advance() + if tp != token.NAME and value != "import": + break + tp, value = advance() + if tp == token.OP and value == "(": + tp, value = advance() + while tp == token.NAME: + if value == "print_function": + return True + tp, value = advance() + if tp != token.OP and value != ",": + break + tp, value = advance() + else: + break + else: + break + except StopIteration: + pass + return False + + class FixerError(Exception): """A fixer could not be loaded.""" class RefactoringTool(object): - _default_options = {"print_function": False} + _default_options = {} CLASS_PREFIX = "Fix" # The prefix for fixer classes FILE_PREFIX = "fix_" # The prefix for modules with a fixer within @@ -124,20 +189,21 @@ self.explicit = explicit or [] self.options = self._default_options.copy() if options is not None: + if "print_function" in options: + warnings.warn("the 'print_function' option is deprecated", + DeprecationWarning) self.options.update(options) self.errors = [] self.logger = logging.getLogger("RefactoringTool") self.fixer_log = [] self.wrote = False - if self.options["print_function"]: - del pygram.python_grammar.keywords["print"] self.driver = driver.Driver(pygram.python_grammar, convert=pytree.convert, logger=self.logger) self.pre_order, self.post_order = self.get_fixers() - self.pre_order_heads = get_headnode_dict(self.pre_order) - self.post_order_heads = get_headnode_dict(self.post_order) + self.pre_order_heads = _get_headnode_dict(self.pre_order) + self.post_order_heads = _get_headnode_dict(self.post_order) self.files = [] # List of files that were or should be modified @@ -196,8 +262,9 @@ msg = msg % args self.logger.debug(msg) - def print_output(self, lines): - """Called with lines of output to give to the user.""" + def print_output(self, old_text, new_text, filename, equal): + """Called with the old version, new version, and filename of a + refactored file.""" pass def refactor(self, items, write=False, doctests_only=False): @@ -220,7 +287,8 @@ dirnames.sort() filenames.sort() for name in filenames: - if not name.startswith(".") and name.endswith("py"): + if not name.startswith(".") and \ + os.path.splitext(name)[1].endswith("py"): fullname = os.path.join(dirpath, name) self.refactor_file(fullname, write, doctests_only) # Modify dirnames in-place to remove subdirs with leading dots @@ -276,12 +344,16 @@ An AST corresponding to the refactored input stream; None if there were errors during the parse. """ + if _detect_future_print(data): + self.driver.grammar = pygram.python_grammar_no_print_statement try: tree = self.driver.parse_string(data) except Exception as err: self.log_error("Can't parse %s: %s: %s", name, err.__class__.__name__, err) return + finally: + self.driver.grammar = pygram.python_grammar self.log_debug("Refactoring %s", name) self.refactor_tree(tree, name) return tree @@ -338,12 +410,11 @@ if not fixers: return for node in traversal: - for fixer in fixers[node.type] + fixers[None]: + for fixer in fixers[node.type]: results = fixer.match(node) if results: new = fixer.transform(node, results) - if new is not None and (new != node or - str(new) != str(node)): + if new is not None: node.replace(new) node = new @@ -357,10 +428,11 @@ old_text = self._read_python_source(filename)[0] if old_text is None: return - if old_text == new_text: + equal = old_text == new_text + self.print_output(old_text, new_text, filename, equal) + if equal: self.log_debug("No changes to %s", filename) return - self.print_output(diff_texts(old_text, new_text, filename)) if write: self.write_file(new_text, filename, old_text, encoding) else: @@ -582,12 +654,3 @@ else: return super(MultiprocessRefactoringTool, self).refactor_file( *args, **kwargs) - - -def diff_texts(a, b, filename): - """Return a unified diff of two strings.""" - a = a.splitlines() - b = b.splitlines() - return difflib.unified_diff(a, b, filename, filename, - "(original)", "(refactored)", - lineterm="") Modified: python/branches/py3k/Lib/lib2to3/tests/data/different_encoding.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/data/different_encoding.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/data/different_encoding.py Mon Jul 20 18:42:03 2009 @@ -1,3 +1,6 @@ #!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -print u'??????????????????????????????????????????????????????????????' +# -*- coding: utf-8 -*- +print u'????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' + +def f(x): + print '%s\t-> ??(%2i):%s ??(%s)' Modified: python/branches/py3k/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_fixers.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_fixers.py Mon Jul 20 18:42:03 2009 @@ -18,8 +18,6 @@ def setUp(self, fix_list=None, fixer_pkg="lib2to3", options=None): if fix_list is None: fix_list = [self.fixer] - if options is None: - options = {"print_function" : False} self.refactor = support.get_refactorer(fixer_pkg, fix_list, options) self.fixer_log = [] self.filename = "" @@ -58,8 +56,7 @@ def assert_runs_after(self, *names): fixes = [self.fixer] fixes.extend(names) - options = {"print_function" : False} - r = support.get_refactorer("lib2to3", fixes, options) + r = support.get_refactorer("lib2to3", fixes) (pre, post) = r.get_fixers() n = "fix_" + self.fixer if post and post[-1].__class__.__module__.endswith(n): @@ -379,18 +376,15 @@ self.unchanged(s) def test_idempotency_print_as_function(self): - print_stmt = pygram.python_grammar.keywords.pop("print") - try: - s = """print(1, 1+1, 1+1+1)""" - self.unchanged(s) + self.refactor.driver.grammar = pygram.python_grammar_no_print_statement + s = """print(1, 1+1, 1+1+1)""" + self.unchanged(s) - s = """print()""" - self.unchanged(s) + s = """print()""" + self.unchanged(s) - s = """print('')""" - self.unchanged(s) - finally: - pygram.python_grammar.keywords["print"] = print_stmt + s = """print('')""" + self.unchanged(s) def test_1(self): b = """print 1, 1+1, 1+1+1""" @@ -462,31 +456,15 @@ a = """print(file=sys.stderr)""" self.check(b, a) - # With from __future__ import print_function def test_with_future_print_function(self): - # XXX: These tests won't actually do anything until the parser - # is fixed so it won't crash when it sees print(x=y). - # When #2412 is fixed, the try/except block can be taken - # out and the tests can be run like normal. - # MvL: disable entirely for now, so that it doesn't print to stdout - return - try: - s = "from __future__ import print_function\n"\ - "print('Hai!', end=' ')" - self.unchanged(s) + s = "from __future__ import print_function\n" \ + "print('Hai!', end=' ')" + self.unchanged(s) - b = "print 'Hello, world!'" - a = "print('Hello, world!')" - self.check(b, a) + b = "print 'Hello, world!'" + a = "print('Hello, world!')" + self.check(b, a) - s = "from __future__ import *\n"\ - "print('Hai!', end=' ')" - self.unchanged(s) - except: - return - else: - self.assertFalse(True, "#2421 has been fixed -- printing tests "\ - "need to be updated!") class Test_exec(FixerTestCase): fixer = "exec" @@ -1705,6 +1683,11 @@ for key in ('dbhash', 'dumbdbm', 'dbm', 'gdbm'): self.modules[key] = mapping1[key] + def test_after_local_imports_refactoring(self): + for fix in ("imports", "imports2"): + self.fixer = fix + self.assert_runs_after("import") + class Test_urllib(FixerTestCase): fixer = "urllib" @@ -3504,6 +3487,7 @@ s = "from itertools import foo" self.unchanged(s) + class Test_import(FixerTestCase): fixer = "import" @@ -3538,8 +3522,7 @@ self.always_exists = False self.present_files = set(['__init__.py']) - expected_extensions = ('.py', os.path.pathsep, '.pyc', '.so', - '.sl', '.pyd') + expected_extensions = ('.py', os.path.sep, '.pyc', '.so', '.sl', '.pyd') names_to_test = (p("/spam/eggs.py"), "ni.py", p("../../shrubbery.py")) for name in names_to_test: @@ -3569,6 +3552,13 @@ self.present_files = set(["__init__.py", "bar.py"]) self.check(b, a) + def test_import_from_package(self): + b = "import bar" + a = "from . import bar" + self.always_exists = False + self.present_files = set(["__init__.py", "bar/"]) + self.check(b, a) + def test_comments_and_indent(self): b = "import bar # Foo" a = "from . import bar # Foo" @@ -4095,3 +4085,26 @@ b = """os.getcwdu ( )""" a = """os.getcwd ( )""" self.check(b, a) + + +class Test_operator(FixerTestCase): + + fixer = "operator" + + def test_operator_isCallable(self): + b = "operator.isCallable(x)" + a = "hasattr(x, '__call__')" + self.check(b, a) + + def test_operator_sequenceIncludes(self): + b = "operator.sequenceIncludes(x, y)" + a = "operator.contains(x, y)" + self.check(b, a) + + def test_bare_isCallable(self): + s = "isCallable(x)" + self.warns_unchanged(s, "You should use hasattr(x, '__call__') here.") + + def test_bare_sequenceIncludes(self): + s = "sequenceIncludes(x, y)" + self.warns_unchanged(s, "You should use operator.contains here.") Modified: python/branches/py3k/Lib/lib2to3/tests/test_refactor.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_refactor.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_refactor.py Mon Jul 20 18:42:03 2009 @@ -7,9 +7,12 @@ import operator import io import tempfile +import shutil import unittest +import warnings from lib2to3 import refactor, pygram, fixer_base +from lib2to3.pgen2 import token from . import support @@ -42,14 +45,11 @@ return refactor.RefactoringTool(fixers, options, explicit) def test_print_function_option(self): - gram = pygram.python_grammar - save = gram.keywords["print"] - try: - rt = self.rt({"print_function" : True}) - self.assertRaises(KeyError, operator.itemgetter("print"), - gram.keywords) - finally: - gram.keywords["print"] = save + with warnings.catch_warnings(record=True) as w: + refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) + self.assertEqual(len(w), 1) + msg, = w + self.assertTrue(msg.category is DeprecationWarning) def test_fixer_loading_helpers(self): contents = ["explicit", "first", "last", "parrot", "preorder"] @@ -61,19 +61,63 @@ self.assertEqual(full_names, ["myfixes.fix_" + name for name in contents]) + def test_detect_future_print(self): + run = refactor._detect_future_print + self.assertFalse(run("")) + self.assertTrue(run("from __future__ import print_function")) + self.assertFalse(run("from __future__ import generators")) + self.assertFalse(run("from __future__ import generators, feature")) + input = "from __future__ import generators, print_function" + self.assertTrue(run(input)) + input ="from __future__ import print_function, generators" + self.assertTrue(run(input)) + input = "from __future__ import (print_function,)" + self.assertTrue(run(input)) + input = "from __future__ import (generators, print_function)" + self.assertTrue(run(input)) + input = "from __future__ import (generators, nested_scopes)" + self.assertFalse(run(input)) + input = """from __future__ import generators +from __future__ import print_function""" + self.assertTrue(run(input)) + self.assertFalse(run("from")) + self.assertFalse(run("from 4")) + self.assertFalse(run("from x")) + self.assertFalse(run("from x 5")) + self.assertFalse(run("from x im")) + self.assertFalse(run("from x import")) + self.assertFalse(run("from x import 4")) + input = "'docstring'\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "'docstring'\n'somng'\nfrom __future__ import print_function" + self.assertFalse(run(input)) + input = "# comment\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "# comment\n'doc'\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "class x: pass\nfrom __future__ import print_function" + self.assertFalse(run(input)) + def test_get_headnode_dict(self): class NoneFix(fixer_base.BaseFix): - PATTERN = None + pass class FileInputFix(fixer_base.BaseFix): PATTERN = "file_input< any * >" + class SimpleFix(fixer_base.BaseFix): + PATTERN = "'name'" + no_head = NoneFix({}, []) with_head = FileInputFix({}, []) - d = refactor.get_headnode_dict([no_head, with_head]) - expected = {None: [no_head], - pygram.python_symbols.file_input : [with_head]} - self.assertEqual(d, expected) + simple = SimpleFix({}, []) + d = refactor._get_headnode_dict([no_head, with_head, simple]) + top_fixes = d.pop(pygram.python_symbols.file_input) + self.assertEqual(top_fixes, [with_head, no_head]) + name_fixes = d.pop(token.NAME) + self.assertEqual(name_fixes, [simple, no_head]) + for fixes in d.values(): + self.assertEqual(fixes, [no_head]) def test_fixer_loading(self): from myfixes.fix_first import FixFirst @@ -106,10 +150,10 @@ class MyRT(refactor.RefactoringTool): - def print_output(self, lines): - diff_lines.extend(lines) + def print_output(self, old_text, new_text, filename, equal): + results.extend([old_text, new_text, filename, equal]) - diff_lines = [] + results = [] rt = MyRT(_DEFAULT_FIXERS) save = sys.stdin sys.stdin = io.StringIO("def parrot(): pass\n\n") @@ -117,12 +161,10 @@ rt.refactor_stdin() finally: sys.stdin = save - expected = """--- (original) -+++ (refactored) -@@ -1,2 +1,2 @@ --def parrot(): pass -+def cheese(): pass""".splitlines() - self.assertEqual(diff_lines[:-1], expected) + expected = ["def parrot(): pass\n\n", + "def cheese(): pass\n\n", + "", False] + self.assertEqual(results, expected) def check_file_refactoring(self, test_file, fixers=_2TO3_FIXERS): def read_file(): @@ -145,6 +187,37 @@ test_file = os.path.join(FIXER_DIR, "parrot_example.py") self.check_file_refactoring(test_file, _DEFAULT_FIXERS) + def test_refactor_dir(self): + def check(structure, expected): + def mock_refactor_file(self, f, *args): + got.append(f) + save_func = refactor.RefactoringTool.refactor_file + refactor.RefactoringTool.refactor_file = mock_refactor_file + rt = self.rt() + got = [] + dir = tempfile.mkdtemp(prefix="2to3-test_refactor") + try: + os.mkdir(os.path.join(dir, "a_dir")) + for fn in structure: + open(os.path.join(dir, fn), "wb").close() + rt.refactor_dir(dir) + finally: + refactor.RefactoringTool.refactor_file = save_func + shutil.rmtree(dir) + self.assertEqual(got, + [os.path.join(dir, path) for path in expected]) + check([], []) + tree = ["nothing", + "hi.py", + ".dumb", + ".after.py", + "sappy"] + expected = ["hi.py"] + check(tree, expected) + tree = ["hi.py", + "a_dir/stuff.py"] + check(tree, tree) + def test_file_encoding(self): fn = os.path.join(TEST_DATA_DIR, "different_encoding.py") self.check_file_refactoring(fn) Modified: python/branches/py3k/Lib/lib2to3/tests/test_util.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_util.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_util.py Mon Jul 20 18:42:03 2009 @@ -1,4 +1,4 @@ -""" Test suite for the code in fixes.util """ +""" Test suite for the code in fixer_util """ # Testing imports from . import support @@ -7,10 +7,10 @@ import os.path # Local imports -from .. import pytree -from .. import fixer_util -from ..fixer_util import Attr, Name - +from lib2to3.pytree import Node, Leaf +from lib2to3 import fixer_util +from lib2to3.fixer_util import Attr, Name, Call, Comma +from lib2to3.pgen2 import token def parse(code, strip_levels=0): # The topmost node is file_input, which we don't care about. @@ -24,7 +24,7 @@ class MacroTestCase(support.TestCase): def assertStr(self, node, string): if isinstance(node, (tuple, list)): - node = pytree.Node(fixer_util.syms.simple_stmt, node) + node = Node(fixer_util.syms.simple_stmt, node) self.assertEqual(str(node), string) @@ -78,6 +78,31 @@ self.assertStr(Name("a", prefix="b"), "ba") +class Test_Call(MacroTestCase): + def _Call(self, name, args=None, prefix=None): + """Help the next test""" + children = [] + if isinstance(args, list): + for arg in args: + children.append(arg) + children.append(Comma()) + children.pop() + return Call(Name(name), children, prefix) + + def test(self): + kids = [None, + [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 2), + Leaf(token.NUMBER, 3)], + [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 3), + Leaf(token.NUMBER, 2), Leaf(token.NUMBER, 4)], + [Leaf(token.STRING, "b"), Leaf(token.STRING, "j", prefix=" ")] + ] + self.assertStr(self._Call("A"), "A()") + self.assertStr(self._Call("b", kids[1]), "b(1,2,3)") + self.assertStr(self._Call("a.b().c", kids[2]), "a.b().c(1,3,2,4)") + self.assertStr(self._Call("d", kids[3], prefix=" "), " d(b, j)") + + class Test_does_tree_import(support.TestCase): def _find_bind_rec(self, name, node): # Search a tree for a binding -- used to find the starting From buildbot at python.org Mon Jul 20 19:02:20 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 17:02:20 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2345 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_lib2to3 ====================================================================== FAIL: test_import_from_package (lib2to3.tests.test_fixers.Test_import) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\lib2to3\tests\test_fixers.py", line 3560, in test_import_from_package self.check(b, a) File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\lib2to3\tests\test_fixers.py", line 37, in check tree = self._check(before, after) File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\lib2to3\tests\test_fixers.py", line 33, in _check self.assertEqual(after, unicode(tree)) AssertionError: u'from . import bar\n\n' != u'import bar\n\n' ====================================================================== FAIL: test_deprecated_prefix_methods (lib2to3.tests.test_pytree.TestNodes) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\lib2to3\tests\test_pytree.py", line 37, in test_deprecated_prefix_methods self.assertEqual(len(w), 2) AssertionError: 0 != 2 ====================================================================== FAIL: test_print_function_option (lib2to3.tests.test_refactor.TestRefactoringTool) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\lib2to3\tests\test_refactor.py", line 50, in test_print_function_option self.assertEqual(len(w), 1) AssertionError: 0 != 1 ====================================================================== FAIL: test_refactor_dir (lib2to3.tests.test_refactor.TestRefactoringTool) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\lib2to3\tests\test_refactor.py", line 219, in test_refactor_dir check(tree, tree) File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\lib2to3\tests\test_refactor.py", line 208, in check [os.path.join(dir, path) for path in expected]) AssertionError: Lists differ: ['c:\\docume~1\\db3l\\locals~1... != ['c:\\docume~1\\db3l\\locals~1... sincerely, -The Buildbot From python-checkins at python.org Mon Jul 20 19:22:35 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 17:22:35 -0000 Subject: [Python-checkins] r74116 - sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Mon Jul 20 19:22:35 2009 New Revision: 74116 Log: placate windows Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Mon Jul 20 19:22:35 2009 @@ -215,7 +215,7 @@ expected = ["hi.py"] check(tree, expected) tree = ["hi.py", - "a_dir/stuff.py"] + os.path.join("a_dir", "stuff.py")] check(tree, tree) def test_file_encoding(self): From python-checkins at python.org Mon Jul 20 19:24:30 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 17:24:30 -0000 Subject: [Python-checkins] r74117 - in python/trunk/Lib/lib2to3: tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Mon Jul 20 19:24:30 2009 New Revision: 74117 Log: Merged revisions 74116 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r74116 | benjamin.peterson | 2009-07-20 12:22:35 -0500 (Mon, 20 Jul 2009) | 1 line placate windows ........ Modified: python/trunk/Lib/lib2to3/ (props changed) python/trunk/Lib/lib2to3/tests/test_refactor.py Modified: python/trunk/Lib/lib2to3/tests/test_refactor.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_refactor.py (original) +++ python/trunk/Lib/lib2to3/tests/test_refactor.py Mon Jul 20 19:24:30 2009 @@ -215,7 +215,7 @@ expected = ["hi.py"] check(tree, expected) tree = ["hi.py", - "a_dir/stuff.py"] + os.path.join("a_dir", "stuff.py")] check(tree, tree) def test_file_encoding(self): From python-checkins at python.org Mon Jul 20 19:34:55 2009 From: python-checkins at python.org (r.david.murray) Date: Mon, 20 Jul 2009 17:34:55 -0000 Subject: [Python-checkins] r74118 - python/branches/py3k/Lib/test/test_re.py Message-ID: Author: r.david.murray Date: Mon Jul 20 19:34:54 2009 New Revision: 74118 Log: Remove apparently unneeded and un-cleaned-up munging of sys.path from test_re. Tests pass on my machine without it, and I can't see any obvious place in the tests that would need it. Modified: python/branches/py3k/Lib/test/test_re.py Modified: python/branches/py3k/Lib/test/test_re.py ============================================================================== --- python/branches/py3k/Lib/test/test_re.py (original) +++ python/branches/py3k/Lib/test/test_re.py Mon Jul 20 19:34:54 2009 @@ -1,6 +1,3 @@ -import sys -sys.path = ['.'] + sys.path - from test.support import verbose, run_unittest import re from re import Scanner From python-checkins at python.org Mon Jul 20 22:28:09 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 20:28:09 -0000 Subject: [Python-checkins] r74119 - in python/trunk: Lib/test/test_ast.py Misc/NEWS Python/ast.c Message-ID: Author: benjamin.peterson Date: Mon Jul 20 22:28:08 2009 New Revision: 74119 Log: the Slice in x[::] has to have step as None to help the interpreter Modified: python/trunk/Lib/test/test_ast.py python/trunk/Misc/NEWS python/trunk/Python/ast.c Modified: python/trunk/Lib/test/test_ast.py ============================================================================== --- python/trunk/Lib/test/test_ast.py (original) +++ python/trunk/Lib/test/test_ast.py Mon Jul 20 22:28:08 2009 @@ -150,7 +150,8 @@ slc = ast.parse("x[::]").body[0].value.slice self.assertIsNone(slc.upper) self.assertIsNone(slc.lower) - self.assertIsNone(slc.step) + self.assertTrue(isinstance(slc.step, ast.Name)) + self.assertEqual(slc.step.id, "None") def test_from_import(self): im = ast.parse("from . import y").body[0] Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jul 20 22:28:08 2009 @@ -44,9 +44,6 @@ - Assignment to None using import statements now raises a SyntaxError. -- In the slice AST type, the step field will always be None if a step expression - is not specified. - - Issue #4547: When debugging a very large function, it was not always possible to update the lineno attribute of the current frame. Modified: python/trunk/Python/ast.c ============================================================================== --- python/trunk/Python/ast.c (original) +++ python/trunk/Python/ast.c Mon Jul 20 22:28:08 2009 @@ -1471,7 +1471,21 @@ ch = CHILD(n, NCH(n) - 1); if (TYPE(ch) == sliceop) { - if (NCH(ch) != 1) { + if (NCH(ch) == 1) { + /* + This is an extended slice (ie "x[::]") with no expression in the + step field. We set this literally to "None" in order to + disambiguate it from x[:]. (The interpreter might have to call + __getslice__ for x[:], but it must call __getitem__ for x[::].) + */ + identifier none = new_identifier("None", c->c_arena); + if (!none) + return NULL; + ch = CHILD(ch, 0); + step = Name(none, Load, LINENO(ch), ch->n_col_offset, c->c_arena); + if (!step) + return NULL; + } else { ch = CHILD(ch, 1); if (TYPE(ch) == test) { step = ast_for_expr(c, ch); From python-checkins at python.org Mon Jul 20 22:36:45 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 20:36:45 -0000 Subject: [Python-checkins] r74120 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Mon Jul 20 22:36:45 2009 New Revision: 74120 Log: Blocked revisions 74119 via svnmerge ........ r74119 | benjamin.peterson | 2009-07-20 15:28:08 -0500 (Mon, 20 Jul 2009) | 2 lines the Slice in x[::] has to have step as None to help the interpreter ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Mon Jul 20 22:40:59 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 20:40:59 -0000 Subject: [Python-checkins] r74121 - in sandbox/trunk/2to3/lib2to3/tests: test_pytree.py test_refactor.py Message-ID: Author: benjamin.peterson Date: Mon Jul 20 22:40:59 2009 New Revision: 74121 Log: try to make warning tests more robust Modified: sandbox/trunk/2to3/lib2to3/tests/test_pytree.py sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_pytree.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_pytree.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_pytree.py Mon Jul 20 22:40:59 2009 @@ -31,6 +31,7 @@ def test_deprecated_prefix_methods(self): l = pytree.Leaf(100, "foo") with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) self.assertEqual(l.get_prefix(), "") l.set_prefix("hi") self.assertEqual(l.prefix, "hi") Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Mon Jul 20 22:40:59 2009 @@ -46,6 +46,7 @@ def test_print_function_option(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) self.assertEqual(len(w), 1) msg, = w From python-checkins at python.org Mon Jul 20 22:44:15 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 20:44:15 -0000 Subject: [Python-checkins] r74122 - sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Message-ID: Author: benjamin.peterson Date: Mon Jul 20 22:44:14 2009 New Revision: 74122 Log: platform compat Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Modified: sandbox/trunk/2to3/lib2to3/tests/test_fixers.py ============================================================================== --- sandbox/trunk/2to3/lib2to3/tests/test_fixers.py (original) +++ sandbox/trunk/2to3/lib2to3/tests/test_fixers.py Mon Jul 20 22:44:14 2009 @@ -3556,7 +3556,7 @@ b = "import bar" a = "from . import bar" self.always_exists = False - self.present_files = set(["__init__.py", "bar/"]) + self.present_files = set(["__init__.py", "bar" + os.path.sep]) self.check(b, a) def test_comments_and_indent(self): From python-checkins at python.org Mon Jul 20 23:09:46 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 20 Jul 2009 21:09:46 -0000 Subject: [Python-checkins] r74123 - in python/trunk/Lib/lib2to3: tests/test_fixers.py tests/test_pytree.py tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Mon Jul 20 23:09:45 2009 New Revision: 74123 Log: Merged revisions 74121-74122 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r74121 | benjamin.peterson | 2009-07-20 15:40:59 -0500 (Mon, 20 Jul 2009) | 1 line try to make warning tests more robust ........ r74122 | benjamin.peterson | 2009-07-20 15:44:14 -0500 (Mon, 20 Jul 2009) | 1 line platform compat ........ Modified: python/trunk/Lib/lib2to3/ (props changed) python/trunk/Lib/lib2to3/tests/test_fixers.py python/trunk/Lib/lib2to3/tests/test_pytree.py python/trunk/Lib/lib2to3/tests/test_refactor.py Modified: python/trunk/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_fixers.py (original) +++ python/trunk/Lib/lib2to3/tests/test_fixers.py Mon Jul 20 23:09:45 2009 @@ -3556,7 +3556,7 @@ b = "import bar" a = "from . import bar" self.always_exists = False - self.present_files = set(["__init__.py", "bar/"]) + self.present_files = set(["__init__.py", "bar" + os.path.sep]) self.check(b, a) def test_comments_and_indent(self): Modified: python/trunk/Lib/lib2to3/tests/test_pytree.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_pytree.py (original) +++ python/trunk/Lib/lib2to3/tests/test_pytree.py Mon Jul 20 23:09:45 2009 @@ -31,6 +31,7 @@ def test_deprecated_prefix_methods(self): l = pytree.Leaf(100, "foo") with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) self.assertEqual(l.get_prefix(), "") l.set_prefix("hi") self.assertEqual(l.prefix, "hi") Modified: python/trunk/Lib/lib2to3/tests/test_refactor.py ============================================================================== --- python/trunk/Lib/lib2to3/tests/test_refactor.py (original) +++ python/trunk/Lib/lib2to3/tests/test_refactor.py Mon Jul 20 23:09:45 2009 @@ -46,6 +46,7 @@ def test_print_function_option(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) self.assertEqual(len(w), 1) msg, = w From buildbot at python.org Mon Jul 20 23:10:48 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 21:10:48 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5183 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From buildbot at python.org Mon Jul 20 23:13:49 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 21:13:49 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 3.x Message-ID: The Buildbot has detected a new failure of x86 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%203.x/builds/1110 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Unknown signal 32 sincerely, -The Buildbot From buildbot at python.org Mon Jul 20 23:17:44 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 21:17:44 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1209 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Abort trap sincerely, -The Buildbot From buildbot at python.org Mon Jul 20 23:25:03 2009 From: buildbot at python.org (buildbot at python.org) Date: Mon, 20 Jul 2009 21:25:03 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/998 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_mailbox test_threading_local make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Tue Jul 21 00:55:35 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 22:55:35 -0000 Subject: [Python-checkins] r74107 - svn:log Message-ID: Author: brett.cannon Revision: 74107 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -2,6 +2,6 @@ importlib.abc.ResourceLoader, when in fact it did not. Fixed the ABC to inherit as documented. -This does in introduce an backwards-incompatiblity as the code in PyLoader +This doesn't introduce an backwards-incompatiblity as the code in PyLoader already required the single method ResourceLoader defined as an abstract method. From brett at python.org Tue Jul 21 00:55:40 2009 From: brett at python.org (Brett Cannon) Date: Mon, 20 Jul 2009 15:55:40 -0700 Subject: [Python-checkins] r74107 - in python/branches/py3k: Lib/importlib/abc.py Lib/importlib/test/test_abc.py Misc/NEWS In-Reply-To: <4A645FE3.8080802@gmail.com> References: <4a63e23c.1467f10a.5310.ffffe91dSMTPIN_ADDED@mx.google.com> <4A645FE3.8080802@gmail.com> Message-ID: On Mon, Jul 20, 2009 at 05:15, Nick Coghlan wrote: > brett.cannon wrote: > > Author: brett.cannon > > Date: Mon Jul 20 05:19:18 2009 > > New Revision: 74107 > > > > Log: > > Importlib's documentation said that importlib.abc.PyLoader inherited from > > importlib.abc.ResourceLoader, when in fact it did not. Fixed the ABC to > inherit > > as documented. > > > > This does in introduce an backwards-incompatiblity as the code in > PyLoader > > already required the single method ResourceLoader defined as an abstract > > method. > > s/does in/doesn't/? Oops. =) Yes, that should be "doesn't". Fixed the log message. -Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: From python-checkins at python.org Tue Jul 21 00:59:01 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 20 Jul 2009 22:59:01 -0000 Subject: [Python-checkins] r74124 - python/branches/py3k/Doc/library/importlib.rst Message-ID: Author: brett.cannon Date: Tue Jul 21 00:59:00 2009 New Revision: 74124 Log: Make the wdocs for importlib.abc.ExecutionLoader to be weaker in terms of what is needed to execute a module. Modified: python/branches/py3k/Doc/library/importlib.rst Modified: python/branches/py3k/Doc/library/importlib.rst ============================================================================== --- python/branches/py3k/Doc/library/importlib.rst (original) +++ python/branches/py3k/Doc/library/importlib.rst Tue Jul 21 00:59:00 2009 @@ -205,7 +205,7 @@ .. class:: ExecutionLoader An abstract base class which inherits from :class:`InspectLoader` that, - when implemented, allows a module to be executed as a script. The ABC + when implemented, helps a module to be executed as a script. The ABC represents an optional :pep:`302` protocol. .. method:: get_filename(fullname) From brett at python.org Tue Jul 21 00:59:02 2009 From: brett at python.org (Brett Cannon) Date: Mon, 20 Jul 2009 15:59:02 -0700 Subject: [Python-checkins] r74110 - in python/branches/py3k: Doc/library/importlib.rst Lib/importlib/_bootstrap.py Lib/importlib/abc.py Lib/importlib/test/source/test_abc_loader.py Lib/importlib/test/test_abc.py Misc/NEWS In-Reply-To: <4A646191.5000705@gmail.com> References: <4a63f15b.0b67f10a.38d2.fffffb7eSMTPIN_ADDED@mx.google.com> <4A646191.5000705@gmail.com> Message-ID: On Mon, Jul 20, 2009 at 05:22, Nick Coghlan wrote: > brett.cannon wrote: > > Author: brett.cannon > > Date: Mon Jul 20 06:23:48 2009 > > New Revision: 74110 > > > > Log: > > Implement the PEP 302 protocol for get_filename() as > > importlib.abc.ExecutionLoader. PyLoader now inherits from this ABC > instead of > > InspectLoader directly. Both PyLoader and PyPycLoader provide concrete > > implementations of get_filename in terms of source_path and > bytecode_path. > > > > > > Modified: > > python/branches/py3k/Doc/library/importlib.rst > > python/branches/py3k/Lib/importlib/_bootstrap.py > > python/branches/py3k/Lib/importlib/abc.py > > python/branches/py3k/Lib/importlib/test/source/test_abc_loader.py > > python/branches/py3k/Lib/importlib/test/test_abc.py > > python/branches/py3k/Misc/NEWS > > > > Modified: python/branches/py3k/Doc/library/importlib.rst > > > ============================================================================== > > --- python/branches/py3k/Doc/library/importlib.rst (original) > > +++ python/branches/py3k/Doc/library/importlib.rst Mon Jul 20 06:23:48 > 2009 > > @@ -202,10 +202,24 @@ > > :term:`loader` cannot find the module. > > > > > > +.. class:: ExecutionLoader > > + > > + An abstract base class which inherits from :class:`InspectLoader` > that, > > + when implemented, allows a module to be executed as a script. The > ABC > > + represents an optional :pep:`302` protocol. > > + > > + .. method:: get_filename(fullname) > > + > > + An abstract method that is to return the value for > :attr:`__file__` for > > + the specified module. If no path is available, > :exc:`ImportError` is > > + raised. > > This isn't quite accurate: > > 1. Modules that come from a loader without get_filename() can still be > executed via the runpy module. They will just have __file__ set to None > instead of the value that would have been set by load_module() (and if > they were executed with -m then sys.argv[0] will be wrong as well). > Changed it to say it helps. > > 2. There's an additional restriction on get_filename(): it isn't allowed > to load the module (otherwise there is no point to the method - if > loading the module was acceptable, then runpy could just do that and > inspect __file__ itself as a fallback when the loader didn't provide > get_filename()). > I have a feeling that I didn't mention point 2 explicitly when I > documented get_filename() in PEP 302 though. > Nope, it isn't in the docs, but I believe it is implied for all the protocols from PEP 302 short of load_module. > > Regards, > Nick. > > -- > Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia > --------------------------------------------------------------- > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins > -------------- next part -------------- An HTML attachment was scrubbed... URL: From python-checkins at python.org Tue Jul 21 01:59:41 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Mon, 20 Jul 2009 23:59:41 -0000 Subject: [Python-checkins] r74125 - python/branches/py3k/Doc/tools Message-ID: Author: alexandre.vassalotti Date: Tue Jul 21 01:59:41 2009 New Revision: 74125 Log: Ignore the correct jinga directory. Modified: python/branches/py3k/Doc/tools/ (props changed) From python-checkins at python.org Tue Jul 21 02:39:03 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 21 Jul 2009 00:39:03 -0000 Subject: [Python-checkins] r74126 - in python/branches/py3k: Objects/unicodeobject.c Message-ID: Author: alexandre.vassalotti Date: Tue Jul 21 02:39:03 2009 New Revision: 74126 Log: Merged revisions 73871 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73871 | alexandre.vassalotti | 2009-07-06 22:17:30 -0400 (Mon, 06 Jul 2009) | 7 lines Grow the allocated buffer in PyUnicode_EncodeUTF7 to avoid buffer overrun. Without this change, test_unicode.UnicodeTest.test_codecs_utf7 crashes in debug mode. What happens is the unicode string u'\U000abcde' with a length of 1 encodes to the string '+2m/c3g-' of length 8. Since only 5 bytes is reserved in the buffer, a buffer overrun occurs. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Objects/unicodeobject.c Modified: python/branches/py3k/Objects/unicodeobject.c ============================================================================== --- python/branches/py3k/Objects/unicodeobject.c (original) +++ python/branches/py3k/Objects/unicodeobject.c Tue Jul 21 02:39:03 2009 @@ -2044,7 +2044,7 @@ { PyObject *v; /* It might be possible to tighten this worst case */ - Py_ssize_t allocated = 5 * size; + Py_ssize_t allocated = 8 * size; int inShift = 0; Py_ssize_t i = 0; unsigned int base64bits = 0; @@ -2055,7 +2055,7 @@ if (size == 0) return PyBytes_FromStringAndSize(NULL, 0); - if (allocated / 5 != size) + if (allocated / 8 != size) return PyErr_NoMemory(); v = PyBytes_FromStringAndSize(NULL, allocated); From python-checkins at python.org Tue Jul 21 02:48:24 2009 From: python-checkins at python.org (tarek.ziade) Date: Tue, 21 Jul 2009 00:48:24 -0000 Subject: [Python-checkins] r74127 - distutils/trunk/README.txt Message-ID: Author: tarek.ziade Date: Tue Jul 21 02:48:23 2009 New Revision: 74127 Log: removed unecessary step Modified: distutils/trunk/README.txt Modified: distutils/trunk/README.txt ============================================================================== --- distutils/trunk/README.txt (original) +++ distutils/trunk/README.txt Tue Jul 21 02:48:23 2009 @@ -11,9 +11,6 @@ $ python setup.py install -Then remove or rename the Distutils version located in your Python library -directory. - Feedback ======== From python-checkins at python.org Tue Jul 21 02:51:59 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 21 Jul 2009 00:51:59 -0000 Subject: [Python-checkins] r74128 - in python/branches/py3k: Doc/library/exceptions.rst Doc/library/os.rst Doc/library/stat.rst Message-ID: Author: alexandre.vassalotti Date: Tue Jul 21 02:51:58 2009 New Revision: 74128 Log: Merged revisions 73706,73778 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73706 | georg.brandl | 2009-06-30 12:18:55 -0400 (Tue, 30 Jun 2009) | 1 line #6384: Add a heading for the exception hierarchy. ........ r73778 | r.david.murray | 2009-07-02 14:19:20 -0400 (Thu, 02 Jul 2009) | 3 lines Issue 6389: add documentation for the 'mode' flags defined in the stat module. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/exceptions.rst python/branches/py3k/Doc/library/os.rst python/branches/py3k/Doc/library/stat.rst Modified: python/branches/py3k/Doc/library/exceptions.rst ============================================================================== --- python/branches/py3k/Doc/library/exceptions.rst (original) +++ python/branches/py3k/Doc/library/exceptions.rst Tue Jul 21 02:51:58 2009 @@ -422,6 +422,8 @@ Base class for warnings related to :class:`bytes` and :class:`buffer`. +Exception hierarchy +------------------- The class hierarchy for built-in exceptions is: Modified: python/branches/py3k/Doc/library/os.rst ============================================================================== --- python/branches/py3k/Doc/library/os.rst (original) +++ python/branches/py3k/Doc/library/os.rst Tue Jul 21 02:51:58 2009 @@ -755,25 +755,25 @@ following values (as defined in the :mod:`stat` module) or bitwise ORed combinations of them: - * ``stat.S_ISUID`` - * ``stat.S_ISGID`` - * ``stat.S_ENFMT`` - * ``stat.S_ISVTX`` - * ``stat.S_IREAD`` - * ``stat.S_IWRITE`` - * ``stat.S_IEXEC`` - * ``stat.S_IRWXU`` - * ``stat.S_IRUSR`` - * ``stat.S_IWUSR`` - * ``stat.S_IXUSR`` - * ``stat.S_IRWXG`` - * ``stat.S_IRGRP`` - * ``stat.S_IWGRP`` - * ``stat.S_IXGRP`` - * ``stat.S_IRWXO`` - * ``stat.S_IROTH`` - * ``stat.S_IWOTH`` - * ``stat.S_IXOTH`` + * :data:`stat.S_ISUID` + * :data:`stat.S_ISGID` + * :data:`stat.S_ENFMT` + * :data:`stat.S_ISVTX` + * :data:`stat.S_IREAD` + * :data:`stat.S_IWRITE` + * :data:`stat.S_IEXEC` + * :data:`stat.S_IRWXU` + * :data:`stat.S_IRUSR` + * :data:`stat.S_IWUSR` + * :data:`stat.S_IXUSR` + * :data:`stat.S_IRWXG` + * :data:`stat.S_IRGRP` + * :data:`stat.S_IWGRP` + * :data:`stat.S_IXGRP` + * :data:`stat.S_IRWXO` + * :data:`stat.S_IROTH` + * :data:`stat.S_IWOTH` + * :data:`stat.S_IXOTH` Availability: Unix, Windows. Modified: python/branches/py3k/Doc/library/stat.rst ============================================================================== --- python/branches/py3k/Doc/library/stat.rst (original) +++ python/branches/py3k/Doc/library/stat.rst Tue Jul 21 02:51:58 2009 @@ -137,6 +137,131 @@ of the size field for other character and block devices varies more, depending on the implementation of the underlying system call. +The variables below define the flags used in the :data:`ST_MODE` field. + +Use of the functions above is more portable than use of the first set of flags: + +.. data:: S_IFMT + + Bit mask for the file type bit fields. + +.. data:: S_IFSOCK + + Socket. + +.. data:: S_IFLNK + + Symbolic link. + +.. data:: S_IFREG + + Regular file. + +.. data:: S_IFBLK + + Block device. + +.. data:: S_IFDIR + + Directory. + +.. data:: S_IFCHR + + Character device. + +.. data:: S_IFIFO + + FIFO. + +The following flags can also be used in the *mode* argument of :func:`os.chmod`: + +.. data:: S_ISUID + + Set UID bit. + +.. data:: S_ISGID + + Set-group-ID bit. This bit has several special uses. For a directory + it indicates that BSD semantics is to be used for that directory: + files created there inherit their group ID from the directory, not + from the effective group ID of the creating process, and directories + created there will also get the :data:`S_ISGID` bit set. For a + file that does not have the group execution bit (:data:`S_IXGRP`) + set, the set-group-ID bit indicates mandatory file/record locking + (see also :data:`S_ENFMT`). + +.. data:: S_ISVTX + + Sticky bit. When this bit is set on a directory it means that a file + in that directory can be renamed or deleted only by the owner of the + file, by the owner of the directory, or by a privileged process. + +.. data:: S_IRWXU + + Mask for file owner permissions. + +.. data:: S_IRUSR + + Owner has read permission. + +.. data:: S_IWUSR + + Owner has write permission. + +.. data:: S_IXUSR + + Owner has execute permission. + +.. data:: S_IRWXG + + Mask for group permissions. + +.. data:: S_IRGRP + + Group has read permission. + +.. data:: S_IWGRP + + Group has write permission. + +.. data:: S_IXGRP + + Group has execute permission. + +.. data:: S_IRWXO + + Mask for permissions for others (not in group). + +.. data:: S_IROTH + + Others have read permission. + +.. data:: S_IWOTH + + Others have write permission. + +.. data:: S_IXOTH + + Others have execute permission. + +.. data:: S_ENFMT + + System V file locking enforcement. This flag is shared with :data:`S_ISGID`: + file/record locking is enforced on files that do not have the group + execution bit (:data:`S_IXGRP`) set. + +.. data:: S_IREAD + + Unix V7 synonym for :data:`S_IRUSR`. + +.. data:: S_IWRITE + + Unix V7 synonym for :data:`S_IWUSR`. + +.. data:: S_IEXEC + + Unix V7 synonym for :data:`S_IXUSR`. + Example:: import os, sys From python-checkins at python.org Tue Jul 21 02:55:16 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 21 Jul 2009 00:55:16 -0000 Subject: [Python-checkins] r74129 - python/branches/py3k/Doc/tools Message-ID: Author: alexandre.vassalotti Date: Tue Jul 21 02:55:16 2009 New Revision: 74129 Log: Revert r74125. Modified: python/branches/py3k/Doc/tools/ (props changed) From python-checkins at python.org Tue Jul 21 02:57:50 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 21 Jul 2009 00:57:50 -0000 Subject: [Python-checkins] r74130 - in python/branches/py3k: .bzrignore .hgignore Message-ID: Author: alexandre.vassalotti Date: Tue Jul 21 02:57:50 2009 New Revision: 74130 Log: Add ignore rule for the Doc/tools/jinga2/ directory. Modified: python/branches/py3k/.bzrignore python/branches/py3k/.hgignore Modified: python/branches/py3k/.bzrignore ============================================================================== --- python/branches/py3k/.bzrignore (original) +++ python/branches/py3k/.bzrignore Tue Jul 21 02:57:50 2009 @@ -20,6 +20,7 @@ .gdb_history Doc/tools/sphinx Doc/tools/jinja +Doc/tools/jinja2 Doc/tools/pygments Doc/tools/docutils Misc/python.pc Modified: python/branches/py3k/.hgignore ============================================================================== --- python/branches/py3k/.hgignore (original) +++ python/branches/py3k/.hgignore Tue Jul 21 02:57:50 2009 @@ -22,6 +22,7 @@ Doc/tools/sphinx/ Doc/tools/docutils/ Doc/tools/jinja/ +Doc/tools/jinja2/ Doc/tools/pygments/ Misc/python.pc Modules/Setup From python-checkins at python.org Tue Jul 21 04:51:59 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 21 Jul 2009 02:51:59 -0000 Subject: [Python-checkins] r74131 - in python/branches/py3k: Lib/test/test_scope.py Python/peephole.c Message-ID: Author: alexandre.vassalotti Date: Tue Jul 21 04:51:58 2009 New Revision: 74131 Log: Merged revisions 73683,73786 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73683 | georg.brandl | 2009-06-29 10:44:49 -0400 (Mon, 29 Jun 2009) | 1 line Fix error handling in PyCode_Optimize, by Alexander Schremmer at EuroPython sprint. ........ r73786 | benjamin.peterson | 2009-07-02 18:56:16 -0400 (Thu, 02 Jul 2009) | 1 line condense with assertRaises ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_scope.py python/branches/py3k/Python/peephole.c Modified: python/branches/py3k/Lib/test/test_scope.py ============================================================================== --- python/branches/py3k/Lib/test/test_scope.py (original) +++ python/branches/py3k/Lib/test/test_scope.py Tue Jul 21 04:51:58 2009 @@ -272,19 +272,8 @@ inner() y = 1 - try: - errorInOuter() - except UnboundLocalError: - pass - else: - self.fail() - - try: - errorInInner() - except NameError: - pass - else: - self.fail() + self.assertRaises(UnboundLocalError, errorInOuter) + self.assertRaises(NameError, errorInInner) # test for bug #1501934: incorrect LOAD/STORE_GLOBAL generation exec(""" Modified: python/branches/py3k/Python/peephole.c ============================================================================== --- python/branches/py3k/Python/peephole.c (original) +++ python/branches/py3k/Python/peephole.c Tue Jul 21 04:51:58 2009 @@ -330,7 +330,7 @@ /* Bail out if an exception is set */ if (PyErr_Occurred()) - goto exitUnchanged; + goto exitError; /* Bypass optimization when the lineno table is too complex */ assert(PyBytes_Check(lineno_obj)); @@ -348,7 +348,7 @@ /* Make a modifiable copy of the code string */ codestr = (unsigned char *)PyMem_Malloc(codelen); if (codestr == NULL) - goto exitUnchanged; + goto exitError; codestr = (unsigned char *)memcpy(codestr, PyBytes_AS_STRING(code), codelen); @@ -363,11 +363,11 @@ /* Mapping to new jump targets after NOPs are removed */ addrmap = (int *)PyMem_Malloc(codelen * sizeof(int)); if (addrmap == NULL) - goto exitUnchanged; + goto exitError; blocks = markblocks(codestr, codelen); if (blocks == NULL) - goto exitUnchanged; + goto exitError; assert(PyList_Check(consts)); for (i=0 ; i Author: alexandre.vassalotti Date: Tue Jul 21 06:30:03 2009 New Revision: 74132 Log: Merged revisions 72487-72488,72879 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r72487 | jeffrey.yasskin | 2009-05-08 17:51:06 -0400 (Fri, 08 May 2009) | 7 lines PyCode_NewEmpty: Most uses of PyCode_New found by http://www.google.com/codesearch?q=PyCode_New are trying to build an empty code object, usually to put it in a dummy frame object. This patch adds a PyCode_NewEmpty wrapper which lets the user specify just the filename, function name, and first line number, instead of also requiring lots of code internals. ........ r72488 | jeffrey.yasskin | 2009-05-08 18:23:21 -0400 (Fri, 08 May 2009) | 13 lines Issue 5954, PyFrame_GetLineNumber: Most uses of PyCode_Addr2Line (http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get the line number of a specified frame, but there's no way to do that directly. Forcing people to go through the code object makes them know more about the guts of the interpreter than they should need. The remaining uses of PyCode_Addr2Line seem to be getting the line from a traceback (for example, http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line), which is replaced by the tb_lineno field. So we may be able to deprecate PyCode_Addr2Line entirely for external use. ........ r72879 | jeffrey.yasskin | 2009-05-23 19:23:01 -0400 (Sat, 23 May 2009) | 14 lines Issue #6042: lnotab-based tracing is very complicated and isn't documented very well. There were at least 3 comment blocks purporting to document co_lnotab, and none did a very good job. This patch unifies them into Objects/lnotab_notes.txt which tries to completely capture the current state of affairs. I also discovered that we've attached 2 layers of patches to the basic tracing scheme. The first layer avoids jumping to instructions that don't start a line, to avoid problems in if statements and while loops. The second layer discovered that jumps backward do need to trace at instructions that don't start a line, so it added extra lnotab entries for 'while' and 'for' loops, and added a special case for backward jumps within the same line. I replaced these patches by just treating forward and backward jumps differently. ........ Added: python/branches/py3k/Doc/c-api/code.rst - copied unchanged from r72488, /python/trunk/Doc/c-api/code.rst python/branches/py3k/Objects/lnotab_notes.txt - copied unchanged from r72879, /python/trunk/Objects/lnotab_notes.txt Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/c-api/concrete.rst python/branches/py3k/Doc/c-api/reflection.rst python/branches/py3k/Doc/library/sys.rst python/branches/py3k/Include/code.h python/branches/py3k/Include/frameobject.h python/branches/py3k/Lib/test/test_code.py python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/_ctypes/callbacks.c python/branches/py3k/Modules/_testcapimodule.c python/branches/py3k/Modules/pyexpat.c python/branches/py3k/Objects/codeobject.c python/branches/py3k/Objects/frameobject.c python/branches/py3k/Python/_warnings.c python/branches/py3k/Python/ceval.c python/branches/py3k/Python/compile.c python/branches/py3k/Python/traceback.c Modified: python/branches/py3k/Doc/c-api/concrete.rst ============================================================================== --- python/branches/py3k/Doc/c-api/concrete.rst (original) +++ python/branches/py3k/Doc/c-api/concrete.rst Tue Jul 21 06:30:03 2009 @@ -105,3 +105,4 @@ cell.rst gen.rst datetime.rst + code.rst Modified: python/branches/py3k/Doc/c-api/reflection.rst ============================================================================== --- python/branches/py3k/Doc/c-api/reflection.rst (original) +++ python/branches/py3k/Doc/c-api/reflection.rst Tue Jul 21 06:30:03 2009 @@ -29,6 +29,11 @@ currently executing. +.. cfunction:: int PyFrame_GetLineNumber(PyFrameObject *frame) + + Return the line number that *frame* is currently executing. + + .. cfunction:: int PyEval_GetRestricted() If there is a current frame and it is executing in restricted mode, return true, Modified: python/branches/py3k/Doc/library/sys.rst ============================================================================== --- python/branches/py3k/Doc/library/sys.rst (original) +++ python/branches/py3k/Doc/library/sys.rst Tue Jul 21 06:30:03 2009 @@ -720,9 +720,11 @@ specifies the local trace function. ``'line'`` - The interpreter is about to execute a new line of code (sometimes multiple - line events on one line exist). The local trace function is called; *arg* - is ``None``; the return value specifies the new local trace function. + The interpreter is about to execute a new line of code or re-execute the + condition of a loop. The local trace function is called; *arg* is + ``None``; the return value specifies the new local trace function. See + :file:`Objects/lnotab_notes.txt` for a detailed explanation of how this + works. ``'return'`` A function (or other code block) is about to return. The local trace Modified: python/branches/py3k/Include/code.h ============================================================================== --- python/branches/py3k/Include/code.h (original) +++ python/branches/py3k/Include/code.h Tue Jul 21 06:30:03 2009 @@ -24,7 +24,8 @@ PyObject *co_filename; /* unicode (where it was loaded from) */ PyObject *co_name; /* unicode (name, for reference) */ int co_firstlineno; /* first source line number */ - PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ + PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See + Objects/lnotab_notes.txt for details. */ void *co_zombieframe; /* for optimization only (see frameobject.c) */ } PyCodeObject; @@ -72,6 +73,14 @@ PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); /* same as struct above */ + +/* Creates a new empty code object with the specified source location. */ +PyAPI_FUNC(PyCodeObject *) +PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno); + +/* Return the line number associated with the specified bytecode index + in this code object. If you just need the line number of a frame, + use PyFrame_GetLineNumber() instead. */ PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int); /* for internal use only */ @@ -80,15 +89,11 @@ int ap_upper; } PyAddrPair; -/* Check whether lasti (an instruction offset) falls outside bounds - and whether it is a line number that should be traced. Returns - a line number if it should be traced or -1 if the line should not. - - If lasti is not within bounds, updates bounds. +/* Update *bounds to describe the first and one-past-the-last instructions in the + same line as lasti. Return the number of that line. */ - -PyAPI_FUNC(int) PyCode_CheckLineNumber(PyCodeObject* co, - int lasti, PyAddrPair *bounds); +PyAPI_FUNC(int) _PyCode_CheckLineNumber(PyCodeObject* co, + int lasti, PyAddrPair *bounds); PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, PyObject *lineno_obj); Modified: python/branches/py3k/Include/frameobject.h ============================================================================== --- python/branches/py3k/Include/frameobject.h (original) +++ python/branches/py3k/Include/frameobject.h Tue Jul 21 06:30:03 2009 @@ -38,8 +38,11 @@ PyThreadState *f_tstate; int f_lasti; /* Last instruction if called */ - /* As of 2.3 f_lineno is only valid when tracing is active (i.e. when - f_trace is set) -- at other times use PyCode_Addr2Line instead. */ + /* Call PyFrame_GetLineNumber() instead of reading this field + directly. As of 2.3 f_lineno is only valid when tracing is + active (i.e. when f_trace is set). At other times we use + PyCode_Addr2Line to calculate the line from the current + bytecode index. */ int f_lineno; /* Current line number */ int f_iblock; /* index in f_blockstack */ PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ @@ -75,6 +78,9 @@ PyAPI_FUNC(int) PyFrame_ClearFreeList(void); +/* Return the line of code the frame is currently executing. */ +PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); + #ifdef __cplusplus } #endif Modified: python/branches/py3k/Lib/test/test_code.py ============================================================================== --- python/branches/py3k/Lib/test/test_code.py (original) +++ python/branches/py3k/Lib/test/test_code.py Tue Jul 21 06:30:03 2009 @@ -102,6 +102,9 @@ """ +import unittest +import _testcapi + def consts(t): """Yield a doctest-safe sequence of object reprs.""" for elt in t: @@ -118,10 +121,21 @@ print("%s: %s" % (attr, getattr(co, "co_" + attr))) print("consts:", tuple(consts(co.co_consts))) + +class CodeTest(unittest.TestCase): + + def test_newempty(self): + co = _testcapi.code_newempty("filename", "funcname", 15) + self.assertEquals(co.co_filename, "filename") + self.assertEquals(co.co_name, "funcname") + self.assertEquals(co.co_firstlineno, 15) + + def test_main(verbose=None): - from test.support import run_doctest + from test.support import run_doctest, run_unittest from test import test_code run_doctest(test_code, verbose) + run_unittest(CodeTest) if __name__ == '__main__': Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Tue Jul 21 06:30:03 2009 @@ -40,6 +40,15 @@ - The code flags for old __future__ features are now available again. +- Issue #5954: Add a PyFrame_GetLineNumber() function to replace most uses of + PyCode_Addr2Line(). + +- Issue #5959: Add a PyCode_NewEmpty() function to create a new empty code + object at a specified file, function, and line number. + +- Issue #1419652: Change the first argument to PyImport_AppendInittab() to + ``const char *`` as the string is stored beyond the call. + Library ------- Modified: python/branches/py3k/Modules/_ctypes/callbacks.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/callbacks.c (original) +++ python/branches/py3k/Modules/_ctypes/callbacks.c Tue Jul 21 06:30:03 2009 @@ -94,41 +94,13 @@ /* after code that pyrex generates */ void _ctypes_add_traceback(char *funcname, char *filename, int lineno) { - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; PyObject *py_globals = 0; - PyObject *empty_tuple = 0; - PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; - py_srcfile = PyUnicode_DecodeFSDefault(filename); - if (!py_srcfile) goto bad; - py_funcname = PyUnicode_FromString(funcname); - if (!py_funcname) goto bad; py_globals = PyDict_New(); if (!py_globals) goto bad; - empty_tuple = PyTuple_New(0); - if (!empty_tuple) goto bad; - empty_string = PyBytes_FromString(""); - if (!empty_string) goto bad; - py_code = PyCode_New( - 0, /*int argcount,*/ - 0, /*int kwonlyargcount,*/ - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - 0, /*int flags,*/ - empty_string, /*PyObject *code,*/ - empty_tuple, /*PyObject *consts,*/ - empty_tuple, /*PyObject *names,*/ - empty_tuple, /*PyObject *varnames,*/ - empty_tuple, /*PyObject *freevars,*/ - empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - lineno, /*int firstlineno,*/ - empty_string /*PyObject *lnotab*/ - ); + py_code = PyCode_NewEmpty(filename, funcname, lineno); if (!py_code) goto bad; py_frame = PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ @@ -141,10 +113,6 @@ PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_globals); - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - Py_XDECREF(empty_tuple); - Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); } Modified: python/branches/py3k/Modules/_testcapimodule.c ============================================================================== --- python/branches/py3k/Modules/_testcapimodule.c (original) +++ python/branches/py3k/Modules/_testcapimodule.c Tue Jul 21 06:30:03 2009 @@ -1446,6 +1446,21 @@ Py_RETURN_NONE; } +/* To test that the result of PyCode_NewEmpty has the right members. */ +static PyObject * +code_newempty(PyObject *self, PyObject *args) +{ + const char *filename; + const char *funcname; + int firstlineno; + + if (!PyArg_ParseTuple(args, "ssi:code_newempty", + &filename, &funcname, &firstlineno)) + return NULL; + + return (PyObject *)PyCode_NewEmpty(filename, funcname, firstlineno); +} + static PyMethodDef TestMethods[] = { {"raise_exception", raise_exception, METH_VARARGS}, {"raise_memoryerror", (PyCFunction)raise_memoryerror, METH_NOARGS}, @@ -1498,6 +1513,7 @@ {"traceback_print", traceback_print, METH_VARARGS}, {"exception_print", exception_print, METH_VARARGS}, {"argparsing", argparsing, METH_VARARGS}, + {"code_newempty", code_newempty, METH_VARARGS}, {NULL, NULL} /* sentinel */ }; Modified: python/branches/py3k/Modules/pyexpat.c ============================================================================== --- python/branches/py3k/Modules/pyexpat.c (original) +++ python/branches/py3k/Modules/pyexpat.c Tue Jul 21 06:30:03 2009 @@ -209,53 +209,11 @@ static PyCodeObject* getcode(enum HandlerTypes slot, char* func_name, int lineno) { - PyObject *code = NULL; - PyObject *name = NULL; - PyObject *nulltuple = NULL; - PyObject *filename = NULL; - if (handler_info[slot].tb_code == NULL) { - code = PyBytes_FromString(""); - if (code == NULL) - goto failed; - name = PyUnicode_FromString(func_name); - if (name == NULL) - goto failed; - nulltuple = PyTuple_New(0); - if (nulltuple == NULL) - goto failed; - filename = PyUnicode_DecodeFSDefault(__FILE__); handler_info[slot].tb_code = - PyCode_New(0, /* argcount */ - 0, /* kwonlyargcount */ - 0, /* nlocals */ - 0, /* stacksize */ - 0, /* flags */ - code, /* code */ - nulltuple, /* consts */ - nulltuple, /* names */ - nulltuple, /* varnames */ -#if PYTHON_API_VERSION >= 1010 - nulltuple, /* freevars */ - nulltuple, /* cellvars */ -#endif - filename, /* filename */ - name, /* name */ - lineno, /* firstlineno */ - code /* lnotab */ - ); - if (handler_info[slot].tb_code == NULL) - goto failed; - Py_DECREF(code); - Py_DECREF(nulltuple); - Py_DECREF(filename); - Py_DECREF(name); + PyCode_NewEmpty(__FILE__, func_name, lineno); } return handler_info[slot].tb_code; - failed: - Py_XDECREF(code); - Py_XDECREF(name); - return NULL; } #ifdef FIX_TRACE Modified: python/branches/py3k/Objects/codeobject.c ============================================================================== --- python/branches/py3k/Objects/codeobject.c (original) +++ python/branches/py3k/Objects/codeobject.c Tue Jul 21 06:30:03 2009 @@ -54,7 +54,7 @@ Py_ssize_t i; /* Check argument types */ - if (argcount < 0 || nlocals < 0 || + if (argcount < 0 || kwonlyargcount < 0 || nlocals < 0 || code == NULL || consts == NULL || !PyTuple_Check(consts) || names == NULL || !PyTuple_Check(names) || @@ -112,6 +112,53 @@ return co; } +PyCodeObject * +PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno) +{ + static PyObject *emptystring = NULL; + static PyObject *nulltuple = NULL; + PyObject *filename_ob = NULL; + PyObject *funcname_ob = NULL; + PyCodeObject *result = NULL; + if (emptystring == NULL) { + emptystring = PyBytes_FromString(""); + if (emptystring == NULL) + goto failed; + } + if (nulltuple == NULL) { + nulltuple = PyTuple_New(0); + if (nulltuple == NULL) + goto failed; + } + funcname_ob = PyUnicode_FromString(funcname); + if (funcname_ob == NULL) + goto failed; + filename_ob = PyUnicode_DecodeFSDefault(filename); + if (filename_ob == NULL) + goto failed; + + result = PyCode_New(0, /* argcount */ + 0, /* kwonlyargcount */ + 0, /* nlocals */ + 0, /* stacksize */ + 0, /* flags */ + emptystring, /* code */ + nulltuple, /* consts */ + nulltuple, /* names */ + nulltuple, /* varnames */ + nulltuple, /* freevars */ + nulltuple, /* cellvars */ + filename_ob, /* filename */ + funcname_ob, /* name */ + firstlineno, /* firstlineno */ + emptystring /* lnotab */ + ); + +failed: + Py_XDECREF(funcname_ob); + Py_XDECREF(filename_ob); + return result; +} #define OFF(x) offsetof(PyCodeObject, x) @@ -431,48 +478,8 @@ code_new, /* tp_new */ }; -/* All about c_lnotab. - -c_lnotab is an array of unsigned bytes disguised as a Python string. In -O -mode, SET_LINENO opcodes aren't generated, and bytecode offsets are mapped -to source code line #s (when needed for tracebacks) via c_lnotab instead. -The array is conceptually a list of - (bytecode offset increment, line number increment) -pairs. The details are important and delicate, best illustrated by example: - - byte code offset source code line number - 0 1 - 6 2 - 50 7 - 350 307 - 361 308 - -The first trick is that these numbers aren't stored, only the increments -from one row to the next (this doesn't really work, but it's a start): - - 0, 1, 6, 1, 44, 5, 300, 300, 11, 1 - -The second trick is that an unsigned byte can't hold negative values, or -values larger than 255, so (a) there's a deep assumption that byte code -offsets and their corresponding line #s both increase monotonically, and (b) -if at least one column jumps by more than 255 from one row to the next, more -than one pair is written to the table. In case #b, there's no way to know -from looking at the table later how many were written. That's the delicate -part. A user of c_lnotab desiring to find the source line number -corresponding to a bytecode address A should do something like this - - lineno = addr = 0 - for addr_incr, line_incr in c_lnotab: - addr += addr_incr - if addr > A: - return lineno - lineno += line_incr - -In order for this to work, when the addr field increments by more than 255, -the line # increment in each pair generated must be 0 until the remaining addr -increment is < 256. So, in the example above, com_set_lineno should not (as -was actually done until 2.2) expand 300, 300 to 255, 255, 45, 45, but to -255, 0, 45, 255, 0, 45. +/* Use co_lnotab to compute the line number from a bytecode index, addrq. See + lnotab_notes.txt for the details of the lnotab representation. */ int @@ -491,85 +498,10 @@ return line; } -/* - Check whether the current instruction is at the start of a line. - - */ - - /* The theory of SET_LINENO-less tracing. - - In a nutshell, we use the co_lnotab field of the code object - to tell when execution has moved onto a different line. - - As mentioned above, the basic idea is so set things up so - that - - *instr_lb <= frame->f_lasti < *instr_ub - - is true so long as execution does not change lines. - - This is all fairly simple. Digging the information out of - co_lnotab takes some work, but is conceptually clear. - - Somewhat harder to explain is why we don't *always* call the - line trace function when the above test fails. - - Consider this code: - - 1: def f(a): - 2: if a: - 3: print 1 - 4: else: - 5: print 2 - - which compiles to this: - - 2 0 LOAD_FAST 0 (a) - 3 JUMP_IF_FALSE 9 (to 15) - 6 POP_TOP - - 3 7 LOAD_CONST 1 (1) - 10 PRINT_ITEM - 11 PRINT_NEWLINE - 12 JUMP_FORWARD 6 (to 21) - >> 15 POP_TOP - - 5 16 LOAD_CONST 2 (2) - 19 PRINT_ITEM - 20 PRINT_NEWLINE - >> 21 LOAD_CONST 0 (None) - 24 RETURN_VALUE - - If 'a' is false, execution will jump to instruction at offset - 15 and the co_lnotab will claim that execution has moved to - line 3. This is at best misleading. In this case we could - associate the POP_TOP with line 4, but that doesn't make - sense in all cases (I think). - - What we do is only call the line trace function if the co_lnotab - indicates we have jumped to the *start* of a line, i.e. if the - current instruction offset matches the offset given for the - start of a line by the co_lnotab. - - This also takes care of the situation where 'a' is true. - Execution will jump from instruction offset 12 to offset 21. - Then the co_lnotab would imply that execution has moved to line - 5, which is again misleading. - - Why do we set f_lineno when tracing? Well, consider the code - above when 'a' is true. If stepping through this with 'n' in - pdb, you would stop at line 1 with a "call" type event, then - line events on lines 2 and 3, then a "return" type event -- but - you would be shown line 5 during this event. This is a change - from the behaviour in 2.2 and before, and I've found it - confusing in practice. By setting and using f_lineno when - tracing, one can report a line number different from that - suggested by f_lasti on this one occasion where it's desirable. - */ - - -int -PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds) +/* Update *bounds to describe the first and one-past-the-last instructions in + the same line as lasti. Return the number of that line. */ +int +_PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds) { int size, addr, line; unsigned char* p; @@ -586,11 +518,9 @@ instr_lb -- if we stored the matching value of p somwhere we could skip the first while loop. */ - /* see comments in compile.c for the description of + /* See lnotab_notes.txt for the description of co_lnotab. A point to remember: increments to p - should come in pairs -- although we don't care about - the line increments here, treating them as byte - increments gets confusing, to say the least. */ + come in (addr, line) pairs. */ bounds->ap_lower = 0; while (size > 0) { @@ -603,13 +533,6 @@ --size; } - /* If lasti and addr don't match exactly, we don't want to - change the lineno slot on the frame or execute a trace - function. Return -1 instead. - */ - if (addr != lasti) - line = -1; - if (size > 0) { while (--size >= 0) { addr += *p++; Modified: python/branches/py3k/Objects/frameobject.c ============================================================================== --- python/branches/py3k/Objects/frameobject.c (original) +++ python/branches/py3k/Objects/frameobject.c Tue Jul 21 06:30:03 2009 @@ -31,17 +31,19 @@ return f->f_locals; } -static PyObject * -frame_getlineno(PyFrameObject *f, void *closure) +int +PyFrame_GetLineNumber(PyFrameObject *f) { - int lineno; - if (f->f_trace) - lineno = f->f_lineno; + return f->f_lineno; else - lineno = PyCode_Addr2Line(f->f_code, f->f_lasti); + return PyCode_Addr2Line(f->f_code, f->f_lasti); +} - return PyLong_FromLong(lineno); +static PyObject * +frame_getlineno(PyFrameObject *f, void *closure) +{ + return PyLong_FromLong(PyFrame_GetLineNumber(f)); } /* Setter for f_lineno - you can set f_lineno from within a trace function in @@ -345,16 +347,14 @@ static int frame_settrace(PyFrameObject *f, PyObject* v, void *closure) { - /* We rely on f_lineno being accurate when f_trace is set. */ + PyObject* old_value; - PyObject* old_value = f->f_trace; + /* We rely on f_lineno being accurate when f_trace is set. */ + f->f_lineno = PyFrame_GetLineNumber(f); + old_value = f->f_trace; Py_XINCREF(v); f->f_trace = v; - - if (v != NULL) - f->f_lineno = PyCode_Addr2Line(f->f_code, f->f_lasti); - Py_XDECREF(old_value); return 0; Modified: python/branches/py3k/Python/_warnings.c ============================================================================== --- python/branches/py3k/Python/_warnings.c (original) +++ python/branches/py3k/Python/_warnings.c Tue Jul 21 06:30:03 2009 @@ -462,7 +462,7 @@ } else { globals = f->f_globals; - *lineno = PyCode_Addr2Line(f->f_code, f->f_lasti); + *lineno = PyFrame_GetLineNumber(f); } *module = NULL; Modified: python/branches/py3k/Python/ceval.c ============================================================================== --- python/branches/py3k/Python/ceval.c (original) +++ python/branches/py3k/Python/ceval.c Tue Jul 21 06:30:03 2009 @@ -2761,7 +2761,7 @@ default: fprintf(stderr, "XXX lineno: %d, opcode: %d\n", - PyCode_Addr2Line(f->f_code, f->f_lasti), + PyFrame_GetLineNumber(f), opcode); PyErr_SetString(PyExc_SystemError, "unknown opcode"); why = WHY_EXCEPTION; @@ -3522,33 +3522,30 @@ return result; } +/* See Objects/lnotab_notes.txt for a description of how tracing works. */ static int maybe_call_line_trace(Py_tracefunc func, PyObject *obj, PyFrameObject *frame, int *instr_lb, int *instr_ub, int *instr_prev) { int result = 0; + int line = frame->f_lineno; /* If the last instruction executed isn't in the current - instruction window, reset the window. If the last - instruction happens to fall at the start of a line or if it - represents a jump backwards, call the trace function. + instruction window, reset the window. */ - if ((frame->f_lasti < *instr_lb || frame->f_lasti >= *instr_ub)) { - int line; + if (frame->f_lasti < *instr_lb || frame->f_lasti >= *instr_ub) { PyAddrPair bounds; - - line = PyCode_CheckLineNumber(frame->f_code, frame->f_lasti, - &bounds); - if (line >= 0) { - frame->f_lineno = line; - result = call_trace(func, obj, frame, - PyTrace_LINE, Py_None); - } + line = _PyCode_CheckLineNumber(frame->f_code, frame->f_lasti, + &bounds); *instr_lb = bounds.ap_lower; *instr_ub = bounds.ap_upper; } - else if (frame->f_lasti <= *instr_prev) { + /* If the last instruction falls at the start of a line or if + it represents a jump backwards, update the frame's line + number and call the trace function. */ + if (frame->f_lasti == *instr_lb || frame->f_lasti < *instr_prev) { + frame->f_lineno = line; result = call_trace(func, obj, frame, PyTrace_LINE, Py_None); } *instr_prev = frame->f_lasti; Modified: python/branches/py3k/Python/compile.c ============================================================================== --- python/branches/py3k/Python/compile.c (original) +++ python/branches/py3k/Python/compile.c Tue Jul 21 06:30:03 2009 @@ -1748,9 +1748,6 @@ VISIT(c, expr, s->v.For.iter); ADDOP(c, GET_ITER); compiler_use_next_block(c, start); - /* for expressions must be traced on each iteration, - so we need to set an extra line number. */ - c->u->u_lineno_set = 0; ADDOP_JREL(c, FOR_ITER, cleanup); VISIT(c, expr, s->v.For.target); VISIT_SEQ(c, stmt, s->v.For.body); @@ -1796,9 +1793,6 @@ if (!compiler_push_fblock(c, LOOP, loop)) return 0; if (constant == -1) { - /* while expressions must be traced on each iteration, - so we need to set an extra line number. */ - c->u->u_lineno_set = 0; VISIT(c, expr, s->v.While.test); ADDOP_JABS(c, POP_JUMP_IF_FALSE, anchor); } @@ -3654,51 +3648,9 @@ return size; } -/* All about a_lnotab. - -c_lnotab is an array of unsigned bytes disguised as a Python string. -It is used to map bytecode offsets to source code line #s (when needed -for tracebacks). - -The array is conceptually a list of - (bytecode offset increment, line number increment) -pairs. The details are important and delicate, best illustrated by example: - - byte code offset source code line number - 0 1 - 6 2 - 50 7 - 350 307 - 361 308 - -The first trick is that these numbers aren't stored, only the increments -from one row to the next (this doesn't really work, but it's a start): - - 0, 1, 6, 1, 44, 5, 300, 300, 11, 1 - -The second trick is that an unsigned byte can't hold negative values, or -values larger than 255, so (a) there's a deep assumption that byte code -offsets and their corresponding line #s both increase monotonically, and (b) -if at least one column jumps by more than 255 from one row to the next, more -than one pair is written to the table. In case #b, there's no way to know -from looking at the table later how many were written. That's the delicate -part. A user of c_lnotab desiring to find the source line number -corresponding to a bytecode address A should do something like this - - lineno = addr = 0 - for addr_incr, line_incr in c_lnotab: - addr += addr_incr - if addr > A: - return lineno - lineno += line_incr - -In order for this to work, when the addr field increments by more than 255, -the line # increment in each pair generated must be 0 until the remaining addr -increment is < 256. So, in the example above, assemble_lnotab (it used -to be called com_set_lineno) should not (as was actually done until 2.2) -expand 300, 300 to 255, 255, 45, 45, - but to 255, 0, 45, 255, 0, 45. -*/ +/* Appends a pair to the end of the line number table, a_lnotab, representing + the instruction's bytecode offset and line number. See + Objects/lnotab_notes.txt for the description of the line number table. */ static int assemble_lnotab(struct assembler *a, struct instr *i) Modified: python/branches/py3k/Python/traceback.c ============================================================================== --- python/branches/py3k/Python/traceback.c (original) +++ python/branches/py3k/Python/traceback.c Tue Jul 21 06:30:03 2009 @@ -114,8 +114,7 @@ Py_XINCREF(frame); tb->tb_frame = frame; tb->tb_lasti = frame->f_lasti; - tb->tb_lineno = PyCode_Addr2Line(frame->f_code, - frame->f_lasti); + tb->tb_lineno = PyFrame_GetLineNumber(frame); PyObject_GC_Track(tb); } return tb; From buildbot at python.org Tue Jul 21 06:58:05 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 04:58:05 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/1002 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_mailbox make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Tue Jul 21 07:04:01 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 05:04:01 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1213 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_binhex make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Tue Jul 21 07:23:51 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 21 Jul 2009 05:23:51 -0000 Subject: [Python-checkins] r74133 - in python/branches/py3k: Python/ceval.c Message-ID: Author: alexandre.vassalotti Date: Tue Jul 21 07:23:51 2009 New Revision: 74133 Log: Merged revisions 73750 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73750 | benjamin.peterson | 2009-07-01 19:45:19 -0400 (Wed, 01 Jul 2009) | 1 line small optimization: avoid popping the current block until we have to ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Python/ceval.c Modified: python/branches/py3k/Python/ceval.c ============================================================================== --- python/branches/py3k/Python/ceval.c (original) +++ python/branches/py3k/Python/ceval.c Tue Jul 21 07:23:51 2009 @@ -2839,19 +2839,18 @@ fast_block_end: while (why != WHY_NOT && f->f_iblock > 0) { - PyTryBlock *b = PyFrame_BlockPop(f); + /* Peek at the current block. */ + PyTryBlock *b = &f->f_blockstack[f->f_iblock - 1]; assert(why != WHY_YIELD); if (b->b_type == SETUP_LOOP && why == WHY_CONTINUE) { - /* For a continue inside a try block, - don't pop the block for the loop. */ - PyFrame_BlockSetup(f, b->b_type, b->b_handler, - b->b_level); why = WHY_NOT; JUMPTO(PyLong_AS_LONG(retval)); Py_DECREF(retval); break; } + /* Now we have to pop the block. */ + f->f_iblock--; if (b->b_type == EXCEPT_HANDLER) { UNWIND_EXCEPT_HANDLER(b); From python-checkins at python.org Tue Jul 21 08:27:14 2009 From: python-checkins at python.org (thomas.heller) Date: Tue, 21 Jul 2009 06:27:14 -0000 Subject: [Python-checkins] r74134 - in python/trunk: Lib/ctypes/test/test_bitfields.py Misc/NEWS Modules/_ctypes/cfield.c Message-ID: Author: thomas.heller Date: Tue Jul 21 08:27:14 2009 New Revision: 74134 Log: Issue #6493: Fix a ctypes problem setting bitfields more than 31 bits wide. Modified: python/trunk/Lib/ctypes/test/test_bitfields.py python/trunk/Misc/NEWS python/trunk/Modules/_ctypes/cfield.c Modified: python/trunk/Lib/ctypes/test/test_bitfields.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_bitfields.py (original) +++ python/trunk/Lib/ctypes/test/test_bitfields.py Tue Jul 21 08:27:14 2009 @@ -240,5 +240,20 @@ _anonymous_ = ["_"] _fields_ = [("_", X)] + def test_uint32(self): + class X(Structure): + _fields_ = [("a", c_uint32, 32)] + x = X() + x.a = 10 + self.failUnlessEqual(x.a, 10) + + def test_uint64(self): + class X(Structure): + _fields_ = [("a", c_uint64, 64)] + x = X() + x.a = 10 + self.failUnlessEqual(x.a, 10) + + if __name__ == "__main__": unittest.main() Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Tue Jul 21 08:27:14 2009 @@ -349,6 +349,8 @@ Library ------- +- Issue #6493: Fix a ctypes problem setting bitfields more than 31 bits wide. + - unittest has been split up into a package. All old names should still work. - Issue #6431: Make Fraction type return NotImplemented when it doesn't Modified: python/trunk/Modules/_ctypes/cfield.c ============================================================================== --- python/trunk/Modules/_ctypes/cfield.c (original) +++ python/trunk/Modules/_ctypes/cfield.c Tue Jul 21 08:27:14 2009 @@ -426,9 +426,9 @@ #define LOW_BIT(x) ((x) & 0xFFFF) #define NUM_BITS(x) ((x) >> 16) -/* This seems nore a compiler issue than a Windows/non-Windows one */ +/* This seems more a compiler issue than a Windows/non-Windows one */ #ifdef MS_WIN32 -# define BIT_MASK(size) ((1 << NUM_BITS(size))-1) +# define BIT_MASK(size) ((1i64 << NUM_BITS(size))-1) #else # define BIT_MASK(size) ((1LL << NUM_BITS(size))-1) #endif From buildbot at python.org Tue Jul 21 08:53:36 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 06:53:36 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo trunk Message-ID: The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/5185 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_ctypes ====================================================================== FAIL: test_uint64 (ctypes.test.test_bitfields.BitFieldTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/ctypes/test/test_bitfields.py", line 255, in test_uint64 self.failUnlessEqual(x.a, 10) AssertionError: 0L != 10 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Tue Jul 21 09:01:07 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 07:01:07 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/327 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller BUILD FAILED: failed 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 524, in __bootstrap_inner self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 477, 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 306, 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 68, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') 1 test failed: test_ctypes ====================================================================== FAIL: test_uint64 (ctypes.test.test_bitfields.BitFieldTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/ctypes/test/test_bitfields.py", line 255, in test_uint64 self.failUnlessEqual(x.a, 10) AssertionError: 0L != 10 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Tue Jul 21 09:08:11 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 07:08:11 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1343 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_ctypes ====================================================================== FAIL: test_uint64 (ctypes.test.test_bitfields.BitFieldTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/trunk.heller-x86-osx5/build/Lib/ctypes/test/test_bitfields.py", line 255, in test_uint64 self.failUnlessEqual(x.a, 10) AssertionError: 0L != 10 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Tue Jul 21 14:51:07 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 21 Jul 2009 12:51:07 -0000 Subject: [Python-checkins] r74135 - in python/branches/py3k: Lib/lib2to3/tests/test_fixers.py Lib/lib2to3/tests/test_pytree.py Lib/lib2to3/tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Tue Jul 21 14:51:07 2009 New Revision: 74135 Log: Merged revisions 74117,74123 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ................ r74117 | benjamin.peterson | 2009-07-20 12:24:30 -0500 (Mon, 20 Jul 2009) | 9 lines Merged revisions 74116 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r74116 | benjamin.peterson | 2009-07-20 12:22:35 -0500 (Mon, 20 Jul 2009) | 1 line placate windows ........ ................ r74123 | benjamin.peterson | 2009-07-20 16:09:45 -0500 (Mon, 20 Jul 2009) | 13 lines Merged revisions 74121-74122 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r74121 | benjamin.peterson | 2009-07-20 15:40:59 -0500 (Mon, 20 Jul 2009) | 1 line try to make warning tests more robust ........ r74122 | benjamin.peterson | 2009-07-20 15:44:14 -0500 (Mon, 20 Jul 2009) | 1 line platform compat ........ ................ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/lib2to3/tests/test_fixers.py python/branches/py3k/Lib/lib2to3/tests/test_pytree.py python/branches/py3k/Lib/lib2to3/tests/test_refactor.py Modified: python/branches/py3k/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_fixers.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_fixers.py Tue Jul 21 14:51:07 2009 @@ -3556,7 +3556,7 @@ b = "import bar" a = "from . import bar" self.always_exists = False - self.present_files = set(["__init__.py", "bar/"]) + self.present_files = set(["__init__.py", "bar" + os.path.sep]) self.check(b, a) def test_comments_and_indent(self): Modified: python/branches/py3k/Lib/lib2to3/tests/test_pytree.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_pytree.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_pytree.py Tue Jul 21 14:51:07 2009 @@ -31,6 +31,7 @@ def test_deprecated_prefix_methods(self): l = pytree.Leaf(100, "foo") with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) self.assertEqual(l.get_prefix(), "") l.set_prefix("hi") self.assertEqual(l.prefix, "hi") Modified: python/branches/py3k/Lib/lib2to3/tests/test_refactor.py ============================================================================== --- python/branches/py3k/Lib/lib2to3/tests/test_refactor.py (original) +++ python/branches/py3k/Lib/lib2to3/tests/test_refactor.py Tue Jul 21 14:51:07 2009 @@ -46,6 +46,7 @@ def test_print_function_option(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) self.assertEqual(len(w), 1) msg, = w @@ -215,7 +216,7 @@ expected = ["hi.py"] check(tree, expected) tree = ["hi.py", - "a_dir/stuff.py"] + os.path.join("a_dir", "stuff.py")] check(tree, tree) def test_file_encoding(self): From python-checkins at python.org Tue Jul 21 14:55:58 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 21 Jul 2009 12:55:58 -0000 Subject: [Python-checkins] r74136 - in python/branches/release31-maint: Lib/lib2to3/fixer_base.py Lib/lib2to3/fixes/fix_import.py Lib/lib2to3/fixes/fix_imports.py Lib/lib2to3/fixes/fix_long.py Lib/lib2to3/fixes/fix_ne.py Lib/lib2to3/fixes/fix_numliterals.py Lib/lib2to3/fixes/fix_operator.py Lib/lib2to3/fixes/fix_print.py Lib/lib2to3/fixes/fix_urllib.py Lib/lib2to3/main.py Lib/lib2to3/patcomp.py Lib/lib2to3/pgen2/grammar.py Lib/lib2to3/pygram.py Lib/lib2to3/refactor.py Lib/lib2to3/tests/data/different_encoding.py Lib/lib2to3/tests/test_fixers.py Lib/lib2to3/tests/test_refactor.py Lib/lib2to3/tests/test_util.py Message-ID: Author: benjamin.peterson Date: Tue Jul 21 14:55:57 2009 New Revision: 74136 Log: merge 2to3 improvments Added: python/branches/release31-maint/Lib/lib2to3/fixes/fix_operator.py - copied unchanged from r74115, /python/branches/py3k/Lib/lib2to3/fixes/fix_operator.py Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/lib2to3/fixer_base.py python/branches/release31-maint/Lib/lib2to3/fixes/fix_import.py python/branches/release31-maint/Lib/lib2to3/fixes/fix_imports.py python/branches/release31-maint/Lib/lib2to3/fixes/fix_long.py python/branches/release31-maint/Lib/lib2to3/fixes/fix_ne.py python/branches/release31-maint/Lib/lib2to3/fixes/fix_numliterals.py python/branches/release31-maint/Lib/lib2to3/fixes/fix_print.py python/branches/release31-maint/Lib/lib2to3/fixes/fix_urllib.py python/branches/release31-maint/Lib/lib2to3/main.py python/branches/release31-maint/Lib/lib2to3/patcomp.py python/branches/release31-maint/Lib/lib2to3/pgen2/grammar.py python/branches/release31-maint/Lib/lib2to3/pygram.py python/branches/release31-maint/Lib/lib2to3/refactor.py python/branches/release31-maint/Lib/lib2to3/tests/data/different_encoding.py python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py python/branches/release31-maint/Lib/lib2to3/tests/test_refactor.py python/branches/release31-maint/Lib/lib2to3/tests/test_util.py Modified: python/branches/release31-maint/Lib/lib2to3/fixer_base.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixer_base.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixer_base.py Tue Jul 21 14:55:57 2009 @@ -33,6 +33,8 @@ explicit = False # Is this ignored by refactor.py -f all? run_order = 5 # Fixers will be sorted by run order before execution # Lower numbers will be run first. + _accept_type = None # [Advanced and not public] This tells RefactoringTool + # which node type to accept when there's not a pattern. # Shortcut for access to Python grammar symbols syms = pygram.python_symbols Modified: python/branches/release31-maint/Lib/lib2to3/fixes/fix_import.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixes/fix_import.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixes/fix_import.py Tue Jul 21 14:55:57 2009 @@ -12,7 +12,7 @@ # Local imports from .. import fixer_base -from os.path import dirname, join, exists, pathsep +from os.path import dirname, join, exists, sep from ..fixer_util import FromImport, syms, token @@ -84,7 +84,7 @@ # so can't be a relative import. if not exists(join(dirname(base_path), '__init__.py')): return False - for ext in ['.py', pathsep, '.pyc', '.so', '.sl', '.pyd']: + for ext in ['.py', sep, '.pyc', '.so', '.sl', '.pyd']: if exists(base_path + ext): return True return False Modified: python/branches/release31-maint/Lib/lib2to3/fixes/fix_imports.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixes/fix_imports.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixes/fix_imports.py Tue Jul 21 14:55:57 2009 @@ -84,8 +84,6 @@ class FixImports(fixer_base.BaseFix): - order = "pre" # Pre-order tree traversal - # This is overridden in fix_imports2. mapping = MAPPING Modified: python/branches/release31-maint/Lib/lib2to3/fixes/fix_long.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixes/fix_long.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixes/fix_long.py Tue Jul 21 14:55:57 2009 @@ -5,18 +5,15 @@ """ # Local imports -from .. import fixer_base -from ..fixer_util import Name, Number, is_probably_builtin +from lib2to3 import fixer_base +from lib2to3.fixer_util import is_probably_builtin class FixLong(fixer_base.BaseFix): PATTERN = "'long'" - static_int = Name("int") - def transform(self, node, results): if is_probably_builtin(node): - new = self.static_int.clone() - new.prefix = node.prefix - return new + node.value = "int" + node.changed() Modified: python/branches/release31-maint/Lib/lib2to3/fixes/fix_ne.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixes/fix_ne.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixes/fix_ne.py Tue Jul 21 14:55:57 2009 @@ -12,9 +12,11 @@ class FixNe(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NOTEQUAL + def match(self, node): # Override - return node.type == token.NOTEQUAL and node.value == "<>" + return node.value == "<>" def transform(self, node, results): new = pytree.Leaf(token.NOTEQUAL, "!=", prefix=node.prefix) Modified: python/branches/release31-maint/Lib/lib2to3/fixes/fix_numliterals.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixes/fix_numliterals.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixes/fix_numliterals.py Tue Jul 21 14:55:57 2009 @@ -12,10 +12,11 @@ class FixNumliterals(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NUMBER + def match(self, node): # Override - return (node.type == token.NUMBER and - (node.value.startswith("0") or node.value[-1] in "Ll")) + return (node.value.startswith("0") or node.value[-1] in "Ll") def transform(self, node, results): val = node.value Modified: python/branches/release31-maint/Lib/lib2to3/fixes/fix_print.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixes/fix_print.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixes/fix_print.py Tue Jul 21 14:55:57 2009 @@ -26,20 +26,15 @@ ) -class FixPrint(fixer_base.ConditionalFix): +class FixPrint(fixer_base.BaseFix): PATTERN = """ simple_stmt< any* bare='print' any* > | print_stmt """ - skip_on = '__future__.print_function' - def transform(self, node, results): assert results - if self.should_skip(node): - return - bare_print = results.get("bare") if bare_print: Modified: python/branches/release31-maint/Lib/lib2to3/fixes/fix_urllib.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/fixes/fix_urllib.py (original) +++ python/branches/release31-maint/Lib/lib2to3/fixes/fix_urllib.py Tue Jul 21 14:55:57 2009 @@ -12,13 +12,13 @@ MAPPING = {'urllib': [ ('urllib.request', ['URLOpener', 'FancyURLOpener', 'urlretrieve', - '_urlopener', 'urlopen', 'urlcleanup']), + '_urlopener', 'urlopen', 'urlcleanup', + 'pathname2url', 'url2pathname']), ('urllib.parse', ['quote', 'quote_plus', 'unquote', 'unquote_plus', - 'urlencode', 'pathname2url', 'url2pathname', 'splitattr', - 'splithost', 'splitnport', 'splitpasswd', 'splitport', - 'splitquery', 'splittag', 'splittype', 'splituser', - 'splitvalue', ]), + 'urlencode', 'splitattr', 'splithost', 'splitnport', + 'splitpasswd', 'splitport', 'splitquery', 'splittag', + 'splittype', 'splituser', 'splitvalue', ]), ('urllib.error', ['ContentTooShortError'])], 'urllib2' : [ Modified: python/branches/release31-maint/Lib/lib2to3/main.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/main.py (original) +++ python/branches/release31-maint/Lib/lib2to3/main.py Tue Jul 21 14:55:57 2009 @@ -4,19 +4,31 @@ import sys import os +import difflib import logging import shutil import optparse from . import refactor + +def diff_texts(a, b, filename): + """Return a unified diff of two strings.""" + a = a.splitlines() + b = b.splitlines() + return difflib.unified_diff(a, b, filename, filename, + "(original)", "(refactored)", + lineterm="") + + class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool): """ Prints output to stdout. """ - def __init__(self, fixers, options, explicit, nobackups): + def __init__(self, fixers, options, explicit, nobackups, show_diffs): self.nobackups = nobackups + self.show_diffs = show_diffs super(StdoutRefactoringTool, self).__init__(fixers, options, explicit) def log_error(self, msg, *args, **kwargs): @@ -42,9 +54,17 @@ if not self.nobackups: shutil.copymode(backup, filename) - def print_output(self, lines): - for line in lines: - print(line) + def print_output(self, old, new, filename, equal): + if equal: + self.log_message("No changes to %s", filename) + else: + self.log_message("Refactored %s", filename) + if self.show_diffs: + for line in diff_texts(old, new, filename): + print(line) + +def warn(msg): + print >> sys.stderr, "WARNING: %s" % (msg,) def main(fixer_pkg, args=None): @@ -70,9 +90,12 @@ parser.add_option("-l", "--list-fixes", action="store_true", help="List available transformations (fixes/fix_*.py)") parser.add_option("-p", "--print-function", action="store_true", - help="Modify the grammar so that print() is a function") + help="DEPRECATED Modify the grammar so that print() is " + "a function") parser.add_option("-v", "--verbose", action="store_true", help="More verbose logging") + parser.add_option("--no-diffs", action="store_true", + help="Don't show diffs of the refactoring") parser.add_option("-w", "--write", action="store_true", help="Write back modified files") parser.add_option("-n", "--nobackups", action="store_true", default=False, @@ -81,6 +104,11 @@ # Parse command line arguments refactor_stdin = False options, args = parser.parse_args(args) + if not options.write and options.no_diffs: + warn("not writing files and not printing diffs; that's not very useful") + if options.print_function: + warn("-p is deprecated; " + "detection of from __future__ import print_function is automatic") if not options.write and options.nobackups: parser.error("Can't use -n without -w") if options.list_fixes: @@ -104,7 +132,6 @@ logging.basicConfig(format='%(name)s: %(message)s', level=level) # Initialize the refactoring tool - rt_opts = {"print_function" : options.print_function} avail_fixes = set(refactor.get_fixers_from_package(fixer_pkg)) unwanted_fixes = set(fixer_pkg + ".fix_" + fix for fix in options.nofix) explicit = set() @@ -119,8 +146,8 @@ else: requested = avail_fixes.union(explicit) fixer_names = requested.difference(unwanted_fixes) - rt = StdoutRefactoringTool(sorted(fixer_names), rt_opts, sorted(explicit), - options.nobackups) + rt = StdoutRefactoringTool(sorted(fixer_names), None, sorted(explicit), + options.nobackups, not options.no_diffs) # Refactor all files and directories passed as arguments if not rt.errors: Modified: python/branches/release31-maint/Lib/lib2to3/patcomp.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/patcomp.py (original) +++ python/branches/release31-maint/Lib/lib2to3/patcomp.py Tue Jul 21 14:55:57 2009 @@ -14,7 +14,7 @@ import os # Fairly local imports -from .pgen2 import driver, literals, token, tokenize, parse +from .pgen2 import driver, literals, token, tokenize, parse, grammar # Really local imports from . import pytree @@ -138,7 +138,7 @@ node = nodes[0] if node.type == token.STRING: value = str(literals.evalString(node.value)) - return pytree.LeafPattern(content=value) + return pytree.LeafPattern(_type_of_literal(value), value) elif node.type == token.NAME: value = node.value if value.isupper(): @@ -179,6 +179,15 @@ "TOKEN": None} +def _type_of_literal(value): + if value[0].isalpha(): + return token.NAME + elif value in grammar.opmap: + return grammar.opmap[value] + else: + return None + + def pattern_convert(grammar, raw_node_info): """Converts raw node information to a Node or Leaf instance.""" type, value, context, children = raw_node_info Modified: python/branches/release31-maint/Lib/lib2to3/pgen2/grammar.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/pgen2/grammar.py (original) +++ python/branches/release31-maint/Lib/lib2to3/pgen2/grammar.py Tue Jul 21 14:55:57 2009 @@ -97,6 +97,19 @@ f.close() self.__dict__.update(d) + def copy(self): + """ + Copy the grammar. + """ + new = self.__class__() + for dict_attr in ("symbol2number", "number2symbol", "dfas", "keywords", + "tokens", "symbol2label"): + setattr(new, dict_attr, getattr(self, dict_attr).copy()) + new.labels = self.labels[:] + new.states = self.states[:] + new.start = self.start + return new + def report(self): """Dump the grammar tables to standard output, for debugging.""" from pprint import pprint Modified: python/branches/release31-maint/Lib/lib2to3/pygram.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/pygram.py (original) +++ python/branches/release31-maint/Lib/lib2to3/pygram.py Tue Jul 21 14:55:57 2009 @@ -28,4 +28,8 @@ python_grammar = driver.load_grammar(_GRAMMAR_FILE) + python_symbols = Symbols(python_grammar) + +python_grammar_no_print_statement = python_grammar.copy() +del python_grammar_no_print_statement.keywords["print"] Modified: python/branches/release31-maint/Lib/lib2to3/refactor.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/refactor.py (original) +++ python/branches/release31-maint/Lib/lib2to3/refactor.py Tue Jul 21 14:55:57 2009 @@ -14,14 +14,15 @@ # Python imports import os import sys -import difflib import logging import operator -from collections import defaultdict +import collections +import io +import warnings from itertools import chain # Local imports -from .pgen2 import driver, tokenize +from .pgen2 import driver, tokenize, token from . import pytree, pygram @@ -37,7 +38,12 @@ fix_names.append(name[:-3]) return fix_names -def get_head_types(pat): + +class _EveryNode(Exception): + pass + + +def _get_head_types(pat): """ Accepts a pytree Pattern Node and returns a set of the pattern types which will match first. """ @@ -45,34 +51,50 @@ # NodePatters must either have no type and no content # or a type and content -- so they don't get any farther # Always return leafs + if pat.type is None: + raise _EveryNode return set([pat.type]) if isinstance(pat, pytree.NegatedPattern): if pat.content: - return get_head_types(pat.content) - return set([None]) # Negated Patterns don't have a type + return _get_head_types(pat.content) + raise _EveryNode # Negated Patterns don't have a type if isinstance(pat, pytree.WildcardPattern): # Recurse on each node in content r = set() for p in pat.content: for x in p: - r.update(get_head_types(x)) + r.update(_get_head_types(x)) return r raise Exception("Oh no! I don't understand pattern %s" %(pat)) -def get_headnode_dict(fixer_list): + +def _get_headnode_dict(fixer_list): """ Accepts a list of fixers and returns a dictionary of head node type --> fixer list. """ - head_nodes = defaultdict(list) + head_nodes = collections.defaultdict(list) + every = [] for fixer in fixer_list: - if not fixer.pattern: - head_nodes[None].append(fixer) - continue - for t in get_head_types(fixer.pattern): - head_nodes[t].append(fixer) - return head_nodes + if fixer.pattern: + try: + heads = _get_head_types(fixer.pattern) + except _EveryNode: + every.append(fixer) + else: + for node_type in heads: + head_nodes[node_type].append(fixer) + else: + if fixer._accept_type is not None: + head_nodes[fixer._accept_type].append(fixer) + else: + every.append(fixer) + for node_type in chain(pygram.python_grammar.symbol2number.values(), + pygram.python_grammar.tokens): + head_nodes[node_type].extend(every) + return dict(head_nodes) + def get_fixers_from_package(pkg_name): """ @@ -101,13 +123,56 @@ _to_system_newlines = _identity +def _detect_future_print(source): + have_docstring = False + gen = tokenize.generate_tokens(io.StringIO(source).readline) + def advance(): + tok = next(gen) + return tok[0], tok[1] + ignore = frozenset((token.NEWLINE, tokenize.NL, token.COMMENT)) + try: + while True: + tp, value = advance() + if tp in ignore: + continue + elif tp == token.STRING: + if have_docstring: + break + have_docstring = True + elif tp == token.NAME: + if value == "from": + tp, value = advance() + if tp != token.NAME and value != "__future__": + break + tp, value = advance() + if tp != token.NAME and value != "import": + break + tp, value = advance() + if tp == token.OP and value == "(": + tp, value = advance() + while tp == token.NAME: + if value == "print_function": + return True + tp, value = advance() + if tp != token.OP and value != ",": + break + tp, value = advance() + else: + break + else: + break + except StopIteration: + pass + return False + + class FixerError(Exception): """A fixer could not be loaded.""" class RefactoringTool(object): - _default_options = {"print_function": False} + _default_options = {} CLASS_PREFIX = "Fix" # The prefix for fixer classes FILE_PREFIX = "fix_" # The prefix for modules with a fixer within @@ -124,20 +189,21 @@ self.explicit = explicit or [] self.options = self._default_options.copy() if options is not None: + if "print_function" in options: + warnings.warn("the 'print_function' option is deprecated", + DeprecationWarning) self.options.update(options) self.errors = [] self.logger = logging.getLogger("RefactoringTool") self.fixer_log = [] self.wrote = False - if self.options["print_function"]: - del pygram.python_grammar.keywords["print"] self.driver = driver.Driver(pygram.python_grammar, convert=pytree.convert, logger=self.logger) self.pre_order, self.post_order = self.get_fixers() - self.pre_order_heads = get_headnode_dict(self.pre_order) - self.post_order_heads = get_headnode_dict(self.post_order) + self.pre_order_heads = _get_headnode_dict(self.pre_order) + self.post_order_heads = _get_headnode_dict(self.post_order) self.files = [] # List of files that were or should be modified @@ -196,8 +262,9 @@ msg = msg % args self.logger.debug(msg) - def print_output(self, lines): - """Called with lines of output to give to the user.""" + def print_output(self, old_text, new_text, filename, equal): + """Called with the old version, new version, and filename of a + refactored file.""" pass def refactor(self, items, write=False, doctests_only=False): @@ -220,7 +287,8 @@ dirnames.sort() filenames.sort() for name in filenames: - if not name.startswith(".") and name.endswith("py"): + if not name.startswith(".") and \ + os.path.splitext(name)[1].endswith("py"): fullname = os.path.join(dirpath, name) self.refactor_file(fullname, write, doctests_only) # Modify dirnames in-place to remove subdirs with leading dots @@ -276,12 +344,16 @@ An AST corresponding to the refactored input stream; None if there were errors during the parse. """ + if _detect_future_print(data): + self.driver.grammar = pygram.python_grammar_no_print_statement try: tree = self.driver.parse_string(data) except Exception as err: self.log_error("Can't parse %s: %s: %s", name, err.__class__.__name__, err) return + finally: + self.driver.grammar = pygram.python_grammar self.log_debug("Refactoring %s", name) self.refactor_tree(tree, name) return tree @@ -338,12 +410,11 @@ if not fixers: return for node in traversal: - for fixer in fixers[node.type] + fixers[None]: + for fixer in fixers[node.type]: results = fixer.match(node) if results: new = fixer.transform(node, results) - if new is not None and (new != node or - str(new) != str(node)): + if new is not None: node.replace(new) node = new @@ -357,10 +428,11 @@ old_text = self._read_python_source(filename)[0] if old_text is None: return - if old_text == new_text: + equal = old_text == new_text + self.print_output(old_text, new_text, filename, equal) + if equal: self.log_debug("No changes to %s", filename) return - self.print_output(diff_texts(old_text, new_text, filename)) if write: self.write_file(new_text, filename, old_text, encoding) else: @@ -582,12 +654,3 @@ else: return super(MultiprocessRefactoringTool, self).refactor_file( *args, **kwargs) - - -def diff_texts(a, b, filename): - """Return a unified diff of two strings.""" - a = a.splitlines() - b = b.splitlines() - return difflib.unified_diff(a, b, filename, filename, - "(original)", "(refactored)", - lineterm="") Modified: python/branches/release31-maint/Lib/lib2to3/tests/data/different_encoding.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/data/different_encoding.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/data/different_encoding.py Tue Jul 21 14:55:57 2009 @@ -1,3 +1,6 @@ #!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -print u'??????????????????????????????????????????????????????????????' +# -*- coding: utf-8 -*- +print u'????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????' + +def f(x): + print '%s\t-> ??(%2i):%s ??(%s)' Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py Tue Jul 21 14:55:57 2009 @@ -18,8 +18,6 @@ def setUp(self, fix_list=None, fixer_pkg="lib2to3", options=None): if fix_list is None: fix_list = [self.fixer] - if options is None: - options = {"print_function" : False} self.refactor = support.get_refactorer(fixer_pkg, fix_list, options) self.fixer_log = [] self.filename = "" @@ -58,8 +56,7 @@ def assert_runs_after(self, *names): fixes = [self.fixer] fixes.extend(names) - options = {"print_function" : False} - r = support.get_refactorer("lib2to3", fixes, options) + r = support.get_refactorer("lib2to3", fixes) (pre, post) = r.get_fixers() n = "fix_" + self.fixer if post and post[-1].__class__.__module__.endswith(n): @@ -379,18 +376,15 @@ self.unchanged(s) def test_idempotency_print_as_function(self): - print_stmt = pygram.python_grammar.keywords.pop("print") - try: - s = """print(1, 1+1, 1+1+1)""" - self.unchanged(s) + self.refactor.driver.grammar = pygram.python_grammar_no_print_statement + s = """print(1, 1+1, 1+1+1)""" + self.unchanged(s) - s = """print()""" - self.unchanged(s) + s = """print()""" + self.unchanged(s) - s = """print('')""" - self.unchanged(s) - finally: - pygram.python_grammar.keywords["print"] = print_stmt + s = """print('')""" + self.unchanged(s) def test_1(self): b = """print 1, 1+1, 1+1+1""" @@ -462,31 +456,15 @@ a = """print(file=sys.stderr)""" self.check(b, a) - # With from __future__ import print_function def test_with_future_print_function(self): - # XXX: These tests won't actually do anything until the parser - # is fixed so it won't crash when it sees print(x=y). - # When #2412 is fixed, the try/except block can be taken - # out and the tests can be run like normal. - # MvL: disable entirely for now, so that it doesn't print to stdout - return - try: - s = "from __future__ import print_function\n"\ - "print('Hai!', end=' ')" - self.unchanged(s) + s = "from __future__ import print_function\n" \ + "print('Hai!', end=' ')" + self.unchanged(s) - b = "print 'Hello, world!'" - a = "print('Hello, world!')" - self.check(b, a) + b = "print 'Hello, world!'" + a = "print('Hello, world!')" + self.check(b, a) - s = "from __future__ import *\n"\ - "print('Hai!', end=' ')" - self.unchanged(s) - except: - return - else: - self.assertFalse(True, "#2421 has been fixed -- printing tests "\ - "need to be updated!") class Test_exec(FixerTestCase): fixer = "exec" @@ -1705,6 +1683,11 @@ for key in ('dbhash', 'dumbdbm', 'dbm', 'gdbm'): self.modules[key] = mapping1[key] + def test_after_local_imports_refactoring(self): + for fix in ("imports", "imports2"): + self.fixer = fix + self.assert_runs_after("import") + class Test_urllib(FixerTestCase): fixer = "urllib" @@ -3504,6 +3487,7 @@ s = "from itertools import foo" self.unchanged(s) + class Test_import(FixerTestCase): fixer = "import" @@ -3538,8 +3522,7 @@ self.always_exists = False self.present_files = set(['__init__.py']) - expected_extensions = ('.py', os.path.pathsep, '.pyc', '.so', - '.sl', '.pyd') + expected_extensions = ('.py', os.path.sep, '.pyc', '.so', '.sl', '.pyd') names_to_test = (p("/spam/eggs.py"), "ni.py", p("../../shrubbery.py")) for name in names_to_test: @@ -3569,6 +3552,13 @@ self.present_files = set(["__init__.py", "bar.py"]) self.check(b, a) + def test_import_from_package(self): + b = "import bar" + a = "from . import bar" + self.always_exists = False + self.present_files = set(["__init__.py", "bar/"]) + self.check(b, a) + def test_comments_and_indent(self): b = "import bar # Foo" a = "from . import bar # Foo" @@ -4095,3 +4085,26 @@ b = """os.getcwdu ( )""" a = """os.getcwd ( )""" self.check(b, a) + + +class Test_operator(FixerTestCase): + + fixer = "operator" + + def test_operator_isCallable(self): + b = "operator.isCallable(x)" + a = "hasattr(x, '__call__')" + self.check(b, a) + + def test_operator_sequenceIncludes(self): + b = "operator.sequenceIncludes(x, y)" + a = "operator.contains(x, y)" + self.check(b, a) + + def test_bare_isCallable(self): + s = "isCallable(x)" + self.warns_unchanged(s, "You should use hasattr(x, '__call__') here.") + + def test_bare_sequenceIncludes(self): + s = "sequenceIncludes(x, y)" + self.warns_unchanged(s, "You should use operator.contains here.") Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_refactor.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_refactor.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_refactor.py Tue Jul 21 14:55:57 2009 @@ -7,9 +7,12 @@ import operator import io import tempfile +import shutil import unittest +import warnings from lib2to3 import refactor, pygram, fixer_base +from lib2to3.pgen2 import token from . import support @@ -42,14 +45,11 @@ return refactor.RefactoringTool(fixers, options, explicit) def test_print_function_option(self): - gram = pygram.python_grammar - save = gram.keywords["print"] - try: - rt = self.rt({"print_function" : True}) - self.assertRaises(KeyError, operator.itemgetter("print"), - gram.keywords) - finally: - gram.keywords["print"] = save + with warnings.catch_warnings(record=True) as w: + refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) + self.assertEqual(len(w), 1) + msg, = w + self.assertTrue(msg.category is DeprecationWarning) def test_fixer_loading_helpers(self): contents = ["explicit", "first", "last", "parrot", "preorder"] @@ -61,19 +61,63 @@ self.assertEqual(full_names, ["myfixes.fix_" + name for name in contents]) + def test_detect_future_print(self): + run = refactor._detect_future_print + self.assertFalse(run("")) + self.assertTrue(run("from __future__ import print_function")) + self.assertFalse(run("from __future__ import generators")) + self.assertFalse(run("from __future__ import generators, feature")) + input = "from __future__ import generators, print_function" + self.assertTrue(run(input)) + input ="from __future__ import print_function, generators" + self.assertTrue(run(input)) + input = "from __future__ import (print_function,)" + self.assertTrue(run(input)) + input = "from __future__ import (generators, print_function)" + self.assertTrue(run(input)) + input = "from __future__ import (generators, nested_scopes)" + self.assertFalse(run(input)) + input = """from __future__ import generators +from __future__ import print_function""" + self.assertTrue(run(input)) + self.assertFalse(run("from")) + self.assertFalse(run("from 4")) + self.assertFalse(run("from x")) + self.assertFalse(run("from x 5")) + self.assertFalse(run("from x im")) + self.assertFalse(run("from x import")) + self.assertFalse(run("from x import 4")) + input = "'docstring'\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "'docstring'\n'somng'\nfrom __future__ import print_function" + self.assertFalse(run(input)) + input = "# comment\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "# comment\n'doc'\nfrom __future__ import print_function" + self.assertTrue(run(input)) + input = "class x: pass\nfrom __future__ import print_function" + self.assertFalse(run(input)) + def test_get_headnode_dict(self): class NoneFix(fixer_base.BaseFix): - PATTERN = None + pass class FileInputFix(fixer_base.BaseFix): PATTERN = "file_input< any * >" + class SimpleFix(fixer_base.BaseFix): + PATTERN = "'name'" + no_head = NoneFix({}, []) with_head = FileInputFix({}, []) - d = refactor.get_headnode_dict([no_head, with_head]) - expected = {None: [no_head], - pygram.python_symbols.file_input : [with_head]} - self.assertEqual(d, expected) + simple = SimpleFix({}, []) + d = refactor._get_headnode_dict([no_head, with_head, simple]) + top_fixes = d.pop(pygram.python_symbols.file_input) + self.assertEqual(top_fixes, [with_head, no_head]) + name_fixes = d.pop(token.NAME) + self.assertEqual(name_fixes, [simple, no_head]) + for fixes in d.values(): + self.assertEqual(fixes, [no_head]) def test_fixer_loading(self): from myfixes.fix_first import FixFirst @@ -106,10 +150,10 @@ class MyRT(refactor.RefactoringTool): - def print_output(self, lines): - diff_lines.extend(lines) + def print_output(self, old_text, new_text, filename, equal): + results.extend([old_text, new_text, filename, equal]) - diff_lines = [] + results = [] rt = MyRT(_DEFAULT_FIXERS) save = sys.stdin sys.stdin = io.StringIO("def parrot(): pass\n\n") @@ -117,12 +161,10 @@ rt.refactor_stdin() finally: sys.stdin = save - expected = """--- (original) -+++ (refactored) -@@ -1,2 +1,2 @@ --def parrot(): pass -+def cheese(): pass""".splitlines() - self.assertEqual(diff_lines[:-1], expected) + expected = ["def parrot(): pass\n\n", + "def cheese(): pass\n\n", + "", False] + self.assertEqual(results, expected) def check_file_refactoring(self, test_file, fixers=_2TO3_FIXERS): def read_file(): @@ -145,6 +187,37 @@ test_file = os.path.join(FIXER_DIR, "parrot_example.py") self.check_file_refactoring(test_file, _DEFAULT_FIXERS) + def test_refactor_dir(self): + def check(structure, expected): + def mock_refactor_file(self, f, *args): + got.append(f) + save_func = refactor.RefactoringTool.refactor_file + refactor.RefactoringTool.refactor_file = mock_refactor_file + rt = self.rt() + got = [] + dir = tempfile.mkdtemp(prefix="2to3-test_refactor") + try: + os.mkdir(os.path.join(dir, "a_dir")) + for fn in structure: + open(os.path.join(dir, fn), "wb").close() + rt.refactor_dir(dir) + finally: + refactor.RefactoringTool.refactor_file = save_func + shutil.rmtree(dir) + self.assertEqual(got, + [os.path.join(dir, path) for path in expected]) + check([], []) + tree = ["nothing", + "hi.py", + ".dumb", + ".after.py", + "sappy"] + expected = ["hi.py"] + check(tree, expected) + tree = ["hi.py", + "a_dir/stuff.py"] + check(tree, tree) + def test_file_encoding(self): fn = os.path.join(TEST_DATA_DIR, "different_encoding.py") self.check_file_refactoring(fn) Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_util.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_util.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_util.py Tue Jul 21 14:55:57 2009 @@ -1,4 +1,4 @@ -""" Test suite for the code in fixes.util """ +""" Test suite for the code in fixer_util """ # Testing imports from . import support @@ -7,10 +7,10 @@ import os.path # Local imports -from .. import pytree -from .. import fixer_util -from ..fixer_util import Attr, Name - +from lib2to3.pytree import Node, Leaf +from lib2to3 import fixer_util +from lib2to3.fixer_util import Attr, Name, Call, Comma +from lib2to3.pgen2 import token def parse(code, strip_levels=0): # The topmost node is file_input, which we don't care about. @@ -24,7 +24,7 @@ class MacroTestCase(support.TestCase): def assertStr(self, node, string): if isinstance(node, (tuple, list)): - node = pytree.Node(fixer_util.syms.simple_stmt, node) + node = Node(fixer_util.syms.simple_stmt, node) self.assertEqual(str(node), string) @@ -78,6 +78,31 @@ self.assertStr(Name("a", prefix="b"), "ba") +class Test_Call(MacroTestCase): + def _Call(self, name, args=None, prefix=None): + """Help the next test""" + children = [] + if isinstance(args, list): + for arg in args: + children.append(arg) + children.append(Comma()) + children.pop() + return Call(Name(name), children, prefix) + + def test(self): + kids = [None, + [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 2), + Leaf(token.NUMBER, 3)], + [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 3), + Leaf(token.NUMBER, 2), Leaf(token.NUMBER, 4)], + [Leaf(token.STRING, "b"), Leaf(token.STRING, "j", prefix=" ")] + ] + self.assertStr(self._Call("A"), "A()") + self.assertStr(self._Call("b", kids[1]), "b(1,2,3)") + self.assertStr(self._Call("a.b().c", kids[2]), "a.b().c(1,3,2,4)") + self.assertStr(self._Call("d", kids[3], prefix=" "), " d(b, j)") + + class Test_does_tree_import(support.TestCase): def _find_bind_rec(self, name, node): # Search a tree for a binding -- used to find the starting From python-checkins at python.org Tue Jul 21 15:13:16 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 21 Jul 2009 13:13:16 -0000 Subject: [Python-checkins] r74137 - in python/branches/release31-maint: Lib/lib2to3/tests/test_fixers.py Lib/lib2to3/tests/test_pytree.py Lib/lib2to3/tests/test_refactor.py Message-ID: Author: benjamin.peterson Date: Tue Jul 21 15:13:16 2009 New Revision: 74137 Log: Merged revisions 74135 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74135 | benjamin.peterson | 2009-07-21 07:51:07 -0500 (Tue, 21 Jul 2009) | 31 lines Merged revisions 74117,74123 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ................ r74117 | benjamin.peterson | 2009-07-20 12:24:30 -0500 (Mon, 20 Jul 2009) | 9 lines Merged revisions 74116 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r74116 | benjamin.peterson | 2009-07-20 12:22:35 -0500 (Mon, 20 Jul 2009) | 1 line placate windows ........ ................ r74123 | benjamin.peterson | 2009-07-20 16:09:45 -0500 (Mon, 20 Jul 2009) | 13 lines Merged revisions 74121-74122 via svnmerge from svn+ssh://pythondev at svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r74121 | benjamin.peterson | 2009-07-20 15:40:59 -0500 (Mon, 20 Jul 2009) | 1 line try to make warning tests more robust ........ r74122 | benjamin.peterson | 2009-07-20 15:44:14 -0500 (Mon, 20 Jul 2009) | 1 line platform compat ........ ................ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py python/branches/release31-maint/Lib/lib2to3/tests/test_pytree.py python/branches/release31-maint/Lib/lib2to3/tests/test_refactor.py Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_fixers.py Tue Jul 21 15:13:16 2009 @@ -3556,7 +3556,7 @@ b = "import bar" a = "from . import bar" self.always_exists = False - self.present_files = set(["__init__.py", "bar/"]) + self.present_files = set(["__init__.py", "bar" + os.path.sep]) self.check(b, a) def test_comments_and_indent(self): Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_pytree.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_pytree.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_pytree.py Tue Jul 21 15:13:16 2009 @@ -31,6 +31,7 @@ def test_deprecated_prefix_methods(self): l = pytree.Leaf(100, "foo") with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) self.assertEqual(l.get_prefix(), "") l.set_prefix("hi") self.assertEqual(l.prefix, "hi") Modified: python/branches/release31-maint/Lib/lib2to3/tests/test_refactor.py ============================================================================== --- python/branches/release31-maint/Lib/lib2to3/tests/test_refactor.py (original) +++ python/branches/release31-maint/Lib/lib2to3/tests/test_refactor.py Tue Jul 21 15:13:16 2009 @@ -46,6 +46,7 @@ def test_print_function_option(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) self.assertEqual(len(w), 1) msg, = w @@ -215,7 +216,7 @@ expected = ["hi.py"] check(tree, expected) tree = ["hi.py", - "a_dir/stuff.py"] + os.path.join("a_dir", "stuff.py")] check(tree, tree) def test_file_encoding(self): From buildbot at python.org Tue Jul 21 15:49:25 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 13:49:25 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.1 Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.1/builds/26 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: benjamin.peterson,brett.cannon BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_import ====================================================================== FAIL: test_execute_bit_not_copied (test.test_import.ImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.1.heller-x86-osx5/build/Lib/test/test_import.py", line 103, in test_execute_bit_not_copied stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) AssertionError: 420 != 292 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Tue Jul 21 16:03:55 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 21 Jul 2009 14:03:55 -0000 Subject: [Python-checkins] r74138 - in python/branches/release31-maint: Lib/test/test_re.py Message-ID: Author: r.david.murray Date: Tue Jul 21 16:03:55 2009 New Revision: 74138 Log: Merged revisions 74118 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74118 | r.david.murray | 2009-07-20 13:34:54 -0400 (Mon, 20 Jul 2009) | 5 lines Remove apparently unneeded and un-cleaned-up munging of sys.path from test_re. Tests pass on my machine without it, and I can't see any obvious place in the tests that would need it. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_re.py Modified: python/branches/release31-maint/Lib/test/test_re.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_re.py (original) +++ python/branches/release31-maint/Lib/test/test_re.py Tue Jul 21 16:03:55 2009 @@ -1,6 +1,3 @@ -import sys -sys.path = ['.'] + sys.path - from test.support import verbose, run_unittest import re from re import Scanner From python-checkins at python.org Tue Jul 21 16:08:40 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 21 Jul 2009 14:08:40 -0000 Subject: [Python-checkins] r74139 - python/trunk/Objects/dictobject.c Message-ID: Author: benjamin.peterson Date: Tue Jul 21 16:08:40 2009 New Revision: 74139 Log: must use _PyThreadState_Current so it isn't checked for NULL #6530 Modified: python/trunk/Objects/dictobject.c Modified: python/trunk/Objects/dictobject.c ============================================================================== --- python/trunk/Objects/dictobject.c (original) +++ python/trunk/Objects/dictobject.c Tue Jul 21 16:08:40 2009 @@ -712,10 +712,12 @@ } } - /* We can arrive here with a NULL tstate during initialization: - try running "python -Wi" for an example related to string - interning. Let's just hope that no exception occurs then... */ - tstate = PyThreadState_GET(); + /* We can arrive here with a NULL tstate during initialization: try + running "python -Wi" for an example related to string interning. + Let's just hope that no exception occurs then... This must be + _PyThreadState_Current and not PyThreadState_GET() because in debug + mode, it complains if tstate is NULL. */ + tstate = _PyThreadState_Current; if (tstate != NULL && tstate->curexc_type != NULL) { /* preserve the existing exception */ PyObject *err_type, *err_value, *err_tb; From python-checkins at python.org Tue Jul 21 16:11:28 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 21 Jul 2009 14:11:28 -0000 Subject: [Python-checkins] r74140 - in python/branches/py3k: Objects/dictobject.c Message-ID: Author: benjamin.peterson Date: Tue Jul 21 16:11:27 2009 New Revision: 74140 Log: Merged revisions 74139 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74139 | benjamin.peterson | 2009-07-21 09:08:40 -0500 (Tue, 21 Jul 2009) | 1 line must use _PyThreadState_Current so it isn't checked for NULL #6530 ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Objects/dictobject.c Modified: python/branches/py3k/Objects/dictobject.c ============================================================================== --- python/branches/py3k/Objects/dictobject.c (original) +++ python/branches/py3k/Objects/dictobject.c Tue Jul 21 16:11:27 2009 @@ -714,10 +714,12 @@ } } - /* We can arrive here with a NULL tstate during initialization: - try running "python -Wi" for an example related to string - interning. Let's just hope that no exception occurs then... */ - tstate = PyThreadState_GET(); + /* We can arrive here with a NULL tstate during initialization: try + running "python -Wi" for an example related to string interning. + Let's just hope that no exception occurs then... This must be + _PyThreadState_Current and not PyThreadState_GET() because in debug + mode, it complains if tstate is NULL. */ + tstate = _PyThreadState_Current; if (tstate != NULL && tstate->curexc_type != NULL) { /* preserve the existing exception */ PyObject *err_type, *err_value, *err_tb; From python-checkins at python.org Tue Jul 21 16:16:14 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 21 Jul 2009 14:16:14 -0000 Subject: [Python-checkins] r74141 - in python/branches/release31-maint: Objects/dictobject.c Message-ID: Author: benjamin.peterson Date: Tue Jul 21 16:16:13 2009 New Revision: 74141 Log: Merged revisions 74140 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74140 | benjamin.peterson | 2009-07-21 09:11:27 -0500 (Tue, 21 Jul 2009) | 9 lines Merged revisions 74139 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74139 | benjamin.peterson | 2009-07-21 09:08:40 -0500 (Tue, 21 Jul 2009) | 1 line must use _PyThreadState_Current so it isn't checked for NULL #6530 ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Objects/dictobject.c Modified: python/branches/release31-maint/Objects/dictobject.c ============================================================================== --- python/branches/release31-maint/Objects/dictobject.c (original) +++ python/branches/release31-maint/Objects/dictobject.c Tue Jul 21 16:16:13 2009 @@ -714,10 +714,12 @@ } } - /* We can arrive here with a NULL tstate during initialization: - try running "python -Wi" for an example related to string - interning. Let's just hope that no exception occurs then... */ - tstate = PyThreadState_GET(); + /* We can arrive here with a NULL tstate during initialization: try + running "python -Wi" for an example related to string interning. + Let's just hope that no exception occurs then... This must be + _PyThreadState_Current and not PyThreadState_GET() because in debug + mode, it complains if tstate is NULL. */ + tstate = _PyThreadState_Current; if (tstate != NULL && tstate->curexc_type != NULL) { /* preserve the existing exception */ PyObject *err_type, *err_value, *err_tb; From python-checkins at python.org Tue Jul 21 16:23:11 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 21 Jul 2009 14:23:11 -0000 Subject: [Python-checkins] r74142 - in python/branches/release26-maint: Doc/library/os.rst Doc/library/stat.rst Message-ID: Author: r.david.murray Date: Tue Jul 21 16:23:11 2009 New Revision: 74142 Log: Merged revisions 73778 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73778 | r.david.murray | 2009-07-02 14:19:20 -0400 (Thu, 02 Jul 2009) | 3 lines Issue 6389: add documentation for the 'mode' flags defined in the stat module. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/os.rst python/branches/release26-maint/Doc/library/stat.rst Modified: python/branches/release26-maint/Doc/library/os.rst ============================================================================== --- python/branches/release26-maint/Doc/library/os.rst (original) +++ python/branches/release26-maint/Doc/library/os.rst Tue Jul 21 16:23:11 2009 @@ -854,25 +854,25 @@ combinations of them: - * ``stat.S_ISUID`` - * ``stat.S_ISGID`` - * ``stat.S_ENFMT`` - * ``stat.S_ISVTX`` - * ``stat.S_IREAD`` - * ``stat.S_IWRITE`` - * ``stat.S_IEXEC`` - * ``stat.S_IRWXU`` - * ``stat.S_IRUSR`` - * ``stat.S_IWUSR`` - * ``stat.S_IXUSR`` - * ``stat.S_IRWXG`` - * ``stat.S_IRGRP`` - * ``stat.S_IWGRP`` - * ``stat.S_IXGRP`` - * ``stat.S_IRWXO`` - * ``stat.S_IROTH`` - * ``stat.S_IWOTH`` - * ``stat.S_IXOTH`` + * :data:`stat.S_ISUID` + * :data:`stat.S_ISGID` + * :data:`stat.S_ENFMT` + * :data:`stat.S_ISVTX` + * :data:`stat.S_IREAD` + * :data:`stat.S_IWRITE` + * :data:`stat.S_IEXEC` + * :data:`stat.S_IRWXU` + * :data:`stat.S_IRUSR` + * :data:`stat.S_IWUSR` + * :data:`stat.S_IXUSR` + * :data:`stat.S_IRWXG` + * :data:`stat.S_IRGRP` + * :data:`stat.S_IWGRP` + * :data:`stat.S_IXGRP` + * :data:`stat.S_IRWXO` + * :data:`stat.S_IROTH` + * :data:`stat.S_IWOTH` + * :data:`stat.S_IXOTH` Availability: Unix, Windows. Modified: python/branches/release26-maint/Doc/library/stat.rst ============================================================================== --- python/branches/release26-maint/Doc/library/stat.rst (original) +++ python/branches/release26-maint/Doc/library/stat.rst Tue Jul 21 16:23:11 2009 @@ -137,6 +137,131 @@ of the size field for other character and block devices varies more, depending on the implementation of the underlying system call. +The variables below define the flags used in the :data:`ST_MODE` field. + +Use of the functions above is more portable than use of the first set of flags: + +.. data:: S_IFMT + + Bit mask for the file type bit fields. + +.. data:: S_IFSOCK + + Socket. + +.. data:: S_IFLNK + + Symbolic link. + +.. data:: S_IFREG + + Regular file. + +.. data:: S_IFBLK + + Block device. + +.. data:: S_IFDIR + + Directory. + +.. data:: S_IFCHR + + Character device. + +.. data:: S_IFIFO + + FIFO. + +The following flags can also be used in the *mode* argument of :func:`os.chmod`: + +.. data:: S_ISUID + + Set UID bit. + +.. data:: S_ISGID + + Set-group-ID bit. This bit has several special uses. For a directory + it indicates that BSD semantics is to be used for that directory: + files created there inherit their group ID from the directory, not + from the effective group ID of the creating process, and directories + created there will also get the :data:`S_ISGID` bit set. For a + file that does not have the group execution bit (:data:`S_IXGRP`) + set, the set-group-ID bit indicates mandatory file/record locking + (see also :data:`S_ENFMT`). + +.. data:: S_ISVTX + + Sticky bit. When this bit is set on a directory it means that a file + in that directory can be renamed or deleted only by the owner of the + file, by the owner of the directory, or by a privileged process. + +.. data:: S_IRWXU + + Mask for file owner permissions. + +.. data:: S_IRUSR + + Owner has read permission. + +.. data:: S_IWUSR + + Owner has write permission. + +.. data:: S_IXUSR + + Owner has execute permission. + +.. data:: S_IRWXG + + Mask for group permissions. + +.. data:: S_IRGRP + + Group has read permission. + +.. data:: S_IWGRP + + Group has write permission. + +.. data:: S_IXGRP + + Group has execute permission. + +.. data:: S_IRWXO + + Mask for permissions for others (not in group). + +.. data:: S_IROTH + + Others have read permission. + +.. data:: S_IWOTH + + Others have write permission. + +.. data:: S_IXOTH + + Others have execute permission. + +.. data:: S_ENFMT + + System V file locking enforcement. This flag is shared with :data:`S_ISGID`: + file/record locking is enforced on files that do not have the group + execution bit (:data:`S_IXGRP`) set. + +.. data:: S_IREAD + + Unix V7 synonym for :data:`S_IRUSR`. + +.. data:: S_IWRITE + + Unix V7 synonym for :data:`S_IWUSR`. + +.. data:: S_IEXEC + + Unix V7 synonym for :data:`S_IXUSR`. + Example:: import os, sys From python-checkins at python.org Tue Jul 21 16:29:59 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 21 Jul 2009 14:29:59 -0000 Subject: [Python-checkins] r74143 - in python/branches/release31-maint: Doc/library/exceptions.rst Doc/library/os.rst Doc/library/stat.rst Message-ID: Author: r.david.murray Date: Tue Jul 21 16:29:59 2009 New Revision: 74143 Log: Merged revisions 74128 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74128 | alexandre.vassalotti | 2009-07-20 20:51:58 -0400 (Mon, 20 Jul 2009) | 14 lines Merged revisions 73706,73778 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73706 | georg.brandl | 2009-06-30 12:18:55 -0400 (Tue, 30 Jun 2009) | 1 line #6384: Add a heading for the exception hierarchy. ........ r73778 | r.david.murray | 2009-07-02 14:19:20 -0400 (Thu, 02 Jul 2009) | 3 lines Issue 6389: add documentation for the 'mode' flags defined in the stat module. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/exceptions.rst python/branches/release31-maint/Doc/library/os.rst python/branches/release31-maint/Doc/library/stat.rst Modified: python/branches/release31-maint/Doc/library/exceptions.rst ============================================================================== --- python/branches/release31-maint/Doc/library/exceptions.rst (original) +++ python/branches/release31-maint/Doc/library/exceptions.rst Tue Jul 21 16:29:59 2009 @@ -422,6 +422,8 @@ Base class for warnings related to :class:`bytes` and :class:`buffer`. +Exception hierarchy +------------------- The class hierarchy for built-in exceptions is: Modified: python/branches/release31-maint/Doc/library/os.rst ============================================================================== --- python/branches/release31-maint/Doc/library/os.rst (original) +++ python/branches/release31-maint/Doc/library/os.rst Tue Jul 21 16:29:59 2009 @@ -755,25 +755,25 @@ following values (as defined in the :mod:`stat` module) or bitwise ORed combinations of them: - * ``stat.S_ISUID`` - * ``stat.S_ISGID`` - * ``stat.S_ENFMT`` - * ``stat.S_ISVTX`` - * ``stat.S_IREAD`` - * ``stat.S_IWRITE`` - * ``stat.S_IEXEC`` - * ``stat.S_IRWXU`` - * ``stat.S_IRUSR`` - * ``stat.S_IWUSR`` - * ``stat.S_IXUSR`` - * ``stat.S_IRWXG`` - * ``stat.S_IRGRP`` - * ``stat.S_IWGRP`` - * ``stat.S_IXGRP`` - * ``stat.S_IRWXO`` - * ``stat.S_IROTH`` - * ``stat.S_IWOTH`` - * ``stat.S_IXOTH`` + * :data:`stat.S_ISUID` + * :data:`stat.S_ISGID` + * :data:`stat.S_ENFMT` + * :data:`stat.S_ISVTX` + * :data:`stat.S_IREAD` + * :data:`stat.S_IWRITE` + * :data:`stat.S_IEXEC` + * :data:`stat.S_IRWXU` + * :data:`stat.S_IRUSR` + * :data:`stat.S_IWUSR` + * :data:`stat.S_IXUSR` + * :data:`stat.S_IRWXG` + * :data:`stat.S_IRGRP` + * :data:`stat.S_IWGRP` + * :data:`stat.S_IXGRP` + * :data:`stat.S_IRWXO` + * :data:`stat.S_IROTH` + * :data:`stat.S_IWOTH` + * :data:`stat.S_IXOTH` Availability: Unix, Windows. Modified: python/branches/release31-maint/Doc/library/stat.rst ============================================================================== --- python/branches/release31-maint/Doc/library/stat.rst (original) +++ python/branches/release31-maint/Doc/library/stat.rst Tue Jul 21 16:29:59 2009 @@ -137,6 +137,131 @@ of the size field for other character and block devices varies more, depending on the implementation of the underlying system call. +The variables below define the flags used in the :data:`ST_MODE` field. + +Use of the functions above is more portable than use of the first set of flags: + +.. data:: S_IFMT + + Bit mask for the file type bit fields. + +.. data:: S_IFSOCK + + Socket. + +.. data:: S_IFLNK + + Symbolic link. + +.. data:: S_IFREG + + Regular file. + +.. data:: S_IFBLK + + Block device. + +.. data:: S_IFDIR + + Directory. + +.. data:: S_IFCHR + + Character device. + +.. data:: S_IFIFO + + FIFO. + +The following flags can also be used in the *mode* argument of :func:`os.chmod`: + +.. data:: S_ISUID + + Set UID bit. + +.. data:: S_ISGID + + Set-group-ID bit. This bit has several special uses. For a directory + it indicates that BSD semantics is to be used for that directory: + files created there inherit their group ID from the directory, not + from the effective group ID of the creating process, and directories + created there will also get the :data:`S_ISGID` bit set. For a + file that does not have the group execution bit (:data:`S_IXGRP`) + set, the set-group-ID bit indicates mandatory file/record locking + (see also :data:`S_ENFMT`). + +.. data:: S_ISVTX + + Sticky bit. When this bit is set on a directory it means that a file + in that directory can be renamed or deleted only by the owner of the + file, by the owner of the directory, or by a privileged process. + +.. data:: S_IRWXU + + Mask for file owner permissions. + +.. data:: S_IRUSR + + Owner has read permission. + +.. data:: S_IWUSR + + Owner has write permission. + +.. data:: S_IXUSR + + Owner has execute permission. + +.. data:: S_IRWXG + + Mask for group permissions. + +.. data:: S_IRGRP + + Group has read permission. + +.. data:: S_IWGRP + + Group has write permission. + +.. data:: S_IXGRP + + Group has execute permission. + +.. data:: S_IRWXO + + Mask for permissions for others (not in group). + +.. data:: S_IROTH + + Others have read permission. + +.. data:: S_IWOTH + + Others have write permission. + +.. data:: S_IXOTH + + Others have execute permission. + +.. data:: S_ENFMT + + System V file locking enforcement. This flag is shared with :data:`S_ISGID`: + file/record locking is enforced on files that do not have the group + execution bit (:data:`S_IXGRP`) set. + +.. data:: S_IREAD + + Unix V7 synonym for :data:`S_IRUSR`. + +.. data:: S_IWRITE + + Unix V7 synonym for :data:`S_IWUSR`. + +.. data:: S_IEXEC + + Unix V7 synonym for :data:`S_IXUSR`. + Example:: import os, sys From python-checkins at python.org Tue Jul 21 16:37:38 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 21 Jul 2009 14:37:38 -0000 Subject: [Python-checkins] r74144 - in python/branches/release26-maint: Doc/library/exceptions.rst Message-ID: Author: r.david.murray Date: Tue Jul 21 16:37:38 2009 New Revision: 74144 Log: Merged revisions 73706 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73706 | georg.brandl | 2009-06-30 12:18:55 -0400 (Tue, 30 Jun 2009) | 1 line #6384: Add a heading for the exception hierarchy. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/exceptions.rst Modified: python/branches/release26-maint/Doc/library/exceptions.rst ============================================================================== --- python/branches/release26-maint/Doc/library/exceptions.rst (original) +++ python/branches/release26-maint/Doc/library/exceptions.rst Tue Jul 21 16:37:38 2009 @@ -477,7 +477,10 @@ .. versionadded:: 2.5 -The class hierarchy for built-in exceptions is: +Exception hierarchy +------------------- + +The class hierarchy for built-in exceptions is: .. literalinclude:: ../../Lib/test/exception_hierarchy.txt From buildbot at python.org Tue Jul 21 17:21:45 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 15:21:45 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/1005 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed failed slave lost sincerely, -The Buildbot From buildbot at python.org Tue Jul 21 17:57:08 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 15:57:08 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.1 Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.1/builds/23 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: benjamin.peterson,brett.cannon BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_lib2to3 ====================================================================== FAIL: test_import_from_package (lib2to3.tests.test_fixers.Test_import) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\lib2to3\tests\test_fixers.py", line 3560, in test_import_from_package self.check(b, a) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\lib2to3\tests\test_fixers.py", line 37, in check tree = self._check(before, after) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\lib2to3\tests\test_fixers.py", line 33, in _check self.assertEqual(after, str(tree)) AssertionError: 'from . import bar\n\n' != 'import bar\n\n' ====================================================================== FAIL: test_deprecated_prefix_methods (lib2to3.tests.test_pytree.TestNodes) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\lib2to3\tests\test_pytree.py", line 37, in test_deprecated_prefix_methods self.assertEqual(len(w), 2) AssertionError: 0 != 2 ====================================================================== FAIL: test_print_function_option (lib2to3.tests.test_refactor.TestRefactoringTool) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\lib2to3\tests\test_refactor.py", line 50, in test_print_function_option self.assertEqual(len(w), 1) AssertionError: 0 != 1 ====================================================================== FAIL: test_refactor_dir (lib2to3.tests.test_refactor.TestRefactoringTool) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\lib2to3\tests\test_refactor.py", line 219, in test_refactor_dir check(tree, tree) File "E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\lib2to3\tests\test_refactor.py", line 208, in check [os.path.join(dir, path) for path in expected]) AssertionError: Lists differ: ['c:\\docume~1\\db3l\\locals~1... != ['c:\\docume~1\\db3l\\locals~1... sincerely, -The Buildbot From g.brandl at gmx.net Tue Jul 21 18:56:03 2009 From: g.brandl at gmx.net (Georg Brandl) Date: Tue, 21 Jul 2009 18:56:03 +0200 Subject: [Python-checkins] r74139 - python/trunk/Objects/dictobject.c In-Reply-To: <36059.4243779362$1248185333@news.gmane.org> References: <36059.4243779362$1248185333@news.gmane.org> Message-ID: benjamin.peterson schrieb: > Author: benjamin.peterson > Date: Tue Jul 21 16:08:40 2009 > New Revision: 74139 > > Log: > must use _PyThreadState_Current so it isn't checked for NULL #6530 > > Modified: > python/trunk/Objects/dictobject.c > > Modified: python/trunk/Objects/dictobject.c > ============================================================================== > --- python/trunk/Objects/dictobject.c (original) > +++ python/trunk/Objects/dictobject.c Tue Jul 21 16:08:40 2009 > @@ -712,10 +712,12 @@ > } > } > > - /* We can arrive here with a NULL tstate during initialization: > - try running "python -Wi" for an example related to string > - interning. Let's just hope that no exception occurs then... */ > - tstate = PyThreadState_GET(); > + /* We can arrive here with a NULL tstate during initialization: try > + running "python -Wi" for an example related to string interning. > + Let's just hope that no exception occurs then... This must be > + _PyThreadState_Current and not PyThreadState_GET() because in debug > + mode, it complains if tstate is NULL. */ ^^ Maybe this could be "the latter" to avoid confusion? 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 Tue Jul 21 19:02:15 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 21 Jul 2009 17:02:15 -0000 Subject: [Python-checkins] r74145 - in python/branches/release26-maint: Doc/library/multiprocessing.rst Lib/multiprocessing/process.py Lib/test/test_multiprocessing.py Misc/ACKS Misc/NEWS Message-ID: Author: r.david.murray Date: Tue Jul 21 19:02:14 2009 New Revision: 74145 Log: Merged revisions 73708,73738 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73708 | jesse.noller | 2009-06-30 13:11:52 -0400 (Tue, 30 Jun 2009) | 1 line Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes ........ r73738 | r.david.murray | 2009-06-30 22:49:10 -0400 (Tue, 30 Jun 2009) | 2 lines Make punctuation prettier and break up run-on sentence. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/multiprocessing.rst python/branches/release26-maint/Lib/multiprocessing/process.py python/branches/release26-maint/Lib/test/test_multiprocessing.py python/branches/release26-maint/Misc/ACKS python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Doc/library/multiprocessing.rst ============================================================================== --- python/branches/release26-maint/Doc/library/multiprocessing.rst (original) +++ python/branches/release26-maint/Doc/library/multiprocessing.rst Tue Jul 21 19:02:14 2009 @@ -2087,6 +2087,38 @@ for i in range(10): Process(target=f, args=(lock,)).start() +Beware replacing sys.stdin with a "file like object" + + :mod:`multiprocessing` originally unconditionally called:: + + os.close(sys.stdin.fileno()) + + in the :meth:`multiprocessing.Process._bootstrap` method --- this resulted + in issues with processes-in-processes. This has been changed to:: + + sys.stdin.close() + sys.stdin = open(os.devnull) + + Which solves the fundamental issue of processes colliding with each other + resulting in a bad file descriptor error, but introduces a potential danger + to applications which replace :func:`sys.stdin` with a "file-like object" + with output buffering. This danger is that if multiple processes call + :func:`close()` on this file-like object, it could result in the same + data being flushed to the object multiple times, resulting in corruption. + + If you write a file-like object and implement your own caching, you can + make it fork-safe by storing the pid whenever you append to the cache, + and discarding the cache when the pid changes. For example:: + + @property + def cache(self): + pid = os.getpid() + if pid != self._pid: + self._pid = pid + self._cache = [] + return self._cache + + For more information, see :issue:`5155`, :issue:`5313` and :issue:`5331` Windows ~~~~~~~ Modified: python/branches/release26-maint/Lib/multiprocessing/process.py ============================================================================== --- python/branches/release26-maint/Lib/multiprocessing/process.py (original) +++ python/branches/release26-maint/Lib/multiprocessing/process.py Tue Jul 21 19:02:14 2009 @@ -220,7 +220,8 @@ self._children = set() self._counter = itertools.count(1) try: - os.close(sys.stdin.fileno()) + sys.stdin.close() + sys.stdin = open(os.devnull) except (OSError, ValueError): pass _current_process = self Modified: python/branches/release26-maint/Lib/test/test_multiprocessing.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_multiprocessing.py (original) +++ python/branches/release26-maint/Lib/test/test_multiprocessing.py Tue Jul 21 19:02:14 2009 @@ -17,6 +17,7 @@ import socket import random import logging +from StringIO import StringIO # Work around broken sem_open implementations @@ -1829,7 +1830,73 @@ multiprocessing.connection.answer_challenge, _FakeConnection(), b'abc') -testcases_other = [OtherTest, TestInvalidHandle] +# +# Issue 5155, 5313, 5331: Test process in processes +# Verifies os.close(sys.stdin.fileno) vs. sys.stdin.close() behavior +# + +def _ThisSubProcess(q): + try: + item = q.get(block=False) + except Queue.Empty: + pass + +def _TestProcess(q): + queue = multiprocessing.Queue() + subProc = multiprocessing.Process(target=_ThisSubProcess, args=(queue,)) + subProc.start() + subProc.join() + +def _afunc(x): + return x*x + +def pool_in_process(): + pool = multiprocessing.Pool(processes=4) + x = pool.map(_afunc, [1, 2, 3, 4, 5, 6, 7]) + +class _file_like(object): + def __init__(self, delegate): + self._delegate = delegate + self._pid = None + + @property + def cache(self): + pid = os.getpid() + # There are no race conditions since fork keeps only the running thread + if pid != self._pid: + self._pid = pid + self._cache = [] + return self._cache + + def write(self, data): + self.cache.append(data) + + def flush(self): + self._delegate.write(''.join(self.cache)) + self._cache = [] + +class TestStdinBadfiledescriptor(unittest.TestCase): + + def test_queue_in_process(self): + queue = multiprocessing.Queue() + proc = multiprocessing.Process(target=_TestProcess, args=(queue,)) + proc.start() + proc.join() + + def test_pool_in_process(self): + p = multiprocessing.Process(target=pool_in_process) + p.start() + p.join() + + def test_flushing(self): + sio = StringIO() + flike = _file_like(sio) + flike.write('foo') + proc = multiprocessing.Process(target=lambda: flike.flush()) + flike.flush() + assert sio.getvalue() == 'foo' + +testcases_other = [OtherTest, TestInvalidHandle, TestStdinBadfiledescriptor] # # Modified: python/branches/release26-maint/Misc/ACKS ============================================================================== --- python/branches/release26-maint/Misc/ACKS (original) +++ python/branches/release26-maint/Misc/ACKS Tue Jul 21 19:02:14 2009 @@ -45,6 +45,7 @@ Ulf Bartelt Nick Bastin Jeff Bauer +Mike Bayer Michael R Bax Anthony Baxter Samuel L. Bayer @@ -178,6 +179,7 @@ Dean Draayer John DuBois Paul Dubois +Graham Dumpleton Quinn Dunkan Robin Dunn Luke Dunstan @@ -536,6 +538,7 @@ Santiago Peres?n Mark Perrego Trevor Perrin +Gabriel de Perthuis Tim Peters Benjamin Peterson Chris Petrilli Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Tue Jul 21 19:02:14 2009 @@ -65,6 +65,10 @@ Library ------- +- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was + unconditionally calling "os.close(sys.stdin.fileno())" resulting in file + descriptor errors + - Issue #6415: Fixed warnings.warn sagfault on bad formatted string. - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. From python-checkins at python.org Tue Jul 21 19:06:28 2009 From: python-checkins at python.org (r.david.murray) Date: Tue, 21 Jul 2009 17:06:28 -0000 Subject: [Python-checkins] r74146 - python/branches/release26-maint Message-ID: Author: r.david.murray Date: Tue Jul 21 19:06:28 2009 New Revision: 74146 Log: Blocked revisions 71041 via svnmerge ........ r71041 | jesse.noller | 2009-04-02 01:17:26 -0400 (Thu, 02 Apr 2009) | 1 line Add custom initializer argument to multiprocess.Manager*, courtesy of lekma ........ Modified: python/branches/release26-maint/ (props changed) From buildbot at python.org Tue Jul 21 19:55:08 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 17:55:08 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2350 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\threading.py", line 524, in __bootstrap_inner File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\threading.py", line 477, in run File "", line 7, in killer : 'NoneType' object is not callable 1 test failed: test_bsddb3 sincerely, -The Buildbot From python-checkins at python.org Tue Jul 21 21:04:02 2009 From: python-checkins at python.org (thomas.heller) Date: Tue, 21 Jul 2009 19:04:02 -0000 Subject: [Python-checkins] r74147 - in python/trunk: Lib/ctypes/test/test_bitfields.py Misc/NEWS Modules/_ctypes/cfield.c Message-ID: Author: thomas.heller Date: Tue Jul 21 21:04:02 2009 New Revision: 74147 Log: Revert rev 74134, as it does not completely fixx issue #6493. Modified: python/trunk/Lib/ctypes/test/test_bitfields.py python/trunk/Misc/NEWS python/trunk/Modules/_ctypes/cfield.c Modified: python/trunk/Lib/ctypes/test/test_bitfields.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_bitfields.py (original) +++ python/trunk/Lib/ctypes/test/test_bitfields.py Tue Jul 21 21:04:02 2009 @@ -240,20 +240,5 @@ _anonymous_ = ["_"] _fields_ = [("_", X)] - def test_uint32(self): - class X(Structure): - _fields_ = [("a", c_uint32, 32)] - x = X() - x.a = 10 - self.failUnlessEqual(x.a, 10) - - def test_uint64(self): - class X(Structure): - _fields_ = [("a", c_uint64, 64)] - x = X() - x.a = 10 - self.failUnlessEqual(x.a, 10) - - if __name__ == "__main__": unittest.main() Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Tue Jul 21 21:04:02 2009 @@ -349,8 +349,6 @@ Library ------- -- Issue #6493: Fix a ctypes problem setting bitfields more than 31 bits wide. - - unittest has been split up into a package. All old names should still work. - Issue #6431: Make Fraction type return NotImplemented when it doesn't Modified: python/trunk/Modules/_ctypes/cfield.c ============================================================================== --- python/trunk/Modules/_ctypes/cfield.c (original) +++ python/trunk/Modules/_ctypes/cfield.c Tue Jul 21 21:04:02 2009 @@ -426,9 +426,9 @@ #define LOW_BIT(x) ((x) & 0xFFFF) #define NUM_BITS(x) ((x) >> 16) -/* This seems more a compiler issue than a Windows/non-Windows one */ +/* This seems nore a compiler issue than a Windows/non-Windows one */ #ifdef MS_WIN32 -# define BIT_MASK(size) ((1i64 << NUM_BITS(size))-1) +# define BIT_MASK(size) ((1 << NUM_BITS(size))-1) #else # define BIT_MASK(size) ((1LL << NUM_BITS(size))-1) #endif From python-checkins at python.org Tue Jul 21 22:18:28 2009 From: python-checkins at python.org (ezio.melotti) Date: Tue, 21 Jul 2009 20:18:28 -0000 Subject: [Python-checkins] r74148 - python/trunk/Doc/howto/urllib2.rst Message-ID: Author: ezio.melotti Date: Tue Jul 21 22:18:27 2009 New Revision: 74148 Log: #6536 fixed typo Modified: python/trunk/Doc/howto/urllib2.rst Modified: python/trunk/Doc/howto/urllib2.rst ============================================================================== --- python/trunk/Doc/howto/urllib2.rst (original) +++ python/trunk/Doc/howto/urllib2.rst Tue Jul 21 22:18:27 2009 @@ -488,7 +488,7 @@ .. note:: - In the above example we only supplied our ``HHTPBasicAuthHandler`` to + In the above example we only supplied our ``HTTPBasicAuthHandler`` to ``build_opener``. By default openers have the handlers for normal situations -- ``ProxyHandler``, ``UnknownHandler``, ``HTTPHandler``, ``HTTPDefaultErrorHandler``, ``HTTPRedirectHandler``, ``FTPHandler``, From python-checkins at python.org Tue Jul 21 22:37:52 2009 From: python-checkins at python.org (ezio.melotti) Date: Tue, 21 Jul 2009 20:37:52 -0000 Subject: [Python-checkins] r74149 - in python/branches/py3k: Doc/howto/urllib2.rst Message-ID: Author: ezio.melotti Date: Tue Jul 21 22:37:52 2009 New Revision: 74149 Log: Merged revisions 74148 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74148 | ezio.melotti | 2009-07-21 23:18:27 +0300 (Tue, 21 Jul 2009) | 1 line #6536 fixed typo ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/howto/urllib2.rst Modified: python/branches/py3k/Doc/howto/urllib2.rst ============================================================================== --- python/branches/py3k/Doc/howto/urllib2.rst (original) +++ python/branches/py3k/Doc/howto/urllib2.rst Tue Jul 21 22:37:52 2009 @@ -493,7 +493,7 @@ .. note:: - In the above example we only supplied our ``HHTPBasicAuthHandler`` to + In the above example we only supplied our ``HTTPBasicAuthHandler`` to ``build_opener``. By default openers have the handlers for normal situations -- ``ProxyHandler``, ``UnknownHandler``, ``HTTPHandler``, ``HTTPDefaultErrorHandler``, ``HTTPRedirectHandler``, ``FTPHandler``, From buildbot at python.org Tue Jul 21 23:11:31 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 21:11:31 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1217 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: ezio.melotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_codecmaps_jp make: *** [buildbottest] Error 1 sincerely, -The Buildbot From nnorwitz at gmail.com Wed Jul 22 00:59:36 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 21 Jul 2009 18:59:36 -0400 Subject: [Python-checkins] Python Regression Test Failures opt (1) Message-ID: <20090721225936.GA31493@python.psfb.org> 339 tests OK. 1 test failed: test_distutils 35 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_curses test_epoll test_gl test_imgfile test_kqueue test_linuxaudiodev test_macos test_macostools test_multiprocessing test_ossaudiodev test_pep277 test_py3kwarn test_scriptpackages test_smtpnet test_socketserver test_startfile test_sunaudiodev test_tcl test_timeout test_tk test_ttk_guionly test_ttk_textonly test_unicode_file test_urllib2net test_urllibnet test_winreg test_winsound test_zipfile64 5 skips unexpected on linux2: test_ttk_guionly test_epoll test_ttk_textonly test_multiprocessing test_tk test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_unittest test_doctest test_doctest2 test_MimeWriter test_SimpleHTTPServer test_StringIO test___all__ test___future__ test__locale test_abc test_abstract_numbers test_aepack test_aepack skipped -- No module named aetypes test_aifc test_al test_al skipped -- No module named al test_anydbm test_applesingle test_applesingle skipped -- No module named MacOS test_array test_ascii_formatd test_ast test_asynchat test_asyncore 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_buffer test_bufio test_bytes test_bz2 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 test_cmd_line test_cmd_line_script 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_compileall test_compiler test_complex test_complex_args test_contains test_contextlib test_cookie test_cookielib test_copy test_copy_reg test_cpickle test_cprofile 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 [19533 refs] [19533 refs] [19533 refs] [19530 refs] test test_distutils failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.7/distutils/tests/test_extension.py", line 35, in test_extension_init self.assertRaises(AssertionError, Extension, 1, []) AssertionError: AssertionError not raised test_dl test_docxmlrpc test_dumbdbm test_dummy_thread test_dummy_threading test_email test_email_codecs test_email_renamed test_enumerate test_eof test_epoll test_epoll skipped -- kernel doesn't support epoll() test_errno test_exception_variations test_extcall test_fcntl test_file test_file2k test_filecmp test_fileinput test_fileio test_float test_fnmatch test_fork1 test_format test_fpformat test_fractions test_frozen test_ftplib test_funcattrs test_functools test_future test_future3 test_future4 test_future5 test_future_builtins 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_hmac test_hotshot test_htmllib test_htmlparser test_httplib test_httpservers [15412 refs] [15412 refs] [15412 refs] [25388 refs] test_imageop test_imaplib test_imgfile test_imgfile skipped -- No module named imgfile test_imp test_import test_importhooks test_importlib test_index test_inspect test_int test_int_literal test_io test_ioctl test_isinstance test_iter test_iterlen test_itertools test_json test_kqueue test_kqueue skipped -- test works only on BSD test_largefile test_lib2to3 test_linecache 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_macos test_macos skipped -- No module named MacOS test_macostools test_macostools skipped -- No module named MacOS test_macpath test_mailbox test_marshal test_math test_md5 test_memoryio test_memoryview test_mhlib test_mimetools test_mimetypes test_minidom test_mmap test_module test_modulefinder test_multibytecodec test_multibytecodec_support test_multifile test_multiprocessing test_multiprocessing skipped -- OSError raises on RLock creation, see issue 3111! test_mutants test_mutex test_netrc test_new test_nis test_normalization 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 Expecting 's_push: parser stack overflow' in next line s_push: parser stack overflow test_pdb 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_pipes test_pkg test_pkgimport test_pkgutil test_platform [16997 refs] [16997 refs] test_plistlib test_poll test_popen [15417 refs] [15417 refs] [15417 refs] test_popen2 test_poplib test_posix test_posixpath test_pow test_pprint test_print test_profile test_profilehooks test_property test_pstats test_pty test_pwd test_py3kwarn test_py3kwarn skipped -- test.test_py3kwarn must be run with the -3 flag test_pyclbr test_pydoc [20908 refs] [20908 refs] [20908 refs] [20908 refs] [20908 refs] [20907 refs] [20907 refs] test_pyexpat test_queue test_quopri [17938 refs] [17938 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 [15412 refs] [15412 refs] [15412 refs] [15412 refs] test_slice test_smtplib test_smtpnet test_smtpnet skipped -- Use of the `network' resource not enabled test_socket test_socketserver test_socketserver skipped -- Use of the `network' resource not enabled test_softspace test_sort test_sqlite test_ssl test_startfile test_startfile skipped -- module os has no attribute startfile test_str test_strftime test_string test_stringprep test_strop test_strptime test_struct test_structmembers test_structseq test_subprocess [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [17252 refs] [15627 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] . [15412 refs] [15412 refs] this bit of output is from a test of stdout in a different process ... [15412 refs] [15412 refs] [15627 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [17252 refs] [15627 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] [15412 refs] . [15412 refs] [15412 refs] this bit of output is from a test of stdout in a different process ... [15412 refs] [15412 refs] [15627 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [15412 refs] [15412 refs] [15641 refs] [15435 refs] test_tarfile test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [15415 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading [18725 refs] [21120 refs] [20096 refs] [20096 refs] [20096 refs] [20096 refs] test_threading_local test_threadsignals test_time test_timeout test_timeout skipped -- Use of the `network' resource not enabled test_tk test_tk skipped -- No module named _tkinter test_tokenize test_trace test_traceback test_transformer test_ttk_guionly test_ttk_guionly skipped -- No module named _tkinter test_ttk_textonly test_ttk_textonly skipped -- No module named _tkinter test_tuple test_typechecks test_ucn test_unary test_undocumented_details test_unicode test_unicode_file test_unicode_file skipped -- No Unicode filesystem semantics on this platform. test_unicodedata test_univnewlines test_univnewlines2k 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 /tmp/python-test/local/lib/python2.7/test/test_xmllib.py:24: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. import xmllib test_xmlrpc test_xpickle test_xpickle -- skipping backwards compat tests. Use 'regrtest.py -u xpickle' to run them. 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_zipimport_support test_zlib 339 tests OK. 1 test failed: test_distutils 35 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_curses test_epoll test_gl test_imgfile test_kqueue test_linuxaudiodev test_macos test_macostools test_multiprocessing test_ossaudiodev test_pep277 test_py3kwarn test_scriptpackages test_smtpnet test_socketserver test_startfile test_sunaudiodev test_tcl test_timeout test_tk test_ttk_guionly test_ttk_textonly test_unicode_file test_urllib2net test_urllibnet test_winreg test_winsound test_zipfile64 5 skips unexpected on linux2: test_ttk_guionly test_epoll test_ttk_textonly test_multiprocessing test_tk [775415 refs] From python-checkins at python.org Wed Jul 22 01:13:19 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 21 Jul 2009 23:13:19 -0000 Subject: [Python-checkins] r74150 - python/trunk/Makefile.pre.in Message-ID: Author: benjamin.peterson Date: Wed Jul 22 01:13:14 2009 New Revision: 74150 Log: install unittest as a package Modified: python/trunk/Makefile.pre.in Modified: python/trunk/Makefile.pre.in ============================================================================== --- python/trunk/Makefile.pre.in (original) +++ python/trunk/Makefile.pre.in Wed Jul 22 01:13:14 2009 @@ -838,6 +838,7 @@ ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \ distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ multiprocessing multiprocessing/dummy \ + unittest \ lib-old \ curses pydoc_data $(MACHDEPS) libinstall: build_all $(srcdir)/Lib/$(PLATDIR) From python-checkins at python.org Wed Jul 22 01:18:55 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 21 Jul 2009 23:18:55 -0000 Subject: [Python-checkins] r74151 - in python/branches/py3k: Makefile.pre.in Message-ID: Author: benjamin.peterson Date: Wed Jul 22 01:18:55 2009 New Revision: 74151 Log: Merged revisions 74150 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74150 | benjamin.peterson | 2009-07-21 18:13:14 -0500 (Tue, 21 Jul 2009) | 1 line install unittest as a package ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Makefile.pre.in Modified: python/branches/py3k/Makefile.pre.in ============================================================================== --- python/branches/py3k/Makefile.pre.in (original) +++ python/branches/py3k/Makefile.pre.in Wed Jul 22 01:18:55 2009 @@ -848,6 +848,7 @@ importlib/test/import_ importlib/test/source \ setuptools setuptools/command setuptools/tests setuptools.egg-info \ multiprocessing multiprocessing/dummy \ + unittest \ curses pydoc_data $(MACHDEPS) libinstall: build_all $(srcdir)/Lib/$(PLATDIR) @for i in $(SCRIPTDIR) $(LIBDEST); \ From buildbot at python.org Wed Jul 22 01:46:07 2009 From: buildbot at python.org (buildbot at python.org) Date: Tue, 21 Jul 2009 23:46:07 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo trunk Message-ID: The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%20trunk/builds/330 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,ezio.melotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_mailbox ====================================================================== FAIL: test_update (test.test_mailbox.TestMaildir) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/test/test_mailbox.py", line 362, in test_update self.assertTrue(len(self._box) == 3) AssertionError: False is not True make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Wed Jul 22 02:03:43 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 22 Jul 2009 00:03:43 -0000 Subject: [Python-checkins] r74152 - python/trunk/Doc/reference/simple_stmts.rst Message-ID: Author: benjamin.peterson Date: Wed Jul 22 02:03:43 2009 New Revision: 74152 Log: simplify Modified: python/trunk/Doc/reference/simple_stmts.rst Modified: python/trunk/Doc/reference/simple_stmts.rst ============================================================================== --- python/trunk/Doc/reference/simple_stmts.rst (original) +++ python/trunk/Doc/reference/simple_stmts.rst Wed Jul 22 02:03:43 2009 @@ -282,13 +282,13 @@ The simple form, ``assert expression``, is equivalent to :: - if __debug__: - if not expression: raise AssertionError + if __debug__ and not expression: + raise AssertionError The extended form, ``assert expression1, expression2``, is equivalent to :: - if __debug__: - if not expression1: raise AssertionError(expression2) + if __debug__ and not expression1: + raise AssertionError(expression2) .. index:: single: __debug__ From buildbot at python.org Wed Jul 22 02:10:54 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 22 Jul 2009 00:10:54 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 trunk Message-ID: The Buildbot has detected a new failure of x86 osx.5 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%20trunk/builds/1346 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,ezio.melotti BUILD FAILED: failed test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Wed Jul 22 02:19:57 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 00:19:57 -0000 Subject: [Python-checkins] r74153 - python/branches/py3k/Lib/test/support.py Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 02:19:57 2009 New Revision: 74153 Log: Fix open_urlresource() to pass its arguments to open() when the resource is cached. This fixes the failure of test_normalization on the Windows buildbots, where the Normalization.txt file was read as a MBCS text file, instead as a UTF-8 one. Modified: python/branches/py3k/Lib/test/support.py Modified: python/branches/py3k/Lib/test/support.py ============================================================================== --- python/branches/py3k/Lib/test/support.py (original) +++ python/branches/py3k/Lib/test/support.py Wed Jul 22 02:19:57 2009 @@ -455,7 +455,7 @@ fn = os.path.join(os.path.dirname(__file__), "data", filename) if os.path.exists(fn): - return open(fn) + return open(fn, *args, **kw) print('\tfetching %s ...' % url, file=get_original_stdout()) fn, _ = urllib.request.urlretrieve(url, fn) From python-checkins at python.org Wed Jul 22 02:30:24 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 00:30:24 -0000 Subject: [Python-checkins] r74154 - python/branches/py3k/Lib/test/test_normalization.py Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 02:30:24 2009 New Revision: 74154 Log: Make test_normalization verify the version of the correct test data file. Modified: python/branches/py3k/Lib/test/test_normalization.py Modified: python/branches/py3k/Lib/test/test_normalization.py ============================================================================== --- python/branches/py3k/Lib/test/test_normalization.py (original) +++ python/branches/py3k/Lib/test/test_normalization.py Wed Jul 22 02:30:24 2009 @@ -8,12 +8,14 @@ TESTDATAFILE = "NormalizationTest.txt" TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE -if os.path.exists(TESTDATAFILE): - f = open(TESTDATAFILE, encoding='utf-8') +# Verify we have the correct version of the test data file. +TESTDATAPATH = os.path.join(os.path.dirname(__file__), "data", TESTDATAFILE) +if os.path.exists(TESTDATAPATH): + f = open(TESTDATAPATH, encoding='utf-8') l = f.readline() f.close() if not unidata_version in l: - os.unlink(TESTDATAFILE) + os.unlink(testdatafile) class RangeError(Exception): pass @@ -95,7 +97,7 @@ def test_main(): - # Hit the exception early + # Skip the test early if the 'urlfetch' resource is not enabled. open_urlresource(TESTDATAURL) run_unittest(NormalizationTest) From nnorwitz at gmail.com Wed Jul 22 02:49:37 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 21 Jul 2009 20:49:37 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090722004937.GA11088@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 Less important issues: ---------------------- test_asynchat leaked [-139, 0, 0] references, sum=-139 test_cmd_line leaked [50, 0, 0] references, sum=50 test_popen2 leaked [54, -54, 29] references, sum=29 test_smtplib leaked [-190, 0, 0] references, sum=-190 test_socketserver leaked [0, 0, 69] references, sum=69 test_ssl leaked [-420, 420, 0] references, sum=0 test_sys leaked [0, -21, 21] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_urllib2_localnet leaked [0, 284, -284] references, sum=0 From alexandre at peadrop.com Wed Jul 22 03:10:29 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Tue, 21 Jul 2009 21:10:29 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) In-Reply-To: <20090722004937.GA11088@python.psfb.org> References: <20090722004937.GA11088@python.psfb.org> Message-ID: Hi Neal, Could you include the name of branch the tests were ran on in your future reports? Cheers, -- Alexandre On Tue, Jul 21, 2009 at 8:49 PM, Neal Norwitz wrote: > More important issues: > ---------------------- > test_io leaked [237, 237, 237] references, sum=711 > test_memoryio leaked [267, 267, 267] references, sum=801 > > Less important issues: > ---------------------- > test_asynchat leaked [-139, 0, 0] references, sum=-139 > test_cmd_line leaked [50, 0, 0] references, sum=50 > test_popen2 leaked [54, -54, 29] references, sum=29 > test_smtplib leaked [-190, 0, 0] references, sum=-190 > test_socketserver leaked [0, 0, 69] references, sum=69 > test_ssl leaked [-420, 420, 0] references, sum=0 > test_sys leaked [0, -21, 21] references, sum=0 > test_threading leaked [48, 48, 48] references, sum=144 > test_urllib2_localnet leaked [0, 284, -284] references, sum=0 > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins > From python-checkins at python.org Wed Jul 22 04:24:50 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 02:24:50 -0000 Subject: [Python-checkins] r74155 - in python/branches/py3k: Lib/test/test_memoryio.py Modules/_io/bytesio.c Modules/_io/stringio.c Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 04:24:49 2009 New Revision: 74155 Log: Issue #6242: Fix deallocator of io.StringIO and io.BytesIO. Modified: python/branches/py3k/Lib/test/test_memoryio.py python/branches/py3k/Modules/_io/bytesio.c python/branches/py3k/Modules/_io/stringio.c Modified: python/branches/py3k/Lib/test/test_memoryio.py ============================================================================== --- python/branches/py3k/Lib/test/test_memoryio.py (original) +++ python/branches/py3k/Lib/test/test_memoryio.py Wed Jul 22 04:24:49 2009 @@ -338,6 +338,13 @@ self.assertEqual(test1(), buf) self.assertEqual(test2(), buf) + def test_instance_dict_leak(self): + # Test case for issue #6242. + # This will be caught by regrtest.py -R if this leak. + for _ in range(100): + memio = self.ioclass() + memio.foo = 1 + class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase): Modified: python/branches/py3k/Modules/_io/bytesio.c ============================================================================== --- python/branches/py3k/Modules/_io/bytesio.c (original) +++ python/branches/py3k/Modules/_io/bytesio.c Wed Jul 22 04:24:49 2009 @@ -609,11 +609,14 @@ static void bytesio_dealloc(bytesio *self) { + _PyObject_GC_UNTRACK(self); if (self->buf != NULL) { PyMem_Free(self->buf); self->buf = NULL; } - Py_TYPE(self)->tp_clear((PyObject *)self); + Py_CLEAR(self->dict); + if (self->weakreflist != NULL) + PyObject_ClearWeakRefs((PyObject *) self); Py_TYPE(self)->tp_free(self); } @@ -667,7 +670,6 @@ bytesio_traverse(bytesio *self, visitproc visit, void *arg) { Py_VISIT(self->dict); - Py_VISIT(self->weakreflist); return 0; } @@ -675,8 +677,6 @@ bytesio_clear(bytesio *self) { Py_CLEAR(self->dict); - if (self->weakreflist != NULL) - PyObject_ClearWeakRefs((PyObject *)self); return 0; } Modified: python/branches/py3k/Modules/_io/stringio.c ============================================================================== --- python/branches/py3k/Modules/_io/stringio.c (original) +++ python/branches/py3k/Modules/_io/stringio.c Wed Jul 22 04:24:49 2009 @@ -509,11 +509,15 @@ stringio_dealloc(stringio *self) { _PyObject_GC_UNTRACK(self); + self->ok = 0; + if (self->buf) { + PyMem_Free(self->buf); + self->buf = NULL; + } Py_CLEAR(self->readnl); Py_CLEAR(self->writenl); Py_CLEAR(self->decoder); - if (self->buf) - PyMem_Free(self->buf); + Py_CLEAR(self->dict); if (self->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) self); Py_TYPE(self)->tp_free(self); From python-checkins at python.org Wed Jul 22 04:32:34 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 02:32:34 -0000 Subject: [Python-checkins] r74156 - python/branches/py3k/Lib/xmlrpc/client.py Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 04:32:34 2009 New Revision: 74156 Log: Issue #6360: Simplify string decoding in xmlrpc.client. Modified: python/branches/py3k/Lib/xmlrpc/client.py Modified: python/branches/py3k/Lib/xmlrpc/client.py ============================================================================== --- python/branches/py3k/Lib/xmlrpc/client.py (original) +++ python/branches/py3k/Lib/xmlrpc/client.py Wed Jul 22 04:32:34 2009 @@ -152,24 +152,11 @@ except ImportError: datetime = None -def _decode(data, encoding, is8bit=re.compile("[\x80-\xff]").search): - # decode non-ascii string (if possible) - if encoding and is8bit(data): - data = str(data, encoding) - return data - def escape(s): s = s.replace("&", "&") s = s.replace("<", "<") return s.replace(">", ">",) -def _stringify(string): - # convert to 7-bit ascii if possible - try: - return string.decode("ascii") - except (UnicodeError, TypeError, AttributeError): - return string - __version__ = "1.0.1" # xmlrpc integer limits @@ -755,8 +742,8 @@ def end_string(self, data): if self._encoding: - data = _decode(data, self._encoding) - self.append(_stringify(data)) + data = data.decode(self._encoding) + self.append(data) self._value = 0 dispatch["string"] = end_string dispatch["name"] = end_string # struct keys are always strings @@ -774,7 +761,7 @@ dict = {} items = self._stack[mark:] for i in range(0, len(items), 2): - dict[_stringify(items[i])] = items[i+1] + dict[items[i]] = items[i+1] self._stack[mark:] = [dict] self._value = 0 dispatch["struct"] = end_struct @@ -811,7 +798,7 @@ def end_methodName(self, data): if self._encoding: - data = _decode(data, self._encoding) + data = data.decode(self._encoding) self._methodname = data self._type = "methodName" # no params dispatch["methodName"] = end_methodName From buildbot at python.org Wed Jul 22 04:59:01 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 22 Jul 2009 02:59:01 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1220 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_cmd_line make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Wed Jul 22 05:07:33 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 03:07:33 -0000 Subject: [Python-checkins] r74157 - in python/branches/py3k: Lib/_pyio.py Lib/test/test_memoryio.py Modules/_io/stringio.c Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 05:07:33 2009 New Revision: 74157 Log: Issue #6241: Better type checking for the arguments of io.StringIO. Modified: python/branches/py3k/Lib/_pyio.py python/branches/py3k/Lib/test/test_memoryio.py python/branches/py3k/Modules/_io/stringio.c Modified: python/branches/py3k/Lib/_pyio.py ============================================================================== --- python/branches/py3k/Lib/_pyio.py (original) +++ python/branches/py3k/Lib/_pyio.py Wed Jul 22 05:07:33 2009 @@ -1924,8 +1924,10 @@ # C version, even under Windows. if newline is None: self._writetranslate = False - if initial_value: + if initial_value is not None: if not isinstance(initial_value, str): + raise TypeError("initial_value must be str or None, not {0}" + .format(type(initial_value).__name__)) initial_value = str(initial_value) self.write(initial_value) self.seek(0) Modified: python/branches/py3k/Lib/test/test_memoryio.py ============================================================================== --- python/branches/py3k/Lib/test/test_memoryio.py (original) +++ python/branches/py3k/Lib/test/test_memoryio.py Wed Jul 22 05:07:33 2009 @@ -140,6 +140,7 @@ self.assertEqual(memio.getvalue(), buf * 2) memio.__init__(buf) self.assertEqual(memio.getvalue(), buf) + self.assertRaises(TypeError, memio.__init__, []) def test_read(self): buf = self.buftype("1234567890") @@ -530,6 +531,13 @@ memio = self.ioclass("a\r\nb\r\n", newline=None) self.assertEqual(memio.read(5), "a\nb\n") + def test_newline_argument(self): + self.assertRaises(TypeError, self.ioclass, newline=b"\n") + self.assertRaises(ValueError, self.ioclass, newline="error") + # These should not raise an error + for newline in (None, "", "\n", "\r", "\r\n"): + self.ioclass(newline=newline) + class CBytesIOTest(PyBytesIOTest): ioclass = io.BytesIO Modified: python/branches/py3k/Modules/_io/stringio.c ============================================================================== --- python/branches/py3k/Modules/_io/stringio.c (original) +++ python/branches/py3k/Modules/_io/stringio.c Wed Jul 22 05:07:33 2009 @@ -550,22 +550,42 @@ { char *kwlist[] = {"initial_value", "newline", NULL}; PyObject *value = NULL; + PyObject *newline_obj = NULL; char *newline = "\n"; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oz:__init__", kwlist, - &value, &newline)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:__init__", kwlist, + &value, &newline_obj)) return -1; + /* Parse the newline argument. This used to be done with the 'z' + specifier, however this allowed any object with the buffer interface to + be converted. Thus we have to parse it manually since we only want to + allow unicode objects or None. */ + if (newline_obj == Py_None) { + newline = NULL; + } + else if (newline_obj) { + if (!PyUnicode_Check(newline_obj)) { + PyErr_Format(PyExc_TypeError, + "newline must be str or None, not %.200s", + Py_TYPE(newline_obj)->tp_name); + return -1; + } + newline = _PyUnicode_AsString(newline_obj); + if (newline == NULL) + return -1; + } + if (newline && newline[0] != '\0' && !(newline[0] == '\n' && newline[1] == '\0') && !(newline[0] == '\r' && newline[1] == '\0') && !(newline[0] == '\r' && newline[1] == '\n' && newline[2] == '\0')) { PyErr_Format(PyExc_ValueError, - "illegal newline value: %s", newline); + "illegal newline value: %R", newline_obj); return -1; } if (value && value != Py_None && !PyUnicode_Check(value)) { - PyErr_Format(PyExc_ValueError, + PyErr_Format(PyExc_TypeError, "initial_value must be str or None, not %.200s", Py_TYPE(value)->tp_name); return -1; @@ -577,6 +597,9 @@ Py_CLEAR(self->writenl); Py_CLEAR(self->decoder); + assert((newline != NULL && newline_obj != Py_None) || + (newline == NULL && newline_obj == Py_None)); + if (newline) { self->readnl = PyUnicode_FromString(newline); if (self->readnl == NULL) From python-checkins at python.org Wed Jul 22 05:24:36 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 03:24:36 -0000 Subject: [Python-checkins] r74158 - in python/branches/py3k: Lib/_pyio.py Lib/test/test_memoryio.py Misc/NEWS Modules/_io/bytesio.c Modules/_io/stringio.c Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 05:24:36 2009 New Revision: 74158 Log: Issue #6218: Make io.BytesIO and io.StringIO picklable. Modified: python/branches/py3k/Lib/_pyio.py python/branches/py3k/Lib/test/test_memoryio.py python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/_io/bytesio.c python/branches/py3k/Modules/_io/stringio.c Modified: python/branches/py3k/Lib/_pyio.py ============================================================================== --- python/branches/py3k/Lib/_pyio.py (original) +++ python/branches/py3k/Lib/_pyio.py Wed Jul 22 05:24:36 2009 @@ -765,6 +765,11 @@ self._buffer = buf self._pos = 0 + def __getstate__(self): + if self.closed: + raise ValueError("__getstate__ on closed file") + return self.__dict__.copy() + def getvalue(self): """Return the bytes value (contents) of the buffer """ Modified: python/branches/py3k/Lib/test/test_memoryio.py ============================================================================== --- python/branches/py3k/Lib/test/test_memoryio.py (original) +++ python/branches/py3k/Lib/test/test_memoryio.py Wed Jul 22 05:24:36 2009 @@ -9,6 +9,7 @@ import io import _pyio as pyio import sys +import pickle class MemorySeekTestMixin: @@ -346,6 +347,42 @@ memio = self.ioclass() memio.foo = 1 + def test_pickling(self): + buf = self.buftype("1234567890") + memio = self.ioclass(buf) + memio.foo = 42 + memio.seek(2) + + class PickleTestMemIO(self.ioclass): + def __init__(me, initvalue, foo): + self.ioclass.__init__(me, initvalue) + me.foo = foo + # __getnewargs__ is undefined on purpose. This checks that PEP 307 + # is used to provide pickling support. + + # Pickle expects the class to be on the module level. Here we use a + # little hack to allow the PickleTestMemIO class to derive from + # self.ioclass without having to define all combinations explictly on + # the module-level. + import __main__ + PickleTestMemIO.__module__ = '__main__' + __main__.PickleTestMemIO = PickleTestMemIO + submemio = PickleTestMemIO(buf, 80) + submemio.seek(2) + + # We only support pickle protocol 2 and onward since we use extended + # __reduce__ API of PEP 307 to provide pickling support. + for proto in range(2, pickle.HIGHEST_PROTOCOL): + for obj in (memio, submemio): + obj2 = pickle.loads(pickle.dumps(obj, protocol=proto)) + self.assertEqual(obj.getvalue(), obj2.getvalue()) + self.assertEqual(obj.__class__, obj2.__class__) + self.assertEqual(obj.foo, obj2.foo) + self.assertEqual(obj.tell(), obj2.tell()) + obj.close() + self.assertRaises(ValueError, pickle.dumps, obj, proto) + del __main__.PickleTestMemIO + class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase): @@ -425,13 +462,26 @@ self.assertEqual(memio.getvalue(), buf) -class PyStringIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase): - buftype = str - ioclass = pyio.StringIO - UnsupportedOperation = pyio.UnsupportedOperation - EOF = "" +class TextIOTestMixin: - # TextIO-specific behaviour. + def test_relative_seek(self): + memio = self.ioclass() + + self.assertRaises(IOError, memio.seek, -1, 1) + self.assertRaises(IOError, memio.seek, 3, 1) + self.assertRaises(IOError, memio.seek, -3, 1) + self.assertRaises(IOError, memio.seek, -1, 2) + self.assertRaises(IOError, memio.seek, 1, 1) + self.assertRaises(IOError, memio.seek, 1, 2) + + def test_textio_properties(self): + memio = self.ioclass() + + # These are just dummy values but we nevertheless check them for fear + # of unexpected breakage. + self.assertTrue(memio.encoding is None) + self.assertEqual(memio.errors, "strict") + self.assertEqual(memio.line_buffering, False) def test_newlines_property(self): memio = self.ioclass(newline=None) @@ -513,7 +563,6 @@ def test_newline_cr(self): # newline="\r" memio = self.ioclass("a\nb\r\nc\rd", newline="\r") - memio.seek(0) self.assertEqual(memio.read(), "a\rb\r\rc\rd") memio.seek(0) self.assertEqual(list(memio), ["a\r", "b\r", "\r", "c\r", "d"]) @@ -521,7 +570,6 @@ def test_newline_crlf(self): # newline="\r\n" memio = self.ioclass("a\nb\r\nc\rd", newline="\r\n") - memio.seek(0) self.assertEqual(memio.read(), "a\r\nb\r\r\nc\rd") memio.seek(0) self.assertEqual(list(memio), ["a\r\n", "b\r\r\n", "c\rd"]) @@ -539,10 +587,59 @@ self.ioclass(newline=newline) +class PyStringIOTest(MemoryTestMixin, MemorySeekTestMixin, + TextIOTestMixin, unittest.TestCase): + buftype = str + ioclass = pyio.StringIO + UnsupportedOperation = pyio.UnsupportedOperation + EOF = "" + + +class PyStringIOPickleTest(TextIOTestMixin, unittest.TestCase): + """Test if pickle restores properly the internal state of StringIO. + """ + buftype = str + UnsupportedOperation = pyio.UnsupportedOperation + EOF = "" + + class ioclass(pyio.StringIO): + def __new__(cls, *args, **kwargs): + return pickle.loads(pickle.dumps(pyio.StringIO(*args, **kwargs))) + def __init__(self, *args, **kwargs): + pass + + class CBytesIOTest(PyBytesIOTest): ioclass = io.BytesIO UnsupportedOperation = io.UnsupportedOperation + def test_getstate(self): + memio = self.ioclass() + state = memio.__getstate__() + self.assertEqual(len(state), 3) + bytearray(state[0]) # Check if state[0] supports the buffer interface. + self.assert_(isinstance(state[1], int)) + self.assert_(isinstance(state[2], dict) or state[2] is None) + memio.close() + self.assertRaises(ValueError, memio.__getstate__) + + def test_setstate(self): + # This checks whether __setstate__ does proper input validation. + memio = self.ioclass() + memio.__setstate__((b"no error", 0, None)) + memio.__setstate__((bytearray(b"no error"), 0, None)) + memio.__setstate__((b"no error", 0, {'spam': 3})) + self.assertRaises(ValueError, memio.__setstate__, (b"", -1, None)) + self.assertRaises(TypeError, memio.__setstate__, ("unicode", 0, None)) + self.assertRaises(TypeError, memio.__setstate__, (b"", 0.0, None)) + self.assertRaises(TypeError, memio.__setstate__, (b"", 0, 0)) + self.assertRaises(TypeError, memio.__setstate__, (b"len-test", 0)) + self.assertRaises(TypeError, memio.__setstate__) + self.assertRaises(TypeError, memio.__setstate__, 0) + memio.close() + self.assertRaises(ValueError, memio.__setstate__, (b"closed", 0, None)) + + class CStringIOTest(PyStringIOTest): ioclass = io.StringIO UnsupportedOperation = io.UnsupportedOperation @@ -561,9 +658,48 @@ self.assertEqual(memio.tell(), len(buf) * 2) self.assertEqual(memio.getvalue(), buf + buf) + def test_getstate(self): + memio = self.ioclass() + state = memio.__getstate__() + self.assertEqual(len(state), 4) + self.assert_(isinstance(state[0], str)) + self.assert_(isinstance(state[1], str)) + self.assert_(isinstance(state[2], int)) + self.assert_(isinstance(state[3], dict) or state[3] is None) + memio.close() + self.assertRaises(ValueError, memio.__getstate__) + + def test_setstate(self): + # This checks whether __setstate__ does proper input validation. + memio = self.ioclass() + memio.__setstate__(("no error", "\n", 0, None)) + memio.__setstate__(("no error", "", 0, {'spam': 3})) + self.assertRaises(ValueError, memio.__setstate__, ("", "f", 0, None)) + self.assertRaises(ValueError, memio.__setstate__, ("", "", -1, None)) + self.assertRaises(TypeError, memio.__setstate__, (b"", "", 0, None)) + self.assertRaises(TypeError, memio.__setstate__, ("", b"", 0, None)) + self.assertRaises(TypeError, memio.__setstate__, ("", "", 0.0, None)) + self.assertRaises(TypeError, memio.__setstate__, ("", "", 0, 0)) + self.assertRaises(TypeError, memio.__setstate__, ("len-test", 0)) + self.assertRaises(TypeError, memio.__setstate__) + self.assertRaises(TypeError, memio.__setstate__, 0) + memio.close() + self.assertRaises(ValueError, memio.__setstate__, ("closed", "", 0, None)) + + +class CStringIOPickleTest(PyStringIOPickleTest): + UnsupportedOperation = io.UnsupportedOperation + + class ioclass(io.StringIO): + def __new__(cls, *args, **kwargs): + return pickle.loads(pickle.dumps(io.StringIO(*args, **kwargs))) + def __init__(self, *args, **kwargs): + pass + def test_main(): - tests = [PyBytesIOTest, PyStringIOTest, CBytesIOTest, CStringIOTest] + tests = [PyBytesIOTest, PyStringIOTest, CBytesIOTest, CStringIOTest, + PyStringIOPickleTest, CStringIOPickleTest] support.run_unittest(*tests) if __name__ == '__main__': Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 22 05:24:36 2009 @@ -85,6 +85,8 @@ - Issue #4005: Fixed a crash of pydoc when there was a zip file present in sys.path. +- Issue #6218: io.StringIO and io.BytesIO instances are now picklable. + Extension Modules ----------------- Modified: python/branches/py3k/Modules/_io/bytesio.c ============================================================================== --- python/branches/py3k/Modules/_io/bytesio.c (original) +++ python/branches/py3k/Modules/_io/bytesio.c Wed Jul 22 05:24:36 2009 @@ -606,6 +606,120 @@ Py_RETURN_NONE; } +/* Pickling support. + + Note that only pickle protocol 2 and onward are supported since we use + extended __reduce__ API of PEP 307 to make BytesIO instances picklable. + + Providing support for protocol < 2 would require the __reduce_ex__ method + which is notably long-winded when defined properly. + + For BytesIO, the implementation would similar to one coded for + object.__reduce_ex__, but slightly less general. To be more specific, we + could call bytesio_getstate directly and avoid checking for the presence of + a fallback __reduce__ method. However, we would still need a __newobj__ + function to use the efficient instance representation of PEP 307. + */ + +static PyObject * +bytesio_getstate(bytesio *self) +{ + PyObject *initvalue = bytesio_getvalue(self); + PyObject *dict; + PyObject *state; + + if (initvalue == NULL) + return NULL; + if (self->dict == NULL) { + Py_INCREF(Py_None); + dict = Py_None; + } + else { + dict = PyDict_Copy(self->dict); + if (dict == NULL) + return NULL; + } + + state = Py_BuildValue("(OnN)", initvalue, self->pos, dict); + Py_DECREF(initvalue); + return state; +} + +static PyObject * +bytesio_setstate(bytesio *self, PyObject *state) +{ + PyObject *result; + PyObject *position_obj; + PyObject *dict; + Py_ssize_t pos; + + assert(state != NULL); + + /* We allow the state tuple to be longer than 3, because we may need + someday to extend the object's state without breaking + backward-compatibility. */ + if (!PyTuple_Check(state) || Py_SIZE(state) < 3) { + PyErr_Format(PyExc_TypeError, + "%.200s.__setstate__ argument should be 3-tuple, got %.200s", + Py_TYPE(self)->tp_name, Py_TYPE(state)->tp_name); + return NULL; + } + /* Reset the object to its default state. This is only needed to handle + the case of repeated calls to __setstate__. */ + self->string_size = 0; + self->pos = 0; + + /* Set the value of the internal buffer. If state[0] does not support the + buffer protocol, bytesio_write will raise the appropriate TypeError. */ + result = bytesio_write(self, PyTuple_GET_ITEM(state, 0)); + if (result == NULL) + return NULL; + Py_DECREF(result); + + /* Set carefully the position value. Alternatively, we could use the seek + method instead of modifying self->pos directly to better protect the + object internal state against errneous (or malicious) inputs. */ + position_obj = PyTuple_GET_ITEM(state, 1); + if (!PyLong_Check(position_obj)) { + PyErr_Format(PyExc_TypeError, + "second item of state must be an integer, not %.200s", + Py_TYPE(position_obj)->tp_name); + return NULL; + } + pos = PyLong_AsSsize_t(position_obj); + if (pos == -1 && PyErr_Occurred()) + return NULL; + if (pos < 0) { + PyErr_SetString(PyExc_ValueError, + "position value cannot be negative"); + return NULL; + } + self->pos = pos; + + /* Set the dictionary of the instance variables. */ + dict = PyTuple_GET_ITEM(state, 2); + if (dict != Py_None) { + if (!PyDict_Check(dict)) { + PyErr_Format(PyExc_TypeError, + "third item of state should be a dict, got a %.200s", + Py_TYPE(dict)->tp_name); + return NULL; + } + if (self->dict) { + /* Alternatively, we could replace the internal dictionary + completely. However, it seems more practical to just update it. */ + if (PyDict_Update(self->dict, dict) < 0) + return NULL; + } + else { + Py_INCREF(dict); + self->dict = dict; + } + } + + Py_RETURN_NONE; +} + static void bytesio_dealloc(bytesio *self) { @@ -630,9 +744,9 @@ if (self == NULL) return NULL; - self->string_size = 0; - self->pos = 0; - self->buf_size = 0; + /* tp_alloc initializes all the fields to zero. So we don't have to + initialize them here. */ + self->buf = (char *)PyMem_Malloc(0); if (self->buf == NULL) { Py_DECREF(self); @@ -705,6 +819,8 @@ {"getvalue", (PyCFunction)bytesio_getvalue, METH_VARARGS, getval_doc}, {"seek", (PyCFunction)bytesio_seek, METH_VARARGS, seek_doc}, {"truncate", (PyCFunction)bytesio_truncate, METH_VARARGS, truncate_doc}, + {"__getstate__", (PyCFunction)bytesio_getstate, METH_NOARGS, NULL}, + {"__setstate__", (PyCFunction)bytesio_setstate, METH_O, NULL}, {NULL, NULL} /* sentinel */ }; Modified: python/branches/py3k/Modules/_io/stringio.c ============================================================================== --- python/branches/py3k/Modules/_io/stringio.c (original) +++ python/branches/py3k/Modules/_io/stringio.c Wed Jul 22 05:24:36 2009 @@ -533,9 +533,9 @@ if (self == NULL) return NULL; - self->string_size = 0; - self->pos = 0; - self->buf_size = 0; + /* tp_alloc initializes all the fields to zero. So we don't have to + initialize them here. */ + self->buf = (Py_UNICODE *)PyMem_Malloc(0); if (self->buf == NULL) { Py_DECREF(self); @@ -600,6 +600,9 @@ assert((newline != NULL && newline_obj != Py_None) || (newline == NULL && newline_obj == Py_None)); + assert((newline != NULL && newline_obj != Py_None) || + (newline == NULL && newline_obj == Py_None)); + if (newline) { self->readnl = PyUnicode_FromString(newline); if (self->readnl == NULL) @@ -672,6 +675,135 @@ Py_RETURN_TRUE; } +/* Pickling support. + + The implementation of __getstate__ is similar to the one for BytesIO, + except that we also save the newline parameter. For __setstate__ and unlike + BytesIO, we call __init__ to restore the object's state. Doing so allows us + to avoid decoding the complex newline state while keeping the object + representation compact. + + See comment in bytesio.c regarding why only pickle protocols and onward are + supported. +*/ + +static PyObject * +stringio_getstate(stringio *self) +{ + PyObject *initvalue = stringio_getvalue(self); + PyObject *dict; + PyObject *state; + + if (initvalue == NULL) + return NULL; + if (self->dict == NULL) { + Py_INCREF(Py_None); + dict = Py_None; + } + else { + dict = PyDict_Copy(self->dict); + if (dict == NULL) + return NULL; + } + + state = Py_BuildValue("(OOnN)", initvalue, + self->readnl ? self->readnl : Py_None, + self->pos, dict); + Py_DECREF(initvalue); + return state; +} + +static PyObject * +stringio_setstate(stringio *self, PyObject *state) +{ + PyObject *initarg; + PyObject *position_obj; + PyObject *dict; + Py_ssize_t pos; + + assert(state != NULL); + CHECK_CLOSED(self); + + /* We allow the state tuple to be longer than 4, because we may need + someday to extend the object's state without breaking + backward-compatibility. */ + if (!PyTuple_Check(state) || Py_SIZE(state) < 4) { + PyErr_Format(PyExc_TypeError, + "%.200s.__setstate__ argument should be 4-tuple, got %.200s", + Py_TYPE(self)->tp_name, Py_TYPE(state)->tp_name); + return NULL; + } + + /* Initialize the object's state. */ + initarg = PyTuple_GetSlice(state, 0, 2); + if (initarg == NULL) + return NULL; + if (stringio_init(self, initarg, NULL) < 0) { + Py_DECREF(initarg); + return NULL; + } + Py_DECREF(initarg); + + /* Restore the buffer state. Even if __init__ did initialize the buffer, + we have to initialize it again since __init__ may translates the + newlines in the inital_value string. We clearly do not want that + because the string value in the state tuple has already been translated + once by __init__. So we do not take any chance and replace object's + buffer completely. */ + { + Py_UNICODE *buf = PyUnicode_AS_UNICODE(PyTuple_GET_ITEM(state, 0)); + Py_ssize_t bufsize = PyUnicode_GET_SIZE(PyTuple_GET_ITEM(state, 0)); + if (resize_buffer(self, bufsize) < 0) + return NULL; + memcpy(self->buf, buf, bufsize * sizeof(Py_UNICODE)); + self->string_size = bufsize; + } + + /* Set carefully the position value. Alternatively, we could use the seek + method instead of modifying self->pos directly to better protect the + object internal state against errneous (or malicious) inputs. */ + position_obj = PyTuple_GET_ITEM(state, 2); + if (!PyLong_Check(position_obj)) { + PyErr_Format(PyExc_TypeError, + "third item of state must be an integer, got %.200s", + Py_TYPE(position_obj)->tp_name); + return NULL; + } + pos = PyLong_AsSsize_t(position_obj); + if (pos == -1 && PyErr_Occurred()) + return NULL; + if (pos < 0) { + PyErr_SetString(PyExc_ValueError, + "position value cannot be negative"); + return NULL; + } + self->pos = pos; + + /* Set the dictionary of the instance variables. */ + dict = PyTuple_GET_ITEM(state, 3); + if (dict != Py_None) { + if (!PyDict_Check(dict)) { + PyErr_Format(PyExc_TypeError, + "fourth item of state should be a dict, got a %.200s", + Py_TYPE(dict)->tp_name); + return NULL; + } + if (self->dict) { + /* Alternatively, we could replace the internal dictionary + completely. However, it seems more practical to just update it. */ + if (PyDict_Update(self->dict, dict) < 0) + return NULL; + } + else { + Py_INCREF(dict); + self->dict = dict; + } + } + + Py_RETURN_NONE; +} + + static PyObject * stringio_closed(stringio *self, void *context) { @@ -706,10 +838,13 @@ {"truncate", (PyCFunction)stringio_truncate, METH_VARARGS, stringio_truncate_doc}, {"seek", (PyCFunction)stringio_seek, METH_VARARGS, stringio_seek_doc}, {"write", (PyCFunction)stringio_write, METH_O, stringio_write_doc}, - + {"seekable", (PyCFunction)stringio_seekable, METH_NOARGS}, {"readable", (PyCFunction)stringio_readable, METH_NOARGS}, {"writable", (PyCFunction)stringio_writable, METH_NOARGS}, + + {"__getstate__", (PyCFunction)stringio_getstate, METH_NOARGS}, + {"__setstate__", (PyCFunction)stringio_setstate, METH_O}, {NULL, NULL} /* sentinel */ }; From python-checkins at python.org Wed Jul 22 05:56:36 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 03:56:36 -0000 Subject: [Python-checkins] r74159 - in python/branches/py3k: Include/descrobject.h Misc/NEWS Objects/descrobject.c Objects/typeobject.c Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 05:56:36 2009 New Revision: 74159 Log: Issue #6151: Make PyDescr_COMMON conform to standard C. Modified: python/branches/py3k/Include/descrobject.h python/branches/py3k/Misc/NEWS python/branches/py3k/Objects/descrobject.c python/branches/py3k/Objects/typeobject.c Modified: python/branches/py3k/Include/descrobject.h ============================================================================== --- python/branches/py3k/Include/descrobject.h (original) +++ python/branches/py3k/Include/descrobject.h Wed Jul 22 05:56:36 2009 @@ -37,15 +37,17 @@ /* Various kinds of descriptor objects */ -#define PyDescr_COMMON \ - PyObject_HEAD \ - PyTypeObject *d_type; \ - PyObject *d_name - typedef struct { - PyDescr_COMMON; + PyObject_HEAD + PyTypeObject *d_type; + PyObject *d_name; } PyDescrObject; +#define PyDescr_COMMON PyDescrObject d_common + +#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) +#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) + typedef struct { PyDescr_COMMON; PyMethodDef *d_method; Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 22 05:56:36 2009 @@ -36,7 +36,12 @@ C-API ----- -- Issue #6405: Remove duplicatet type declarations in descrobject.h. +- Issue #6151: Made PyDescr_COMMON conform to standard C (like PyObject_HEAD + in PEP 3123). The PyDescr_TYPE and PyDescr_NAME macros should be + should used for accessing the d_type and d_name members of structures + using PyDescr_COMMON. + +- Issue #6405: Remove duplicate type declarations in descrobject.h. - The code flags for old __future__ features are now available again. @@ -49,6 +54,7 @@ - Issue #1419652: Change the first argument to PyImport_AppendInittab() to ``const char *`` as the string is stored beyond the call. + Library ------- Modified: python/branches/py3k/Objects/descrobject.c ============================================================================== --- python/branches/py3k/Objects/descrobject.c (original) +++ python/branches/py3k/Objects/descrobject.c Wed Jul 22 05:56:36 2009 @@ -92,7 +92,7 @@ "descriptor '%V' for type '%s' " "needs either an object or a type", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name); + PyDescr_TYPE(descr)->tp_name); return NULL; } } @@ -101,16 +101,16 @@ "descriptor '%V' for type '%s' " "needs a type, not a '%s' as arg 2", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name, + PyDescr_TYPE(descr)->tp_name, type->ob_type->tp_name); return NULL; } - if (!PyType_IsSubtype((PyTypeObject *)type, descr->d_type)) { + if (!PyType_IsSubtype((PyTypeObject *)type, PyDescr_TYPE(descr))) { PyErr_Format(PyExc_TypeError, "descriptor '%V' for type '%s' " "doesn't apply to type '%s'", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name, + PyDescr_TYPE(descr)->tp_name, ((PyTypeObject *)type)->tp_name); return NULL; } @@ -149,7 +149,7 @@ PyErr_Format(PyExc_AttributeError, "attribute '%V' of '%.100s' objects is not readable", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name); + PyDescr_TYPE(descr)->tp_name); return NULL; } @@ -204,7 +204,7 @@ PyErr_Format(PyExc_AttributeError, "attribute '%V' of '%.100s' objects is not writable", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name); + PyDescr_TYPE(descr)->tp_name); return -1; } @@ -222,17 +222,17 @@ "descriptor '%V' of '%.100s' " "object needs an argument", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name); + PyDescr_TYPE(descr)->tp_name); return NULL; } self = PyTuple_GET_ITEM(args, 0); - if (!PyObject_IsInstance(self, (PyObject *)(descr->d_type))) { + if (!PyObject_IsInstance(self, (PyObject *)PyDescr_TYPE(descr))) { PyErr_Format(PyExc_TypeError, "descriptor '%V' " "requires a '%.100s' object " "but received a '%.100s'", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name, + PyDescr_TYPE(descr)->tp_name, self->ob_type->tp_name); return NULL; } @@ -257,7 +257,7 @@ { PyObject *func, *result; - func = PyCFunction_New(descr->d_method, (PyObject *)descr->d_type); + func = PyCFunction_New(descr->d_method, (PyObject *)PyDescr_TYPE(descr)); if (func == NULL) return NULL; @@ -280,17 +280,17 @@ "descriptor '%V' of '%.100s' " "object needs an argument", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name); + PyDescr_TYPE(descr)->tp_name); return NULL; } self = PyTuple_GET_ITEM(args, 0); - if (!PyObject_IsInstance(self, (PyObject *)(descr->d_type))) { + if (!PyObject_IsInstance(self, (PyObject *)PyDescr_TYPE(descr))) { PyErr_Format(PyExc_TypeError, "descriptor '%V' " "requires a '%.100s' object " "but received a '%.100s'", descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name, + PyDescr_TYPE(descr)->tp_name, self->ob_type->tp_name); return NULL; } @@ -949,7 +949,7 @@ static PyObject * wrapper_objclass(wrapperobject *wp) { - PyObject *c = (PyObject *)wp->descr->d_type; + PyObject *c = (PyObject *)PyDescr_TYPE(wp->descr); Py_INCREF(c); return c; @@ -1059,7 +1059,7 @@ assert(PyObject_TypeCheck(d, &PyWrapperDescr_Type)); descr = (PyWrapperDescrObject *)d; - assert(PyObject_IsInstance(self, (PyObject *)(descr->d_type))); + assert(PyObject_IsInstance(self, (PyObject *)PyDescr_TYPE(descr))); wp = PyObject_GC_New(wrapperobject, &wrappertype); if (wp != NULL) { Modified: python/branches/py3k/Objects/typeobject.c ============================================================================== --- python/branches/py3k/Objects/typeobject.c (original) +++ python/branches/py3k/Objects/typeobject.c Wed Jul 22 05:56:36 2009 @@ -5648,7 +5648,7 @@ generic = p->function; d = (PyWrapperDescrObject *)descr; if (d->d_base->wrapper == p->wrapper && - PyType_IsSubtype(type, d->d_type)) + PyType_IsSubtype(type, PyDescr_TYPE(d))) { if (specific == NULL || specific == d->d_wrapped) From buildbot at python.org Wed Jul 22 06:23:53 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 22 Jul 2009 04:23:53 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1223 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_thread.py", line 49, in task self.done_mutex.release() _thread.error: release unlocked lock Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_thread.py", line 49, in task self.done_mutex.release() _thread.error: release unlocked lock Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_thread.py", line 49, in task self.done_mutex.release() _thread.error: release unlocked lock Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_thread.py", line 49, in task self.done_mutex.release() _thread.error: release unlocked lock make: *** [buildbottest] Abort trap sincerely, -The Buildbot From buildbot at python.org Wed Jul 22 06:25:36 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 22 Jul 2009 04:25:36 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/1014 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: alexandre.vassalotti BUILD FAILED: failed test Excerpt from the test logfile: 2 tests failed: test_codecs test_io ====================================================================== ERROR: test_basics (test.test_codecs.BasicUnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 1360, in test_basics encodedresult += encoder.encode(c) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_decoder_state (test.test_codecs.BasicUnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 1445, in test_decoder_state self.check_state_handling_decode(encoding, u, u.encode(encoding)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_codecs.py", line 30, in check_state_handling_decode part1 = d.decode(s[:i]) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1753, in test_basic_io self.assertEquals(f.read(), "abc") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest/case.py", line 416, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.CTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_basic_io (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1748, in test_basic_io self.assertEquals(f.write("abc"), 3) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1546, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_destructor (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1698, in test_destructor t.write("abc") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1546, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_detach (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1531, in test_detach t.write("howdy") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1546, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_encoding_errors_reading (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1575, in test_encoding_errors_reading self.assertRaises(UnicodeError, t.read) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest/case.py", line 416, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1801, in read decoder.decode(self.buffer.read(), final=True)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1323, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_encoding_errors_writing (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1593, in test_encoding_errors_writing self.assertRaises(UnicodeError, t.write, "\xff") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/unittest/case.py", line 416, in assertRaises callableObj(*args, **kwargs) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1546, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' ====================================================================== ERROR: test_issue1395_1 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1944, in test_issue1395_1 c = txt.read(1) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1810, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1617, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1323, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_2 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1956, in test_issue1395_2 c = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1810, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1617, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1323, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_3 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1966, in test_issue1395_3 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1810, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1617, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1323, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_4 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1977, in test_issue1395_4 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1810, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1617, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1323, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_issue1395_5 (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1985, in test_issue1395_5 reads = txt.read(4) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1810, in read eof = not self._read_chunk() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1617, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1323, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_input (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1667, in test_newlines_input self.assertEquals(txt.readlines(), expected) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 493, in readlines return list(self) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1816, in __next__ line = self.readline() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1893, in readline while self._read_chunk(): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1617, in _read_chunk self._set_decoded_chars(self._decoder.decode(input_chunk, eof)) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1323, in decode output = self.decoder.decode(input, final=final) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_decode' ====================================================================== ERROR: test_newlines_output (test.test_io.PyTextIOWrapperTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/test/test_io.py", line 1682, in test_newlines_output txt.write("AAA\nB") File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/_pyio.py", line 1546, in write b = encoder.encode(s) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/encodings/ascii.py", line 22, in encode return codecs.ascii_encode(input, self.errors)[0] AttributeError: 'NoneType' object has no attribute 'ascii_encode' make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Wed Jul 22 06:27:34 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 04:27:34 -0000 Subject: [Python-checkins] r74160 - python/branches/py3k/Lib/test/test_nis.py Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 06:27:34 2009 New Revision: 74160 Log: Only skip test_nis on Solaris. Modified: python/branches/py3k/Lib/test/test_nis.py Modified: python/branches/py3k/Lib/test/test_nis.py ============================================================================== --- python/branches/py3k/Lib/test/test_nis.py (original) +++ python/branches/py3k/Lib/test/test_nis.py Wed Jul 22 06:27:34 2009 @@ -1,10 +1,12 @@ from test import support import unittest +import sys # Skip test if nis module does not exist. nis = support.import_module('nis') -raise unittest.SkipTest("test_nis hangs on Solaris") +if sys.platform.startswith("sunos"): + raise unittest.SkipTest("test_nis hangs on Solaris") class NisTests(unittest.TestCase): def test_maps(self): From python-checkins at python.org Wed Jul 22 06:43:33 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 04:43:33 -0000 Subject: [Python-checkins] r74161 - python/branches/py3k/Lib/test/test_threading.py Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 06:43:33 2009 New Revision: 74161 Log: Remove erroneous print statement. Modified: python/branches/py3k/Lib/test/test_threading.py Modified: python/branches/py3k/Lib/test/test_threading.py ============================================================================== --- python/branches/py3k/Lib/test/test_threading.py (original) +++ python/branches/py3k/Lib/test/test_threading.py Wed Jul 22 06:43:33 2009 @@ -414,9 +414,9 @@ # Skip platforms with known problems forking from a worker thread. # See http://bugs.python.org/issue3863. if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'os2emx'): - print >>sys.stderr, ('Skipping test_3_join_in_forked_from_thread' - ' due to known OS bugs on'), sys.platform - return + raise unittest.SkipTest( + 'test_3_join_in_forked_from_thread due to known OS bugs on ' + + sys.platform) script = """if 1: main_thread = threading.current_thread() def worker(): From python-checkins at python.org Wed Jul 22 06:54:53 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 04:54:53 -0000 Subject: [Python-checkins] r74162 - python/branches/py3k/Lib/test/test_threading.py Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 06:54:52 2009 New Revision: 74162 Log: Use unittest.SkipTest to skip tests in test_threading. Modified: python/branches/py3k/Lib/test/test_threading.py Modified: python/branches/py3k/Lib/test/test_threading.py ============================================================================== --- python/branches/py3k/Lib/test/test_threading.py (original) +++ python/branches/py3k/Lib/test/test_threading.py Wed Jul 22 06:54:52 2009 @@ -10,6 +10,7 @@ import time import unittest import weakref +import os # A trivial mutable counter. class Counter(object): @@ -109,9 +110,8 @@ try: threading.stack_size(262144) except _thread.error: - if verbose: - print('platform does not support changing thread stack size') - return + raise unittest.SkipTest( + 'platform does not support changing thread stack size') self.test_various_ops() threading.stack_size(0) @@ -122,9 +122,8 @@ try: threading.stack_size(0x100000) except _thread.error: - if verbose: - print('platform does not support changing thread stack size') - return + raise unittest.SkipTest( + 'platform does not support changing thread stack size') self.test_various_ops() threading.stack_size(0) @@ -154,9 +153,7 @@ try: import ctypes except ImportError: - if verbose: - print("test_PyThreadState_SetAsyncExc can't import ctypes") - return # can't do anything + raise unittest.SkipTest("cannot import ctypes") set_async_exc = ctypes.pythonapi.PyThreadState_SetAsyncExc @@ -226,9 +223,7 @@ try: import ctypes except ImportError: - if verbose: - print("test_finalize_with_runnning_thread can't import ctypes") - return # can't do anything + raise unittest.SkipTest("cannot import ctypes") import subprocess rc = subprocess.call([sys.executable, "-c", """if 1: @@ -387,11 +382,9 @@ self._run_and_join(script) + @unittest.skipUnless(hasattr(os, 'fork'), "needs os.fork()") def test_2_join_in_forked_process(self): # Like the test above, but from a forked interpreter - import os - if not hasattr(os, 'fork'): - return script = """if 1: childpid = os.fork() if childpid != 0: @@ -405,18 +398,15 @@ """ self._run_and_join(script) + @unittest.skipUnless(hasattr(os, 'fork'), "needs os.fork()") def test_3_join_in_forked_from_thread(self): # Like the test above, but fork() was called from a worker thread # In the forked process, the main Thread object must be marked as stopped. - import os - if not hasattr(os, 'fork'): - return + # Skip platforms with known problems forking from a worker thread. # See http://bugs.python.org/issue3863. if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'os2emx'): - raise unittest.SkipTest( - 'test_3_join_in_forked_from_thread due to known OS bugs on ' + - sys.platform) + raise unittest.SkipTest('due to known OS bugs on ' + sys.platform) script = """if 1: main_thread = threading.current_thread() def worker(): From nnorwitz at gmail.com Wed Jul 22 07:17:15 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 21 Jul 2009 22:17:15 -0700 Subject: [Python-checkins] Python Regression Test Failures refleak (2) In-Reply-To: References: <20090722004937.GA11088@python.psfb.org> Message-ID: Sure, this report comes from Misc/build.sh. It typically only runs on trunk. You can also find the full results here: http://docs.python.org/dev/results/ which are also generated from Misc/build.sh. The most recent results were from r74149. Perhaps the page references above should be appended to this mail? Feel free to make any changes to the build.sh file. Once checked in, the changes will be picked up on subsequent runs. n On Tue, Jul 21, 2009 at 6:10 PM, Alexandre Vassalotti wrote: > Hi Neal, > > Could you include the name of branch the tests were ran on in your > future reports? > > Cheers, > -- Alexandre > > On Tue, Jul 21, 2009 at 8:49 PM, Neal Norwitz wrote: >> More important issues: >> ---------------------- >> test_io leaked [237, 237, 237] references, sum=711 >> test_memoryio leaked [267, 267, 267] references, sum=801 >> >> Less important issues: >> ---------------------- >> test_asynchat leaked [-139, 0, 0] references, sum=-139 >> test_cmd_line leaked [50, 0, 0] references, sum=50 >> test_popen2 leaked [54, -54, 29] references, sum=29 >> test_smtplib leaked [-190, 0, 0] references, sum=-190 >> test_socketserver leaked [0, 0, 69] references, sum=69 >> test_ssl leaked [-420, 420, 0] references, sum=0 >> test_sys leaked [0, -21, 21] references, sum=0 >> test_threading leaked [48, 48, 48] references, sum=144 >> test_urllib2_localnet leaked [0, 284, -284] references, sum=0 >> _______________________________________________ >> Python-checkins mailing list >> Python-checkins at python.org >> http://mail.python.org/mailman/listinfo/python-checkins >> > From nnorwitz at gmail.com Wed Jul 22 10:22:48 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Wed, 22 Jul 2009 04:22:48 -0400 Subject: [Python-checkins] Python Regression Test Failures opt (1) Message-ID: <20090722082248.GA9230@python.psfb.org> 338 tests OK. 1 test failed: test_distutils 36 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_curses test_epoll test_gl test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos test_macostools test_multiprocessing test_ossaudiodev test_pep277 test_py3kwarn test_scriptpackages test_smtpnet test_socketserver test_startfile test_sunaudiodev test_tcl test_timeout test_tk test_ttk_guionly test_ttk_textonly test_unicode_file test_urllib2net test_urllibnet test_winreg test_winsound test_zipfile64 6 skips unexpected on linux2: test_multiprocessing test_ttk_guionly test_epoll test_tk test_ioctl test_ttk_textonly test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_unittest test_doctest test_doctest2 test_MimeWriter test_SimpleHTTPServer test_StringIO test___all__ test___future__ test__locale test_abc test_abstract_numbers test_aepack test_aepack skipped -- No module named aetypes test_aifc test_al test_al skipped -- No module named al test_anydbm test_applesingle test_applesingle skipped -- No module named MacOS test_array test_ascii_formatd test_ast test_asynchat test_asyncore 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_buffer test_bufio test_bytes test_bz2 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 test_cmd_line test_cmd_line_script 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_compileall test_compiler test_complex test_complex_args test_contains test_contextlib test_cookie test_cookielib test_copy test_copy_reg test_cpickle test_cprofile 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 [19533 refs] [19533 refs] [19533 refs] [19530 refs] test test_distutils failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.7/distutils/tests/test_extension.py", line 35, in test_extension_init self.assertRaises(AssertionError, Extension, 1, []) AssertionError: AssertionError not raised test_dl test_docxmlrpc test_dumbdbm test_dummy_thread test_dummy_threading test_email test_email_codecs test_email_renamed test_enumerate test_eof test_epoll test_epoll skipped -- kernel doesn't support epoll() test_errno test_exception_variations test_extcall test_fcntl test_file test_file2k test_filecmp test_fileinput test_fileio test_float test_fnmatch test_fork1 test_format test_fpformat test_fractions test_frozen test_ftplib test_funcattrs test_functools test_future test_future3 test_future4 test_future5 test_future_builtins 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_hmac test_hotshot test_htmllib test_htmlparser test_httplib test_httpservers [15409 refs] [15409 refs] [15409 refs] [25388 refs] test_imageop test_imaplib test_imgfile test_imgfile skipped -- No module named imgfile test_imp test_import test_importhooks test_importlib test_index test_inspect test_int test_int_literal test_io test_ioctl test_ioctl skipped -- Unable to open /dev/tty test_isinstance test_iter test_iterlen test_itertools test_json test_kqueue test_kqueue skipped -- test works only on BSD test_largefile test_lib2to3 test_linecache 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_macos test_macos skipped -- No module named MacOS test_macostools test_macostools skipped -- No module named MacOS test_macpath test_mailbox test_marshal test_math test_md5 test_memoryio test_memoryview test_mhlib test_mimetools test_mimetypes test_minidom test_mmap test_module test_modulefinder test_multibytecodec test_multibytecodec_support test_multifile test_multiprocessing test_multiprocessing skipped -- OSError raises on RLock creation, see issue 3111! test_mutants test_mutex test_netrc test_new test_nis test_normalization 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 Expecting 's_push: parser stack overflow' in next line s_push: parser stack overflow test_pdb 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_pipes test_pkg test_pkgimport test_pkgutil test_platform [16997 refs] [16997 refs] test_plistlib test_poll test_popen [15414 refs] [15414 refs] [15414 refs] test_popen2 test_poplib test_posix test_posixpath test_pow test_pprint test_print test_profile test_profilehooks test_property test_pstats test_pty test_pwd test_py3kwarn test_py3kwarn skipped -- test.test_py3kwarn must be run with the -3 flag test_pyclbr test_pydoc [20908 refs] [20908 refs] [20908 refs] [20908 refs] [20908 refs] [20907 refs] [20907 refs] test_pyexpat test_queue test_quopri [17935 refs] [17935 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 [15409 refs] [15409 refs] [15412 refs] [15409 refs] test_slice test_smtplib test_smtpnet test_smtpnet skipped -- Use of the `network' resource not enabled test_socket test_socketserver test_socketserver skipped -- Use of the `network' resource not enabled test_softspace test_sort test_sqlite test_ssl test_startfile test_startfile skipped -- module os has no attribute startfile test_str test_strftime test_string test_stringprep test_strop test_strptime test_struct test_structmembers test_structseq test_subprocess [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [17252 refs] [15624 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] . [15409 refs] [15409 refs] this bit of output is from a test of stdout in a different process ... [15409 refs] [15409 refs] [15624 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [17252 refs] [15624 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] [15409 refs] . [15409 refs] [15409 refs] this bit of output is from a test of stdout in a different process ... [15409 refs] [15409 refs] [15624 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [15409 refs] [15409 refs] [15638 refs] [15432 refs] test_tarfile test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [15412 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading [18722 refs] [21120 refs] [20096 refs] [20096 refs] [20096 refs] [20096 refs] test_threading_local test_threadsignals test_time test_timeout test_timeout skipped -- Use of the `network' resource not enabled test_tk test_tk skipped -- No module named _tkinter test_tokenize test_trace test_traceback test_transformer test_ttk_guionly test_ttk_guionly skipped -- No module named _tkinter test_ttk_textonly test_ttk_textonly skipped -- No module named _tkinter test_tuple test_typechecks test_ucn test_unary test_undocumented_details test_unicode test_unicode_file test_unicode_file skipped -- No Unicode filesystem semantics on this platform. test_unicodedata test_univnewlines test_univnewlines2k 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 /tmp/python-test/local/lib/python2.7/test/test_xmllib.py:24: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. import xmllib test_xmlrpc test_xpickle test_xpickle -- skipping backwards compat tests. Use 'regrtest.py -u xpickle' to run them. 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_zipimport_support test_zlib 338 tests OK. 1 test failed: test_distutils 36 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_curses test_epoll test_gl test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos test_macostools test_multiprocessing test_ossaudiodev test_pep277 test_py3kwarn test_scriptpackages test_smtpnet test_socketserver test_startfile test_sunaudiodev test_tcl test_timeout test_tk test_ttk_guionly test_ttk_textonly test_unicode_file test_urllib2net test_urllibnet test_winreg test_winsound test_zipfile64 6 skips unexpected on linux2: test_multiprocessing test_ttk_guionly test_epoll test_tk test_ioctl test_ttk_textonly [775137 refs] From ziade.tarek at gmail.com Wed Jul 22 10:33:13 2009 From: ziade.tarek at gmail.com (=?ISO-8859-1?Q?Tarek_Ziad=E9?=) Date: Wed, 22 Jul 2009 10:33:13 +0200 Subject: [Python-checkins] Python Regression Test Failures opt (1) In-Reply-To: <20090721225936.GA31493@python.psfb.org> References: <20090721225936.GA31493@python.psfb.org> Message-ID: <94bdd2610907220133u5a9313bewf4bfb166c9897885@mail.gmail.com> > test_distutils > [19533 refs] > [19533 refs] > [19533 refs] > [19530 refs] > test test_distutils failed -- Traceback (most recent call last): > ?File "/tmp/python-test/local/lib/python2.7/distutils/tests/test_extension.py", line 35, in test_extension_init > ? ?self.assertRaises(AssertionError, Extension, 1, []) > AssertionError: AssertionError not raised I am on it : this happens because distutils.extension.Extension uses some assert statement, that are removed with this test script (which uses -O) I'll fix it sometimes today Regards Tarek From python-checkins at python.org Wed Jul 22 10:55:19 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 22 Jul 2009 08:55:19 -0000 Subject: [Python-checkins] r74163 - in python/trunk: Lib/distutils/extension.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Wed Jul 22 10:55:19 2009 New Revision: 74163 Log: Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O Modified: python/trunk/Lib/distutils/extension.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/distutils/extension.py ============================================================================== --- python/trunk/Lib/distutils/extension.py (original) +++ python/trunk/Lib/distutils/extension.py Wed Jul 22 10:55:19 2009 @@ -103,10 +103,11 @@ optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str), "'name' must be a string" - assert (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)), \ - "'sources' must be a list of strings" + if not isinstance(name, str): + raise AssertionError("'name' must be a string") + if not (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)): + raise AssertionError("'sources' must be a list of strings") self.name = name self.sources = sources Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Jul 22 10:55:19 2009 @@ -349,6 +349,9 @@ Library ------- +- Issue #6545: Removed assert statements in distutils.Extension, so the + behavior is similar when used with -O. + - unittest has been split up into a package. All old names should still work. - Issue #6431: Make Fraction type return NotImplemented when it doesn't From python-checkins at python.org Wed Jul 22 10:57:28 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 22 Jul 2009 08:57:28 -0000 Subject: [Python-checkins] r74164 - in python/branches/py3k: Lib/distutils/extension.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Wed Jul 22 10:57:28 2009 New Revision: 74164 Log: Merged revisions 74163 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74163 | tarek.ziade | 2009-07-22 10:55:19 +0200 (Wed, 22 Jul 2009) | 1 line Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/extension.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/distutils/extension.py ============================================================================== --- python/branches/py3k/Lib/distutils/extension.py (original) +++ python/branches/py3k/Lib/distutils/extension.py Wed Jul 22 10:57:28 2009 @@ -103,10 +103,11 @@ optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str), "'name' must be a string" - assert (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)), \ - "'sources' must be a list of strings" + if not isinstance(name, str): + raise AssertionError("'name' must be a string") + if not (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)): + raise AssertionError("'sources' must be a list of strings") self.name = name self.sources = sources Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 22 10:57:28 2009 @@ -940,6 +940,9 @@ Library ------- +- Issue #6545: Removed assert statements in distutils.Extension, so the + behavior is similar when used with -O. + - unittest has been split up into a package. All old names should still work. - Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler From python-checkins at python.org Wed Jul 22 11:03:01 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 22 Jul 2009 09:03:01 -0000 Subject: [Python-checkins] r74165 - in python/branches/release31-maint: Lib/distutils/extension.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Wed Jul 22 11:03:01 2009 New Revision: 74165 Log: Merged revisions 74164 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74164 | tarek.ziade | 2009-07-22 10:57:28 +0200 (Wed, 22 Jul 2009) | 9 lines Merged revisions 74163 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74163 | tarek.ziade | 2009-07-22 10:55:19 +0200 (Wed, 22 Jul 2009) | 1 line Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/extension.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/distutils/extension.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/extension.py (original) +++ python/branches/release31-maint/Lib/distutils/extension.py Wed Jul 22 11:03:01 2009 @@ -103,10 +103,11 @@ optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str), "'name' must be a string" - assert (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)), \ - "'sources' must be a list of strings" + if not isinstance(name, str): + raise AssertionError("'name' must be a string") + if not (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)): + raise AssertionError("'sources' must be a list of strings") self.name = name self.sources = sources Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Wed Jul 22 11:03:01 2009 @@ -892,6 +892,9 @@ Library ------- +- Issue #6545: Removed assert statements in distutils.Extension, so the + behavior is similar when used with -O. + - Issue #6459: distutils.command.build_ext.get_export_symbols now uses the "PyInit" prefix, rather than "init". From python-checkins at python.org Wed Jul 22 11:04:17 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 22 Jul 2009 09:04:17 -0000 Subject: [Python-checkins] r74166 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Wed Jul 22 11:04:17 2009 New Revision: 74166 Log: Blocked revisions 74163 via svnmerge ........ r74163 | tarek.ziade | 2009-07-22 10:55:19 +0200 (Wed, 22 Jul 2009) | 1 line Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O ........ Modified: python/branches/release26-maint/ (props changed) From buildbot at python.org Wed Jul 22 11:57:19 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 22 Jul 2009 09:57:19 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 3.1 Message-ID: The Buildbot has detected a new failure of x86 gentoo 3.1. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%203.1/builds/30 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release31-maint] HEAD Blamelist: tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: make: *** [buildbottest] Unknown signal 32 sincerely, -The Buildbot From nnorwitz at gmail.com Wed Jul 22 12:04:16 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Wed, 22 Jul 2009 06:04:16 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090722100416.GA29884@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 Less important issues: ---------------------- test_cmd_line leaked [0, -25, 0] references, sum=-25 test_popen2 leaked [0, 54, -54] references, sum=0 test_smtplib leaked [-82, 0, 0] references, sum=-82 test_ssl leaked [0, -339, 339] references, sum=0 test_threading leaked [48, 48, 44] references, sum=140 test_urllib2_localnet leaked [283, -283, 0] references, sum=0 test_xmlrpc leaked [-5, 5, 0] references, sum=0 From buildbot at python.org Wed Jul 22 13:10:24 2009 From: buildbot at python.org (buildbot at python.org) Date: Wed, 22 Jul 2009 11:10:24 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2353 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: benjamin.peterson,tarek.ziade BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 ====================================================================== FAIL: test01_basic_replication (bsddb.test.test_replication.DBBaseReplication) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\bsddb\test\test_replication.py", line 315, in test01_basic_replication self.assertTrue(time.time() Author: georg.brandl Date: Wed Jul 22 13:57:15 2009 New Revision: 74167 Log: Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. Modified: python/trunk/Lib/test/test_builtin.py python/trunk/Misc/NEWS python/trunk/Objects/bytearrayobject.c Modified: python/trunk/Lib/test/test_builtin.py ============================================================================== --- python/trunk/Lib/test/test_builtin.py (original) +++ python/trunk/Lib/test/test_builtin.py Wed Jul 22 13:57:15 2009 @@ -1472,6 +1472,11 @@ self.assertEqual(bin(-(2**65)), '-0b1' + '0' * 65) self.assertEqual(bin(-(2**65-1)), '-0b' + '1' * 65) + def test_bytearray_translate(self): + x = bytearray("abc") + self.assertRaises(ValueError, x.translate, "1", 1) + self.assertRaises(TypeError, x.translate, "1"*256, 1) + class TestSorted(unittest.TestCase): def test_basic(self): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Jul 22 13:57:15 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. + - Issue #1616979: Added the cp720 (Arabic DOS) encoding. - Issue #6070: On posix platforms import no longer copies the execute bit Modified: python/trunk/Objects/bytearrayobject.c ============================================================================== --- python/trunk/Objects/bytearrayobject.c (original) +++ python/trunk/Objects/bytearrayobject.c Wed Jul 22 13:57:15 2009 @@ -1465,15 +1465,17 @@ if (vtable.len != 256) { PyErr_SetString(PyExc_ValueError, "translation table must be 256 characters long"); - goto done; + PyBuffer_Release(&vtable); + return NULL; } table = (const char*)vtable.buf; } if (delobj != NULL) { if (_getbuffer(delobj, &vdel) < 0) { - delobj = NULL; /* don't try to release vdel buffer on exit */ - goto done; + if (tableobj != NULL) + PyBuffer_Release(&vtable); + return NULL; } } else { From python-checkins at python.org Wed Jul 22 14:03:09 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 22 Jul 2009 12:03:09 -0000 Subject: [Python-checkins] r74168 - in python/branches/release26-maint: Lib/test/test_builtin.py Misc/NEWS Objects/bytearrayobject.c Message-ID: Author: georg.brandl Date: Wed Jul 22 14:03:09 2009 New Revision: 74168 Log: Merged revisions 74167 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74167 | georg.brandl | 2009-07-22 13:57:15 +0200 (Mi, 22 Jul 2009) | 1 line Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_builtin.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Objects/bytearrayobject.c Modified: python/branches/release26-maint/Lib/test/test_builtin.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_builtin.py (original) +++ python/branches/release26-maint/Lib/test/test_builtin.py Wed Jul 22 14:03:09 2009 @@ -1469,6 +1469,11 @@ self.assertEqual(bin(-(2**65)), '-0b1' + '0' * 65) self.assertEqual(bin(-(2**65-1)), '-0b' + '1' * 65) + def test_bytearray_translate(self): + x = bytearray("abc") + self.assertRaises(ValueError, x.translate, "1", 1) + self.assertRaises(TypeError, x.translate, "1"*256, 1) + class TestSorted(unittest.TestCase): def test_basic(self): Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Wed Jul 22 14:03:09 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. + - Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set. Modified: python/branches/release26-maint/Objects/bytearrayobject.c ============================================================================== --- python/branches/release26-maint/Objects/bytearrayobject.c (original) +++ python/branches/release26-maint/Objects/bytearrayobject.c Wed Jul 22 14:03:09 2009 @@ -1458,15 +1458,14 @@ if (vtable.len != 256) { PyErr_SetString(PyExc_ValueError, "translation table must be 256 characters long"); - result = NULL; - goto done; + PyBuffer_Release(&vtable); + return NULL; } if (delobj != NULL) { if (_getbuffer(delobj, &vdel) < 0) { - result = NULL; - delobj = NULL; /* don't try to release vdel buffer on exit */ - goto done; + PyBuffer_Release(&vtable); + return NULL; } } else { From python-checkins at python.org Wed Jul 22 14:04:00 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 22 Jul 2009 12:04:00 -0000 Subject: [Python-checkins] r74169 - in python/branches/py3k: Lib/test/test_builtin.py Misc/NEWS Objects/bytearrayobject.c Message-ID: Author: georg.brandl Date: Wed Jul 22 14:03:59 2009 New Revision: 74169 Log: Merged revisions 74167 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74167 | georg.brandl | 2009-07-22 13:57:15 +0200 (Mi, 22 Jul 2009) | 1 line Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_builtin.py python/branches/py3k/Misc/NEWS python/branches/py3k/Objects/bytearrayobject.c Modified: python/branches/py3k/Lib/test/test_builtin.py ============================================================================== --- python/branches/py3k/Lib/test/test_builtin.py (original) +++ python/branches/py3k/Lib/test/test_builtin.py Wed Jul 22 14:03:59 2009 @@ -1229,6 +1229,11 @@ self.assertEqual(bin(-(2**65)), '-0b1' + '0' * 65) self.assertEqual(bin(-(2**65-1)), '-0b' + '1' * 65) + def test_bytearray_translate(self): + x = bytearray(b"abc") + self.assertRaises(ValueError, x.translate, b"1", 1) + self.assertRaises(TypeError, x.translate, b"1"*256, 1) + class TestSorted(unittest.TestCase): def test_basic(self): Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 22 14:03:59 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. + - Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set. Modified: python/branches/py3k/Objects/bytearrayobject.c ============================================================================== --- python/branches/py3k/Objects/bytearrayobject.c (original) +++ python/branches/py3k/Objects/bytearrayobject.c Wed Jul 22 14:03:59 2009 @@ -1389,15 +1389,17 @@ if (vtable.len != 256) { PyErr_SetString(PyExc_ValueError, "translation table must be 256 characters long"); - goto done; + PyBuffer_Release(&vtable); + return NULL; } table = (const char*)vtable.buf; } if (delobj != NULL) { if (_getbuffer(delobj, &vdel) < 0) { - delobj = NULL; /* don't try to release vdel buffer on exit */ - goto done; + if (tableobj != NULL) + PyBuffer_Release(&vtable); + return NULL; } } else { From python-checkins at python.org Wed Jul 22 14:06:11 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 22 Jul 2009 12:06:11 -0000 Subject: [Python-checkins] r74170 - in python/branches/release31-maint: Lib/test/test_builtin.py Misc/NEWS Objects/bytearrayobject.c Message-ID: Author: georg.brandl Date: Wed Jul 22 14:06:11 2009 New Revision: 74170 Log: Merged revisions 74169 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ................ r74169 | georg.brandl | 2009-07-22 14:03:59 +0200 (Mi, 22 Jul 2009) | 9 lines Merged revisions 74167 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74167 | georg.brandl | 2009-07-22 13:57:15 +0200 (Mi, 22 Jul 2009) | 1 line Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_builtin.py python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Objects/bytearrayobject.c Modified: python/branches/release31-maint/Lib/test/test_builtin.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_builtin.py (original) +++ python/branches/release31-maint/Lib/test/test_builtin.py Wed Jul 22 14:06:11 2009 @@ -1229,6 +1229,11 @@ self.assertEqual(bin(-(2**65)), '-0b1' + '0' * 65) self.assertEqual(bin(-(2**65-1)), '-0b' + '1' * 65) + def test_bytearray_translate(self): + x = bytearray(b"abc") + self.assertRaises(ValueError, x.translate, b"1", 1) + self.assertRaises(TypeError, x.translate, b"1"*256, 1) + class TestSorted(unittest.TestCase): def test_basic(self): Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Wed Jul 22 14:06:11 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. + - Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set. Modified: python/branches/release31-maint/Objects/bytearrayobject.c ============================================================================== --- python/branches/release31-maint/Objects/bytearrayobject.c (original) +++ python/branches/release31-maint/Objects/bytearrayobject.c Wed Jul 22 14:06:11 2009 @@ -1389,15 +1389,17 @@ if (vtable.len != 256) { PyErr_SetString(PyExc_ValueError, "translation table must be 256 characters long"); - goto done; + PyBuffer_Release(&vtable); + return NULL; } table = (const char*)vtable.buf; } if (delobj != NULL) { if (_getbuffer(delobj, &vdel) < 0) { - delobj = NULL; /* don't try to release vdel buffer on exit */ - goto done; + if (tableobj != NULL) + PyBuffer_Release(&vtable); + return NULL; } } else { From ncoghlan at gmail.com Wed Jul 22 14:37:20 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Wed, 22 Jul 2009 22:37:20 +1000 Subject: [Python-checkins] r74152 - python/trunk/Doc/reference/simple_stmts.rst In-Reply-To: <4a665764.1567f10a.682b.459eSMTPIN_ADDED@mx.google.com> References: <4a665764.1567f10a.682b.459eSMTPIN_ADDED@mx.google.com> Message-ID: <4A670800.2050300@gmail.com> benjamin.peterson wrote: > Author: benjamin.peterson > Date: Wed Jul 22 02:03:43 2009 > New Revision: 74152 > > Log: > simplify > > Modified: > python/trunk/Doc/reference/simple_stmts.rst > > Modified: python/trunk/Doc/reference/simple_stmts.rst > ============================================================================== > --- python/trunk/Doc/reference/simple_stmts.rst (original) > +++ python/trunk/Doc/reference/simple_stmts.rst Wed Jul 22 02:03:43 2009 > @@ -282,13 +282,13 @@ > > The simple form, ``assert expression``, is equivalent to :: > > - if __debug__: > - if not expression: raise AssertionError > + if __debug__ and not expression: > + raise AssertionError > > The extended form, ``assert expression1, expression2``, is equivalent to :: > > - if __debug__: > - if not expression1: raise AssertionError(expression2) > + if __debug__ and not expression1: > + raise AssertionError(expression2) This change is incorrect as the compiler only optimises away statements specifically of the form "if __debug__:". As soon as you put anything else in the expression, the compiler no longer detects it as a candidate for elimination. (example below was run under "python -O") .>>> def f(): .... if __debug__: .... return 1 .... .>>> f() .>>> from dis import dis .>>> dis(f) 2 0 LOAD_CONST 0 (None) 3 RETURN_VALUE .>>> def f(): .... if __debug__ and 1: .... return 1 .... .>>> f() .>>> dis(f) 2 0 LOAD_GLOBAL 0 (__debug__) 3 JUMP_IF_FALSE 15 (to 21) 6 POP_TOP 7 LOAD_CONST 1 (1) 10 JUMP_IF_FALSE 8 (to 21) 13 POP_TOP 3 14 LOAD_CONST 1 (1) 17 RETURN_VALUE 18 JUMP_FORWARD 1 (to 22) >> 21 POP_TOP >> 22 LOAD_CONST 0 (None) 25 RETURN_VALUE Cheers. Nick -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From benjamin at python.org Wed Jul 22 15:40:52 2009 From: benjamin at python.org (Benjamin Peterson) Date: Wed, 22 Jul 2009 08:40:52 -0500 Subject: [Python-checkins] r74152 - python/trunk/Doc/reference/simple_stmts.rst In-Reply-To: <4A670800.2050300@gmail.com> References: <4a665764.1567f10a.682b.459eSMTPIN_ADDED@mx.google.com> <4A670800.2050300@gmail.com> Message-ID: <1afaf6160907220640o27a9a8c4lfa5b784e4c86a3bb@mail.gmail.com> 2009/7/22 Nick Coghlan : > benjamin.peterson wrote: >> Author: benjamin.peterson >> Date: Wed Jul 22 02:03:43 2009 >> New Revision: 74152 >> >> Log: >> simplify >> >> Modified: >> ? ?python/trunk/Doc/reference/simple_stmts.rst >> >> Modified: python/trunk/Doc/reference/simple_stmts.rst >> ============================================================================== >> --- python/trunk/Doc/reference/simple_stmts.rst ? ? ? (original) >> +++ python/trunk/Doc/reference/simple_stmts.rst ? ? ? Wed Jul 22 02:03:43 2009 >> @@ -282,13 +282,13 @@ >> >> ?The simple form, ``assert expression``, is equivalent to :: >> >> - ? if __debug__: >> - ? ? ?if not expression: raise AssertionError >> + ? if __debug__ and not expression: >> + ? ? ? raise AssertionError >> >> ?The extended form, ``assert expression1, expression2``, is equivalent to :: >> >> - ? if __debug__: >> - ? ? ?if not expression1: raise AssertionError(expression2) >> + ? if __debug__ and not expression1: >> + ? ? ? raise AssertionError(expression2) > > This change is incorrect as the compiler only optimises away statements > specifically of the form "if __debug__:". As soon as you put anything > else in the expression, the compiler no longer detects it as a candidate > for elimination. Yeah, but whether it's optimized out in the form is an implementation detail. -- Regards, Benjamin From g.brandl at gmx.net Wed Jul 22 16:24:16 2009 From: g.brandl at gmx.net (Georg Brandl) Date: Wed, 22 Jul 2009 16:24:16 +0200 Subject: [Python-checkins] r74152 - python/trunk/Doc/reference/simple_stmts.rst In-Reply-To: <1afaf6160907220640o27a9a8c4lfa5b784e4c86a3bb@mail.gmail.com> References: <4a665764.1567f10a.682b.459eSMTPIN_ADDED@mx.google.com> <4A670800.2050300@gmail.com> <1afaf6160907220640o27a9a8c4lfa5b784e4c86a3bb@mail.gmail.com> Message-ID: Benjamin Peterson schrieb: > 2009/7/22 Nick Coghlan : >> benjamin.peterson wrote: >>> Author: benjamin.peterson >>> Date: Wed Jul 22 02:03:43 2009 >>> New Revision: 74152 >>> >>> Log: >>> simplify >>> >>> Modified: >>> python/trunk/Doc/reference/simple_stmts.rst >>> >>> Modified: python/trunk/Doc/reference/simple_stmts.rst >>> ============================================================================== >>> --- python/trunk/Doc/reference/simple_stmts.rst (original) >>> +++ python/trunk/Doc/reference/simple_stmts.rst Wed Jul 22 02:03:43 2009 >>> @@ -282,13 +282,13 @@ >>> >>> The simple form, ``assert expression``, is equivalent to :: >>> >>> - if __debug__: >>> - if not expression: raise AssertionError >>> + if __debug__ and not expression: >>> + raise AssertionError >>> >>> The extended form, ``assert expression1, expression2``, is equivalent to :: >>> >>> - if __debug__: >>> - if not expression1: raise AssertionError(expression2) >>> + if __debug__ and not expression1: >>> + raise AssertionError(expression2) >> >> This change is incorrect as the compiler only optimises away statements >> specifically of the form "if __debug__:". As soon as you put anything >> else in the expression, the compiler no longer detects it as a candidate >> for elimination. > > Yeah, but whether it's optimized out in the form is an implementation detail. I still find it cleaner in the original form (or a PEP8ified version with a real suite), please revert. 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 Jul 22 17:20:28 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 22 Jul 2009 15:20:28 -0000 Subject: [Python-checkins] r74171 - python/branches/py3k/Lib/test/test_os.py Message-ID: Author: r.david.murray Date: Wed Jul 22 17:20:27 2009 New Revision: 74171 Log: Issue 6542: Make sure that TestInvalidFD.test_closerange does not close any valid file descriptors. Modified: python/branches/py3k/Lib/test/test_os.py Modified: python/branches/py3k/Lib/test/test_os.py ============================================================================== --- python/branches/py3k/Lib/test/test_os.py (original) +++ python/branches/py3k/Lib/test/test_os.py Wed Jul 22 17:20:27 2009 @@ -617,7 +617,18 @@ def test_closerange(self): if hasattr(os, "closerange"): fd = support.make_bad_fd() - self.assertEqual(os.closerange(fd, fd + 10), None) + # Make sure none of the descriptors we are about to close are + # currently valid (issue 6542). + for i in range(10): + try: os.fstat(fd+i) + except OSError: + pass + else: + break + if i < 2: + raise unittest.SkipTest( + "Unable to acquire a range of invalid file descriptors") + self.assertEqual(os.closerange(fd, fd + i-1), None) def test_dup2(self): if hasattr(os, "dup2"): From python-checkins at python.org Wed Jul 22 17:23:37 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 22 Jul 2009 15:23:37 -0000 Subject: [Python-checkins] r74172 - in python/branches/release31-maint: Lib/test/test_os.py Message-ID: Author: r.david.murray Date: Wed Jul 22 17:23:36 2009 New Revision: 74172 Log: Merged revisions 74171 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74171 | r.david.murray | 2009-07-22 11:20:27 -0400 (Wed, 22 Jul 2009) | 3 lines Issue 6542: Make sure that TestInvalidFD.test_closerange does not close any valid file descriptors. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_os.py Modified: python/branches/release31-maint/Lib/test/test_os.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_os.py (original) +++ python/branches/release31-maint/Lib/test/test_os.py Wed Jul 22 17:23:36 2009 @@ -617,7 +617,18 @@ def test_closerange(self): if hasattr(os, "closerange"): fd = support.make_bad_fd() - self.assertEqual(os.closerange(fd, fd + 10), None) + # Make sure none of the descriptors we are about to close are + # currently valid (issue 6542). + for i in range(10): + try: os.fstat(fd+i) + except OSError: + pass + else: + break + if i < 2: + raise unittest.SkipTest( + "Unable to acquire a range of invalid file descriptors") + self.assertEqual(os.closerange(fd, fd + i-1), None) def test_dup2(self): if hasattr(os, "dup2"): From python-checkins at python.org Wed Jul 22 18:34:37 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 22 Jul 2009 16:34:37 -0000 Subject: [Python-checkins] r74173 - python/trunk/Doc/reference/simple_stmts.rst Message-ID: Author: benjamin.peterson Date: Wed Jul 22 18:34:37 2009 New Revision: 74173 Log: revert r74152 Modified: python/trunk/Doc/reference/simple_stmts.rst Modified: python/trunk/Doc/reference/simple_stmts.rst ============================================================================== --- python/trunk/Doc/reference/simple_stmts.rst (original) +++ python/trunk/Doc/reference/simple_stmts.rst Wed Jul 22 18:34:37 2009 @@ -282,13 +282,13 @@ The simple form, ``assert expression``, is equivalent to :: - if __debug__ and not expression: - raise AssertionError + if __debug__: + if not expression: raise AssertionError The extended form, ``assert expression1, expression2``, is equivalent to :: - if __debug__ and not expression1: - raise AssertionError(expression2) + if __debug__: + if not expression1: raise AssertionError(expression2) .. index:: single: __debug__ From python-checkins at python.org Wed Jul 22 18:36:59 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 22 Jul 2009 16:36:59 -0000 Subject: [Python-checkins] r74174 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Wed Jul 22 18:36:58 2009 New Revision: 74174 Log: Blocked revisions 74152,74173 via svnmerge ........ r74152 | benjamin.peterson | 2009-07-21 19:03:43 -0500 (Tue, 21 Jul 2009) | 1 line simplify ........ r74173 | benjamin.peterson | 2009-07-22 11:34:37 -0500 (Wed, 22 Jul 2009) | 1 line revert r74152 ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Jul 22 19:22:59 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 22 Jul 2009 17:22:59 -0000 Subject: [Python-checkins] r74175 - python/trunk/Lib/test/test_os.py Message-ID: Author: r.david.murray Date: Wed Jul 22 19:22:58 2009 New Revision: 74175 Log: Backport of fix for issue 6542: make sure test_os.TestInvalidFD.test_closerange does not close any valid file descriptors. Modified: python/trunk/Lib/test/test_os.py Modified: python/trunk/Lib/test/test_os.py ============================================================================== --- python/trunk/Lib/test/test_os.py (original) +++ python/trunk/Lib/test/test_os.py Wed Jul 22 19:22:58 2009 @@ -563,7 +563,18 @@ def test_closerange(self): if hasattr(os, "closerange"): fd = test_support.make_bad_fd() - self.assertEqual(os.closerange(fd, fd + 10), None) + # Make sure none of the descriptors we are about to close are + # currently valid (issue 6542). + for i in range(10): + try: os.fstat(fd+i) + except OSError: + pass + else: + break + if i < 2: + raise unittest.SkipTest( + "Unable to acquire a range of invalid file descriptors") + self.assertEqual(os.closerange(fd, fd + i-1), None) def test_dup2(self): if hasattr(os, "dup2"): From python-checkins at python.org Wed Jul 22 19:37:11 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 22 Jul 2009 17:37:11 -0000 Subject: [Python-checkins] r74176 - in python/branches/release26-maint: Lib/test/test_os.py Message-ID: Author: r.david.murray Date: Wed Jul 22 19:37:11 2009 New Revision: 74176 Log: Merged revisions 74175 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74175 | r.david.murray | 2009-07-22 13:22:58 -0400 (Wed, 22 Jul 2009) | 4 lines Backport of fix for issue 6542: make sure test_os.TestInvalidFD.test_closerange does not close any valid file descriptors. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_os.py Modified: python/branches/release26-maint/Lib/test/test_os.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_os.py (original) +++ python/branches/release26-maint/Lib/test/test_os.py Wed Jul 22 19:37:11 2009 @@ -556,7 +556,18 @@ def test_closerange(self): if hasattr(os, "closerange"): fd = test_support.make_bad_fd() - self.assertEqual(os.closerange(fd, fd + 10), None) + # Make sure none of the descriptors we are about to close are + # currently valid (issue 6542). + for i in range(10): + try: os.fstat(fd+i) + except OSError: + pass + else: + break + if i < 2: + raise unittest.SkipTest( + "Unable to acquire a range of invalid file descriptors") + self.assertEqual(os.closerange(fd, fd + i-1), None) def test_dup2(self): if hasattr(os, "dup2"): From python-checkins at python.org Wed Jul 22 19:42:10 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 22 Jul 2009 17:42:10 -0000 Subject: [Python-checkins] r74177 - python/branches/py3k Message-ID: Author: r.david.murray Date: Wed Jul 22 19:42:10 2009 New Revision: 74177 Log: Recorded merge of revisions 74175 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74175 | r.david.murray | 2009-07-22 13:22:58 -0400 (Wed, 22 Jul 2009) | 4 lines Backport of fix for issue 6542: make sure test_os.TestInvalidFD.test_closerange does not close any valid file descriptors. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Jul 22 19:50:58 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 22 Jul 2009 17:50:58 -0000 Subject: [Python-checkins] r74178 - python/branches/release31-maint Message-ID: Author: r.david.murray Date: Wed Jul 22 19:50:57 2009 New Revision: 74178 Log: Recorded merge of revisions 74177 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74177 | r.david.murray | 2009-07-22 13:42:10 -0400 (Wed, 22 Jul 2009) | 11 lines Recorded merge of revisions 74175 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74175 | r.david.murray | 2009-07-22 13:22:58 -0400 (Wed, 22 Jul 2009) | 4 lines Backport of fix for issue 6542: make sure test_os.TestInvalidFD.test_closerange does not close any valid file descriptors. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Wed Jul 22 23:08:50 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 22 Jul 2009 21:08:50 -0000 Subject: [Python-checkins] r74179 - python/trunk/Doc/library/cgi.rst Message-ID: Author: ezio.melotti Date: Wed Jul 22 23:08:49 2009 New Revision: 74179 Log: #6423 has_key -> in Modified: python/trunk/Doc/library/cgi.rst Modified: python/trunk/Doc/library/cgi.rst ============================================================================== --- python/trunk/Doc/library/cgi.rst (original) +++ python/trunk/Doc/library/cgi.rst Wed Jul 22 23:08:49 2009 @@ -91,12 +91,13 @@ various environment variables set according to the CGI standard). Since it may consume standard input, it should be instantiated only once. -The :class:`FieldStorage` instance can be indexed like a Python dictionary, and -also supports the standard dictionary methods :meth:`has_key` and :meth:`keys`. -The built-in :func:`len` is also supported. Form fields containing empty -strings are ignored and do not appear in the dictionary; to keep such values, -provide a true value for the optional *keep_blank_values* keyword parameter when -creating the :class:`FieldStorage` instance. +The :class:`FieldStorage` instance can be indexed like a Python dictionary. +It allows membership testing with the :keyword:`in` operator, and also supports +the standard dictionary method :meth:`keys` and the built-in function +:func:`len`. Form fields containing empty strings are ignored and do not appear +in the dictionary; to keep such values, provide a true value for the optional +*keep_blank_values* keyword parameter when creating the :class:`FieldStorage` +instance. For instance, the following code (which assumes that the :mailheader:`Content-Type` header and blank line have already been printed) @@ -104,7 +105,7 @@ string:: form = cgi.FieldStorage() - if not (form.has_key("name") and form.has_key("addr")): + if "name" not in form or "addr" not in form: print "

Error

" print "Please fill in the name and addr fields." return From python-checkins at python.org Wed Jul 22 23:17:15 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 22 Jul 2009 21:17:15 -0000 Subject: [Python-checkins] r74180 - in python/branches/py3k: Doc/library/cgi.rst Message-ID: Author: ezio.melotti Date: Wed Jul 22 23:17:14 2009 New Revision: 74180 Log: Merged revisions 74179 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74179 | ezio.melotti | 2009-07-23 00:08:49 +0300 (Thu, 23 Jul 2009) | 1 line #6423 has_key -> in ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/cgi.rst Modified: python/branches/py3k/Doc/library/cgi.rst ============================================================================== --- python/branches/py3k/Doc/library/cgi.rst (original) +++ python/branches/py3k/Doc/library/cgi.rst Wed Jul 22 23:17:14 2009 @@ -88,12 +88,13 @@ variables set according to the CGI standard). Since it may consume standard input, it should be instantiated only once. -The :class:`FieldStorage` instance can be indexed like a Python dictionary, and -also supports the standard dictionary methods :meth:`__contains__` and -:meth:`keys`. The built-in :func:`len` is also supported. Form fields -containing empty strings are ignored and do not appear in the dictionary; to -keep such values, provide a true value for the optional *keep_blank_values* -keyword parameter when creating the :class:`FieldStorage` instance. +The :class:`FieldStorage` instance can be indexed like a Python dictionary. +It allows membership testing with the :keyword:`in` operator, and also supports +the standard dictionary method :meth:`keys` and the built-in function +:func:`len`. Form fields containing empty strings are ignored and do not appear +in the dictionary; to keep such values, provide a true value for the optional +*keep_blank_values* keyword parameter when creating the :class:`FieldStorage` +instance. For instance, the following code (which assumes that the :mailheader:`Content-Type` header and blank line have already been printed) @@ -101,7 +102,7 @@ string:: form = cgi.FieldStorage() - if not ("name" in form and "addr" in form): + if "name" not in form or "addr" not in form: print("

Error

") print("Please fill in the name and addr fields.") return From python-checkins at python.org Wed Jul 22 23:27:53 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 21:27:53 -0000 Subject: [Python-checkins] r74181 - python/branches/py3k/Lib/test/test_curses.py Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 23:27:53 2009 New Revision: 74181 Log: Clean up test_curses. By using __stdout__ directly, test_curses caused regrtest.py to duplicate the output of some test results. Modified: python/branches/py3k/Lib/test/test_curses.py Modified: python/branches/py3k/Lib/test/test_curses.py ============================================================================== --- python/branches/py3k/Lib/test/test_curses.py (original) +++ python/branches/py3k/Lib/test/test_curses.py Wed Jul 22 23:27:53 2009 @@ -269,16 +269,17 @@ finally: curses.resetty() -if __name__ == '__main__': - curses.wrapper(main) - unit_tests() -else: +def test_main(): # testing setupterm() inside initscr/endwin # causes terminal breakage - curses.setupterm(fd=sys.__stdout__.fileno()) + curses.setupterm(fd=sys.stdout.fileno()) try: stdscr = curses.initscr() main(stdscr) finally: curses.endwin() unit_tests() + +if __name__ == '__main__': + curses.wrapper(main) + unit_tests() From python-checkins at python.org Wed Jul 22 23:29:02 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 21:29:02 -0000 Subject: [Python-checkins] r74182 - python/branches/py3k/Lib/test/test_asynchat.py Message-ID: Author: alexandre.vassalotti Date: Wed Jul 22 23:29:01 2009 New Revision: 74182 Log: Use assertGreater instead of assertTrue(x > y). Modified: python/branches/py3k/Lib/test/test_asynchat.py Modified: python/branches/py3k/Lib/test/test_asynchat.py ============================================================================== --- python/branches/py3k/Lib/test/test_asynchat.py (original) +++ python/branches/py3k/Lib/test/test_asynchat.py Wed Jul 22 23:29:01 2009 @@ -214,7 +214,7 @@ # the server might have been able to send a byte or two back, but this # at least checks that it received something and didn't just fail # (which could still result in the client not having received anything) - self.assertTrue(len(s.buffer) > 0) + self.assertGreater(len(s.buffer), 0) class TestAsynchat_WithPoll(TestAsynchat): From alexandre at peadrop.com Wed Jul 22 23:35:10 2009 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Wed, 22 Jul 2009 17:35:10 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) In-Reply-To: References: <20090722004937.GA11088@python.psfb.org> Message-ID: On Wed, Jul 22, 2009 at 1:17 AM, Neal Norwitz wrote: > Sure, this report comes from Misc/build.sh. ?It typically only runs on > trunk. ?You can also find the full results here: > > ?http://docs.python.org/dev/results/ > > which are also generated from Misc/build.sh. ?The most recent results > were from r74149. > Ah, thanks. I didn't know how the report were generated?I thought you ran some private script as a cron job or something. > Perhaps the page references above should be appended to this mail? > Feel free to make any changes to the build.sh file. ?Once checked in, > the changes will be picked up on subsequent runs. > Sounds like a good idea to me. I will check out what else I can do to improve build.sh. Thanks, -- Alexandre From python-checkins at python.org Thu Jul 23 01:27:22 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 22 Jul 2009 23:27:22 -0000 Subject: [Python-checkins] r74183 - python/branches/py3k/Lib/test/test_mailbox.py Message-ID: Author: alexandre.vassalotti Date: Thu Jul 23 01:27:17 2009 New Revision: 74183 Log: Specialize assertTrue checks when possible. We should get slightly more helpful failure messages with this change. Modified: python/branches/py3k/Lib/test/test_mailbox.py Modified: python/branches/py3k/Lib/test/test_mailbox.py ============================================================================== --- python/branches/py3k/Lib/test/test_mailbox.py (original) +++ python/branches/py3k/Lib/test/test_mailbox.py Thu Jul 23 01:27:17 2009 @@ -24,13 +24,13 @@ self.assertTrue(isinstance(msg, email.message.Message)) self.assertTrue(isinstance(msg, mailbox.Message)) for key, value in _sample_headers.items(): - self.assertTrue(value in msg.get_all(key)) + self.assertIn(value, msg.get_all(key)) self.assertTrue(msg.is_multipart()) self.assertEqual(len(msg.get_payload()), len(_sample_payloads)) for i, payload in enumerate(_sample_payloads): part = msg.get_payload(i) self.assertTrue(isinstance(part, email.message.Message)) - self.assertTrue(not isinstance(part, mailbox.Message)) + self.assertFalse(isinstance(part, mailbox.Message)) self.assertEqual(part.get_payload(), payload) def _delete_recursively(self, target): @@ -91,16 +91,14 @@ key1 = self._box.add(self._template % 1) self.assertEqual(len(self._box), 2) method(key0) - l = len(self._box) - self.assertTrue(l == 1, "actual l: %s" % l) + self.assertEqual(len(self._box), 1) self.assertRaises(KeyError, lambda: self._box[key0]) self.assertRaises(KeyError, lambda: method(key0)) self.assertEqual(self._box.get_string(key1), self._template % 1) key2 = self._box.add(self._template % 2) self.assertEqual(len(self._box), 2) method(key2) - l = len(self._box) - self.assertTrue(l == 1, "actual l: %s" % l) + self.assertEqual(len(self._box), 1) self.assertRaises(KeyError, lambda: self._box[key2]) self.assertRaises(KeyError, lambda: method(key2)) self.assertEqual(self._box.get_string(key1), self._template % 1) @@ -127,8 +125,8 @@ msg = self._box.get(key0) self.assertEqual(msg['from'], 'foo') self.assertEqual(msg.get_payload(), '0') - self.assertTrue(self._box.get('foo') is None) - self.assertTrue(self._box.get('foo', False) is False) + self.assertIs(self._box.get('foo'), None) + self.assertIs(self._box.get('foo', False), False) self._box.close() self._box = self._factory(self._path) key1 = self._box.add(self._template % 1) @@ -228,29 +226,28 @@ count = 0 for value in returned_values: self.assertEqual(value['from'], 'foo') - self.assertTrue(int(value.get_payload()) < repetitions) + self.assertLess(int(value.get_payload()), repetitions) count += 1 self.assertEqual(len(values), count) def test_contains(self): # Check existence of keys using __contains__() - method = self._box.__contains__ - self.assertTrue(not method('foo')) + self.assertNotIn('foo', self._box) key0 = self._box.add(self._template % 0) - self.assertTrue(method(key0)) - self.assertTrue(not method('foo')) + self.assertIn(key0, self._box) + self.assertNotIn('foo', self._box) key1 = self._box.add(self._template % 1) - self.assertTrue(method(key1)) - self.assertTrue(method(key0)) - self.assertTrue(not method('foo')) + self.assertIn(key1, self._box) + self.assertIn(key0, self._box) + self.assertNotIn('foo', self._box) self._box.remove(key0) - self.assertTrue(not method(key0)) - self.assertTrue(method(key1)) - self.assertTrue(not method('foo')) + self.assertNotIn(key0, self._box) + self.assertIn(key1, self._box) + self.assertNotIn('foo', self._box) self._box.remove(key1) - self.assertTrue(not method(key1)) - self.assertTrue(not method(key0)) - self.assertTrue(not method('foo')) + self.assertNotIn(key1, self._box) + self.assertNotIn(key0, self._box) + self.assertNotIn('foo', self._box) def test_len(self, repetitions=10): # Get message count @@ -297,7 +294,7 @@ for i in range(iterations): self._box.add(self._template % i) for i, key in enumerate(keys): - self.assertTrue(self._box.get_string(key) == self._template % i) + self.assertEqual(self._box.get_string(key), self._template % i) self._box.clear() self.assertEqual(len(self._box), 0) for i, key in enumerate(keys): @@ -306,19 +303,19 @@ def test_pop(self): # Get and remove a message using pop() key0 = self._box.add(self._template % 0) - self.assertTrue(key0 in self._box) + self.assertIn(key0, self._box) key1 = self._box.add(self._template % 1) - self.assertTrue(key1 in self._box) + self.assertIn(key1, self._box) self.assertEqual(self._box.pop(key0).get_payload(), '0') - self.assertTrue(key0 not in self._box) - self.assertTrue(key1 in self._box) + self.assertNotIn(key0, self._box) + self.assertIn(key1, self._box) key2 = self._box.add(self._template % 2) - self.assertTrue(key2 in self._box) + self.assertIn(key2, self._box) self.assertEqual(self._box.pop(key2).get_payload(), '2') - self.assertTrue(key2 not in self._box) - self.assertTrue(key1 in self._box) + self.assertNotIn(key2, self._box) + self.assertIn(key1, self._box) self.assertEqual(self._box.pop(key1).get_payload(), '1') - self.assertTrue(key1 not in self._box) + self.assertNotIn(key1, self._box) self.assertEqual(len(self._box), 0) def test_popitem(self, iterations=10): @@ -329,8 +326,8 @@ seen = [] for i in range(10): key, msg = self._box.popitem() - self.assertTrue(key in keys) - self.assertTrue(key not in seen) + self.assertIn(key, keys) + self.assertNotIn(key, seen) seen.append(key) self.assertEqual(int(msg.get_payload()), keys.index(key)) self.assertEqual(len(self._box), 0) @@ -377,11 +374,11 @@ def test_lock_unlock(self): # Lock and unlock the mailbox - self.assertTrue(not os.path.exists(self._get_lock_path())) + self.assertFalse(os.path.exists(self._get_lock_path())) self._box.lock() self.assertTrue(os.path.exists(self._get_lock_path())) self._box.unlock() - self.assertTrue(not os.path.exists(self._get_lock_path())) + self.assertFalse(os.path.exists(self._get_lock_path())) def test_close(self): # Close mailbox and flush changes to disk @@ -400,7 +397,7 @@ keys = self._box.keys() self.assertEqual(len(keys), 3) for key in keys: - self.assertTrue(self._box.get_string(key) in contents) + self.assertIn(self._box.get_string(key), contents) oldbox.close() def test_dump_message(self): @@ -571,7 +568,7 @@ self._box.add_folder('one') self._box.add_folder('two') self.assertEqual(len(self._box.list_folders()), 2) - self.assertTrue(set(self._box.list_folders()) == set(('one', 'two'))) + self.assertEqual(set(self._box.list_folders()), set(('one', 'two'))) self._box.remove_folder('one') self.assertEqual(len(self._box.list_folders()), 1) self.assertEqual(set(self._box.list_folders()), set(('two',))) @@ -602,7 +599,7 @@ os.utime(foo_path, (time.time() - 129600 - 2, foo_stat.st_mtime)) self._box.clean() - self.assertTrue(not os.path.exists(foo_path)) + self.assertFalse(os.path.exists(foo_path)) self.assertTrue(os.path.exists(bar_path)) def test_create_tmp(self, repetitions=10): @@ -623,7 +620,7 @@ "tmp")), "File in wrong location: '%s'" % head) match = pattern.match(tail) - self.assertTrue(match is not None, "Invalid file name: '%s'" % tail) + self.assertIsNot(match, None, "Invalid file name: '%s'" % tail) groups = match.groups() if previous_groups is not None: self.assertTrue(int(groups[0] >= previous_groups[0]), @@ -691,10 +688,10 @@ return None box = self._factory(self._path, factory=dummy_factory) folder = box.add_folder('folder1') - self.assertTrue(folder._factory is dummy_factory) + self.assertIs(folder._factory, dummy_factory) folder1_alias = box.get_folder('folder1') - self.assertTrue(folder1_alias._factory is dummy_factory) + self.assertIs(folder1_alias._factory, dummy_factory) def test_directory_in_folder (self): # Test that mailboxes still work if there's a stray extra directory @@ -721,7 +718,7 @@ os.umask(orig_umask) path = os.path.join(self._path, self._box._lookup(key)) mode = os.stat(path).st_mode - self.assertTrue(mode & 0o111 == 0) + self.assertFalse(mode & 0o111) def test_folder_file_perms(self): # From bug #3228, we want to verify that the file created inside a Maildir @@ -802,7 +799,7 @@ self._box = self._factory(self._path) self.assertEqual(len(self._box), 3) for key in self._box.keys(): - self.assertTrue(self._box.get_string(key) in values) + self.assertIn(self._box.get_string(key), values) self._box.close() self.assertEqual(mtime, os.path.getmtime(self._path)) @@ -920,8 +917,8 @@ # Test for bug #1569790: verify that folders returned by .get_folder() # use the same factory function. - self.assertTrue(new_folder._factory is self._box._factory) - self.assertTrue(folder0._factory is self._box._factory) + self.assertIs(new_folder._factory, self._box._factory) + self.assertIs(folder0._factory, self._box._factory) def test_add_and_remove_folders(self): # Delete folders @@ -990,7 +987,7 @@ {'foo':[key0,key1,key3], 'unseen':[key0], 'bar':[key3], 'replied':[key3]}) self._box.pack() - self.assertTrue(self._box.keys() == [1, 2, 3]) + self.assertEqual(self._box.keys(), [1, 2, 3]) key0 = key0 key1 = key0 + 1 key2 = key1 + 1 @@ -1086,7 +1083,7 @@ self.assertTrue(isinstance(msg, mailbox.Message)) self.assertTrue(isinstance(msg, self._factory)) self.assertEqual(msg.keys(), []) - self.assertTrue(not msg.is_multipart()) + self.assertFalse(msg.is_multipart()) self.assertEqual(msg.get_payload(), None) def test_initialize_incorrectly(self): @@ -1159,7 +1156,7 @@ def test_date(self): # Use get_date() and set_date() msg = mailbox.MaildirMessage(_sample_message) - self.assertTrue(abs(msg.get_date() - time.time()) < 60) + self.assertLess(abs(msg.get_date() - time.time()), 60) msg.set_date(0.0) self.assertEqual(msg.get_date(), 0.0) @@ -1309,7 +1306,7 @@ msg = mailbox.BabylMessage(_sample_message) visible = msg.get_visible() self.assertEqual(visible.keys(), []) - self.assertTrue(visible.get_payload() is None) + self.assertIs(visible.get_payload(), None) visible['User-Agent'] = 'FooBar 1.0' visible['X-Whatever'] = 'Blah' self.assertEqual(msg.get_visible().keys(), []) @@ -1318,10 +1315,10 @@ self.assertTrue(visible.keys() == ['User-Agent', 'X-Whatever']) self.assertTrue(visible['User-Agent'] == 'FooBar 1.0') self.assertEqual(visible['X-Whatever'], 'Blah') - self.assertTrue(visible.get_payload() is None) + self.assertIs(visible.get_payload(), None) msg.update_visible() self.assertEqual(visible.keys(), ['User-Agent', 'X-Whatever']) - self.assertTrue(visible.get_payload() is None) + self.assertIs(visible.get_payload(), None) visible = msg.get_visible() self.assertEqual(visible.keys(), ['User-Agent', 'Date', 'From', 'To', 'Subject']) @@ -1423,7 +1420,7 @@ msg_mboxMMDF.set_flags(setting) msg = mailbox.MaildirMessage(msg_mboxMMDF) self.assertEqual(msg.get_flags(), result) - self.assertTrue(msg.get_date() == 0.0, msg.get_date()) + self.assertEqual(msg.get_date(), 0.0) msg_mboxMMDF.set_flags('O') self.assertEqual(mailbox.MaildirMessage(msg_mboxMMDF).get_subdir(), 'cur') @@ -1822,34 +1819,34 @@ self.mbox = mailbox.Maildir(support.TESTFN) #self.assertTrue(hasattr(self.mbox, "boxes")) #self.assertEqual(len(self.mbox.boxes), 0) - self.assertTrue(self.mbox.next() is None) - self.assertTrue(self.mbox.next() is None) + self.assertIs(self.mbox.next(), None) + self.assertIs(self.mbox.next(), None) def test_nonempty_maildir_cur(self): self.createMessage("cur") self.mbox = mailbox.Maildir(support.TESTFN) #self.assertEqual(len(self.mbox.boxes), 1) - self.assertTrue(self.mbox.next() is not None) - self.assertTrue(self.mbox.next() is None) - self.assertTrue(self.mbox.next() is None) + self.assertIsNot(self.mbox.next(), None) + self.assertIs(self.mbox.next(), None) + self.assertIs(self.mbox.next(), None) def test_nonempty_maildir_new(self): self.createMessage("new") self.mbox = mailbox.Maildir(support.TESTFN) #self.assertEqual(len(self.mbox.boxes), 1) - self.assertTrue(self.mbox.next() is not None) - self.assertTrue(self.mbox.next() is None) - self.assertTrue(self.mbox.next() is None) + self.assertIsNot(self.mbox.next(), None) + self.assertIs(self.mbox.next(), None) + self.assertIs(self.mbox.next(), None) def test_nonempty_maildir_both(self): self.createMessage("cur") self.createMessage("new") self.mbox = mailbox.Maildir(support.TESTFN) #self.assertEqual(len(self.mbox.boxes), 2) - self.assertTrue(self.mbox.next() is not None) - self.assertTrue(self.mbox.next() is not None) - self.assertTrue(self.mbox.next() is None) - self.assertTrue(self.mbox.next() is None) + self.assertIsNot(self.mbox.next(), None) + self.assertIsNot(self.mbox.next(), None) + self.assertIs(self.mbox.next(), None) + self.assertIs(self.mbox.next(), None) ## End: tests from the original module (for backward compatibility). From nnorwitz at gmail.com Thu Jul 23 08:08:57 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 23 Jul 2009 02:08:57 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090723060857.GA5475@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 Less important issues: ---------------------- test_popen2 leaked [0, 54, -54] references, sum=0 test_smtplib leaked [-88, 161, -161] references, sum=-88 test_sys leaked [-21, -21, 0] references, sum=-42 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, 0, -8] references, sum=-8 test_urllib2_localnet leaked [283, -283, 0] references, sum=0 From python-checkins at python.org Thu Jul 23 09:08:59 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 23 Jul 2009 07:08:59 -0000 Subject: [Python-checkins] r74184 - python/trunk/Doc/library/cmath.rst Message-ID: Author: georg.brandl Date: Thu Jul 23 09:08:58 2009 New Revision: 74184 Log: #6548: dont suggest existence of real and imag functions in cmath. Modified: python/trunk/Doc/library/cmath.rst Modified: python/trunk/Doc/library/cmath.rst ============================================================================== --- python/trunk/Doc/library/cmath.rst (original) +++ python/trunk/Doc/library/cmath.rst Thu Jul 23 09:08:58 2009 @@ -28,15 +28,15 @@ Complex numbers can be expressed by two important coordinate systems. Python's :class:`complex` type uses rectangular coordinates where a number -on the complex plain is defined by two floats, the real part and the imaginary +on the complex plane is defined by two floats, the real part and the imaginary part. Definition:: z = x + 1j * y - x := real(z) - y := imag(z) + x := z.real + y := z.imag In engineering the polar coordinate system is popular for complex numbers. In polar coordinates a complex number is defined by the radius *r* and the phase @@ -216,7 +216,7 @@ .. data:: pi - The mathematical constant *pi*, as a float. + The mathematical constant *?*, as a float. .. data:: e From python-checkins at python.org Thu Jul 23 11:17:09 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 23 Jul 2009 09:17:09 -0000 Subject: [Python-checkins] r74185 - python/trunk/Misc/gdbinit Message-ID: Author: georg.brandl Date: Thu Jul 23 11:17:09 2009 New Revision: 74185 Log: Fix the "pylocals" gdb command. Modified: python/trunk/Misc/gdbinit Modified: python/trunk/Misc/gdbinit ============================================================================== --- python/trunk/Misc/gdbinit (original) +++ python/trunk/Misc/gdbinit Thu Jul 23 11:17:09 2009 @@ -29,7 +29,7 @@ # print the local variables of the current frame define pylocals set $_i = 0 - while $_i < f->f_nlocals + while $_i < f->f_code->co_nlocals if f->f_localsplus + $_i != 0 set $_names = co->co_varnames set $_name = PyString_AsString(PyTuple_GetItem($_names, $_i)) From python-checkins at python.org Thu Jul 23 11:19:09 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 23 Jul 2009 09:19:09 -0000 Subject: [Python-checkins] r74186 - in python/branches/py3k: Misc/gdbinit Message-ID: Author: georg.brandl Date: Thu Jul 23 11:19:09 2009 New Revision: 74186 Log: Recorded merge of revisions 74185 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74185 | georg.brandl | 2009-07-23 11:17:09 +0200 (Do, 23 Jul 2009) | 1 line Fix the "pylocals" gdb command. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Misc/gdbinit Modified: python/branches/py3k/Misc/gdbinit ============================================================================== --- python/branches/py3k/Misc/gdbinit (original) +++ python/branches/py3k/Misc/gdbinit Thu Jul 23 11:19:09 2009 @@ -29,7 +29,7 @@ # print the local variables of the current frame define pylocals set $_i = 0 - while $_i < f->f_nlocals + while $_i < f->f_code->co_nlocals if f->f_localsplus + $_i != 0 set $_names = co->co_varnames set $_name = _PyUnicode_AsString(PyTuple_GetItem($_names, $_i)) From nnorwitz at gmail.com Thu Jul 23 11:48:13 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 23 Jul 2009 05:48:13 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090723094813.GA14091@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 Less important issues: ---------------------- test_cmd_line leaked [0, 0, 25] references, sum=25 test_smtplib leaked [5, -88, 0] references, sum=-83 test_socketserver leaked [-83, 0, 0] references, sum=-83 test_threading leaked [48, 48, 48] references, sum=144 test_urllib2_localnet leaked [283, -283, 0] references, sum=0 From buildbot at python.org Thu Jul 23 11:56:44 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 23 Jul 2009 09:56:44 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1235 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: georg.brandl BUILD FAILED: failed test Excerpt from the test logfile: Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/multiprocessing/process.py", line 233, in _bootstrap self.run() File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/multiprocessing/process.py", line 88, in run self._target(*self._args, **self._kwargs) File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/test/test_multiprocessing.py", line 1210, in _putter manager.connect() File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/multiprocessing/managers.py", line 477, in connect conn = Client(self._address, authkey=self._authkey) File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/multiprocessing/connection.py", line 416, in XmlClient import xmlrpc.client as xmlrpclib File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/importlib/_bootstrap.py", line 151, in decorated return fxn(self, module) File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/importlib/_bootstrap.py", line 320, in load_module code_object = self.get_code(module.__name__) File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/importlib/_bootstrap.py", line 415, in get_code pyc_timestamp = marshal._r_long(data[4:8]) File "/Users/buildbot/buildarea/3.x.heller-x86-osx5/build/Lib/importlib/__init__.py", line 65, in _r_long x = int_bytes[0] IndexError: index out of range sincerely, -The Buildbot From python-checkins at python.org Thu Jul 23 16:19:08 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 23 Jul 2009 14:19:08 -0000 Subject: [Python-checkins] r74187 - python/trunk/Lib/webbrowser.py Message-ID: Author: benjamin.peterson Date: Thu Jul 23 16:19:08 2009 New Revision: 74187 Log: use bools for autoraise Modified: python/trunk/Lib/webbrowser.py Modified: python/trunk/Lib/webbrowser.py ============================================================================== --- python/trunk/Lib/webbrowser.py (original) +++ python/trunk/Lib/webbrowser.py Thu Jul 23 16:19:08 2009 @@ -55,7 +55,7 @@ # It is recommended one does "import webbrowser" and uses webbrowser.open(url) # instead of "from webbrowser import *". -def open(url, new=0, autoraise=1): +def open(url, new=0, autoraise=True): for name in _tryorder: browser = get(name) if browser.open(url, new, autoraise): @@ -144,7 +144,7 @@ self.name = name self.basename = name - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): raise NotImplementedError def open_new(self, url): @@ -168,7 +168,7 @@ self.args = name[1:] self.basename = os.path.basename(self.name) - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] try: @@ -185,7 +185,7 @@ """Class for all browsers which are to be started in the background.""" - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] try: @@ -216,7 +216,7 @@ raise_opt = [] if remote and self.raise_opts: # use autoraise argument only for remote invocation - autoraise = int(bool(autoraise)) + autoraise = int(autoraise) opt = self.raise_opts[autoraise] if opt: raise_opt = [opt] @@ -256,7 +256,7 @@ else: return not p.wait() - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): if new == 0: action = self.remote_action elif new == 1: @@ -340,7 +340,7 @@ for more information on the Konqueror remote-control interface. """ - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): # XXX Currently I know no way to prevent KFM from opening a new win. if new == 2: action = "newTab" @@ -428,7 +428,7 @@ s.close() return 1 - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): if new: ok = self._remote("LOADNEW " + url) else: @@ -511,7 +511,7 @@ if sys.platform[:3] == "win": class WindowsDefault(BaseBrowser): - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): try: os.startfile(url) except WindowsError: @@ -545,7 +545,7 @@ pass else: class InternetConfig(BaseBrowser): - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): ic.launchurl(url) return True # Any way to get status? @@ -566,7 +566,7 @@ def __init__(self, name): self.name = name - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): assert "'" not in url # hack for local urls if not ':' in url: From python-checkins at python.org Thu Jul 23 16:25:32 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 23 Jul 2009 14:25:32 -0000 Subject: [Python-checkins] r74188 - python/trunk/Doc/library/webbrowser.rst Message-ID: Author: benjamin.peterson Date: Thu Jul 23 16:25:31 2009 New Revision: 74188 Log: use bools Modified: python/trunk/Doc/library/webbrowser.rst Modified: python/trunk/Doc/library/webbrowser.rst ============================================================================== --- python/trunk/Doc/library/webbrowser.rst (original) +++ python/trunk/Doc/library/webbrowser.rst Thu Jul 23 16:25:31 2009 @@ -46,14 +46,14 @@ The following functions are defined: -.. function:: open(url[, new=0[, autoraise=1]]) +.. function:: open(url[, new=0[, autoraise=True]]) - Display *url* using the default browser. If *new* is 0, the *url* is opened in - the same browser window if possible. If *new* is 1, a new browser window is - opened if possible. If *new* is 2, a new browser page ("tab") is opened if - possible. If *autoraise* is true, the window is raised if possible (note that - under many window managers this will occur regardless of the setting of this - variable). + Display *url* using the default browser. If *new* is 0, the *url* is opened + in the same browser window if possible. If *new* is 1, a new browser window + is opened if possible. If *new* is 2, a new browser page ("tab") is opened + if possible. If *autoraise* is ``True``, the window is raised if possible + (note that under many window managers this will occur regardless of the + setting of this variable). Note that on some platforms, trying to open a filename using this function, may work and start the operating system's associated program. However, this @@ -180,7 +180,7 @@ module-level convenience functions: -.. method:: controller.open(url[, new[, autoraise=1]]) +.. method:: controller.open(url[, new[, autoraise=True]]) Display *url* using the browser handled by this controller. If *new* is 1, a new browser window is opened if possible. If *new* is 2, a new browser page ("tab") From python-checkins at python.org Thu Jul 23 21:26:03 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 23 Jul 2009 19:26:03 -0000 Subject: [Python-checkins] r74189 - in python/trunk: Lib/test/pickletester.py Misc/NEWS Modules/cPickle.c Message-ID: Author: amaury.forgeotdarc Date: Thu Jul 23 21:26:02 2009 New Revision: 74189 Log: #6553: crash in cPickle.load(), when given a StringIO with incomplete data. Will backport to 2.6, 3.x already fixed a similar issue with issue4298. Modified: python/trunk/Lib/test/pickletester.py python/trunk/Misc/NEWS python/trunk/Modules/cPickle.c Modified: python/trunk/Lib/test/pickletester.py ============================================================================== --- python/trunk/Lib/test/pickletester.py (original) +++ python/trunk/Lib/test/pickletester.py Thu Jul 23 21:26:02 2009 @@ -1,6 +1,7 @@ import unittest import pickle import cPickle +import StringIO import cStringIO import pickletools import copy_reg @@ -1086,6 +1087,10 @@ self.module.Pickler(f, -1) self.module.Pickler(f, protocol=-1) + def test_incomplete_input(self): + s = StringIO.StringIO("X''.") + self.assertRaises(EOFError, self.module.load, s) + class AbstractPersistentPicklerTests(unittest.TestCase): # This class defines persistent_id() and persistent_load() Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Jul 23 21:26:02 2009 @@ -351,7 +351,10 @@ Library ------- -- Issue #6545: Removed assert statements in distutils.Extension, so the +- Issue #6553: Fixed a crash in cPickle.load(), when given a file-like object + containing incomplete data. + +- Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O. - unittest has been split up into a package. All old names should still work. @@ -360,7 +363,7 @@ know how to handle a comparison without loss of precision. Also add correct handling of infinities and nans for comparisons with float. -- Issue #6415: Fixed warnings.warn sagfault on bad formatted string. +- Issue #6415: Fixed warnings.warn segfault on bad formatted string. - Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler uses the same refactored function to get gcc/ld/dllwrap versions numbers. Modified: python/trunk/Modules/cPickle.c ============================================================================== --- python/trunk/Modules/cPickle.c (original) +++ python/trunk/Modules/cPickle.c Thu Jul 23 21:26:02 2009 @@ -663,6 +663,12 @@ self->last_string = str; if (! (*s = PyString_AsString(str))) return -1; + + if (PyString_GET_SIZE(str) != n) { + PyErr_SetNone(PyExc_EOFError); + return -1; + } + return n; } From nnorwitz at gmail.com Thu Jul 23 23:42:55 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 23 Jul 2009 17:42:55 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090723214255.GA12127@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 Less important issues: ---------------------- test_asynchat leaked [126, -126, 0] references, sum=0 test_file2k leaked [-8, -83, 0] references, sum=-91 test_smtplib leaked [0, -6, 94] references, sum=88 test_sys leaked [0, 42, -21] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [-8, 8, 0] references, sum=0 From python-checkins at python.org Fri Jul 24 00:31:48 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 23 Jul 2009 22:31:48 -0000 Subject: [Python-checkins] r74190 - in python/branches/release26-maint: Lib/test/pickletester.py Misc/NEWS Modules/cPickle.c Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 24 00:31:47 2009 New Revision: 74190 Log: Merged revisions 74189 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74189 | amaury.forgeotdarc | 2009-07-23 21:26:02 +0200 (jeu., 23 juil. 2009) | 4 lines #6553: crash in cPickle.load(), when given a StringIO with incomplete data. Will backport to 2.6, 3.x already fixed a similar issue with issue4298. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/pickletester.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Modules/cPickle.c Modified: python/branches/release26-maint/Lib/test/pickletester.py ============================================================================== --- python/branches/release26-maint/Lib/test/pickletester.py (original) +++ python/branches/release26-maint/Lib/test/pickletester.py Fri Jul 24 00:31:47 2009 @@ -1,6 +1,7 @@ import unittest import pickle import cPickle +import StringIO import pickletools import copy_reg @@ -1015,6 +1016,10 @@ self.module.Pickler(f, -1) self.module.Pickler(f, protocol=-1) + def test_incomplete_input(self): + s = StringIO.StringIO("X''.") + self.assertRaises(EOFError, self.module.load, s) + class AbstractPersistentPicklerTests(unittest.TestCase): # This class defines persistent_id() and persistent_load() Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Fri Jul 24 00:31:47 2009 @@ -273,6 +273,9 @@ Library ------- +- Issue #6553: Fixed a crash in cPickle.load(), when given a file-like object + containing incomplete data. + - Issue #2622: Fixed an ImportError when importing email.messsage from a standalone application built with py2exe or py2app. Modified: python/branches/release26-maint/Modules/cPickle.c ============================================================================== --- python/branches/release26-maint/Modules/cPickle.c (original) +++ python/branches/release26-maint/Modules/cPickle.c Fri Jul 24 00:31:47 2009 @@ -663,6 +663,12 @@ self->last_string = str; if (! (*s = PyString_AsString(str))) return -1; + + if (PyString_GET_SIZE(str) != n) { + PyErr_SetNone(PyExc_EOFError); + return -1; + } + return n; } From python-checkins at python.org Fri Jul 24 00:34:28 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Thu, 23 Jul 2009 22:34:28 -0000 Subject: [Python-checkins] r74191 - python/branches/py3k Message-ID: Author: amaury.forgeotdarc Date: Fri Jul 24 00:34:27 2009 New Revision: 74191 Log: Blocked revisions 74189 via svnmerge ........ r74189 | amaury.forgeotdarc | 2009-07-23 21:26:02 +0200 (jeu., 23 juil. 2009) | 4 lines #6553: crash in cPickle.load(), when given a StringIO with incomplete data. Will backport to 2.6, 3.x already fixed a similar issue with issue4298. ........ Modified: python/branches/py3k/ (props changed) From buildbot at python.org Fri Jul 24 00:57:20 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 23 Jul 2009 22:57:20 +0000 Subject: [Python-checkins] buildbot failure in x86 gentoo 2.6 Message-ID: The Buildbot has detected a new failure of x86 gentoo 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20gentoo%202.6/builds/428 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-x86 Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_os make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jul 24 01:00:47 2009 From: buildbot at python.org (buildbot at python.org) Date: Thu, 23 Jul 2009 23:00:47 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 2.6 Message-ID: The Buildbot has detected a new failure of amd64 gentoo 2.6. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%202.6/builds/147 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/release26-maint] HEAD Blamelist: amaury.forgeotdarc BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_os make: *** [buildbottest] Error 1 sincerely, -The Buildbot From nnorwitz at gmail.com Fri Jul 24 11:43:09 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 24 Jul 2009 05:43:09 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090724094309.GA5707@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 Less important issues: ---------------------- test_asynchat leaked [-132, 0, 139] references, sum=7 test_cmd_line leaked [-25, 0, 0] references, sum=-25 test_file2k leaked [80, -80, 0] references, sum=0 test_smtplib leaked [88, 0, -88] references, sum=0 test_sys leaked [0, 42, -21] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [-8, 8, -8] references, sum=-8 From solipsis at pitrou.net Fri Jul 24 13:53:52 2009 From: solipsis at pitrou.net (Antoine Pitrou) Date: Fri, 24 Jul 2009 11:53:52 +0000 (UTC) Subject: [Python-checkins] =?utf-8?q?r74176_-_in_python/branches/release26?= =?utf-8?q?-maint=3A=09Lib/test/test=5Fos=2Epy?= References: <12518.2021096864$1248284246@news.gmane.org> Message-ID: writes: > > ........ > r74175 | r.david.murray | 2009-07-22 13:22:58 -0400 (Wed, 22 Jul 2009) | 4 lines > > Backport of fix for issue 6542: make sure > test_os.TestInvalidFD.test_closerange does not close any > valid file descriptors. > ........ This checkin caused a buildbot failure with the following message: test test_os failed -- Traceback (most recent call last): File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/test/test_os.py", line 568, in test_closerange raise unittest.SkipTest( AttributeError: 'module' object has no attribute 'SkipTest' From python-checkins at python.org Fri Jul 24 18:28:43 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 24 Jul 2009 16:28:43 -0000 Subject: [Python-checkins] r74192 - python/trunk/Doc/c-api/arg.rst Message-ID: Author: georg.brandl Date: Fri Jul 24 18:28:38 2009 New Revision: 74192 Log: Fix arg types of et#. Modified: python/trunk/Doc/c-api/arg.rst Modified: python/trunk/Doc/c-api/arg.rst ============================================================================== --- python/trunk/Doc/c-api/arg.rst (original) +++ python/trunk/Doc/c-api/arg.rst Fri Jul 24 18:28:38 2009 @@ -136,7 +136,7 @@ In both cases, *\*buffer_length* is set to the length of the encoded data without the trailing NUL byte. -``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer] +``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length] Same as ``es#`` except that string objects are passed through without recoding them. Instead, the implementation assumes that the string object uses the encoding passed in as parameter. From python-checkins at python.org Fri Jul 24 18:46:38 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 24 Jul 2009 16:46:38 -0000 Subject: [Python-checkins] r74193 - in python/trunk/Doc/c-api: float.rst int.rst method.rst sys.rst tuple.rst type.rst unicode.rst Message-ID: Author: georg.brandl Date: Fri Jul 24 18:46:38 2009 New Revision: 74193 Log: Dont put "void" in signature for nullary functions. Modified: python/trunk/Doc/c-api/float.rst python/trunk/Doc/c-api/int.rst python/trunk/Doc/c-api/method.rst python/trunk/Doc/c-api/sys.rst python/trunk/Doc/c-api/tuple.rst python/trunk/Doc/c-api/type.rst python/trunk/Doc/c-api/unicode.rst Modified: python/trunk/Doc/c-api/float.rst ============================================================================== --- python/trunk/Doc/c-api/float.rst (original) +++ python/trunk/Doc/c-api/float.rst Fri Jul 24 18:46:38 2009 @@ -72,21 +72,21 @@ .. versionadded:: 2.6 -.. cfunction:: double PyFloat_GetMax(void) +.. cfunction:: double PyFloat_GetMax() Return the maximum representable finite float *DBL_MAX* as C :ctype:`double`. .. versionadded:: 2.6 -.. cfunction:: double PyFloat_GetMin(void) +.. cfunction:: double PyFloat_GetMin() Return the minimum normalized positive float *DBL_MIN* as C :ctype:`double`. .. versionadded:: 2.6 -.. cfunction:: int PyFloat_ClearFreeList(void) +.. cfunction:: int PyFloat_ClearFreeList() Clear the float free list. Return the number of items that could not be freed. Modified: python/trunk/Doc/c-api/int.rst ============================================================================== --- python/trunk/Doc/c-api/int.rst (original) +++ python/trunk/Doc/c-api/int.rst Fri Jul 24 18:46:38 2009 @@ -131,7 +131,7 @@ (:const:`LONG_MAX`, as defined in the system header files). -.. cfunction:: int PyInt_ClearFreeList(void) +.. cfunction:: int PyInt_ClearFreeList() Clear the integer free list. Return the number of items that could not be freed. Modified: python/trunk/Doc/c-api/method.rst ============================================================================== --- python/trunk/Doc/c-api/method.rst (original) +++ python/trunk/Doc/c-api/method.rst Fri Jul 24 18:46:38 2009 @@ -65,7 +65,7 @@ Macro version of :cfunc:`PyMethod_Self` which avoids error checking. -.. cfunction:: int PyMethod_ClearFreeList(void) +.. cfunction:: int PyMethod_ClearFreeList() Clear the free list. Return the total number of freed items. Modified: python/trunk/Doc/c-api/sys.rst ============================================================================== --- python/trunk/Doc/c-api/sys.rst (original) +++ python/trunk/Doc/c-api/sys.rst Fri Jul 24 18:46:38 2009 @@ -73,7 +73,7 @@ case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` on error. -.. cfunction:: void PySys_ResetWarnOptions(void) +.. cfunction:: void PySys_ResetWarnOptions() Reset :data:`sys.warnoptions` to an empty list. Modified: python/trunk/Doc/c-api/tuple.rst ============================================================================== --- python/trunk/Doc/c-api/tuple.rst (original) +++ python/trunk/Doc/c-api/tuple.rst Fri Jul 24 18:46:38 2009 @@ -157,7 +157,7 @@ require changes in your code for properly supporting 64-bit systems. -.. cfunction:: int PyTuple_ClearFreeList(void) +.. cfunction:: int PyTuple_ClearFreeList() Clear the free list. Return the total number of freed items. Modified: python/trunk/Doc/c-api/type.rst ============================================================================== --- python/trunk/Doc/c-api/type.rst (original) +++ python/trunk/Doc/c-api/type.rst Fri Jul 24 18:46:38 2009 @@ -35,7 +35,7 @@ .. versionadded:: 2.2 -.. cfunction:: unsigned int PyType_ClearCache(void) +.. cfunction:: unsigned int PyType_ClearCache() Clear the internal lookup cache. Return the current version tag. Modified: python/trunk/Doc/c-api/unicode.rst ============================================================================== --- python/trunk/Doc/c-api/unicode.rst (original) +++ python/trunk/Doc/c-api/unicode.rst Fri Jul 24 18:46:38 2009 @@ -98,12 +98,13 @@ :ctype:`PyUnicodeObject` (not checked). -.. cfunction:: int PyUnicode_ClearFreeList(void) +.. cfunction:: int PyUnicode_ClearFreeList() Clear the free list. Return the total number of freed items. .. versionadded:: 2.6 + Unicode provides many different character properties. The most often needed ones are available through these macros which are mapped to C functions depending on the Python configuration. From python-checkins at python.org Fri Jul 24 22:09:46 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 24 Jul 2009 20:09:46 -0000 Subject: [Python-checkins] r74194 - python/trunk/Doc/tutorial/errors.rst Message-ID: Author: georg.brandl Date: Fri Jul 24 22:09:46 2009 New Revision: 74194 Log: #6564: fix section about the two raise syntaxes. Modified: python/trunk/Doc/tutorial/errors.rst Modified: python/trunk/Doc/tutorial/errors.rst ============================================================================== --- python/trunk/Doc/tutorial/errors.rst (original) +++ python/trunk/Doc/tutorial/errors.rst Fri Jul 24 22:09:46 2009 @@ -221,10 +221,11 @@ File "", line 1, in ? NameError: HiThere -The first argument to :keyword:`raise` names the exception to be raised. The -optional second argument specifies the exception's argument. Alternatively, the -above could be written as ``raise NameError('HiThere')``. Either form works -fine, but there seems to be a growing stylistic preference for the latter. +The argument to :keyword:`raise` is an exception class or instance to be +raised. There is a deprecated alternate syntax that separates class and +constructor arguments; the above could be written as ``raise NameError, +'HiThere'``. Since it once was the only one available, the latter form is +prevalent in older code. If you need to determine whether an exception was raised but don't intend to handle it, a simpler form of the :keyword:`raise` statement allows you to From python-checkins at python.org Fri Jul 24 22:13:38 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 24 Jul 2009 20:13:38 -0000 Subject: [Python-checkins] r74195 - python/branches/py3k Message-ID: Author: georg.brandl Date: Fri Jul 24 22:13:37 2009 New Revision: 74195 Log: Blocked revisions 74194 via svnmerge ........ r74194 | georg.brandl | 2009-07-24 22:09:46 +0200 (Fr, 24 Jul 2009) | 1 line #6564: fix section about the two raise syntaxes. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Sat Jul 25 03:02:02 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 25 Jul 2009 01:02:02 -0000 Subject: [Python-checkins] r74196 - python/branches/py3k/Doc/library/unittest.rst Message-ID: Author: benjamin.peterson Date: Sat Jul 25 03:02:01 2009 New Revision: 74196 Log: account for range() py3k change Modified: python/branches/py3k/Doc/library/unittest.rst Modified: python/branches/py3k/Doc/library/unittest.rst ============================================================================== --- python/branches/py3k/Doc/library/unittest.rst (original) +++ python/branches/py3k/Doc/library/unittest.rst Sat Jul 25 03:02:01 2009 @@ -172,13 +172,13 @@ class TestSequenceFunctions(unittest.TestCase): def setUp(self): - self.seq = range(10) + self.seq = list(range(10)) def test_shuffle(self): # make sure the shuffled sequence does not lose any elements random.shuffle(self.seq) self.seq.sort() - self.assertEqual(self.seq, range(10)) + self.assertEqual(self.seq, list(range(10))) def test_choice(self): element = random.choice(self.seq) From python-checkins at python.org Sat Jul 25 04:03:48 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sat, 25 Jul 2009 02:03:48 -0000 Subject: [Python-checkins] r74197 - python/trunk/Objects/dictobject.c Message-ID: Author: benjamin.peterson Date: Sat Jul 25 04:03:48 2009 New Revision: 74197 Log: clarify Modified: python/trunk/Objects/dictobject.c Modified: python/trunk/Objects/dictobject.c ============================================================================== --- python/trunk/Objects/dictobject.c (original) +++ python/trunk/Objects/dictobject.c Sat Jul 25 04:03:48 2009 @@ -716,7 +716,7 @@ running "python -Wi" for an example related to string interning. Let's just hope that no exception occurs then... This must be _PyThreadState_Current and not PyThreadState_GET() because in debug - mode, it complains if tstate is NULL. */ + mode, the latter complains if tstate is NULL. */ tstate = _PyThreadState_Current; if (tstate != NULL && tstate->curexc_type != NULL) { /* preserve the existing exception */ From python-checkins at python.org Sat Jul 25 06:24:38 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sat, 25 Jul 2009 04:24:38 -0000 Subject: [Python-checkins] r74198 - in python/branches/py3k: Doc/library/http.client.rst Lib/http/client.py Lib/test/test_urllib2.py Lib/urllib/request.py Misc/NEWS Message-ID: Author: senthil.kumaran Date: Sat Jul 25 06:24:38 2009 New Revision: 74198 Log: Fixed Issue1424152 in Py3k: urllib2 fails with HTTPS over Proxy. Modified: python/branches/py3k/Doc/library/http.client.rst python/branches/py3k/Lib/http/client.py python/branches/py3k/Lib/test/test_urllib2.py python/branches/py3k/Lib/urllib/request.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Doc/library/http.client.rst ============================================================================== --- python/branches/py3k/Doc/library/http.client.rst (original) +++ python/branches/py3k/Doc/library/http.client.rst Sat Jul 25 06:24:38 2009 @@ -386,6 +386,12 @@ .. versionadded:: 2.7 +.. method:: HTTPConnection.set_tunnel(host, port=None) + + Set the host and the port for HTTP Connect Tunnelling. Normally used when it + is required to a HTTPS Connection through a proxy server. + + .. versionadded:: 3.1 .. method:: HTTPConnection.connect() Modified: python/branches/py3k/Lib/http/client.py ============================================================================== --- python/branches/py3k/Lib/http/client.py (original) +++ python/branches/py3k/Lib/http/client.py Sat Jul 25 06:24:38 2009 @@ -644,11 +644,17 @@ self.__response = None self.__state = _CS_IDLE self._method = None + self._tunnel_host = None + self._tunnel_port = None self._set_hostport(host, port) if strict is not None: self.strict = strict + def set_tunnel(self, host, port=None): + self._tunnel_host = host + self._tunnel_port = port + def _set_hostport(self, host, port): if port is None: i = host.rfind(':') @@ -669,10 +675,29 @@ def set_debuglevel(self, level): self.debuglevel = level + def _tunnel(self): + self._set_hostport(self._tunnel_host, self._tunnel_port) + connect_str = "CONNECT %s:%d HTTP/1.0\r\n\r\n" %(self.host, self.port) + connect_bytes = connect_str.encode("ascii") + self.send(connect_bytes) + response = self.response_class(self.sock, strict = self.strict, + method= self._method) + (version, code, message) = response._read_status() + if code != 200: + self.close() + raise socket.error("Tunnel connection failed: %d %s" % (code, + message.strip())) + while True: + line = response.fp.readline() + if line == b'\r\n': + break + def connect(self): """Connect to the host and port specified in __init__.""" self.sock = socket.create_connection((self.host,self.port), self.timeout) + if self._tunnel_host: + self._tunnel() def close(self): """Close the connection to the HTTP server.""" @@ -1008,6 +1033,11 @@ sock = socket.create_connection((self.host, self.port), self.timeout) + + if self._tunnel_host: + self.sock = sock + self._tunnel() + self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) Modified: python/branches/py3k/Lib/test/test_urllib2.py ============================================================================== --- python/branches/py3k/Lib/test/test_urllib2.py (original) +++ python/branches/py3k/Lib/test/test_urllib2.py Sat Jul 25 06:24:38 2009 @@ -947,6 +947,23 @@ self.assertEqual([(handlers[0], "http_open")], [tup[0:2] for tup in o.calls]) + def test_proxy_https(self): + o = OpenerDirector() + ph = urllib.request.ProxyHandler(dict(https="proxy.example.com:3128")) + o.add_handler(ph) + meth_spec = [ + [("https_open", "return response")] + ] + handlers = add_ordered_mock_handlers(o, meth_spec) + + req = Request("https://www.example.com/") + self.assertEqual(req.get_host(), "www.example.com") + r = o.open(req) + self.assertEqual(req.get_host(), "proxy.example.com:3128") + self.assertEqual([(handlers[0], "https_open")], + [tup[0:2] for tup in o.calls]) + + def test_basic_auth(self, quote_char='"'): opener = OpenerDirector() password_manager = MockPasswordManager() Modified: python/branches/py3k/Lib/urllib/request.py ============================================================================== --- python/branches/py3k/Lib/urllib/request.py (original) +++ python/branches/py3k/Lib/urllib/request.py Sat Jul 25 06:24:38 2009 @@ -163,6 +163,7 @@ self.full_url = unwrap(url) self.data = data self.headers = {} + self._tunnel_host = None for key, value in headers.items(): self.add_header(key, value) self.unredirected_hdrs = {} @@ -218,8 +219,12 @@ # End deprecated methods def set_proxy(self, host, type): - self.host, self.type = host, type - self.selector = self.full_url + if self.type == 'https' and not self._tunnel_host: + self._tunnel_host = self.host + else: + self.type= type + self.selector = self.full_url + self.host = host def has_proxy(self): return self.selector == self.full_url @@ -659,7 +664,7 @@ req.add_header('Proxy-authorization', 'Basic ' + creds) hostport = unquote(hostport) req.set_proxy(hostport, proxy_type) - if orig_type == proxy_type: + if orig_type == proxy_type or orig_type == 'https': # let other handlers take care of it return None else: @@ -1041,6 +1046,10 @@ # request. headers["Connection"] = "close" headers = dict((name.title(), val) for name, val in headers.items()) + + if req._tunnel_host: + h.set_tunnel(req._tunnel_host) + try: h.request(req.get_method(), req.selector, req.data, headers) r = h.getresponse() # an HTTPResponse instance Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sat Jul 25 06:24:38 2009 @@ -60,6 +60,9 @@ Library ------- +- Issue #1424152: Fix for httplib, urllib2 to support SSL while working through + proxy. Original patch by Christopher Li, changes made by Senthil Kumaran + - Add importlib.abc.ExecutionLoader to represent the PEP 302 protocol for loaders that allow for modules to be executed. Both importlib.abc.PyLoader and PyPycLoader inherit from this class and provide implementations in From python-checkins at python.org Sat Jul 25 06:27:39 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sat, 25 Jul 2009 04:27:39 -0000 Subject: [Python-checkins] r74199 - python/branches/py3k/Doc/library/http.client.rst Message-ID: Author: senthil.kumaran Date: Sat Jul 25 06:27:38 2009 New Revision: 74199 Log: versionadded: 3.2. not 3.1. Modified: python/branches/py3k/Doc/library/http.client.rst Modified: python/branches/py3k/Doc/library/http.client.rst ============================================================================== --- python/branches/py3k/Doc/library/http.client.rst (original) +++ python/branches/py3k/Doc/library/http.client.rst Sat Jul 25 06:27:38 2009 @@ -391,7 +391,7 @@ Set the host and the port for HTTP Connect Tunnelling. Normally used when it is required to a HTTPS Connection through a proxy server. - .. versionadded:: 3.1 + .. versionadded:: 3.2 .. method:: HTTPConnection.connect() From buildbot at python.org Sat Jul 25 06:29:56 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 25 Jul 2009 04:29:56 +0000 Subject: [Python-checkins] buildbot failure in x86 osx.5 3.x Message-ID: The Buildbot has detected a new failure of x86 osx.5 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20osx.5%203.x/builds/1238 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: heller-x86-osx5 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson,senthil.kumaran BUILD FAILED: failed svn sincerely, -The Buildbot From buildbot at python.org Sat Jul 25 06:30:04 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 25 Jul 2009 04:30:04 +0000 Subject: [Python-checkins] buildbot failure in sparc solaris10 gcc 3.x Message-ID: The Buildbot has detected a new failure of sparc solaris10 gcc 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%20solaris10%20gcc%203.x/builds/997 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: loewis-sun Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson,senthil.kumaran BUILD FAILED: failed svn sincerely, -The Buildbot From buildbot at python.org Sat Jul 25 06:30:14 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 25 Jul 2009 04:30:14 +0000 Subject: [Python-checkins] buildbot failure in amd64 gentoo 3.x Message-ID: The Buildbot has detected a new failure of amd64 gentoo 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%20gentoo%203.x/builds/1029 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: norwitz-amd64 Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson,senthil.kumaran BUILD FAILED: failed svn sincerely, -The Buildbot From buildbot at python.org Sat Jul 25 06:31:00 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 25 Jul 2009 04:31:00 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 3.x Message-ID: The Buildbot has detected a new failure of x86 XP-4 3.x. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%203.x/builds/813 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch branches/py3k] HEAD Blamelist: benjamin.peterson,senthil.kumaran BUILD FAILED: failed svn sincerely, -The Buildbot From python-checkins at python.org Sat Jul 25 15:02:16 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 25 Jul 2009 13:02:16 -0000 Subject: [Python-checkins] r74200 - python/trunk/Doc/library/stdtypes.rst Message-ID: Author: georg.brandl Date: Sat Jul 25 15:02:15 2009 New Revision: 74200 Log: #6571: add index entries for more operators. Modified: python/trunk/Doc/library/stdtypes.rst Modified: python/trunk/Doc/library/stdtypes.rst ============================================================================== --- python/trunk/Doc/library/stdtypes.rst (original) +++ python/trunk/Doc/library/stdtypes.rst Sat Jul 25 15:02:15 2009 @@ -129,7 +129,17 @@ Comparisons =========== -.. index:: pair: chaining; comparisons +.. index:: + pair: chaining; comparisons + pair: operator; comparison + operator: == + operator: < + operator: <= + operator: > + operator: >= + operator: != + operator: is + operator: is not Comparison operations are supported by all objects. They all have the same priority (which is higher than that of the Boolean operations). Comparisons can @@ -159,17 +169,6 @@ | ``is not`` | negated object identity | | +------------+-------------------------+-------+ -.. index:: - pair: operator; comparison - operator: == - operator: < - operator: <= - operator: > - operator: >= - operator: != - operator: is - operator: is not - Notes: (1) @@ -262,6 +261,13 @@ builtin: long builtin: float builtin: complex + operator: + + operator: - + operator: * + operator: / + operator: // + operator: % + operator: ** Python fully supports mixed arithmetic: when a binary arithmetic operator has operands of different numeric types, the operand with the "narrower" type is @@ -394,7 +400,15 @@ Bit-string Operations on Integer Types -------------------------------------- -.. _bit-string-operations: +.. index:: + triple: operations on; integer; types + pair: bit-string; operations + pair: shifting; operations + pair: masking; operations + operator: ^ + operator: & + operator: << + operator: >> Plain and long integer types support additional operations that make sense only for bit-strings. Negative numbers are treated as their 2's complement value @@ -426,12 +440,6 @@ | ``~x`` | the bits of *x* inverted | | +------------+--------------------------------+----------+ -.. index:: - triple: operations on; integer; types - pair: bit-string; operations - pair: shifting; operations - pair: masking; operations - Notes: (1) From python-checkins at python.org Sat Jul 25 18:22:06 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Sat, 25 Jul 2009 16:22:06 -0000 Subject: [Python-checkins] r74201 - python/trunk/Python/import.c Message-ID: Author: amaury.forgeotdarc Date: Sat Jul 25 18:22:06 2009 New Revision: 74201 Log: Better name a variable: 'buf' seems to imply a mutable buffer. Modified: python/trunk/Python/import.c Modified: python/trunk/Python/import.c ============================================================================== --- python/trunk/Python/import.c (original) +++ python/trunk/Python/import.c Sat Jul 25 18:22:06 2009 @@ -1802,7 +1802,7 @@ its module object WITH INCREMENTED REFERENCE COUNT */ static PyObject * -load_module(char *name, FILE *fp, char *buf, int type, PyObject *loader) +load_module(char *name, FILE *fp, char *pathname, int type, PyObject *loader) { PyObject *modules; PyObject *m; @@ -1823,27 +1823,27 @@ switch (type) { case PY_SOURCE: - m = load_source_module(name, buf, fp); + m = load_source_module(name, pathname, fp); break; case PY_COMPILED: - m = load_compiled_module(name, buf, fp); + m = load_compiled_module(name, pathname, fp); break; #ifdef HAVE_DYNAMIC_LOADING case C_EXTENSION: - m = _PyImport_LoadDynamicModule(name, buf, fp); + m = _PyImport_LoadDynamicModule(name, pathname, fp); break; #endif case PKG_DIRECTORY: - m = load_package(name, buf); + m = load_package(name, pathname); break; case C_BUILTIN: case PY_FROZEN: - if (buf != NULL && buf[0] != '\0') - name = buf; + if (pathname != NULL && pathname[0] != '\0') + name = pathname; if (type == C_BUILTIN) err = init_builtin(name); else From buildbot at python.org Sat Jul 25 20:09:23 2009 From: buildbot at python.org (buildbot at python.org) Date: Sat, 25 Jul 2009 18:09:23 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-4 trunk Message-ID: The Buildbot has detected a new failure of x86 XP-4 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%20XP-4%20trunk/builds/2359 Buildbot URL: http://www.python.org/dev/buildbot/all/ Buildslave for this Build: bolen-windows Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: amaury.forgeotdarc,georg.brandl BUILD FAILED: failed test Excerpt from the test logfile: 1 test failed: test_bsddb3 sincerely, -The Buildbot From brett at python.org Sun Jul 26 00:21:15 2009 From: brett at python.org (Brett Cannon) Date: Sat, 25 Jul 2009 15:21:15 -0700 Subject: [Python-checkins] r74198 - in python/branches/py3k: Doc/library/http.client.rst Lib/http/client.py Lib/test/test_urllib2.py Lib/urllib/request.py Misc/NEWS In-Reply-To: <4a6a890d.1a67f10a.0e53.ffff91d5SMTPIN_ADDED@mx.google.com> References: <4a6a890d.1a67f10a.0e53.ffff91d5SMTPIN_ADDED@mx.google.com> Message-ID: The Misc/NEWS entry uses the wrong module names for py3k. On Fri, Jul 24, 2009 at 21:24, senthil.kumaran wrote: > Author: senthil.kumaran > Date: Sat Jul 25 06:24:38 2009 > New Revision: 74198 > > Log: > Fixed Issue1424152 in Py3k: urllib2 fails with HTTPS over Proxy. > > > > Modified: > python/branches/py3k/Doc/library/http.client.rst > python/branches/py3k/Lib/http/client.py > python/branches/py3k/Lib/test/test_urllib2.py > python/branches/py3k/Lib/urllib/request.py > python/branches/py3k/Misc/NEWS > > Modified: python/branches/py3k/Doc/library/http.client.rst > > ============================================================================== > --- python/branches/py3k/Doc/library/http.client.rst (original) > +++ python/branches/py3k/Doc/library/http.client.rst Sat Jul 25 06:24:38 > 2009 > @@ -386,6 +386,12 @@ > > .. versionadded:: 2.7 > > +.. method:: HTTPConnection.set_tunnel(host, port=None) > + > + Set the host and the port for HTTP Connect Tunnelling. Normally used > when it > + is required to a HTTPS Connection through a proxy server. > + > + .. versionadded:: 3.1 > > .. method:: HTTPConnection.connect() > > > Modified: python/branches/py3k/Lib/http/client.py > > ============================================================================== > --- python/branches/py3k/Lib/http/client.py (original) > +++ python/branches/py3k/Lib/http/client.py Sat Jul 25 06:24:38 2009 > @@ -644,11 +644,17 @@ > self.__response = None > self.__state = _CS_IDLE > self._method = None > + self._tunnel_host = None > + self._tunnel_port = None > > self._set_hostport(host, port) > if strict is not None: > self.strict = strict > > + def set_tunnel(self, host, port=None): > + self._tunnel_host = host > + self._tunnel_port = port > + > def _set_hostport(self, host, port): > if port is None: > i = host.rfind(':') > @@ -669,10 +675,29 @@ > def set_debuglevel(self, level): > self.debuglevel = level > > + def _tunnel(self): > + self._set_hostport(self._tunnel_host, self._tunnel_port) > + connect_str = "CONNECT %s:%d HTTP/1.0\r\n\r\n" %(self.host, > self.port) > + connect_bytes = connect_str.encode("ascii") > + self.send(connect_bytes) > + response = self.response_class(self.sock, strict = self.strict, > + method= self._method) > + (version, code, message) = response._read_status() > + if code != 200: > + self.close() > + raise socket.error("Tunnel connection failed: %d %s" % (code, > + > message.strip())) > + while True: > + line = response.fp.readline() > + if line == b'\r\n': > + break > + > def connect(self): > """Connect to the host and port specified in __init__.""" > self.sock = socket.create_connection((self.host,self.port), > self.timeout) > + if self._tunnel_host: > + self._tunnel() > > def close(self): > """Close the connection to the HTTP server.""" > @@ -1008,6 +1033,11 @@ > > sock = socket.create_connection((self.host, self.port), > self.timeout) > + > + if self._tunnel_host: > + self.sock = sock > + self._tunnel() > + > self.sock = ssl.wrap_socket(sock, self.key_file, > self.cert_file) > > > > Modified: python/branches/py3k/Lib/test/test_urllib2.py > > ============================================================================== > --- python/branches/py3k/Lib/test/test_urllib2.py (original) > +++ python/branches/py3k/Lib/test/test_urllib2.py Sat Jul 25 06:24:38 > 2009 > @@ -947,6 +947,23 @@ > self.assertEqual([(handlers[0], "http_open")], > [tup[0:2] for tup in o.calls]) > > + def test_proxy_https(self): > + o = OpenerDirector() > + ph = urllib.request.ProxyHandler(dict(https=" > proxy.example.com:3128")) > + o.add_handler(ph) > + meth_spec = [ > + [("https_open", "return response")] > + ] > + handlers = add_ordered_mock_handlers(o, meth_spec) > + > + req = Request("https://www.example.com/") > + self.assertEqual(req.get_host(), "www.example.com") > + r = o.open(req) > + self.assertEqual(req.get_host(), "proxy.example.com:3128") > + self.assertEqual([(handlers[0], "https_open")], > + [tup[0:2] for tup in o.calls]) > + > + > def test_basic_auth(self, quote_char='"'): > opener = OpenerDirector() > password_manager = MockPasswordManager() > > Modified: python/branches/py3k/Lib/urllib/request.py > > ============================================================================== > --- python/branches/py3k/Lib/urllib/request.py (original) > +++ python/branches/py3k/Lib/urllib/request.py Sat Jul 25 06:24:38 2009 > @@ -163,6 +163,7 @@ > self.full_url = unwrap(url) > self.data = data > self.headers = {} > + self._tunnel_host = None > for key, value in headers.items(): > self.add_header(key, value) > self.unredirected_hdrs = {} > @@ -218,8 +219,12 @@ > # End deprecated methods > > def set_proxy(self, host, type): > - self.host, self.type = host, type > - self.selector = self.full_url > + if self.type == 'https' and not self._tunnel_host: > + self._tunnel_host = self.host > + else: > + self.type= type > + self.selector = self.full_url > + self.host = host > > def has_proxy(self): > return self.selector == self.full_url > @@ -659,7 +664,7 @@ > req.add_header('Proxy-authorization', 'Basic ' + creds) > hostport = unquote(hostport) > req.set_proxy(hostport, proxy_type) > - if orig_type == proxy_type: > + if orig_type == proxy_type or orig_type == 'https': > # let other handlers take care of it > return None > else: > @@ -1041,6 +1046,10 @@ > # request. > headers["Connection"] = "close" > headers = dict((name.title(), val) for name, val in > headers.items()) > + > + if req._tunnel_host: > + h.set_tunnel(req._tunnel_host) > + > try: > h.request(req.get_method(), req.selector, req.data, headers) > r = h.getresponse() # an HTTPResponse instance > > Modified: python/branches/py3k/Misc/NEWS > > ============================================================================== > --- python/branches/py3k/Misc/NEWS (original) > +++ python/branches/py3k/Misc/NEWS Sat Jul 25 06:24:38 2009 > @@ -60,6 +60,9 @@ > Library > ------- > > +- Issue #1424152: Fix for httplib, urllib2 to support SSL while working > through > + proxy. Original patch by Christopher Li, changes made by Senthil Kumaran > + > - Add importlib.abc.ExecutionLoader to represent the PEP 302 protocol for > loaders that allow for modules to be executed. Both > importlib.abc.PyLoader > and PyPycLoader inherit from this class and provide implementations in > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nnorwitz at gmail.com Sat Jul 25 23:42:09 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 25 Jul 2009 17:42:09 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (3) Message-ID: <20090725214209.GA18209@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 test_ssl leaked [420, 0, 0] references, sum=420 Less important issues: ---------------------- test_cmd_line leaked [-25, 0, 25] references, sum=0 test_file2k leaked [83, -83, 0] references, sum=0 test_smtplib leaked [-2, -88, 91] references, sum=1 test_sys leaked [0, -21, 0] references, sum=-21 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [-8, 8, -8] references, sum=-8 From python-checkins at python.org Sun Jul 26 06:46:00 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sun, 26 Jul 2009 04:46:00 -0000 Subject: [Python-checkins] r74202 - python/branches/py3k/Misc/NEWS Message-ID: Author: senthil.kumaran Date: Sun Jul 26 06:46:00 2009 New Revision: 74202 Log: Fixing module names in the NEWS entry. Modified: python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Jul 26 06:46:00 2009 @@ -60,8 +60,9 @@ Library ------- -- Issue #1424152: Fix for httplib, urllib2 to support SSL while working through - proxy. Original patch by Christopher Li, changes made by Senthil Kumaran +- Issue #1424152: Fix for http.client, urllib.request to support SSL while + working through proxy. Original patch by Christopher Li, changes made by + Senthil Kumaran - Add importlib.abc.ExecutionLoader to represent the PEP 302 protocol for loaders that allow for modules to be executed. Both importlib.abc.PyLoader From nnorwitz at gmail.com Sun Jul 26 11:43:02 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 26 Jul 2009 05:43:02 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (3) Message-ID: <20090726094302.GA12785@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 test_ssl leaked [0, 0, -420] references, sum=-420 Less important issues: ---------------------- test_asynchat leaked [0, 128, -128] references, sum=0 test_file2k leaked [0, 80, -3] references, sum=77 test_smtplib leaked [4, -88, 96] references, sum=12 test_sys leaked [0, 0, 21] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 test_urllib2_localnet leaked [283, -283, 0] references, sum=0 From python-checkins at python.org Sun Jul 26 14:36:09 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sun, 26 Jul 2009 12:36:09 -0000 Subject: [Python-checkins] r74203 - in python/branches/release26-maint: Lib/httplib.py Lib/test/test_urllib2.py Lib/urllib2.py Misc/NEWS Message-ID: Author: senthil.kumaran Date: Sun Jul 26 14:36:08 2009 New Revision: 74203 Log: Backporting the changes made in revision 72880 as fix for Issue1424152. Modified: python/branches/release26-maint/Lib/httplib.py python/branches/release26-maint/Lib/test/test_urllib2.py python/branches/release26-maint/Lib/urllib2.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/httplib.py ============================================================================== --- python/branches/release26-maint/Lib/httplib.py (original) +++ python/branches/release26-maint/Lib/httplib.py Sun Jul 26 14:36:08 2009 @@ -652,11 +652,18 @@ self.__response = None self.__state = _CS_IDLE self._method = None + self._tunnel_host = None + self._tunnel_port = None self._set_hostport(host, port) if strict is not None: self.strict = strict + def _set_tunnel(self, host, port=None): + """ Sets up the host and the port for the HTTP CONNECT Tunnelling.""" + self._tunnel_host = host + self._tunnel_port = port + def _set_hostport(self, host, port): if port is None: i = host.rfind(':') @@ -677,11 +684,30 @@ def set_debuglevel(self, level): self.debuglevel = level + def _tunnel(self): + self._set_hostport(self._tunnel_host, self._tunnel_port) + self.send("CONNECT %s:%d HTTP/1.0\r\n\r\n" % (self.host, self.port)) + response = self.response_class(self.sock, strict = self.strict, + method = self._method) + (version, code, message) = response._read_status() + + if code != 200: + self.close() + raise socket.error, "Tunnel connection failed: %d %s" % (code, + message.strip()) + while True: + line = response.fp.readline() + if line == '\r\n': break + + def connect(self): """Connect to the host and port specified in __init__.""" self.sock = socket.create_connection((self.host,self.port), self.timeout) + if self._tunnel_host: + self._tunnel() + def close(self): """Close the connection to the HTTP server.""" if self.sock: @@ -1070,6 +1096,9 @@ "Connect to a host on a given (SSL) port." sock = socket.create_connection((self.host, self.port), self.timeout) + if self._tunnel_host: + self.sock = sock + self._tunnel() self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) __all__.append("HTTPSConnection") Modified: python/branches/release26-maint/Lib/test/test_urllib2.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_urllib2.py (original) +++ python/branches/release26-maint/Lib/test/test_urllib2.py Sun Jul 26 14:36:08 2009 @@ -943,6 +943,21 @@ self.assertEqual([(handlers[0], "http_open")], [tup[0:2] for tup in o.calls]) + def test_proxy_https(self): + o = OpenerDirector() + ph = urllib2.ProxyHandler(dict(https='proxy.example.com:3128')) + o.add_handler(ph) + meth_spec = [ + [("https_open","return response")] + ] + handlers = add_ordered_mock_handlers(o, meth_spec) + req = Request("https://www.example.com/") + self.assertEqual(req.get_host(), "www.example.com") + r = o.open(req) + self.assertEqual(req.get_host(), "proxy.example.com:3128") + self.assertEqual([(handlers[0], "https_open")], + [tup[0:2] for tup in o.calls]) + def test_basic_auth(self, quote_char='"'): opener = OpenerDirector() password_manager = MockPasswordManager() Modified: python/branches/release26-maint/Lib/urllib2.py ============================================================================== --- python/branches/release26-maint/Lib/urllib2.py (original) +++ python/branches/release26-maint/Lib/urllib2.py Sun Jul 26 14:36:08 2009 @@ -192,6 +192,7 @@ # self.__r_type is what's left after doing the splittype self.host = None self.port = None + self._tunnel_host = None self.data = data self.headers = {} for key, value in headers.items(): @@ -252,8 +253,13 @@ return self.__r_host def set_proxy(self, host, type): - self.host, self.type = host, type - self.__r_host = self.__original + if self.type == 'https' and not self._tunnel_host: + self._tunnel_host = self.host + else: + self.type = type + self.__r_host = self.__original + + self.host = host def has_proxy(self): return self.__r_host == self.__original @@ -700,7 +706,7 @@ req.add_header('Proxy-authorization', 'Basic ' + creds) hostport = unquote(hostport) req.set_proxy(hostport, proxy_type) - if orig_type == proxy_type: + if orig_type == proxy_type or orig_type == 'https': # let other handlers take care of it return None else: @@ -1098,6 +1104,10 @@ headers["Connection"] = "close" headers = dict( (name.title(), val) for name, val in headers.items()) + + if req._tunnel_host: + h._set_tunnel(req._tunnel_host) + try: h.request(req.get_method(), req.get_selector(), req.data, headers) r = h.getresponse() Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Jul 26 14:36:08 2009 @@ -67,6 +67,9 @@ Library ------- +- Issue #1424152: Fix for httplib, urllib2 to support SSL while working through + proxy. Original patch by Christopher Li, changes made by Senthil Kumaran. + - Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was unconditionally calling "os.close(sys.stdin.fileno())" resulting in file descriptor errors From python-checkins at python.org Sun Jul 26 14:39:48 2009 From: python-checkins at python.org (senthil.kumaran) Date: Sun, 26 Jul 2009 12:39:48 -0000 Subject: [Python-checkins] r74204 - in python/branches/release31-maint: Lib/http/client.py Lib/test/test_urllib2.py Lib/urllib/request.py Misc/NEWS Message-ID: Author: senthil.kumaran Date: Sun Jul 26 14:39:47 2009 New Revision: 74204 Log: Backport the changes made in revision 74198, fixing the issue 1424152 Modified: python/branches/release31-maint/Lib/http/client.py python/branches/release31-maint/Lib/test/test_urllib2.py python/branches/release31-maint/Lib/urllib/request.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/http/client.py ============================================================================== --- python/branches/release31-maint/Lib/http/client.py (original) +++ python/branches/release31-maint/Lib/http/client.py Sun Jul 26 14:39:47 2009 @@ -644,11 +644,17 @@ self.__response = None self.__state = _CS_IDLE self._method = None + self._tunnel_host = None + self._tunnel_port = None self._set_hostport(host, port) if strict is not None: self.strict = strict + def _set_tunnel(self, host, port=None): + self._tunnel_host = host + self._tunnel_port = port + def _set_hostport(self, host, port): if port is None: i = host.rfind(':') @@ -669,10 +675,29 @@ def set_debuglevel(self, level): self.debuglevel = level + def _tunnel(self): + self._set_hostport(self._tunnel_host, self._tunnel_port) + connect_str = "CONNECT %s:%d HTTP/1.0\r\n\r\n" %(self.host, self.port) + connect_bytes = connect_str.encode("ascii") + self.send(connect_bytes) + response = self.response_class(self.sock, strict = self.strict, + method= self._method) + (version, code, message) = response._read_status() + if code != 200: + self.close() + raise socket.error("Tunnel connection failed: %d %s" % (code, + message.strip())) + while True: + line = response.fp.readline() + if line == b'\r\n': + break + def connect(self): """Connect to the host and port specified in __init__.""" self.sock = socket.create_connection((self.host,self.port), self.timeout) + if self._tunnel_host: + self._tunnel() def close(self): """Close the connection to the HTTP server.""" @@ -1008,6 +1033,11 @@ sock = socket.create_connection((self.host, self.port), self.timeout) + + if self._tunnel_host: + self.sock = sock + self._tunnel() + self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) Modified: python/branches/release31-maint/Lib/test/test_urllib2.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_urllib2.py (original) +++ python/branches/release31-maint/Lib/test/test_urllib2.py Sun Jul 26 14:39:47 2009 @@ -947,6 +947,23 @@ self.assertEqual([(handlers[0], "http_open")], [tup[0:2] for tup in o.calls]) + def test_proxy_https(self): + o = OpenerDirector() + ph = urllib.request.ProxyHandler(dict(https="proxy.example.com:3128")) + o.add_handler(ph) + meth_spec = [ + [("https_open", "return response")] + ] + handlers = add_ordered_mock_handlers(o, meth_spec) + + req = Request("https://www.example.com/") + self.assertEqual(req.get_host(), "www.example.com") + r = o.open(req) + self.assertEqual(req.get_host(), "proxy.example.com:3128") + self.assertEqual([(handlers[0], "https_open")], + [tup[0:2] for tup in o.calls]) + + def test_basic_auth(self, quote_char='"'): opener = OpenerDirector() password_manager = MockPasswordManager() Modified: python/branches/release31-maint/Lib/urllib/request.py ============================================================================== --- python/branches/release31-maint/Lib/urllib/request.py (original) +++ python/branches/release31-maint/Lib/urllib/request.py Sun Jul 26 14:39:47 2009 @@ -163,6 +163,7 @@ self.full_url = unwrap(url) self.data = data self.headers = {} + self._tunnel_host = None for key, value in headers.items(): self.add_header(key, value) self.unredirected_hdrs = {} @@ -218,8 +219,12 @@ # End deprecated methods def set_proxy(self, host, type): - self.host, self.type = host, type - self.selector = self.full_url + if self.type == 'https' and not self._tunnel_host: + self._tunnel_host = self.host + else: + self.type= type + self.selector = self.full_url + self.host = host def has_proxy(self): return self.selector == self.full_url @@ -659,7 +664,7 @@ req.add_header('Proxy-authorization', 'Basic ' + creds) hostport = unquote(hostport) req.set_proxy(hostport, proxy_type) - if orig_type == proxy_type: + if orig_type == proxy_type or orig_type == 'https': # let other handlers take care of it return None else: @@ -1041,6 +1046,10 @@ # request. headers["Connection"] = "close" headers = dict((name.title(), val) for name, val in headers.items()) + + if req._tunnel_host: + h._set_tunnel(req._tunnel_host) + try: h.request(req.get_method(), req.selector, req.data, headers) r = h.getresponse() # an HTTPResponse instance Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sun Jul 26 14:39:47 2009 @@ -39,6 +39,10 @@ Library ------- +- Issue #1424152: Fix for http.client, urllib.request to support SSL while + working through proxy. Original patch by Christopher Li, changes made by + Senthil Kumaran + - importlib.abc.PyLoader did not inherit from importlib.abc.ResourceLoader like the documentation said it did even though the code in PyLoader relied on the abstract method required by ResourceLoader. From python-checkins at python.org Sun Jul 26 15:36:39 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 13:36:39 -0000 Subject: [Python-checkins] r74205 - python/trunk/Doc/library/re.rst Message-ID: Author: georg.brandl Date: Sun Jul 26 15:36:39 2009 New Revision: 74205 Log: #6576: fix cross-refs in re docs. Modified: python/trunk/Doc/library/re.rst Modified: python/trunk/Doc/library/re.rst ============================================================================== --- python/trunk/Doc/library/re.rst (original) +++ python/trunk/Doc/library/re.rst Sun Jul 26 15:36:39 2009 @@ -216,7 +216,7 @@ flags are described in :ref:`contents-of-module-re`.) This is useful if you wish to include the flags as part of the regular expression, instead of passing a *flag* argument to the - :func:`compile` function. + :func:`re.compile` function. Note that the ``(?x)`` flag changes how the expression is parsed. It should be used first in the expression string, or after one or more whitespace characters. @@ -443,9 +443,9 @@ result = re.match(pattern, string) - but using :func:`compile` and saving the resulting regular expression object - for reuse is more efficient when the expression will be used several times - in a single program. + but using :func:`re.compile` and saving the resulting regular expression + object for reuse is more efficient when the expression will be used several + times in a single program. .. note:: @@ -532,7 +532,7 @@ .. note:: - If you want to locate a match anywhere in *string*, use :meth:`search` + If you want to locate a match anywhere in *string*, use :func:`search` instead. @@ -699,8 +699,8 @@ .. note:: - If you want to locate a match anywhere in *string*, use :meth:`search` - instead. + If you want to locate a match anywhere in *string*, use + :meth:`~RegexObject.search` instead. The optional second parameter *pos* gives an index in the string where the search is to start; it defaults to ``0``. This is not completely equivalent to @@ -729,7 +729,7 @@ is different from finding a zero-length match at some point in the string. The optional *pos* and *endpos* parameters have the same meaning as for the - :meth:`match` method. + :meth:`~RegexObject.match` method. .. method:: RegexObject.split(string[, maxsplit=0]) @@ -793,10 +793,10 @@ .. method:: MatchObject.expand(template) Return the string obtained by doing backslash substitution on the template - string *template*, as done by the :meth:`sub` method. Escapes such as ``\n`` are - converted to the appropriate characters, and numeric backreferences (``\1``, - ``\2``) and named backreferences (``\g<1>``, ``\g``) are replaced by the - contents of the corresponding group. + string *template*, as done by the :meth:`~RegexObject.sub` method. Escapes + such as ``\n`` are converted to the appropriate characters, and numeric + backreferences (``\1``, ``\2``) and named backreferences (``\g<1>``, + ``\g``) are replaced by the contents of the corresponding group. .. method:: MatchObject.group([group1, ...]) @@ -920,16 +920,16 @@ .. attribute:: MatchObject.pos - The value of *pos* which was passed to the :func:`search` or :func:`match` - method of the :class:`RegexObject`. This is the index into the string at which - the RE engine started looking for a match. + The value of *pos* which was passed to the :meth:`~RegexObject.search` or + :meth:`~RegexObject.match` method of the :class:`RegexObject`. This is the + index into the string at which the RE engine started looking for a match. .. attribute:: MatchObject.endpos - The value of *endpos* which was passed to the :func:`search` or :func:`match` - method of the :class:`RegexObject`. This is the index into the string beyond - which the RE engine will not go. + The value of *endpos* which was passed to the :meth:`~RegexObject.search` or + :meth:`~RegexObject.match` method of the :class:`RegexObject`. This is the + index into the string beyond which the RE engine will not go. .. attribute:: MatchObject.lastindex @@ -949,13 +949,15 @@ .. attribute:: MatchObject.re - The regular expression object whose :meth:`match` or :meth:`search` method - produced this :class:`MatchObject` instance. + The regular expression object whose :meth:`~RegexObject.match` or + :meth:`~RegexObject.search` method produced this :class:`MatchObject` + instance. .. attribute:: MatchObject.string - The string passed to :func:`match` or :func:`search`. + The string passed to :meth:`~RegexObject.match` or + :meth:`~RegexObject.search`. Examples @@ -1000,8 +1002,9 @@ >>> displaymatch(pair.match("354aa")) # Pair of aces. "" -To find out what card the pair consists of, one could use the :func:`group` -method of :class:`MatchObject` in the following manner: +To find out what card the pair consists of, one could use the +:meth:`~MatchObject.group` method of :class:`MatchObject` in the following +manner: .. doctest:: From python-checkins at python.org Sun Jul 26 15:43:33 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 13:43:33 -0000 Subject: [Python-checkins] r74206 - python/branches/release31-maint/Include/patchlevel.h Message-ID: Author: georg.brandl Date: Sun Jul 26 15:43:33 2009 New Revision: 74206 Log: Be consistent in versioning with the stable 2.6 branch; this also makes more sense for the version number showing up on . Modified: python/branches/release31-maint/Include/patchlevel.h Modified: python/branches/release31-maint/Include/patchlevel.h ============================================================================== --- python/branches/release31-maint/Include/patchlevel.h (original) +++ python/branches/release31-maint/Include/patchlevel.h Sun Jul 26 15:43:33 2009 @@ -18,12 +18,12 @@ /*--start constants--*/ #define PY_MAJOR_VERSION 3 #define PY_MINOR_VERSION 1 -#define PY_MICRO_VERSION 1 -#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA +#define PY_MICRO_VERSION 0 +#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "3.1.1a0" +#define PY_VERSION "3.1.0+" /*--end constants--*/ /* Subversion Revision number of this file (not of the repository) */ From python-checkins at python.org Sun Jul 26 16:19:58 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 14:19:58 -0000 Subject: [Python-checkins] r74207 - in python/trunk/Doc/library: 2to3.rst aifc.rst anydbm.rst audioop.rst cd.rst cgi.rst csv.rst curses.rst dbhash.rst decimal.rst dis.rst dl.rst exceptions.rst fileinput.rst functions.rst io.rst locale.rst logging.rst mailbox.rst multifile.rst multiprocessing.rst optparse.rst os.rst ossaudiodev.rst posixfile.rst pyclbr.rst repr.rst shelve.rst stdtypes.rst sunau.rst sunaudio.rst tempfile.rst threading.rst tkinter.rst wave.rst webbrowser.rst Message-ID: Author: georg.brandl Date: Sun Jul 26 16:19:57 2009 New Revision: 74207 Log: #6577: fix (hopefully) all links to builtin instead of module/class-specific objects. Modified: python/trunk/Doc/library/2to3.rst python/trunk/Doc/library/aifc.rst python/trunk/Doc/library/anydbm.rst python/trunk/Doc/library/audioop.rst python/trunk/Doc/library/cd.rst python/trunk/Doc/library/cgi.rst python/trunk/Doc/library/csv.rst python/trunk/Doc/library/curses.rst python/trunk/Doc/library/dbhash.rst python/trunk/Doc/library/decimal.rst python/trunk/Doc/library/dis.rst python/trunk/Doc/library/dl.rst python/trunk/Doc/library/exceptions.rst python/trunk/Doc/library/fileinput.rst python/trunk/Doc/library/functions.rst python/trunk/Doc/library/io.rst python/trunk/Doc/library/locale.rst python/trunk/Doc/library/logging.rst python/trunk/Doc/library/mailbox.rst python/trunk/Doc/library/multifile.rst python/trunk/Doc/library/multiprocessing.rst python/trunk/Doc/library/optparse.rst python/trunk/Doc/library/os.rst python/trunk/Doc/library/ossaudiodev.rst python/trunk/Doc/library/posixfile.rst python/trunk/Doc/library/pyclbr.rst python/trunk/Doc/library/repr.rst python/trunk/Doc/library/shelve.rst python/trunk/Doc/library/stdtypes.rst python/trunk/Doc/library/sunau.rst python/trunk/Doc/library/sunaudio.rst python/trunk/Doc/library/tempfile.rst python/trunk/Doc/library/threading.rst python/trunk/Doc/library/tkinter.rst python/trunk/Doc/library/wave.rst python/trunk/Doc/library/webbrowser.rst Modified: python/trunk/Doc/library/2to3.rst ============================================================================== --- python/trunk/Doc/library/2to3.rst (original) +++ python/trunk/Doc/library/2to3.rst Sun Jul 26 16:19:57 2009 @@ -239,8 +239,9 @@ .. 2to3fixer:: next - Converts the use of iterator's :meth:`next` methods to the :func:`next` - function. It also renames :meth:`next` methods to :meth:`~object.__next__`. + Converts the use of iterator's :meth:`~iterator.next` methods to the + :func:`next` function. It also renames :meth:`next` methods to + :meth:`~object.__next__`. .. 2to3fixer:: nonzero Modified: python/trunk/Doc/library/aifc.rst ============================================================================== --- python/trunk/Doc/library/aifc.rst (original) +++ python/trunk/Doc/library/aifc.rst Sun Jul 26 16:19:57 2009 @@ -48,7 +48,7 @@ time how many samples you are going to write in total and use :meth:`writeframesraw` and :meth:`setnframes`. -Objects returned by :func:`open` when a file is opened for reading have the +Objects returned by :func:`.open` when a file is opened for reading have the following methods: @@ -131,7 +131,7 @@ Close the AIFF file. After calling this method, the object can no longer be used. -Objects returned by :func:`open` when a file is opened for writing have all the +Objects returned by :func:`.open` when a file is opened for writing have all the above methods, except for :meth:`readframes` and :meth:`setpos`. In addition the following methods exist. The :meth:`get\*` methods can only be called after the corresponding :meth:`set\*` methods have been called. Before the first Modified: python/trunk/Doc/library/anydbm.rst ============================================================================== --- python/trunk/Doc/library/anydbm.rst (original) +++ python/trunk/Doc/library/anydbm.rst Sun Jul 26 16:19:57 2009 @@ -62,7 +62,7 @@ modules, with a unique exception also named :exc:`anydbm.error` as the first item --- the latter is used when :exc:`anydbm.error` is raised. -The object returned by :func:`open` supports most of the same functionality as +The object returned by :func:`.open` supports most of the same functionality as dictionaries; keys and their corresponding values can be stored, retrieved, and deleted, and the :meth:`has_key` and :meth:`keys` methods are available. Keys and values must always be strings. Modified: python/trunk/Doc/library/audioop.rst ============================================================================== --- python/trunk/Doc/library/audioop.rst (original) +++ python/trunk/Doc/library/audioop.rst Sun Jul 26 16:19:57 2009 @@ -228,7 +228,7 @@ u-LAW encoding always uses 8 bits samples, so *width* refers only to the sample width of the output fragment here. -Note that operations such as :func:`mul` or :func:`max` make no distinction +Note that operations such as :func:`.mul` or :func:`.max` make no distinction between mono and stereo fragments, i.e. all samples are treated equal. If this is a problem the stereo fragment should be split into two mono fragments first and recombined later. Here is an example of how to do that:: Modified: python/trunk/Doc/library/cd.rst ============================================================================== --- python/trunk/Doc/library/cd.rst (original) +++ python/trunk/Doc/library/cd.rst Sun Jul 26 16:19:57 2009 @@ -16,8 +16,8 @@ available only on Silicon Graphics systems. The way the library works is as follows. A program opens the CD-ROM device with -:func:`open` and creates a parser to parse the data from the CD with -:func:`createparser`. The object returned by :func:`open` can be used to read +:func:`.open` and creates a parser to parse the data from the CD with +:func:`createparser`. The object returned by :func:`.open` can be used to read data from the CD, but also to get status information for the CD-ROM device, and to get information about the CD, such as the table of contents. Data from the CD is passed to the parser, which parses the frames, and calls any callback @@ -133,7 +133,7 @@ Player Objects -------------- -Player objects (returned by :func:`open`) have the following methods: +Player objects (returned by :func:`.open`) have the following methods: .. method:: CD player.allowremoval() Modified: python/trunk/Doc/library/cgi.rst ============================================================================== --- python/trunk/Doc/library/cgi.rst (original) +++ python/trunk/Doc/library/cgi.rst Sun Jul 26 16:19:57 2009 @@ -136,8 +136,8 @@ If a field represents an uploaded file, accessing the value via the :attr:`value` attribute or the :func:`getvalue` method reads the entire file in memory as a string. This may not be what you want. You can test for an uploaded -file by testing either the :attr:`filename` attribute or the :attr:`file` -attribute. You can then read the data at leisure from the :attr:`file` +file by testing either the :attr:`filename` attribute or the :attr:`!file` +attribute. You can then read the data at leisure from the :attr:`!file` attribute:: fileitem = form["userfile"] @@ -157,7 +157,7 @@ The file upload draft standard entertains the possibility of uploading multiple files from one field (using a recursive :mimetype:`multipart/\*` encoding). When this occurs, the item will be a dictionary-like :class:`FieldStorage` item. -This can be determined by testing its :attr:`type` attribute, which should be +This can be determined by testing its :attr:`!type` attribute, which should be :mimetype:`multipart/form-data` (or perhaps another MIME type matching :mimetype:`multipart/\*`). In this case, it can be iterated over recursively just like the top-level form object. @@ -165,7 +165,7 @@ When a form is submitted in the "old" format (as the query string or as a single data part of type :mimetype:`application/x-www-form-urlencoded`), the items will actually be instances of the class :class:`MiniFieldStorage`. In this case, the -:attr:`list`, :attr:`file`, and :attr:`filename` attributes are always ``None``. +:attr:`!list`, :attr:`!file`, and :attr:`filename` attributes are always ``None``. A form submitted via POST that also has a query string will contain both :class:`FieldStorage` and :class:`MiniFieldStorage` items. Modified: python/trunk/Doc/library/csv.rst ============================================================================== --- python/trunk/Doc/library/csv.rst (original) +++ python/trunk/Doc/library/csv.rst Sun Jul 26 16:19:57 2009 @@ -61,7 +61,7 @@ Return a reader object which will iterate over lines in the given *csvfile*. *csvfile* can be any object which supports the :term:`iterator` protocol and returns a - string each time its :meth:`next` method is called --- file objects and list + string each time its :meth:`!next` method is called --- file objects and list objects are both suitable. If *csvfile* is a file object, it must be opened with the 'b' flag on platforms where that makes a difference. An optional *dialect* parameter can be given which is used to define a set of parameters Modified: python/trunk/Doc/library/curses.rst ============================================================================== --- python/trunk/Doc/library/curses.rst (original) +++ python/trunk/Doc/library/curses.rst Sun Jul 26 16:19:57 2009 @@ -186,7 +186,7 @@ .. function:: filter() - The :func:`filter` routine, if used, must be called before :func:`initscr` is + The :func:`.filter` routine, if used, must be called before :func:`initscr` is called. The effect is that, during those calls, LINES is set to 1; the capabilities clear, cup, cud, cud1, cuu1, cuu, vpa are disabled; and the home string is set to the value of cr. The effect is that the cursor is confined to Modified: python/trunk/Doc/library/dbhash.rst ============================================================================== --- python/trunk/Doc/library/dbhash.rst (original) +++ python/trunk/Doc/library/dbhash.rst Sun Jul 26 16:19:57 2009 @@ -72,7 +72,7 @@ Database Objects ---------------- -The database objects returned by :func:`open` provide the methods common to all +The database objects returned by :func:`.open` provide the methods common to all the DBM-style databases and mapping objects. The following methods are available in addition to the standard methods. @@ -80,7 +80,7 @@ .. method:: dbhash.first() It's possible to loop over every key/value pair in the database using this - method and the :meth:`next` method. The traversal is ordered by the databases + method and the :meth:`!next` method. The traversal is ordered by the databases internal hash values, and won't be sorted by the key values. This method returns the starting key. Modified: python/trunk/Doc/library/decimal.rst ============================================================================== --- python/trunk/Doc/library/decimal.rst (original) +++ python/trunk/Doc/library/decimal.rst Sun Jul 26 16:19:57 2009 @@ -656,7 +656,7 @@ .. method:: max_mag(other[, context]) - Similar to the :meth:`max` method, but the comparison is done using the + Similar to the :meth:`.max` method, but the comparison is done using the absolute values of the operands. .. versionadded:: 2.6 @@ -670,7 +670,7 @@ .. method:: min_mag(other[, context]) - Similar to the :meth:`min` method, but the comparison is done using the + Similar to the :meth:`.min` method, but the comparison is done using the absolute values of the operands. .. versionadded:: 2.6 Modified: python/trunk/Doc/library/dis.rst ============================================================================== --- python/trunk/Doc/library/dis.rst (original) +++ python/trunk/Doc/library/dis.rst Sun Jul 26 16:19:57 2009 @@ -705,7 +705,7 @@ .. opcode:: FOR_ITER (delta) - ``TOS`` is an :term:`iterator`. Call its :meth:`next` method. If this + ``TOS`` is an :term:`iterator`. Call its :meth:`!next` method. If this yields a new value, push it on the stack (leaving the iterator below it). If the iterator indicates it is exhausted ``TOS`` is popped, and the bytecode counter is incremented by *delta*. Modified: python/trunk/Doc/library/dl.rst ============================================================================== --- python/trunk/Doc/library/dl.rst (original) +++ python/trunk/Doc/library/dl.rst Sun Jul 26 16:19:57 2009 @@ -44,12 +44,12 @@ .. data:: RTLD_LAZY - Useful as an argument to :func:`open`. + Useful as an argument to :func:`.open`. .. data:: RTLD_NOW - Useful as an argument to :func:`open`. Note that on systems which do not + Useful as an argument to :func:`.open`. Note that on systems which do not support immediate binding, this constant will not appear in the module. For maximum portability, use :func:`hasattr` to determine if the system supports immediate binding. @@ -78,7 +78,7 @@ Dl Objects ---------- -Dl objects, as returned by :func:`open` above, have the following methods: +Dl objects, as returned by :func:`.open` above, have the following methods: .. method:: dl.close() Modified: python/trunk/Doc/library/exceptions.rst ============================================================================== --- python/trunk/Doc/library/exceptions.rst (original) +++ python/trunk/Doc/library/exceptions.rst Sun Jul 26 16:19:57 2009 @@ -281,10 +281,10 @@ .. exception:: StopIteration - Raised by an :term:`iterator`\'s :meth:`next` method to signal that there are - no further values. This is derived from :exc:`Exception` rather than - :exc:`StandardError`, since this is not considered an error in its normal - application. + Raised by an :term:`iterator`\'s :meth:`~iterator.next` method to signal that + there are no further values. This is derived from :exc:`Exception` rather + than :exc:`StandardError`, since this is not considered an error in its + normal application. .. versionadded:: 2.2 Modified: python/trunk/Doc/library/fileinput.rst ============================================================================== --- python/trunk/Doc/library/fileinput.rst (original) +++ python/trunk/Doc/library/fileinput.rst Sun Jul 26 16:19:57 2009 @@ -20,10 +20,10 @@ This iterates over the lines of all files listed in ``sys.argv[1:]``, defaulting to ``sys.stdin`` if the list is empty. If a filename is ``'-'``, it is also replaced by ``sys.stdin``. To specify an alternative list of filenames, pass it -as the first argument to :func:`input`. A single file name is also allowed. +as the first argument to :func:`.input`. A single file name is also allowed. All files are opened in text mode by default, but you can override this by -specifying the *mode* parameter in the call to :func:`input` or +specifying the *mode* parameter in the call to :func:`.input` or :class:`FileInput()`. If an I/O error occurs during opening or reading a file, :exc:`IOError` is raised. Modified: python/trunk/Doc/library/functions.rst ============================================================================== --- python/trunk/Doc/library/functions.rst (original) +++ python/trunk/Doc/library/functions.rst Sun Jul 26 16:19:57 2009 @@ -291,7 +291,7 @@ Return an enumerate object. *sequence* must be a sequence, an :term:`iterator`, or some other object which supports iteration. The - :meth:`next` method of the iterator returned by :func:`enumerate` returns a + :meth:`!next` method of the iterator returned by :func:`enumerate` returns a tuple containing a count (from *start* which defaults to 0) and the corresponding value obtained from iterating over *iterable*. :func:`enumerate` is useful for obtaining an indexed series: ``(0, seq[0])``, @@ -595,7 +595,7 @@ does not support either of those protocols, :exc:`TypeError` is raised. If the second argument, *sentinel*, is given, then *o* must be a callable object. The iterator created in this case will call *o* with no arguments for each call to - its :meth:`next` method; if the value returned is equal to *sentinel*, + its :meth:`~iterator.next` method; if the value returned is equal to *sentinel*, :exc:`StopIteration` will be raised, otherwise the value will be returned. One useful application of the second form of :func:`iter` is to read lines of @@ -705,9 +705,9 @@ .. function:: next(iterator[, default]) - Retrieve the next item from the *iterator* by calling its :meth:`next` - method. If *default* is given, it is returned if the iterator is exhausted, - otherwise :exc:`StopIteration` is raised. + Retrieve the next item from the *iterator* by calling its + :meth:`~iterator.next` method. If *default* is given, it is returned if the + iterator is exhausted, otherwise :exc:`StopIteration` is raised. .. versionadded:: 2.6 Modified: python/trunk/Doc/library/io.rst ============================================================================== --- python/trunk/Doc/library/io.rst (original) +++ python/trunk/Doc/library/io.rst Sun Jul 26 16:19:57 2009 @@ -37,7 +37,7 @@ stream for text. Argument names are not part of the specification, and only the arguments of -:func:`open` are intended to be used as keyword arguments. +:func:`.open` are intended to be used as keyword arguments. Module Interface @@ -46,7 +46,7 @@ .. data:: DEFAULT_BUFFER_SIZE An int containing the default buffer size used by the module's buffered I/O - classes. :func:`open` uses the file's blksize (as obtained by + classes. :func:`.open` uses the file's blksize (as obtained by :func:`os.stat`) if possible. .. function:: open(file[, mode[, buffering[, encoding[, errors[, newline[, closefd=True]]]]]]) @@ -138,8 +138,8 @@ when the file is closed. If a filename is given *closefd* has no effect but must be ``True`` (the default). - The type of file object returned by the :func:`open` function depends - on the mode. When :func:`open` is used to open a file in a text mode + The type of file object returned by the :func:`.open` function depends + on the mode. When :func:`.open` is used to open a file in a text mode (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a :class:`TextIOWrapper`. When used to open a file in a binary mode, the returned class varies: in read binary mode, it returns a @@ -250,7 +250,7 @@ most *limit* bytes will be read. The line terminator is always ``b'\n'`` for binary files; for text files, - the *newlines* argument to :func:`open` can be used to select the line + the *newlines* argument to :func:`.open` can be used to select the line terminator(s) recognized. .. method:: readlines([hint]) Modified: python/trunk/Doc/library/locale.rst ============================================================================== --- python/trunk/Doc/library/locale.rst (original) +++ python/trunk/Doc/library/locale.rst Sun Jul 26 16:19:57 2009 @@ -454,8 +454,8 @@ .. data:: LC_NUMERIC - Locale category for formatting numbers. The functions :func:`format`, - :func:`atoi`, :func:`atof` and :func:`str` of the :mod:`locale` module are + Locale category for formatting numbers. The functions :func:`.format`, + :func:`atoi`, :func:`atof` and :func:`.str` of the :mod:`locale` module are affected by that category. All other numeric formatting operations are not affected. @@ -523,7 +523,7 @@ The only way to perform numeric operations according to the locale is to use the special functions defined by this module: :func:`atof`, :func:`atoi`, -:func:`format`, :func:`str`. +:func:`.format`, :func:`.str`. .. _embedding-locale: Modified: python/trunk/Doc/library/logging.rst ============================================================================== --- python/trunk/Doc/library/logging.rst (original) +++ python/trunk/Doc/library/logging.rst Sun Jul 26 16:19:57 2009 @@ -1012,7 +1012,7 @@ Handles a record by passing it to all handlers associated with this logger and its ancestors (until a false value of *propagate* is found). This method is used for unpickled records received from a socket, as well as those created locally. - Logger-level filtering is applied using :meth:`filter`. + Logger-level filtering is applied using :meth:`~Logger.filter`. .. method:: Logger.makeRecord(name, lvl, fn, lno, msg, args, exc_info [, func, extra]) Modified: python/trunk/Doc/library/mailbox.rst ============================================================================== --- python/trunk/Doc/library/mailbox.rst (original) +++ python/trunk/Doc/library/mailbox.rst Sun Jul 26 16:19:57 2009 @@ -1530,7 +1530,7 @@ Most of the older mailbox classes have names that differ from the current mailbox class names, except for :class:`Maildir`. For this reason, the new -:class:`Maildir` class defines a :meth:`next` method and its constructor differs +:class:`Maildir` class defines a :meth:`!next` method and its constructor differs slightly from those of the other new mailbox classes. The older mailbox classes whose names are not the same as their newer @@ -1543,7 +1543,7 @@ single file and separated by ``From`` (a.k.a. ``From_``) lines. The file object *fp* points to the mailbox file. The optional *factory* parameter is a callable that should create new message objects. *factory* is called with one argument, - *fp* by the :meth:`next` method of the mailbox object. The default is the + *fp* by the :meth:`!next` method of the mailbox object. The default is the :class:`rfc822.Message` class (see the :mod:`rfc822` module -- and the note below). Modified: python/trunk/Doc/library/multifile.rst ============================================================================== --- python/trunk/Doc/library/multifile.rst (original) +++ python/trunk/Doc/library/multifile.rst Sun Jul 26 16:19:57 2009 @@ -109,7 +109,7 @@ an input line, it will be interpreted as a section-divider or end-marker (depending on the decoration, see :rfc:`2045`). All subsequent reads will return the empty string to indicate end-of-file, until a call to :meth:`pop` - removes the boundary a or :meth:`next` call reenables it. + removes the boundary a or :meth:`.next` call reenables it. It is possible to push more than one boundary. Encountering the most-recently-pushed boundary will return EOF; encountering any other Modified: python/trunk/Doc/library/multiprocessing.rst ============================================================================== --- python/trunk/Doc/library/multiprocessing.rst (original) +++ python/trunk/Doc/library/multiprocessing.rst Sun Jul 26 16:19:57 2009 @@ -1580,7 +1580,7 @@ .. method:: map_async(func, iterable[, chunksize[, callback]]) - A variant of the :meth:`map` method which returns a result object. + A variant of the :meth:`.map` method which returns a result object. If *callback* is specified then it should be a callable which accepts a single argument. When the result becomes ready *callback* is applied to @@ -1596,7 +1596,7 @@ make make the job complete **much** faster than using the default value of ``1``. - Also if *chunksize* is ``1`` then the :meth:`next` method of the iterator + Also if *chunksize* is ``1`` then the :meth:`!next` method of the iterator returned by the :meth:`imap` method has an optional *timeout* parameter: ``next(timeout)`` will raise :exc:`multiprocessing.TimeoutError` if the result cannot be returned within *timeout* seconds. Modified: python/trunk/Doc/library/optparse.rst ============================================================================== --- python/trunk/Doc/library/optparse.rst (original) +++ python/trunk/Doc/library/optparse.rst Sun Jul 26 16:19:57 2009 @@ -286,7 +286,7 @@ * ``args``, the list of positional arguments leftover after parsing options This tutorial section only covers the four most important option attributes: -:attr:`action`, :attr:`type`, :attr:`dest` (destination), and :attr:`help`. Of +:attr:`action`, :attr:`!type`, :attr:`dest` (destination), and :attr:`help`. Of these, :attr:`action` is the most fundamental. @@ -834,7 +834,7 @@ print a usage message including all options and the documentation for them (If you don't supply an action, the default is ``store``. For this action, you -may also supply :attr:`type` and :attr:`dest` option attributes; see below.) +may also supply :attr:`!type` and :attr:`dest` option attributes; see below.) As you can see, most actions involve storing or updating a value somewhere. :mod:`optparse` always creates a special object for this, conventionally called @@ -865,7 +865,7 @@ options.filename = "foo" -The :attr:`type` and :attr:`dest` option attributes are almost as important as +The :attr:`!type` and :attr:`dest` option attributes are almost as important as :attr:`action`, but :attr:`action` is the only one that makes sense for *all* options. @@ -880,18 +880,18 @@ guide :mod:`optparse`'s behaviour; a few have required attributes, which you must specify for any option using that action. -* ``store`` [relevant: :attr:`type`, :attr:`dest`, ``nargs``, ``choices``] +* ``store`` [relevant: :attr:`!type`, :attr:`dest`, ``nargs``, ``choices``] The option must be followed by an argument, which is converted to a value - according to :attr:`type` and stored in :attr:`dest`. If ``nargs`` > 1, + according to :attr:`!type` and stored in :attr:`dest`. If ``nargs`` > 1, multiple arguments will be consumed from the command line; all will be converted - according to :attr:`type` and stored to :attr:`dest` as a tuple. See the + according to :attr:`!type` and stored to :attr:`dest` as a tuple. See the "Option types" section below. If ``choices`` is supplied (a list or tuple of strings), the type defaults to ``choice``. - If :attr:`type` is not supplied, it defaults to ``string``. + If :attr:`!type` is not supplied, it defaults to ``string``. If :attr:`dest` is not supplied, :mod:`optparse` derives a destination from the first long option string (e.g., ``"--foo-bar"`` implies ``foo_bar``). If there @@ -943,7 +943,7 @@ parser.add_option("--clobber", action="store_true", dest="clobber") parser.add_option("--no-clobber", action="store_false", dest="clobber") -* ``append`` [relevant: :attr:`type`, :attr:`dest`, ``nargs``, ``choices``] +* ``append`` [relevant: :attr:`!type`, :attr:`dest`, ``nargs``, ``choices``] The option must be followed by an argument, which is appended to the list in :attr:`dest`. If no default value for :attr:`dest` is supplied, an empty list @@ -951,7 +951,7 @@ the command-line. If ``nargs`` > 1, multiple arguments are consumed, and a tuple of length ``nargs`` is appended to :attr:`dest`. - The defaults for :attr:`type` and :attr:`dest` are the same as for the ``store`` + The defaults for :attr:`!type` and :attr:`dest` are the same as for the ``store`` action. Example:: @@ -993,7 +993,7 @@ options.verbosity += 1 -* ``callback`` [required: ``callback``; relevant: :attr:`type`, ``nargs``, +* ``callback`` [required: ``callback``; relevant: :attr:`!type`, ``nargs``, ``callback_args``, ``callback_kwargs``] Call the function specified by ``callback``, which is called as :: @@ -1066,7 +1066,7 @@ Determines :mod:`optparse`'s behaviour when this option is seen on the command line; the available options are documented above. -* :attr:`type` (default: ``"string"``) +* :attr:`!type` (default: ``"string"``) The argument type expected by this option (e.g., ``"string"`` or ``"int"``); the available option types are documented below. @@ -1084,7 +1084,7 @@ * ``nargs`` (default: 1) - How many arguments of type :attr:`type` should be consumed when this option is + How many arguments of type :attr:`!type` should be consumed when this option is seen. If > 1, :mod:`optparse` will store a tuple of values to :attr:`dest`. * ``const`` @@ -1415,15 +1415,15 @@ There are several other option attributes that you can supply when you define a callback option: -:attr:`type` +:attr:`!type` has its usual meaning: as with the ``store`` or ``append`` actions, it instructs - :mod:`optparse` to consume one argument and convert it to :attr:`type`. Rather + :mod:`optparse` to consume one argument and convert it to :attr:`!type`. Rather than storing the converted value(s) anywhere, though, :mod:`optparse` passes it to your callback function. ``nargs`` also has its usual meaning: if it is supplied and > 1, :mod:`optparse` will - consume ``nargs`` arguments, each of which must be convertible to :attr:`type`. + consume ``nargs`` arguments, each of which must be convertible to :attr:`!type`. It then passes a tuple of converted values to your callback. ``callback_args`` @@ -1455,8 +1455,8 @@ ``value`` is the argument to this option seen on the command-line. :mod:`optparse` will - only expect an argument if :attr:`type` is set; the type of ``value`` will be - the type implied by the option's type. If :attr:`type` for this option is + only expect an argument if :attr:`!type` is set; the type of ``value`` will be + the type implied by the option's type. If :attr:`!type` for this option is ``None`` (no argument expected), then ``value`` will be ``None``. If ``nargs`` > 1, ``value`` will be a tuple of values of the appropriate type. @@ -1583,7 +1583,7 @@ Things get slightly more interesting when you define callback options that take a fixed number of arguments. Specifying that a callback option takes arguments is similar to defining a ``store`` or ``append`` option: if you define -:attr:`type`, then the option takes one argument that must be convertible to +:attr:`!type`, then the option takes one argument that must be convertible to that type; if you further define ``nargs``, then the option takes ``nargs`` arguments. @@ -1762,7 +1762,7 @@ "typed" actions actions that take a value from the command line and expect it to be of a certain type; or rather, a string that can be converted to a certain type. These - options require a :attr:`type` attribute to the Option constructor. + options require a :attr:`!type` attribute to the Option constructor. These are overlapping sets: some default "store" actions are ``store``, ``store_const``, ``append``, and ``count``, while the default "typed" actions Modified: python/trunk/Doc/library/os.rst ============================================================================== --- python/trunk/Doc/library/os.rst (original) +++ python/trunk/Doc/library/os.rst Sun Jul 26 16:19:57 2009 @@ -606,10 +606,10 @@ .. note:: - This function is intended for low-level I/O. For normal usage, use the built-in - function :func:`open`, which returns a "file object" with :meth:`~file.read` and - :meth:`~file.write` methods (and many more). To wrap a file descriptor in a "file - object", use :func:`fdopen`. + This function is intended for low-level I/O. For normal usage, use the + built-in function :func:`open`, which returns a "file object" with + :meth:`~file.read` and :meth:`~file.write` methods (and many more). To + wrap a file descriptor in a "file object", use :func:`fdopen`. .. function:: openpty() @@ -754,10 +754,10 @@ .. note:: - Using :func:`access` to check if a user is authorized to e.g. open a file before - actually doing so using :func:`open` creates a security hole, because the user - might exploit the short time interval between checking and opening the file to - manipulate it. + Using :func:`access` to check if a user is authorized to e.g. open a file + before actually doing so using :func:`open` creates a security hole, + because the user might exploit the short time interval between checking + and opening the file to manipulate it. .. note:: Modified: python/trunk/Doc/library/ossaudiodev.rst ============================================================================== --- python/trunk/Doc/library/ossaudiodev.rst (original) +++ python/trunk/Doc/library/ossaudiodev.rst Sun Jul 26 16:19:57 2009 @@ -120,7 +120,7 @@ parameters at once. This is more convenient, but may not be as flexible in all cases. -The audio device objects returned by :func:`open` define the following methods +The audio device objects returned by :func:`.open` define the following methods and (read-only) attributes: Modified: python/trunk/Doc/library/posixfile.rst ============================================================================== --- python/trunk/Doc/library/posixfile.rst (original) +++ python/trunk/Doc/library/posixfile.rst Sun Jul 26 16:19:57 2009 @@ -24,9 +24,8 @@ methods and adds the methods described below. This module only works for certain flavors of Unix, since it uses :func:`fcntl.fcntl` for file locking. -To instantiate a posixfile object, use the :func:`open` function in the -:mod:`posixfile` module. The resulting object looks and feels roughly the same -as a standard file object. +To instantiate a posixfile object, use the :func:`posixfile.open` function. The +resulting object looks and feels roughly the same as a standard file object. The :mod:`posixfile` module defines the following constants: Modified: python/trunk/Doc/library/pyclbr.rst ============================================================================== --- python/trunk/Doc/library/pyclbr.rst (original) +++ python/trunk/Doc/library/pyclbr.rst Sun Jul 26 16:19:57 2009 @@ -78,7 +78,7 @@ .. attribute:: Class.lineno The line number of the ``class`` statement within the file named by - :attr:`file`. + :attr:`~Class.file`. .. _pyclbr-function-objects: @@ -109,5 +109,5 @@ .. attribute:: Function.lineno The line number of the ``def`` statement within the file named by - :attr:`file`. + :attr:`~Function.file`. Modified: python/trunk/Doc/library/repr.rst ============================================================================== --- python/trunk/Doc/library/repr.rst (original) +++ python/trunk/Doc/library/repr.rst Sun Jul 26 16:19:57 2009 @@ -27,16 +27,16 @@ .. data:: aRepr - This is an instance of :class:`Repr` which is used to provide the :func:`repr` + This is an instance of :class:`Repr` which is used to provide the :func:`.repr` function described below. Changing the attributes of this object will affect - the size limits used by :func:`repr` and the Python debugger. + the size limits used by :func:`.repr` and the Python debugger. .. function:: repr(obj) - This is the :meth:`repr` method of ``aRepr``. It returns a string similar to - that returned by the built-in function of the same name, but with limits on - most sizes. + This is the :meth:`~Repr.repr` method of ``aRepr``. It returns a string + similar to that returned by the built-in function of the same name, but with + limits on most sizes. .. _repr-objects: @@ -99,7 +99,7 @@ .. method:: Repr.repr1(obj, level) - Recursive implementation used by :meth:`repr`. This uses the type of *obj* to + Recursive implementation used by :meth:`.repr`. This uses the type of *obj* to determine which formatting method to call, passing it *obj* and *level*. The type-specific methods should call :meth:`repr1` to perform recursive formatting, with ``level - 1`` for the value of *level* in the recursive call. Modified: python/trunk/Doc/library/shelve.rst ============================================================================== --- python/trunk/Doc/library/shelve.rst (original) +++ python/trunk/Doc/library/shelve.rst Sun Jul 26 16:19:57 2009 @@ -108,7 +108,7 @@ .. class:: BsdDbShelf(dict[, protocol=None[, writeback=False]]) - A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`next`, + A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`!next`, :meth:`previous`, :meth:`last` and :meth:`set_location` which are available in the :mod:`bsddb` module but not in other database modules. The *dict* object passed to the constructor must support those methods. This is generally @@ -122,7 +122,7 @@ A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like object. The underlying file will be opened using :func:`anydbm.open`. By default, the file will be created and opened for both read and write. The - optional *flag* parameter has the same interpretation as for the :func:`open` + optional *flag* parameter has the same interpretation as for the :func:`.open` function. The optional *protocol* and *writeback* parameters have the same interpretation as for the :class:`Shelf` class. @@ -174,8 +174,8 @@ BSD ``db`` database interface. Module :mod:`dbhash` - Thin layer around the :mod:`bsddb` which provides an :func:`open` function like - the other database modules. + Thin layer around the :mod:`bsddb` which provides an :func:`~dbhash.open` + function like the other database modules. Module :mod:`dbm` Standard Unix database interface. Modified: python/trunk/Doc/library/stdtypes.rst ============================================================================== --- python/trunk/Doc/library/stdtypes.rst (original) +++ python/trunk/Doc/library/stdtypes.rst Sun Jul 26 16:19:57 2009 @@ -2179,12 +2179,12 @@ A file object is its own iterator, for example ``iter(f)`` returns *f* (unless *f* is closed). When a file is used as an iterator, typically in a :keyword:`for` loop (for example, ``for line in f: print line``), the - :meth:`next` method is called repeatedly. This method returns the next input + :meth:`.next` method is called repeatedly. This method returns the next input line, or raises :exc:`StopIteration` when EOF is hit when the file is open for reading (behavior is undefined when the file is open for writing). In order to make a :keyword:`for` loop the most efficient way of looping over the lines of a file (a very common operation), the :meth:`next` method uses a hidden read-ahead - buffer. As a consequence of using a read-ahead buffer, combining :meth:`next` + buffer. As a consequence of using a read-ahead buffer, combining :meth:`.next` with other file methods (like :meth:`readline`) does not work right. However, using :meth:`seek` to reposition the file to an absolute position will flush the read-ahead buffer. Modified: python/trunk/Doc/library/sunau.rst ============================================================================== --- python/trunk/Doc/library/sunau.rst (original) +++ python/trunk/Doc/library/sunau.rst Sun Jul 26 16:19:57 2009 @@ -58,18 +58,18 @@ .. function:: openfp(file, mode) - A synonym for :func:`open`, maintained for backwards compatibility. + A synonym for :func:`.open`, maintained for backwards compatibility. -The :mod:`sunau` module defines the following exception: +The :mod:`sunau` module defines the following exception: .. exception:: Error An error raised when something is impossible because of Sun AU specs or implementation deficiency. -The :mod:`sunau` module defines the following data items: +The :mod:`sunau` module defines the following data items: .. data:: AUDIO_FILE_MAGIC @@ -104,7 +104,7 @@ AU_read Objects --------------- -AU_read objects, as returned by :func:`open` above, have the following methods: +AU_read objects, as returned by :func:`.open` above, have the following methods: .. method:: AU_read.close() @@ -197,7 +197,7 @@ AU_write Objects ---------------- -AU_write objects, as returned by :func:`open` above, have the following methods: +AU_write objects, as returned by :func:`.open` above, have the following methods: .. method:: AU_write.setnchannels(n) Modified: python/trunk/Doc/library/sunaudio.rst ============================================================================== --- python/trunk/Doc/library/sunaudio.rst (original) +++ python/trunk/Doc/library/sunaudio.rst Sun Jul 26 16:19:57 2009 @@ -54,7 +54,7 @@ Audio Device Objects -------------------- -The audio device objects are returned by :func:`open` define the following +The audio device objects are returned by :func:`.open` define the following methods (except ``control`` objects which only provide :meth:`getinfo`, :meth:`setinfo`, :meth:`fileno`, and :meth:`drain`): Modified: python/trunk/Doc/library/tempfile.rst ============================================================================== --- python/trunk/Doc/library/tempfile.rst (original) +++ python/trunk/Doc/library/tempfile.rst Sun Jul 26 16:19:57 2009 @@ -51,7 +51,7 @@ The *dir*, *prefix* and *suffix* parameters are passed to :func:`mkstemp`. The returned object is a true file object on POSIX platforms. On other - platforms, it is a file-like object whose :attr:`file` attribute is the + platforms, it is a file-like object whose :attr:`!file` attribute is the underlying true file object. This file-like object can be used in a :keyword:`with` statement, just like a normal file. @@ -67,7 +67,7 @@ on Windows NT or later). If *delete* is true (the default), the file is deleted as soon as it is closed. - The returned object is always a file-like object whose :attr:`file` + The returned object is always a file-like object whose :attr:`!file` attribute is the underlying true file object. This file-like object can be used in a :keyword:`with` statement, just like a normal file. Modified: python/trunk/Doc/library/threading.rst ============================================================================== --- python/trunk/Doc/library/threading.rst (original) +++ python/trunk/Doc/library/threading.rst Sun Jul 26 16:19:57 2009 @@ -65,8 +65,9 @@ :noindex: A factory function that returns a new event object. An event manages a flag - that can be set to true with the :meth:`set` method and reset to false with the - :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. + that can be set to true with the :meth:`~Event.set` method and reset to false + with the :meth:`clear` method. The :meth:`wait` method blocks until the flag + is true. .. class:: local @@ -666,7 +667,7 @@ thread signals an event and other threads wait for it. An event object manages an internal flag that can be set to true with the -:meth:`set` method and reset to false with the :meth:`clear` method. The +:meth:`~Event.set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. @@ -691,13 +692,14 @@ .. method:: Event.clear() Reset the internal flag to false. Subsequently, threads calling :meth:`wait` - will block until :meth:`set` is called to set the internal flag to true again. + will block until :meth:`.set` is called to set the internal flag to true + again. .. method:: Event.wait([timeout]) Block until the internal flag is true. If the internal flag is true on entry, - return immediately. Otherwise, block until another thread calls :meth:`set` + return immediately. Otherwise, block until another thread calls :meth:`.set` to set the flag to true, or until the optional timeout occurs. When the timeout argument is present and not ``None``, it should be a floating Modified: python/trunk/Doc/library/tkinter.rst ============================================================================== --- python/trunk/Doc/library/tkinter.rst (original) +++ python/trunk/Doc/library/tkinter.rst Sun Jul 26 16:19:57 2009 @@ -524,7 +524,7 @@ There are many useful subclasses of Variable already defined: :class:`StringVar`, :class:`IntVar`, :class:`DoubleVar`, and :class:`BooleanVar`. To read the current value of such a variable, call the -:meth:`get` method on it, and to change its value you call the :meth:`set` +:meth:`get` method on it, and to change its value you call the :meth:`!set` method. If you follow this protocol, the widget will always track the value of the variable, with no further intervention on your part. @@ -665,7 +665,7 @@ ``"raised"``, ``"sunken"``, ``"flat"``, ``"groove"``, and ``"ridge"``. scrollcommand - This is almost always the :meth:`set` method of some scrollbar widget, but can + This is almost always the :meth:`!set` method of some scrollbar widget, but can be any widget method that takes a single argument. Refer to the file :file:`Demo/tkinter/matt/canvas-with-scrollbars.py` in the Python source distribution for an example. Modified: python/trunk/Doc/library/wave.rst ============================================================================== --- python/trunk/Doc/library/wave.rst (original) +++ python/trunk/Doc/library/wave.rst Sun Jul 26 16:19:57 2009 @@ -33,7 +33,7 @@ .. function:: openfp(file, mode) - A synonym for :func:`open`, maintained for backwards compatibility. + A synonym for :func:`.open`, maintained for backwards compatibility. .. exception:: Error @@ -47,7 +47,7 @@ Wave_read Objects ----------------- -Wave_read objects, as returned by :func:`open`, have the following methods: +Wave_read objects, as returned by :func:`.open`, have the following methods: .. method:: Wave_read.close() @@ -134,7 +134,7 @@ Wave_write Objects ------------------ -Wave_write objects, as returned by :func:`open`, have the following methods: +Wave_write objects, as returned by :func:`.open`, have the following methods: .. method:: Wave_write.close() Modified: python/trunk/Doc/library/webbrowser.rst ============================================================================== --- python/trunk/Doc/library/webbrowser.rst (original) +++ python/trunk/Doc/library/webbrowser.rst Sun Jul 26 16:19:57 2009 @@ -10,7 +10,7 @@ The :mod:`webbrowser` module provides a high-level interface to allow displaying Web-based documents to users. Under most circumstances, simply calling the -:func:`open` function from this module will do the right thing. +:func:`.open` function from this module will do the right thing. Under Unix, graphical browsers are preferred under X11, but text-mode browsers will be used if graphical browsers are not available or an X11 display isn't From python-checkins at python.org Sun Jul 26 16:24:30 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 14:24:30 -0000 Subject: [Python-checkins] r74208 - python/branches/release30-maint/Doc/tools/sphinxext/indexsidebar.html Message-ID: Author: georg.brandl Date: Sun Jul 26 16:24:30 2009 New Revision: 74208 Log: Add section about other versions to index.html sidebar. Modified: python/branches/release30-maint/Doc/tools/sphinxext/indexsidebar.html Modified: python/branches/release30-maint/Doc/tools/sphinxext/indexsidebar.html ============================================================================== --- python/branches/release30-maint/Doc/tools/sphinxext/indexsidebar.html (original) +++ python/branches/release30-maint/Doc/tools/sphinxext/indexsidebar.html Sun Jul 26 16:24:30 2009 @@ -1,5 +1,13 @@

Download

Download these documents

+

Docs for other versions

+

Other resources

    {# XXX: many of these should probably be merged in the main docs #} From python-checkins at python.org Sun Jul 26 16:37:29 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 14:37:29 -0000 Subject: [Python-checkins] r74209 - in python/trunk/Doc: c-api/buffer.rst c-api/import.rst c-api/unicode.rst distutils/apiref.rst extending/newtypes.rst glossary.rst howto/doanddont.rst howto/urllib2.rst includes/sqlite3/text_factory.py library/2to3.rst library/__future__.rst library/_winreg.rst library/ast.rst library/collections.rst library/compiler.rst library/configparser.rst library/curses.rst library/functions.rst library/future_builtins.rst library/gc.rst library/gettext.rst library/heapq.rst library/imputil.rst library/io.rst library/multiprocessing.rst library/numbers.rst library/pprint.rst library/sets.rst library/sqlite3.rst library/stdtypes.rst library/string.rst library/sys.rst library/undoc.rst library/weakref.rst library/xmlrpclib.rst library/zipimport.rst reference/datamodel.rst reference/executionmodel.rst reference/expressions.rst reference/simple_stmts.rst using/cmdline.rst whatsnew/2.2.rst whatsnew/2.6.rst Message-ID: Author: georg.brandl Date: Sun Jul 26 16:37:28 2009 New Revision: 74209 Log: builtin -> built-in. Modified: python/trunk/Doc/c-api/buffer.rst python/trunk/Doc/c-api/import.rst python/trunk/Doc/c-api/unicode.rst python/trunk/Doc/distutils/apiref.rst python/trunk/Doc/extending/newtypes.rst python/trunk/Doc/glossary.rst python/trunk/Doc/howto/doanddont.rst python/trunk/Doc/howto/urllib2.rst python/trunk/Doc/includes/sqlite3/text_factory.py python/trunk/Doc/library/2to3.rst python/trunk/Doc/library/__future__.rst python/trunk/Doc/library/_winreg.rst python/trunk/Doc/library/ast.rst python/trunk/Doc/library/collections.rst python/trunk/Doc/library/compiler.rst python/trunk/Doc/library/configparser.rst python/trunk/Doc/library/curses.rst python/trunk/Doc/library/functions.rst python/trunk/Doc/library/future_builtins.rst python/trunk/Doc/library/gc.rst python/trunk/Doc/library/gettext.rst python/trunk/Doc/library/heapq.rst python/trunk/Doc/library/imputil.rst python/trunk/Doc/library/io.rst python/trunk/Doc/library/multiprocessing.rst python/trunk/Doc/library/numbers.rst python/trunk/Doc/library/pprint.rst python/trunk/Doc/library/sets.rst python/trunk/Doc/library/sqlite3.rst python/trunk/Doc/library/stdtypes.rst python/trunk/Doc/library/string.rst python/trunk/Doc/library/sys.rst python/trunk/Doc/library/undoc.rst python/trunk/Doc/library/weakref.rst python/trunk/Doc/library/xmlrpclib.rst python/trunk/Doc/library/zipimport.rst python/trunk/Doc/reference/datamodel.rst python/trunk/Doc/reference/executionmodel.rst python/trunk/Doc/reference/expressions.rst python/trunk/Doc/reference/simple_stmts.rst python/trunk/Doc/using/cmdline.rst python/trunk/Doc/whatsnew/2.2.rst python/trunk/Doc/whatsnew/2.6.rst Modified: python/trunk/Doc/c-api/buffer.rst ============================================================================== --- python/trunk/Doc/c-api/buffer.rst (original) +++ python/trunk/Doc/c-api/buffer.rst Sun Jul 26 16:37:28 2009 @@ -31,7 +31,7 @@ returning data from the target object. Starting from version 1.6, Python has been providing Python-level buffer -objects and a C-level buffer API so that any builtin or used-defined type can +objects and a C-level buffer API so that any built-in or used-defined type can expose its characteristics. Both, however, have been deprecated because of various shortcomings, and have been officially removed in Python 3.0 in favour of a new C-level buffer API and a new Python-level object named Modified: python/trunk/Doc/c-api/import.rst ============================================================================== --- python/trunk/Doc/c-api/import.rst (original) +++ python/trunk/Doc/c-api/import.rst Sun Jul 26 16:37:28 2009 @@ -167,7 +167,7 @@ *path*, possibly by fetching it from the :data:`sys.path_importer_cache` dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook is found that can handle the path item. Return ``None`` if no hook could; - this tells our caller it should fall back to the builtin import mechanism. + this tells our caller it should fall back to the built-in import mechanism. Cache the result in :data:`sys.path_importer_cache`. Return a new reference to the importer object. Modified: python/trunk/Doc/c-api/unicode.rst ============================================================================== --- python/trunk/Doc/c-api/unicode.rst (original) +++ python/trunk/Doc/c-api/unicode.rst Sun Jul 26 16:37:28 2009 @@ -292,12 +292,12 @@ Built-in Codecs ^^^^^^^^^^^^^^^ -Python provides a set of builtin codecs which are written in C for speed. All of +Python provides a set of built-in codecs which are written in C for speed. All of these codecs are directly usable via the following functions. Many of the following APIs take two arguments encoding and errors. These parameters encoding and errors have the same semantics as the ones of the -builtin unicode() Unicode object constructor. +built-in :func:`unicode` Unicode object constructor. Setting encoding to *NULL* causes the default encoding to be used which is ASCII. The file system calls should use :cdata:`Py_FileSystemDefaultEncoding` @@ -307,7 +307,7 @@ Error handling is set by errors which may also be set to *NULL* meaning to use the default handling defined for the codec. Default error handling for all -builtin codecs is "strict" (:exc:`ValueError` is raised). +built-in codecs is "strict" (:exc:`ValueError` is raised). The codecs all use a similar interface. Only deviation from the following generic ones are documented for simplicity. @@ -321,7 +321,7 @@ Create a Unicode object by decoding *size* bytes of the encoded string *s*. *encoding* and *errors* have the same meaning as the parameters of the same name - in the :func:`unicode` builtin function. The codec to be used is looked up + in the :func:`unicode` built-in function. The codec to be used is looked up using the Python codec registry. Return *NULL* if an exception was raised by the codec. Modified: python/trunk/Doc/distutils/apiref.rst ============================================================================== --- python/trunk/Doc/distutils/apiref.rst (original) +++ python/trunk/Doc/distutils/apiref.rst Sun Jul 26 16:37:28 2009 @@ -1601,7 +1601,7 @@ +------------------+--------------------------------+---------+ Note that since *rstrip_ws* can strip the trailing newline, the semantics of - :meth:`readline` must differ from those of the builtin file object's + :meth:`readline` must differ from those of the built-in file object's :meth:`readline` method! In particular, :meth:`readline` returns ``None`` for end-of-file: an empty string might just be a blank line (or an all-whitespace line), if *rstrip_ws* is true but *skip_blanks* is not. @@ -1609,8 +1609,8 @@ .. method:: TextFile.open(filename) - Open a new file *filename*. This overrides any *file* or *filename* constructor - arguments. + Open a new file *filename*. This overrides any *file* or *filename* + constructor arguments. .. method:: TextFile.close() Modified: python/trunk/Doc/extending/newtypes.rst ============================================================================== --- python/trunk/Doc/extending/newtypes.rst (original) +++ python/trunk/Doc/extending/newtypes.rst Sun Jul 26 16:37:28 2009 @@ -819,7 +819,7 @@ these :class:`PyTypeObject` structures between extension modules. In this example we will create a :class:`Shoddy` type that inherits from the -builtin :class:`list` type. The new type will be completely compatible with +built-in :class:`list` type. The new type will be completely compatible with regular lists, but will have an additional :meth:`increment` method that increases an internal counter. :: Modified: python/trunk/Doc/glossary.rst ============================================================================== --- python/trunk/Doc/glossary.rst (original) +++ python/trunk/Doc/glossary.rst Sun Jul 26 16:37:28 2009 @@ -28,11 +28,11 @@ abstract base class Abstract Base Classes (abbreviated ABCs) complement :term:`duck-typing` by - providing a way to define interfaces when other techniques like :func:`hasattr` - would be clumsy. Python comes with many builtin ABCs for data structures - (in the :mod:`collections` module), numbers (in the :mod:`numbers` - module), and streams (in the :mod:`io` module). You can create your own - ABC with the :mod:`abc` module. + providing a way to define interfaces when other techniques like + :func:`hasattr` would be clumsy. Python comes with many built-in ABCs for + data structures (in the :mod:`collections` module), numbers (in the + :mod:`numbers` module), and streams (in the :mod:`io` module). You can + create your own ABC with the :mod:`abc` module. argument A value passed to a function or method, assigned to a named local @@ -79,7 +79,7 @@ in ``3+4.5``, each argument is of a different type (one int, one float), and both must be converted to the same type before they can be added or it will raise a ``TypeError``. Coercion between two operands can be - performed with the ``coerce`` builtin function; thus, ``3+4.5`` is + performed with the ``coerce`` built-in function; thus, ``3+4.5`` is equivalent to calling ``operator.add(*coerce(3, 4.5))`` and results in ``operator.add(3.0, 4.5)``. Without coercion, all arguments of even compatible types would have to be normalized to the same value by the @@ -90,7 +90,7 @@ expressed as a sum of a real part and an imaginary part. Imaginary numbers are real multiples of the imaginary unit (the square root of ``-1``), often written ``i`` in mathematics or ``j`` in - engineering. Python has builtin support for complex numbers, which are + engineering. Python has built-in support for complex numbers, which are written with this latter notation; the imaginary part is written with a ``j`` suffix, e.g., ``3+1j``. To get access to complex equivalents of the :mod:`math` module, use :mod:`cmath`. Use of complex numbers is a fairly @@ -322,7 +322,7 @@ define with an :meth:`__iter__` or :meth:`__getitem__` method. Iterables can be used in a :keyword:`for` loop and in many other places where a sequence is needed (:func:`zip`, :func:`map`, ...). When an iterable - object is passed as an argument to the builtin function :func:`iter`, it + object is passed as an argument to the built-in function :func:`iter`, it returns an iterator for the object. This iterator is good for one pass over the set of values. When using iterables, it is usually not necessary to call :func:`iter` or deal with iterator objects yourself. The ``for`` @@ -424,7 +424,7 @@ namespace The place where a variable is stored. Namespaces are implemented as - dictionaries. There are the local, global and builtin namespaces as well + dictionaries. There are the local, global and built-in namespaces as well as nested namespaces in objects (in methods). Namespaces support modularity by preventing naming conflicts. For instance, the functions :func:`__builtin__.open` and :func:`os.open` are distinguished by their Modified: python/trunk/Doc/howto/doanddont.rst ============================================================================== --- python/trunk/Doc/howto/doanddont.rst (original) +++ python/trunk/Doc/howto/doanddont.rst Sun Jul 26 16:37:28 2009 @@ -261,7 +261,7 @@ More useful functions in :mod:`os.path`: :func:`basename`, :func:`dirname` and :func:`splitext`. -There are also many useful builtin functions people seem not to be aware of for +There are also many useful built-in functions people seem not to be aware of for some reason: :func:`min` and :func:`max` can find the minimum/maximum of any sequence with comparable semantics, for example, yet many people write their own :func:`max`/:func:`min`. Another highly useful function is :func:`reduce`. A Modified: python/trunk/Doc/howto/urllib2.rst ============================================================================== --- python/trunk/Doc/howto/urllib2.rst (original) +++ python/trunk/Doc/howto/urllib2.rst Sun Jul 26 16:37:28 2009 @@ -182,10 +182,9 @@ Handling Exceptions =================== -*urlopen* raises :exc:`URLError` when it cannot handle a response (though as usual -with Python APIs, builtin exceptions such as -:exc:`ValueError`, :exc:`TypeError` etc. may also -be raised). +*urlopen* raises :exc:`URLError` when it cannot handle a response (though as +usual with Python APIs, built-in exceptions such as :exc:`ValueError`, +:exc:`TypeError` etc. may also be raised). :exc:`HTTPError` is the subclass of :exc:`URLError` raised in the specific case of HTTP URLs. Modified: python/trunk/Doc/includes/sqlite3/text_factory.py ============================================================================== --- python/trunk/Doc/includes/sqlite3/text_factory.py (original) +++ python/trunk/Doc/includes/sqlite3/text_factory.py Sun Jul 26 16:37:28 2009 @@ -31,7 +31,7 @@ row = cur.fetchone() assert type(row[0]) == unicode -# sqlite3 offers a builtin optimized text_factory that will return bytestring +# sqlite3 offers a built-in optimized text_factory that will return bytestring # objects, if the data is in ASCII only, and otherwise return unicode objects con.text_factory = sqlite3.OptimizedUnicode cur.execute("select ?", (AUSTRIA,)) Modified: python/trunk/Doc/library/2to3.rst ============================================================================== --- python/trunk/Doc/library/2to3.rst (original) +++ python/trunk/Doc/library/2to3.rst Sun Jul 26 16:37:28 2009 @@ -209,7 +209,7 @@ .. 2to3fixer:: itertools Changes usage of :func:`itertools.ifilter`, :func:`itertools.izip`, and - :func:`itertools.imap` to their builtin equivalents. + :func:`itertools.imap` to their built-in equivalents. :func:`itertools.ifilterfalse` is changed to :func:`itertools.filterfalse`. .. 2to3fixer:: long Modified: python/trunk/Doc/library/__future__.rst ============================================================================== --- python/trunk/Doc/library/__future__.rst (original) +++ python/trunk/Doc/library/__future__.rst Sun Jul 26 16:37:28 2009 @@ -52,7 +52,7 @@ :meth:`getOptionalRelease` and :meth:`getMandatoryRelease`. *CompilerFlag* is the (bitfield) flag that should be passed in the fourth -argument to the builtin function :func:`compile` to enable the feature in +argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`compiler_flag` attribute on :class:`_Feature` instances. Modified: python/trunk/Doc/library/_winreg.rst ============================================================================== --- python/trunk/Doc/library/_winreg.rst (original) +++ python/trunk/Doc/library/_winreg.rst Sun Jul 26 16:37:28 2009 @@ -408,7 +408,7 @@ The object also support comparison semantics, so handle objects will compare true if they both reference the same underlying Windows handle value. -Handle objects can be converted to an integer (e.g., using the builtin +Handle objects can be converted to an integer (e.g., using the built-in :func:`int` function), in which case the underlying Windows handle value is returned. You can also use the :meth:`Detach` method to return the integer handle, and also disconnect the Windows handle from the handle object. Modified: python/trunk/Doc/library/ast.rst ============================================================================== --- python/trunk/Doc/library/ast.rst (original) +++ python/trunk/Doc/library/ast.rst Sun Jul 26 16:37:28 2009 @@ -22,7 +22,7 @@ grammar looks like. An abstract syntax tree can be generated by passing :data:`ast.PyCF_ONLY_AST` as -a flag to the :func:`compile` builtin function, or using the :func:`parse` +a flag to the :func:`compile` built-in function, or using the :func:`parse` helper provided in this module. The result will be a tree of objects whose classes all inherit from :class:`ast.AST`. An abstract syntax tree can be compiled into a Python code object using the built-in :func:`compile` function. Modified: python/trunk/Doc/library/collections.rst ============================================================================== --- python/trunk/Doc/library/collections.rst (original) +++ python/trunk/Doc/library/collections.rst Sun Jul 26 16:37:28 2009 @@ -509,7 +509,7 @@ .. class:: defaultdict([default_factory[, ...]]) Returns a new dictionary-like object. :class:`defaultdict` is a subclass of the - builtin :class:`dict` class. It overrides one method and adds one writable + built-in :class:`dict` class. It overrides one method and adds one writable instance variable. The remaining functionality is the same as for the :class:`dict` class and is not documented here. Modified: python/trunk/Doc/library/compiler.rst ============================================================================== --- python/trunk/Doc/library/compiler.rst (original) +++ python/trunk/Doc/library/compiler.rst Sun Jul 26 16:37:28 2009 @@ -21,11 +21,11 @@ generated a concrete syntax tree. This tree is used to generate an abstract syntax tree (AST) and then Python bytecode. -The full functionality of the package duplicates the builtin compiler provided +The full functionality of the package duplicates the built-in compiler provided with the Python interpreter. It is intended to match its behavior almost exactly. Why implement another compiler that does the same thing? The package is useful for a variety of purposes. It can be modified more easily than the -builtin compiler. The AST it generates is useful for analyzing Python source +built-in compiler. The AST it generates is useful for analyzing Python source code. This chapter explains how the various components of the :mod:`compiler` package @@ -118,7 +118,7 @@ introduced by Python's precedence rules. The abstract syntax tree is created by the :mod:`compiler.transformer` module. -The transformer relies on the builtin Python parser to generate a concrete +The transformer relies on the built-in Python parser to generate a concrete syntax tree. It generates an abstract syntax tree from the concrete tree. .. index:: Modified: python/trunk/Doc/library/configparser.rst ============================================================================== --- python/trunk/Doc/library/configparser.rst (original) +++ python/trunk/Doc/library/configparser.rst Sun Jul 26 16:37:28 2009 @@ -56,7 +56,7 @@ constructor as a dictionary. Additional defaults may be passed into the :meth:`get` method which will override all others. -Sections are normally stored in a builtin dictionary. An alternative dictionary +Sections are normally stored in a built-in dictionary. An alternative dictionary type can be passed to the :class:`ConfigParser` constructor. For example, if a dictionary type is passed that sorts its keys, the sections will be sorted on write-back, as will be the keys within each section. Modified: python/trunk/Doc/library/curses.rst ============================================================================== --- python/trunk/Doc/library/curses.rst (original) +++ python/trunk/Doc/library/curses.rst Sun Jul 26 16:37:28 2009 @@ -609,9 +609,9 @@ .. note:: A *character* means a C character (an ASCII code), rather then a Python - character (a string of length 1). (This note is true whenever the documentation - mentions a character.) The builtin :func:`ord` is handy for conveying strings to - codes. + character (a string of length 1). (This note is true whenever the + documentation mentions a character.) The built-in :func:`ord` is handy for + conveying strings to codes. Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any character previously painter at that location. By default, the character Modified: python/trunk/Doc/library/functions.rst ============================================================================== --- python/trunk/Doc/library/functions.rst (original) +++ python/trunk/Doc/library/functions.rst Sun Jul 26 16:37:28 2009 @@ -847,7 +847,7 @@ .. note:: - This function is not normally available as a builtin since the name + This function is not normally available as a built-in since the name ``print`` is recognized as the :keyword:`print` statement. To disable the statement and use the :func:`print` function, use this future statement at the top of your module:: Modified: python/trunk/Doc/library/future_builtins.rst ============================================================================== --- python/trunk/Doc/library/future_builtins.rst (original) +++ python/trunk/Doc/library/future_builtins.rst Sun Jul 26 16:37:28 2009 @@ -1,14 +1,14 @@ -:mod:`future_builtins` --- Python 3 builtins -============================================ +:mod:`future_builtins` --- Python 3 built-ins +============================================= .. module:: future_builtins .. sectionauthor:: Georg Brandl .. versionadded:: 2.6 This module provides functions that exist in 2.x, but have different behavior in -Python 3, so they cannot be put into the 2.x builtin namespace. +Python 3, so they cannot be put into the 2.x builtins namespace. -Instead, if you want to write code compatible with Python 3 builtins, import +Instead, if you want to write code compatible with Python 3 built-ins, import them from this module, like this:: from future_builtins import map, filter @@ -16,17 +16,17 @@ ... code using Python 3-style map and filter ... The :term:`2to3` tool that ports Python 2 code to Python 3 will recognize -this usage and leave the new builtins alone. +this usage and leave the new built-ins alone. .. note:: - The Python 3 :func:`print` function is already in the builtins, but cannot be + The Python 3 :func:`print` function is already in the built-ins, but cannot be accessed from Python 2 code unless you use the appropriate future statement:: from __future__ import print_function -Available builtins are: +Available built-ins are: .. function:: ascii(object) @@ -42,7 +42,7 @@ .. function:: hex(object) - Works like the builtin :func:`hex`, but instead of :meth:`__hex__` it will + Works like the built-in :func:`hex`, but instead of :meth:`__hex__` it will use the :meth:`__index__` method on its argument to get an integer that is then converted to hexadecimal. @@ -52,7 +52,7 @@ .. function:: oct(object) - Works like the builtin :func:`oct`, but instead of :meth:`__oct__` it will + Works like the built-in :func:`oct`, but instead of :meth:`__oct__` it will use the :meth:`__index__` method on its argument to get an integer that is then converted to octal. Modified: python/trunk/Doc/library/gc.rst ============================================================================== --- python/trunk/Doc/library/gc.rst (original) +++ python/trunk/Doc/library/gc.rst Sun Jul 26 16:37:28 2009 @@ -48,7 +48,7 @@ The optional *generation* argument was added. .. versionchanged:: 2.6 - The free lists maintained for a number of builtin types are cleared + The free lists maintained for a number of built-in types are cleared whenever a full collection or collection of the highest generation (2) is run. Not all items in some free lists may be freed due to the particular implementation, in particular :class:`int` and :class:`float`. Modified: python/trunk/Doc/library/gettext.rst ============================================================================== --- python/trunk/Doc/library/gettext.rst (original) +++ python/trunk/Doc/library/gettext.rst Sun Jul 26 16:37:28 2009 @@ -205,7 +205,7 @@ .. function:: install(domain[, localedir[, unicode [, codeset[, names]]]]) - This installs the function :func:`_` in Python's builtin namespace, based on + This installs the function :func:`_` in Python's builtins namespace, based on *domain*, *localedir*, and *codeset* which are passed to the function :func:`translation`. The *unicode* flag is passed to the resulting translation object's :meth:`install` method. @@ -220,7 +220,7 @@ print _('This string will be translated.') For convenience, you want the :func:`_` function to be installed in Python's - builtin namespace, so it is easily accessible in all modules of your + builtins namespace, so it is easily accessible in all modules of your application. .. versionchanged:: 2.4 @@ -347,7 +347,7 @@ it binds :meth:`self.ugettext` instead. By default, *unicode* is false. If the *names* parameter is given, it must be a sequence containing the - names of functions you want to install in the builtin namespace in + names of functions you want to install in the builtins namespace in addition to :func:`_`. Supported names are ``'gettext'`` (bound to :meth:`self.gettext` or :meth:`self.ugettext` according to the *unicode* flag), ``'ngettext'`` (bound to :meth:`self.ngettext` or Modified: python/trunk/Doc/library/heapq.rst ============================================================================== --- python/trunk/Doc/library/heapq.rst (original) +++ python/trunk/Doc/library/heapq.rst Sun Jul 26 16:37:28 2009 @@ -147,7 +147,7 @@ The latter two functions perform best for smaller values of *n*. For larger values, it is more efficient to use the :func:`sorted` function. Also, when -``n==1``, it is more efficient to use the builtin :func:`min` and :func:`max` +``n==1``, it is more efficient to use the built-in :func:`min` and :func:`max` functions. Modified: python/trunk/Doc/library/imputil.rst ============================================================================== --- python/trunk/Doc/library/imputil.rst (original) +++ python/trunk/Doc/library/imputil.rst Sun Jul 26 16:37:28 2009 @@ -79,7 +79,7 @@ .. class:: BuiltinImporter() - Emulate the import mechanism for builtin and frozen modules. This is a + Emulate the import mechanism for built-in and frozen modules. This is a sub-class of the :class:`Importer` class. .. method:: BuiltinImporter.get_code(parent, modname, fqname) Modified: python/trunk/Doc/library/io.rst ============================================================================== --- python/trunk/Doc/library/io.rst (original) +++ python/trunk/Doc/library/io.rst Sun Jul 26 16:37:28 2009 @@ -10,7 +10,7 @@ .. versionadded:: 2.6 The :mod:`io` module provides the Python interfaces to stream handling. The -builtin :func:`open` function is defined in this module. +built-in :func:`open` function is defined in this module. At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. It defines the basic interface to a stream. Note, however, that there is no Modified: python/trunk/Doc/library/multiprocessing.rst ============================================================================== --- python/trunk/Doc/library/multiprocessing.rst (original) +++ python/trunk/Doc/library/multiprocessing.rst Sun Jul 26 16:37:28 2009 @@ -1555,8 +1555,8 @@ .. method:: apply(func[, args[, kwds]]) - Equivalent of the :func:`apply` builtin function. It blocks till the - result is ready. Given this blocks - :meth:`apply_async` is better suited + Equivalent of the :func:`apply` built-in function. It blocks till the + result is ready. Given this blocks, :meth:`apply_async` is better suited for performing work in parallel. Additionally, the passed in function is only executed in one of the workers of the pool. @@ -1571,7 +1571,7 @@ .. method:: map(func, iterable[, chunksize]) - A parallel equivalent of the :func:`map` builtin function (it supports only + A parallel equivalent of the :func:`map` built-in function (it supports only one *iterable* argument though). It blocks till the result is ready. This method chops the iterable into a number of chunks which it submits to Modified: python/trunk/Doc/library/numbers.rst ============================================================================== --- python/trunk/Doc/library/numbers.rst (original) +++ python/trunk/Doc/library/numbers.rst Sun Jul 26 16:37:28 2009 @@ -24,7 +24,7 @@ .. class:: Complex Subclasses of this type describe complex numbers and include the operations - that work on the builtin :class:`complex` type. These are: conversions to + that work on the built-in :class:`complex` type. These are: conversions to :class:`complex` and :class:`bool`, :attr:`.real`, :attr:`.imag`, ``+``, ``-``, ``*``, ``/``, :func:`abs`, :meth:`conjugate`, ``==``, and ``!=``. All except ``-`` and ``!=`` are abstract. Modified: python/trunk/Doc/library/pprint.rst ============================================================================== --- python/trunk/Doc/library/pprint.rst (original) +++ python/trunk/Doc/library/pprint.rst Sun Jul 26 16:37:28 2009 @@ -13,7 +13,7 @@ If the formatted structures include objects which are not fundamental Python types, the representation may not be loadable. This may be the case if objects such as files, sockets, classes, or instances are included, as well as many -other builtin objects which are not representable as Python constants. +other built-in objects which are not representable as Python constants. The formatted representation keeps objects on a single line if it can, and breaks them onto multiple lines if they don't fit within the allowed width. Modified: python/trunk/Doc/library/sets.rst ============================================================================== --- python/trunk/Doc/library/sets.rst (original) +++ python/trunk/Doc/library/sets.rst Sun Jul 26 16:37:28 2009 @@ -184,7 +184,7 @@ Also note, the module also includes a :meth:`union_update` method which is an alias for :meth:`update`. The method is included for backwards compatibility. Programmers should prefer the :meth:`update` method because it is supported by -the builtin :class:`set()` and :class:`frozenset()` types. +the built-in :class:`set()` and :class:`frozenset()` types. .. _set-example: Modified: python/trunk/Doc/library/sqlite3.rst ============================================================================== --- python/trunk/Doc/library/sqlite3.rst (original) +++ python/trunk/Doc/library/sqlite3.rst Sun Jul 26 16:37:28 2009 @@ -840,7 +840,7 @@ Accessing columns by name instead of by index ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -One useful feature of the :mod:`sqlite3` module is the builtin +One useful feature of the :mod:`sqlite3` module is the built-in :class:`sqlite3.Row` class designed to be used as a row factory. Rows wrapped with this class can be accessed both by index (like tuples) and Modified: python/trunk/Doc/library/stdtypes.rst ============================================================================== --- python/trunk/Doc/library/stdtypes.rst (original) +++ python/trunk/Doc/library/stdtypes.rst Sun Jul 26 16:37:28 2009 @@ -277,7 +277,7 @@ :func:`long`, :func:`float`, and :func:`complex` can be used to produce numbers of a specific type. -All builtin numeric types support the following operations. See +All built-in numeric types support the following operations. See :ref:`power` and later sections for the operators' priorities. +--------------------+---------------------------------+--------+ @@ -675,7 +675,7 @@ single item tuple must have a trailing comma, such as ``(d,)``. Buffer objects are not directly supported by Python syntax, but can be created -by calling the builtin function :func:`buffer`. They don't support +by calling the built-in function :func:`buffer`. They don't support concatenation or repetition. Objects of type xrange are similar to buffers in that there is no specific syntax to @@ -1632,7 +1632,7 @@ order of insertion. Accordingly, sets do not support indexing, slicing, or other sequence-like behavior. -There are currently two builtin set types, :class:`set` and :class:`frozenset`. +There are currently two built-in set types, :class:`set` and :class:`frozenset`. The :class:`set` type is mutable --- the contents can be changed using methods like :meth:`add` and :meth:`remove`. Since it is mutable, it has no hash value and cannot be used as either a dictionary key or as an element of another set. Modified: python/trunk/Doc/library/string.rst ============================================================================== --- python/trunk/Doc/library/string.rst (original) +++ python/trunk/Doc/library/string.rst Sun Jul 26 16:37:28 2009 @@ -312,7 +312,7 @@ "Format specifications" are used within replacement fields contained within a format string to define how individual values are presented (see -:ref:`formatstrings`.) They can also be passed directly to the builtin +:ref:`formatstrings`.) They can also be passed directly to the built-in :func:`format` function. Each formattable type may define how the format specification is to be interpreted. Modified: python/trunk/Doc/library/sys.rst ============================================================================== --- python/trunk/Doc/library/sys.rst (original) +++ python/trunk/Doc/library/sys.rst Sun Jul 26 16:37:28 2009 @@ -816,7 +816,7 @@ ``'c_call'`` A C function is about to be called. This may be an extension function or - a builtin. *arg* is the C function object. + a built-in. *arg* is the C function object. ``'c_return'`` A C function has returned. *arg* is ``None``. Modified: python/trunk/Doc/library/undoc.rst ============================================================================== --- python/trunk/Doc/library/undoc.rst (original) +++ python/trunk/Doc/library/undoc.rst Sun Jul 26 16:37:28 2009 @@ -113,7 +113,7 @@ :deprecated: -Importing :mod:`icopen` will replace the builtin :meth:`open` with a version +Importing :mod:`icopen` will replace the built-in :meth:`open` with a version that uses Internet Config to set file type and creator for new files. .. deprecated:: 2.6 Modified: python/trunk/Doc/library/weakref.rst ============================================================================== --- python/trunk/Doc/library/weakref.rst (original) +++ python/trunk/Doc/library/weakref.rst Sun Jul 26 16:37:28 2009 @@ -65,7 +65,7 @@ .. versionchanged:: 2.4 Added support for files, sockets, arrays, and patterns. -Several builtin types such as :class:`list` and :class:`dict` do not directly +Several built-in types such as :class:`list` and :class:`dict` do not directly support weak references but can add support through subclassing:: class Dict(dict): Modified: python/trunk/Doc/library/xmlrpclib.rst ============================================================================== --- python/trunk/Doc/library/xmlrpclib.rst (original) +++ python/trunk/Doc/library/xmlrpclib.rst Sun Jul 26 16:37:28 2009 @@ -94,7 +94,7 @@ :exc:`ProtocolError` used to signal an error in the HTTP/HTTPS transport layer. Both :exc:`Fault` and :exc:`ProtocolError` derive from a base class called :exc:`Error`. Note that even though starting with Python 2.2 you can subclass - builtin types, the xmlrpclib module currently does not marshal instances of such + built-in types, the xmlrpclib module currently does not marshal instances of such subclasses. When passing strings, characters special to XML such as ``<``, ``>``, and ``&`` Modified: python/trunk/Doc/library/zipimport.rst ============================================================================== --- python/trunk/Doc/library/zipimport.rst (original) +++ python/trunk/Doc/library/zipimport.rst Sun Jul 26 16:37:28 2009 @@ -12,7 +12,7 @@ This module adds the ability to import Python modules (:file:`\*.py`, :file:`\*.py[co]`) and packages from ZIP-format archives. It is usually not needed to use the :mod:`zipimport` module explicitly; it is automatically used -by the builtin :keyword:`import` mechanism for ``sys.path`` items that are paths +by the built-in :keyword:`import` mechanism for ``sys.path`` items that are paths to ZIP archives. Typically, ``sys.path`` is a list of directory names as strings. This module Modified: python/trunk/Doc/reference/datamodel.rst ============================================================================== --- python/trunk/Doc/reference/datamodel.rst (original) +++ python/trunk/Doc/reference/datamodel.rst Sun Jul 26 16:37:28 2009 @@ -1437,7 +1437,7 @@ .. index:: builtin: unicode - Called to implement :func:`unicode` builtin; should return a Unicode object. + Called to implement :func:`unicode` built-in; should return a Unicode object. When this method is not defined, string conversion is attempted, and the result of string conversion is converted to Unicode using the system default encoding. @@ -1516,7 +1516,7 @@ .. note:: This method may still be bypassed when looking up special methods as the - result of implicit invocation via language syntax or builtin functions. + result of implicit invocation via language syntax or built-in functions. See :ref:`new-style-special-lookup`. @@ -1865,12 +1865,12 @@ .. method:: object.__reversed__(self) - Called (if present) by the :func:`reversed` builtin to implement + Called (if present) by the :func:`reversed` built-in to implement reverse iteration. It should return a new iterator object that iterates over all the objects in the container in reverse order. If the :meth:`__reversed__` method is not provided, the :func:`reversed` - builtin will fall back to using the sequence protocol (:meth:`__len__` and + built-in will fall back to using the sequence protocol (:meth:`__len__` and :meth:`__getitem__`). Objects that support the sequence protocol should only provide :meth:`__reversed__` if they can provide an implementation that is more efficient than the one provided by :func:`reversed`. Modified: python/trunk/Doc/reference/executionmodel.rst ============================================================================== --- python/trunk/Doc/reference/executionmodel.rst (original) +++ python/trunk/Doc/reference/executionmodel.rst Sun Jul 26 16:37:28 2009 @@ -112,9 +112,9 @@ If the global statement occurs within a block, all uses of the name specified in the statement refer to the binding of that name in the top-level namespace. Names are resolved in the top-level namespace by searching the global namespace, -i.e. the namespace of the module containing the code block, and the builtin +i.e. the namespace of the module containing the code block, and the builtins namespace, the namespace of the module :mod:`__builtin__`. The global namespace -is searched first. If the name is not found there, the builtin namespace is +is searched first. If the name is not found there, the builtins namespace is searched. The global statement must precede all uses of the name. .. index:: pair: restricted; execution Modified: python/trunk/Doc/reference/expressions.rst ============================================================================== --- python/trunk/Doc/reference/expressions.rst (original) +++ python/trunk/Doc/reference/expressions.rst Sun Jul 26 16:37:28 2009 @@ -665,7 +665,7 @@ .. note:: - An implementation may provide builtin functions whose positional parameters do + An implementation may provide built-in functions whose positional parameters do not have names, even if they are 'named' for the purpose of documentation, and which therefore cannot be supplied by keyword. In CPython, this is the case for functions implemented in C that use :cfunc:`PyArg_ParseTuple` to parse their @@ -1032,7 +1032,7 @@ values of two objects. The objects need not have the same type. If both are numbers, they are converted to a common type. Otherwise, objects of different types *always* compare unequal, and are ordered consistently but arbitrarily. -You can control comparison behavior of objects of non-builtin types by defining +You can control comparison behavior of objects of non-built-in types by defining a ``__cmp__`` method or rich comparison methods like ``__gt__``, described in section :ref:`specialnames`. @@ -1063,7 +1063,7 @@ lists compare equal. [#]_ Outcomes other than equality are resolved consistently, but are not otherwise defined. [#]_ -* Most other objects of builtin types compare unequal unless they are the same +* Most other objects of built-in types compare unequal unless they are the same object; the choice whether one object is considered smaller or larger than another one is made arbitrarily but consistently within one execution of a program. Modified: python/trunk/Doc/reference/simple_stmts.rst ============================================================================== --- python/trunk/Doc/reference/simple_stmts.rst (original) +++ python/trunk/Doc/reference/simple_stmts.rst Sun Jul 26 16:37:28 2009 @@ -891,7 +891,7 @@ That is not a future statement; it's an ordinary import statement with no special semantics or syntax restrictions. -Code compiled by an :keyword:`exec` statement or calls to the builtin functions +Code compiled by an :keyword:`exec` statement or calls to the built-in functions :func:`compile` and :func:`execfile` that occur in a module :mod:`M` containing a future statement will, by default, use the new syntax or semantics associated with the future statement. This can, starting with Python 2.2 be controlled by Modified: python/trunk/Doc/using/cmdline.rst ============================================================================== --- python/trunk/Doc/using/cmdline.rst (original) +++ python/trunk/Doc/using/cmdline.rst Sun Jul 26 16:37:28 2009 @@ -86,7 +86,7 @@ .. note:: - This option cannot be used with builtin modules and extension modules + This option cannot be used with built-in modules and extension modules written in C, since they do not have Python module files. However, it can still be used for precompiled modules, even if the original source file is not available. Modified: python/trunk/Doc/whatsnew/2.2.rst ============================================================================== --- python/trunk/Doc/whatsnew/2.2.rst (original) +++ python/trunk/Doc/whatsnew/2.2.rst Sun Jul 26 16:37:28 2009 @@ -1173,7 +1173,7 @@ can uncomment them. Gestalt and Internet Config modules are enabled by default. -* Keyword arguments passed to builtin functions that don't take them now cause a +* Keyword arguments passed to built-in functions that don't take them now cause a :exc:`TypeError` exception to be raised, with the message "*function* takes no keyword arguments". Modified: python/trunk/Doc/whatsnew/2.6.rst ============================================================================== --- python/trunk/Doc/whatsnew/2.6.rst (original) +++ python/trunk/Doc/whatsnew/2.6.rst Sun Jul 26 16:37:28 2009 @@ -2819,7 +2819,7 @@ often used in web applications. For more information about JSON, see http://www.json.org. -:mod:`json` comes with support for decoding and encoding most builtin Python +:mod:`json` comes with support for decoding and encoding most built-in Python types. The following example encodes and decodes a dictionary:: >>> import json From python-checkins at python.org Sun Jul 26 16:44:23 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 14:44:23 -0000 Subject: [Python-checkins] r74210 - python/trunk/Doc/library/threading.rst Message-ID: Author: georg.brandl Date: Sun Jul 26 16:44:23 2009 New Revision: 74210 Log: Move member descriptions inside the classes. Modified: python/trunk/Doc/library/threading.rst Modified: python/trunk/Doc/library/threading.rst ============================================================================== --- python/trunk/Doc/library/threading.rst (original) +++ python/trunk/Doc/library/threading.rst Sun Jul 26 16:44:23 2009 @@ -231,7 +231,8 @@ .. class:: Thread(group=None, target=None, name=None, args=(), kwargs={}) - This constructor should always be called with keyword arguments. Arguments are: + This constructor should always be called with keyword arguments. Arguments + are: *group* should be ``None``; reserved for future extension when a :class:`ThreadGroup` class is implemented. @@ -239,112 +240,104 @@ *target* is the callable object to be invoked by the :meth:`run` method. Defaults to ``None``, meaning nothing is called. - *name* is the thread name. By default, a unique name is constructed of the form - "Thread-*N*" where *N* is a small decimal number. + *name* is the thread name. By default, a unique name is constructed of the + form "Thread-*N*" where *N* is a small decimal number. *args* is the argument tuple for the target invocation. Defaults to ``()``. *kwargs* is a dictionary of keyword arguments for the target invocation. Defaults to ``{}``. - If the subclass overrides the constructor, it must make sure to invoke the base - class constructor (``Thread.__init__()``) before doing anything else to the - thread. + If the subclass overrides the constructor, it must make sure to invoke the + base class constructor (``Thread.__init__()``) before doing anything else to + the thread. + .. method:: start() -.. method:: Thread.start() + Start the thread's activity. - Start the thread's activity. + It must be called at most once per thread object. It arranges for the + object's :meth:`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 - :meth:`run` method to be invoked in a separate thread of control. + This method will raise a :exc:`RuntimeException` if called more than once + on the same thread object. - This method will raise a :exc:`RuntimeException` if called more than once on the - same thread object. + .. method:: run() + Method representing the thread's activity. -.. method:: Thread.run() + You may override this method in a subclass. The standard :meth:`run` + method invokes the callable object passed to the object's constructor as + the *target* argument, if any, with sequential and keyword arguments taken + from the *args* and *kwargs* arguments, respectively. - Method representing the thread's activity. + .. method:: join([timeout]) - You may override this method in a subclass. The standard :meth:`run` method - invokes the callable object passed to the object's constructor as the *target* - argument, if any, with sequential and keyword arguments taken from the *args* - and *kwargs* arguments, respectively. + Wait until the thread terminates. This blocks the calling thread until the + thread whose :meth:`join` method is called terminates -- either normally + or through an unhandled exception -- or until the optional timeout occurs. + When the *timeout* argument is present and not ``None``, it should be a + floating point number specifying a timeout for the operation in seconds + (or fractions thereof). As :meth:`join` always returns ``None``, you must + call :meth:`isAlive` after :meth:`join` to decide whether a timeout + happened -- if the thread is still alive, the :meth:`join` call timed out. -.. method:: Thread.join([timeout]) + When the *timeout* argument is not present or ``None``, the operation will + block until the thread terminates. - Wait until the thread terminates. This blocks the calling thread until the - thread whose :meth:`join` method is called terminates -- either normally or - through an unhandled exception -- or until the optional timeout occurs. + A thread can be :meth:`join`\ ed many times. - When the *timeout* argument is present and not ``None``, it should be a floating - point number specifying a timeout for the operation in seconds (or fractions - thereof). As :meth:`join` always returns ``None``, you must call :meth:`isAlive` - after :meth:`join` to decide whether a timeout happened -- if the thread is - still alive, the :meth:`join` call timed out. + :meth:`join` raises a :exc:`RuntimeError` if an attempt is made to join + the current thread as that would cause a deadlock. It is also an error to + :meth:`join` a thread before it has been started and attempts to do so + raises the same exception. - When the *timeout* argument is not present or ``None``, the operation will block - until the thread terminates. + .. method:: getName() + setName() - A thread can be :meth:`join`\ ed many times. + Old API for :attr:`~Thread.name`. - :meth:`join` raises a :exc:`RuntimeError` if an attempt is made to join - the current thread as that would cause a deadlock. It is also an error to - :meth:`join` a thread before it has been started and attempts to do so - raises the same exception. + .. attribute:: name + A string used for identification purposes only. It has no semantics. + Multiple threads may be given the same name. The initial name is set by + the constructor. -.. method:: Thread.getName() - Thread.setName() + .. attribute:: ident - Old API for :attr:`~Thread.name`. + The 'thread identifier' of this thread or ``None`` if the thread has not + been started. This is a nonzero integer. See the + :func:`thread.get_ident()` function. Thread identifiers may be recycled + when a thread exits and another thread is created. The identifier is + available even after the thread has exited. + .. versionadded:: 2.6 -.. attribute:: Thread.name + .. method:: is_alive() + isAlive() - A string used for identification purposes only. It has no semantics. - Multiple threads may be given the same name. The initial name is set by the - constructor. + Return whether the thread is alive. + Roughly, a thread is alive from the moment the :meth:`start` method + returns until its :meth:`run` method terminates. The module function + :func:`enumerate` returns a list of all alive threads. -.. attribute:: Thread.ident + .. method:: isDaemon() + setDaemon() - The 'thread identifier' of this thread or ``None`` if the thread has not been - started. This is a nonzero integer. See the :func:`thread.get_ident()` - function. Thread identifiers may be recycled when a thread exits and another - thread is created. The identifier is available even after the thread has - exited. + Old API for :attr:`~Thread.daemon`. - .. versionadded:: 2.6 + .. attribute:: daemon + A boolean value indicating whether this thread is a daemon thread (True) + or not (False). This must be set before :meth:`start` is called, + otherwise :exc:`RuntimeError` is raised. Its initial value is inherited + from the creating thread; the main thread is not a daemon thread and + therefore all threads created in the main thread default to :attr:`daemon` + = ``False``. -.. method:: Thread.is_alive() - Thread.isAlive() - - Return whether the thread is alive. - - Roughly, a thread is alive from the moment the :meth:`start` method returns - until its :meth:`run` method terminates. The module function :func:`enumerate` - returns a list of all alive threads. - - -.. method:: Thread.isDaemon() - Thread.setDaemon() - - Old API for :attr:`~Thread.daemon`. - - -.. attribute:: Thread.daemon - - A boolean value indicating whether this thread is a daemon thread (True) or - not (False). This must be set before :meth:`start` is called, otherwise - :exc:`RuntimeError` is raised. Its initial value is inherited from the - creating thread; the main thread is not a daemon thread and therefore all - threads created in the main thread default to :attr:`daemon` = ``False``. - - The entire Python program exits when no alive non-daemon threads are left. + The entire Python program exits when no alive non-daemon threads are left. .. _lock-objects: @@ -515,70 +508,66 @@ .. class:: Condition([lock]) - If the *lock* argument is given and not ``None``, it must be a :class:`Lock` or - :class:`RLock` object, and it is used as the underlying lock. Otherwise, a new - :class:`RLock` object is created and used as the underlying lock. - - -.. method:: Condition.acquire(*args) - - Acquire the underlying lock. This method calls the corresponding method on the - underlying lock; the return value is whatever that method returns. - + If the *lock* argument is given and not ``None``, it must be a :class:`Lock` + or :class:`RLock` object, and it is used as the underlying lock. Otherwise, + a new :class:`RLock` object is created and used as the underlying lock. -.. method:: Condition.release() + .. method:: acquire(*args) - Release the underlying lock. This method calls the corresponding method on the - underlying lock; there is no return value. + Acquire the underlying lock. This method calls the corresponding method on + the underlying lock; the return value is whatever that method returns. + .. method:: release() -.. method:: Condition.wait([timeout]) + Release the underlying lock. This method calls the corresponding method on + the underlying lock; there is no return value. - Wait until notified or until a timeout occurs. If the calling thread has not - acquired the lock when this method is called, a :exc:`RuntimeError` is raised. + .. method:: wait([timeout]) - This method releases the underlying lock, and then blocks until it is awakened - by a :meth:`notify` or :meth:`notifyAll` call for the same condition variable in - another thread, or until the optional timeout occurs. Once awakened or timed - out, it re-acquires the lock and returns. + Wait until notified or until a timeout occurs. If the calling thread has not + acquired the lock when this method is called, a :exc:`RuntimeError` is raised. - When the *timeout* argument is present and not ``None``, it should be a floating - point number specifying a timeout for the operation in seconds (or fractions - thereof). + This method releases the underlying lock, and then blocks until it is + awakened by a :meth:`notify` or :meth:`notifyAll` call for the same + condition variable in another thread, or until the optional timeout + occurs. Once awakened or timed out, it re-acquires the lock and returns. - When the underlying lock is an :class:`RLock`, it is not released using its - :meth:`release` method, since this may not actually unlock the lock when it was - acquired multiple times recursively. Instead, an internal interface of the - :class:`RLock` class is used, which really unlocks it even when it has been - recursively acquired several times. Another internal interface is then used to - restore the recursion level when the lock is reacquired. + When the *timeout* argument is present and not ``None``, it should be a + floating point number specifying a timeout for the operation in seconds + (or fractions thereof). + When the underlying lock is an :class:`RLock`, it is not released using + its :meth:`release` method, since this may not actually unlock the lock + when it was acquired multiple times recursively. Instead, an internal + interface of the :class:`RLock` class is used, which really unlocks it + even when it has been recursively acquired several times. Another internal + interface is then used to restore the recursion level when the lock is + reacquired. -.. method:: Condition.notify() + .. method:: notify() - Wake up a thread waiting on this condition, if any. If the calling thread - has not acquired the lock when this method is called, a :exc:`RuntimeError` - is raised. + Wake up a thread waiting on this condition, if any. If the calling thread + has not acquired the lock when this method is called, a + :exc:`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. + 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. - The current implementation wakes up exactly one thread, if any are waiting. - However, it's not safe to rely on this behavior. A future, optimized - implementation may occasionally wake up more than one thread. + The current implementation wakes up exactly one thread, if any are + waiting. However, it's not safe to rely on this behavior. A future, + optimized implementation may occasionally wake up more than one thread. - Note: the awakened thread does not actually return from its :meth:`wait` call - until it can reacquire the lock. Since :meth:`notify` does not release the - lock, its caller should. + Note: the awakened thread does not actually return from its :meth:`wait` + call until it can reacquire the lock. Since :meth:`notify` does not + release the lock, its caller should. + .. method:: notify_all() + notifyAll() -.. method:: Condition.notify_all() - Condition.notifyAll() - - Wake up all threads waiting on this condition. This method acts like - :meth:`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 - :exc:`RuntimeError` is raised. + Wake up all threads waiting on this condition. This method acts like + :meth:`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 + :exc:`RuntimeError` is raised. .. _semaphore-objects: @@ -602,33 +591,31 @@ defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raised. + .. method:: acquire([blocking]) -.. method:: Semaphore.acquire([blocking]) - - Acquire a semaphore. - - When invoked without arguments: if the internal counter is larger than zero on - entry, decrement it by one and return immediately. If it is zero on entry, - block, waiting until some other thread has called :meth:`release` to make it - larger than zero. This is done with proper interlocking so that if multiple - :meth:`acquire` calls are blocked, :meth:`release` will wake exactly one of them - up. The implementation may pick one at random, so the order in which blocked - threads are awakened should not be relied on. There is no return value in this - case. - - When invoked with *blocking* set to true, do the same thing as when called - without arguments, and return true. - - When invoked with *blocking* set to false, do not block. If a call without an - argument would block, return false immediately; otherwise, do the same thing as - when called without arguments, and return true. - + Acquire a semaphore. -.. method:: Semaphore.release() - - Release a semaphore, incrementing the internal counter by one. When it was zero - on entry and another thread is waiting for it to become larger than zero again, - wake up that thread. + When invoked without arguments: if the internal counter is larger than + zero on entry, decrement it by one and return immediately. If it is zero + on entry, block, waiting until some other thread has called + :meth:`release` to make it larger than zero. This is done with proper + interlocking so that if multiple :meth:`acquire` calls are blocked, + :meth:`release` will wake exactly one of them up. The implementation may + pick one at random, so the order in which blocked threads are awakened + should not be relied on. There is no return value in this case. + + When invoked with *blocking* set to true, do the same thing as when called + without arguments, and return true. + + When invoked with *blocking* set to false, do not block. If a call + without an argument would block, return false immediately; otherwise, do + the same thing as when called without arguments, and return true. + + .. method:: release() + + Release a semaphore, incrementing the internal counter by one. When it + was zero on entry and another thread is waiting for it to become larger + than zero again, wake up that thread. .. _semaphore-examples: @@ -675,42 +662,39 @@ The internal flag is initially false. + .. method:: is_set() + isSet() -.. method:: Event.is_set() - Event.isSet() - - Return true if and only if the internal flag is true. - + Return true if and only if the internal flag is true. -.. method:: Event.set() + .. method:: set() - Set the internal flag to true. All threads waiting for it to become true are - awakened. Threads that call :meth:`wait` once the flag is true will not block at - all. + Set the internal flag to true. All threads waiting for it to become true + are awakened. Threads that call :meth:`wait` once the flag is true will + not block at all. + .. method:: clear() -.. method:: Event.clear() + Reset the internal flag to false. Subsequently, threads calling + :meth:`wait` will block until :meth:`.set` is called to set the internal + flag to true again. - Reset the internal flag to false. Subsequently, threads calling :meth:`wait` - will block until :meth:`.set` is called to set the internal flag to true - again. + .. method:: wait([timeout]) + Block until the internal flag is true. If the internal flag is true on + entry, return immediately. Otherwise, block until another thread calls + :meth:`.set` to set the flag to true, or until the optional timeout + occurs. -.. method:: Event.wait([timeout]) + When the timeout argument is present and not ``None``, it should be a + floating point number specifying a timeout for the operation in seconds + (or fractions thereof). - Block until the internal flag is true. If the internal flag is true on entry, - return immediately. Otherwise, block until another thread calls :meth:`.set` - to set the flag to true, or until the optional timeout occurs. + This method returns the internal flag on exit, so it will always return + ``True`` except if a timeout is given and the operation times out. - When the timeout argument is present and not ``None``, it should be a floating - point number specifying a timeout for the operation in seconds (or fractions - thereof). - - This method returns the internal flag on exit, so it will always return - ``True`` except if a timeout is given and the operation times out. - - .. versionchanged:: 2.7 - Previously, the method always returned ``None``. + .. versionchanged:: 2.7 + Previously, the method always returned ``None``. .. _timer-objects: @@ -741,11 +725,10 @@ Create a timer that will run *function* with arguments *args* and keyword arguments *kwargs*, after *interval* seconds have passed. + .. method:: cancel() -.. method:: Timer.cancel() - - Stop the timer, and cancel the execution of the timer's action. This will only - work if the timer is still in its waiting stage. + Stop the timer, and cancel the execution of the timer's action. This will + only work if the timer is still in its waiting stage. .. _with-locks: From python-checkins at python.org Sun Jul 26 16:48:09 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 14:48:09 -0000 Subject: [Python-checkins] r74211 - in python/branches/py3k: Doc/library/threading.rst Message-ID: Author: georg.brandl Date: Sun Jul 26 16:48:09 2009 New Revision: 74211 Log: Recorded merge of revisions 74210 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74210 | georg.brandl | 2009-07-26 16:44:23 +0200 (So, 26 Jul 2009) | 1 line Move member descriptions inside the classes. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/threading.rst Modified: python/branches/py3k/Doc/library/threading.rst ============================================================================== --- python/branches/py3k/Doc/library/threading.rst (original) +++ python/branches/py3k/Doc/library/threading.rst Sun Jul 26 16:48:09 2009 @@ -1,4 +1,3 @@ - :mod:`threading` --- Higher-level threading interface ===================================================== @@ -213,7 +212,8 @@ .. class:: Thread(group=None, target=None, name=None, args=(), kwargs={}) - This constructor should always be called with keyword arguments. Arguments are: + This constructor should always be called with keyword arguments. Arguments + are: *group* should be ``None``; reserved for future extension when a :class:`ThreadGroup` class is implemented. @@ -221,111 +221,103 @@ *target* is the callable object to be invoked by the :meth:`run` method. Defaults to ``None``, meaning nothing is called. - *name* is the thread name. By default, a unique name is constructed of the form - "Thread-*N*" where *N* is a small decimal number. + *name* is the thread name. By default, a unique name is constructed of the + form "Thread-*N*" where *N* is a small decimal number. *args* is the argument tuple for the target invocation. Defaults to ``()``. *kwargs* is a dictionary of keyword arguments for the target invocation. Defaults to ``{}``. - If the subclass overrides the constructor, it must make sure to invoke the base - class constructor (``Thread.__init__()``) before doing anything else to the - thread. - - -.. method:: Thread.start() - - Start the thread's activity. - - It must be called at most once per thread object. It arranges for the object's - :meth:`run` method to be invoked in a separate thread of control. - - This method will raise a :exc:`RuntimeException` if called more than once on the - same thread object. + If the subclass overrides the constructor, it must make sure to invoke the + base class constructor (``Thread.__init__()``) before doing anything else to + the thread. + .. method:: start() -.. method:: Thread.run() + Start the thread's activity. - Method representing the thread's activity. + It must be called at most once per thread object. It arranges for the + object's :meth:`run` method to be invoked in a separate thread of control. - You may override this method in a subclass. The standard :meth:`run` method - invokes the callable object passed to the object's constructor as the *target* - argument, if any, with sequential and keyword arguments taken from the *args* - and *kwargs* arguments, respectively. + This method will raise a :exc:`RuntimeException` if called more than once + on the same thread object. + .. method:: run() -.. method:: Thread.join([timeout]) + Method representing the thread's activity. - Wait until the thread terminates. This blocks the calling thread until the - thread whose :meth:`join` method is called terminates -- either normally or - through an unhandled exception -- or until the optional timeout occurs. + You may override this method in a subclass. The standard :meth:`run` + method invokes the callable object passed to the object's constructor as + the *target* argument, if any, with sequential and keyword arguments taken + from the *args* and *kwargs* arguments, respectively. - When the *timeout* argument is present and not ``None``, it should be a floating - point number specifying a timeout for the operation in seconds (or fractions - thereof). As :meth:`join` always returns ``None``, you must call :meth:`is_alive` - after :meth:`join` to decide whether a timeout happened -- if the thread is - still alive, the :meth:`join` call timed out. + .. method:: join([timeout]) - When the *timeout* argument is not present or ``None``, the operation will block - until the thread terminates. + Wait until the thread terminates. This blocks the calling thread until the + thread whose :meth:`join` method is called terminates -- either normally + or through an unhandled exception -- or until the optional timeout occurs. - A thread can be :meth:`join`\ ed many times. + When the *timeout* argument is present and not ``None``, it should be a + floating point number specifying a timeout for the operation in seconds + (or fractions thereof). As :meth:`join` always returns ``None``, you must + call :meth:`is_alive` after :meth:`join` to decide whether a timeout + happened -- if the thread is still alive, the :meth:`join` call timed out. - :meth:`join` raises a :exc:`RuntimeError` if an attempt is made to join - the current thread as that would cause a deadlock. It is also an error to - :meth:`join` a thread before it has been started and attempts to do so - raises the same exception. + When the *timeout* argument is not present or ``None``, the operation will + block until the thread terminates. + A thread can be :meth:`join`\ ed many times. -.. attribute:: Thread.name + :meth:`join` raises a :exc:`RuntimeError` if an attempt is made to join + the current thread as that would cause a deadlock. It is also an error to + :meth:`join` a thread before it has been started and attempts to do so + raises the same exception. - A string used for identification purposes only. It has no semantics. - Multiple threads may be given the same name. The initial name is set by the - constructor. + .. attribute:: name + A string used for identification purposes only. It has no semantics. + Multiple threads may be given the same name. The initial name is set by + the constructor. -.. method:: Thread.getName() - Thread.setName() + .. method:: getName() + setName() - Old getter/setter API for :attr:`~Thread.name`; use it directly as a property - instead. + Old getter/setter API for :attr:`~Thread.name`; use it directly as a + property instead. + .. attribute:: ident -.. attribute:: Thread.ident + The 'thread identifier' of this thread or ``None`` if the thread has not + been started. This is a nonzero integer. See the + :func:`thread.get_ident()` function. Thread identifiers may be recycled + when a thread exits and another thread is created. The identifier is + available even after the thread has exited. - The 'thread identifier' of this thread or ``None`` if the thread has not been - started. This is a nonzero integer. See the :func:`thread.get_ident()` - function. Thread identifiers may be recycled when a thread exits and another - thread is created. The identifier is available even after the thread has - exited. + .. method:: is_alive() + Return whether the thread is alive. -.. method:: Thread.is_alive() + Roughly, a thread is alive from the moment the :meth:`start` method + returns until its :meth:`run` method terminates. The module function + :func:`enumerate` returns a list of all alive threads. - Return whether the thread is alive. + .. attribute:: daemon - Roughly, a thread is alive from the moment the :meth:`start` method returns - until its :meth:`run` method terminates. The module function :func:`enumerate` - returns a list of all alive threads. + A boolean value indicating whether this thread is a daemon thread (True) + or not (False). This must be set before :meth:`start` is called, + otherwise :exc:`RuntimeError` is raised. Its initial value is inherited + from the creating thread; the main thread is not a daemon thread and + therefore all threads created in the main thread default to :attr:`daemon` + = ``False``. + The entire Python program exits when no alive non-daemon threads are left. -.. attribute:: Thread.daemon + .. method:: isDaemon() + setDaemon() - A boolean value indicating whether this thread is a daemon thread (True) or - not (False). This must be set before :meth:`start` is called, otherwise - :exc:`RuntimeError` is raised. Its initial value is inherited from the - creating thread; the main thread is not a daemon thread and therefore all - threads created in the main thread default to :attr:`daemon` = ``False``. - - The entire Python program exits when no alive non-daemon threads are left. - - -.. method:: Thread.isDaemon() - Thread.setDaemon() - - Old getter/setter API for :attr:`~Thread.daemon`; use it directly as a - property instead. + Old getter/setter API for :attr:`~Thread.daemon`; use it directly as a + property instead. .. _lock-objects: @@ -496,69 +488,66 @@ .. class:: Condition([lock]) - If the *lock* argument is given and not ``None``, it must be a :class:`Lock` or - :class:`RLock` object, and it is used as the underlying lock. Otherwise, a new - :class:`RLock` object is created and used as the underlying lock. - - -.. method:: Condition.acquire(*args) - - Acquire the underlying lock. This method calls the corresponding method on the - underlying lock; the return value is whatever that method returns. + If the *lock* argument is given and not ``None``, it must be a :class:`Lock` + or :class:`RLock` object, and it is used as the underlying lock. Otherwise, + a new :class:`RLock` object is created and used as the underlying lock. + .. method:: acquire(*args) -.. method:: Condition.release() + Acquire the underlying lock. This method calls the corresponding method on + the underlying lock; the return value is whatever that method returns. - Release the underlying lock. This method calls the corresponding method on the - underlying lock; there is no return value. + .. method:: release() + Release the underlying lock. This method calls the corresponding method on + the underlying lock; there is no return value. -.. method:: Condition.wait([timeout]) + .. method:: wait([timeout]) - Wait until notified or until a timeout occurs. If the calling thread has not - acquired the lock when this method is called, a :exc:`RuntimeError` is raised. + Wait until notified or until a timeout occurs. If the calling thread has + not acquired the lock when this method is called, a :exc:`RuntimeError` is + raised. - This method releases the underlying lock, and then blocks until it is awakened - by a :meth:`notify` or :meth:`notify_all` call for the same condition variable in - another thread, or until the optional timeout occurs. Once awakened or timed - out, it re-acquires the lock and returns. + This method releases the underlying lock, and then blocks until it is + awakened by a :meth:`notify` or :meth:`notify_all` call for the same + condition variable in another thread, or until the optional timeout + occurs. Once awakened or timed out, it re-acquires the lock and returns. - When the *timeout* argument is present and not ``None``, it should be a floating - point number specifying a timeout for the operation in seconds (or fractions - thereof). + When the *timeout* argument is present and not ``None``, it should be a + floating point number specifying a timeout for the operation in seconds + (or fractions thereof). - When the underlying lock is an :class:`RLock`, it is not released using its - :meth:`release` method, since this may not actually unlock the lock when it was - acquired multiple times recursively. Instead, an internal interface of the - :class:`RLock` class is used, which really unlocks it even when it has been - recursively acquired several times. Another internal interface is then used to - restore the recursion level when the lock is reacquired. + When the underlying lock is an :class:`RLock`, it is not released using + its :meth:`release` method, since this may not actually unlock the lock + when it was acquired multiple times recursively. Instead, an internal + interface of the :class:`RLock` class is used, which really unlocks it + even when it has been recursively acquired several times. Another internal + interface is then used to restore the recursion level when the lock is + reacquired. + .. method:: notify() -.. method:: Condition.notify() + Wake up a thread waiting on this condition, if any. If the calling thread + has not acquired the lock when this method is called, a + :exc:`RuntimeError` is raised. - Wake up a thread waiting on this condition, if any. If the calling thread - has not acquired the lock when this method is called, a :exc:`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. - 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. + The current implementation wakes up exactly one thread, if any are + waiting. However, it's not safe to rely on this behavior. A future, + optimized implementation may occasionally wake up more than one thread. - The current implementation wakes up exactly one thread, if any are waiting. - However, it's not safe to rely on this behavior. A future, optimized - implementation may occasionally wake up more than one thread. + Note: the awakened thread does not actually return from its :meth:`wait` + call until it can reacquire the lock. Since :meth:`notify` does not + release the lock, its caller should. - Note: the awakened thread does not actually return from its :meth:`wait` call - until it can reacquire the lock. Since :meth:`notify` does not release the - lock, its caller should. + .. method:: notify_all() - -.. method:: Condition.notify_all() - - Wake up all threads waiting on this condition. This method acts like - :meth:`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 - :exc:`RuntimeError` is raised. + Wake up all threads waiting on this condition. This method acts like + :meth:`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 + :exc:`RuntimeError` is raised. .. _semaphore-objects: @@ -582,33 +571,31 @@ defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raised. + .. method:: acquire([blocking]) -.. method:: Semaphore.acquire([blocking]) - - Acquire a semaphore. - - When invoked without arguments: if the internal counter is larger than zero on - entry, decrement it by one and return immediately. If it is zero on entry, - block, waiting until some other thread has called :meth:`release` to make it - larger than zero. This is done with proper interlocking so that if multiple - :meth:`acquire` calls are blocked, :meth:`release` will wake exactly one of them - up. The implementation may pick one at random, so the order in which blocked - threads are awakened should not be relied on. There is no return value in this - case. - - When invoked with *blocking* set to true, do the same thing as when called - without arguments, and return true. - - When invoked with *blocking* set to false, do not block. If a call without an - argument would block, return false immediately; otherwise, do the same thing as - when called without arguments, and return true. - + Acquire a semaphore. -.. method:: Semaphore.release() - - Release a semaphore, incrementing the internal counter by one. When it was zero - on entry and another thread is waiting for it to become larger than zero again, - wake up that thread. + When invoked without arguments: if the internal counter is larger than + zero on entry, decrement it by one and return immediately. If it is zero + on entry, block, waiting until some other thread has called + :meth:`release` to make it larger than zero. This is done with proper + interlocking so that if multiple :meth:`acquire` calls are blocked, + :meth:`release` will wake exactly one of them up. The implementation may + pick one at random, so the order in which blocked threads are awakened + should not be relied on. There is no return value in this case. + + When invoked with *blocking* set to true, do the same thing as when called + without arguments, and return true. + + When invoked with *blocking* set to false, do not block. If a call + without an argument would block, return false immediately; otherwise, do + the same thing as when called without arguments, and return true. + + .. method:: release() + + Release a semaphore, incrementing the internal counter by one. When it + was zero on entry and another thread is waiting for it to become larger + than zero again, wake up that thread. .. _semaphore-examples: @@ -655,40 +642,37 @@ The internal flag is initially false. + .. method:: is_set() -.. method:: Event.is_set() - - Return true if and only if the internal flag is true. - + Return true if and only if the internal flag is true. -.. method:: Event.set() + .. method:: set() - Set the internal flag to true. All threads waiting for it to become true are - awakened. Threads that call :meth:`wait` once the flag is true will not block at - all. + Set the internal flag to true. All threads waiting for it to become true + are awakened. Threads that call :meth:`wait` once the flag is true will + not block at all. + .. method:: clear() -.. method:: Event.clear() + Reset the internal flag to false. Subsequently, threads calling + :meth:`wait` will block until :meth:`set` is called to set the internal + flag to true again. - Reset the internal flag to false. Subsequently, threads calling :meth:`wait` - will block until :meth:`set` is called to set the internal flag to true again. + .. method:: wait([timeout]) + Block until the internal flag is true. If the internal flag is true on + entry, return immediately. Otherwise, block until another thread calls + :meth:`set` to set the flag to true, or until the optional timeout occurs. -.. method:: Event.wait([timeout]) + When the timeout argument is present and not ``None``, it should be a + floating point number specifying a timeout for the operation in seconds + (or fractions thereof). - Block until the internal flag is true. If the internal flag is true on entry, - return immediately. Otherwise, block until another thread calls :meth:`set` - to set the flag to true, or until the optional timeout occurs. + This method returns the internal flag on exit, so it will always return + ``True`` except if a timeout is given and the operation times out. - When the timeout argument is present and not ``None``, it should be a floating - point number specifying a timeout for the operation in seconds (or fractions - thereof). - - This method returns the internal flag on exit, so it will always return - ``True`` except if a timeout is given and the operation times out. - - .. versionchanged:: 3.1 - Previously, the method always returned ``None``. + .. versionchanged:: 3.1 + Previously, the method always returned ``None``. .. _timer-objects: @@ -719,11 +703,10 @@ Create a timer that will run *function* with arguments *args* and keyword arguments *kwargs*, after *interval* seconds have passed. + .. method:: cancel() -.. method:: Timer.cancel() - - Stop the timer, and cancel the execution of the timer's action. This will only - work if the timer is still in its waiting stage. + Stop the timer, and cancel the execution of the timer's action. This will + only work if the timer is still in its waiting stage. .. _with-locks: From python-checkins at python.org Sun Jul 26 16:54:52 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 14:54:52 -0000 Subject: [Python-checkins] r74212 - in python/branches/py3k: Doc/c-api/import.rst Doc/c-api/unicode.rst Doc/distutils/apiref.rst Doc/extending/newtypes.rst Doc/glossary.rst Doc/howto/doanddont.rst Doc/howto/urllib2.rst Doc/includes/sqlite3/text_factory.py Doc/library/2to3.rst Doc/library/__future__.rst Doc/library/ast.rst Doc/library/collections.rst Doc/library/configparser.rst Doc/library/curses.rst Doc/library/gettext.rst Doc/library/heapq.rst Doc/library/io.rst Doc/library/multiprocessing.rst Doc/library/numbers.rst Doc/library/pprint.rst Doc/library/sqlite3.rst Doc/library/stdtypes.rst Doc/library/string.rst Doc/library/sys.rst Doc/library/undoc.rst Doc/library/weakref.rst Doc/library/winreg.rst Doc/library/xmlrpc.client.rst Doc/library/zipimport.rst Doc/reference/datamodel.rst Doc/reference/executionmodel.rst Doc/reference/expressions.rst Doc/reference/simple_stmts.rst Doc/using/cmdline.rst Doc/whatsnew/2.2.rst Doc/whatsnew/2.6.rst Message-ID: Author: georg.brandl Date: Sun Jul 26 16:54:51 2009 New Revision: 74212 Log: Merged revisions 74209 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74209 | georg.brandl | 2009-07-26 16:37:28 +0200 (So, 26 Jul 2009) | 1 line builtin -> built-in. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/c-api/import.rst python/branches/py3k/Doc/c-api/unicode.rst python/branches/py3k/Doc/distutils/apiref.rst python/branches/py3k/Doc/extending/newtypes.rst python/branches/py3k/Doc/glossary.rst python/branches/py3k/Doc/howto/doanddont.rst python/branches/py3k/Doc/howto/urllib2.rst python/branches/py3k/Doc/includes/sqlite3/text_factory.py python/branches/py3k/Doc/library/2to3.rst python/branches/py3k/Doc/library/__future__.rst python/branches/py3k/Doc/library/ast.rst python/branches/py3k/Doc/library/collections.rst python/branches/py3k/Doc/library/configparser.rst python/branches/py3k/Doc/library/curses.rst python/branches/py3k/Doc/library/gettext.rst python/branches/py3k/Doc/library/heapq.rst python/branches/py3k/Doc/library/io.rst python/branches/py3k/Doc/library/multiprocessing.rst python/branches/py3k/Doc/library/numbers.rst python/branches/py3k/Doc/library/pprint.rst python/branches/py3k/Doc/library/sqlite3.rst python/branches/py3k/Doc/library/stdtypes.rst python/branches/py3k/Doc/library/string.rst python/branches/py3k/Doc/library/sys.rst python/branches/py3k/Doc/library/undoc.rst python/branches/py3k/Doc/library/weakref.rst python/branches/py3k/Doc/library/winreg.rst python/branches/py3k/Doc/library/xmlrpc.client.rst python/branches/py3k/Doc/library/zipimport.rst python/branches/py3k/Doc/reference/datamodel.rst python/branches/py3k/Doc/reference/executionmodel.rst python/branches/py3k/Doc/reference/expressions.rst python/branches/py3k/Doc/reference/simple_stmts.rst python/branches/py3k/Doc/using/cmdline.rst python/branches/py3k/Doc/whatsnew/2.2.rst python/branches/py3k/Doc/whatsnew/2.6.rst Modified: python/branches/py3k/Doc/c-api/import.rst ============================================================================== --- python/branches/py3k/Doc/c-api/import.rst (original) +++ python/branches/py3k/Doc/c-api/import.rst Sun Jul 26 16:54:51 2009 @@ -141,7 +141,7 @@ *path*, possibly by fetching it from the :data:`sys.path_importer_cache` dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook is found that can handle the path item. Return ``None`` if no hook could; - this tells our caller it should fall back to the builtin import mechanism. + this tells our caller it should fall back to the built-in import mechanism. Cache the result in :data:`sys.path_importer_cache`. Return a new reference to the importer object. Modified: python/branches/py3k/Doc/c-api/unicode.rst ============================================================================== --- python/branches/py3k/Doc/c-api/unicode.rst (original) +++ python/branches/py3k/Doc/c-api/unicode.rst Sun Jul 26 16:54:51 2009 @@ -372,12 +372,12 @@ Built-in Codecs ^^^^^^^^^^^^^^^ -Python provides a set of builtin codecs which are written in C for speed. All of +Python provides a set of built-in codecs which are written in C for speed. All of these codecs are directly usable via the following functions. Many of the following APIs take two arguments encoding and errors. These parameters encoding and errors have the same semantics as the ones of the -builtin unicode() Unicode object constructor. +built-in :func:`unicode` Unicode object constructor. Setting encoding to *NULL* causes the default encoding to be used which is ASCII. The file system calls should use @@ -389,7 +389,7 @@ Error handling is set by errors which may also be set to *NULL* meaning to use the default handling defined for the codec. Default error handling for all -builtin codecs is "strict" (:exc:`ValueError` is raised). +built-in codecs is "strict" (:exc:`ValueError` is raised). The codecs all use a similar interface. Only deviation from the following generic ones are documented for simplicity. @@ -403,7 +403,7 @@ Create a Unicode object by decoding *size* bytes of the encoded string *s*. *encoding* and *errors* have the same meaning as the parameters of the same name - in the :func:`unicode` builtin function. The codec to be used is looked up + in the :func:`unicode` built-in function. The codec to be used is looked up using the Python codec registry. Return *NULL* if an exception was raised by the codec. Modified: python/branches/py3k/Doc/distutils/apiref.rst ============================================================================== --- python/branches/py3k/Doc/distutils/apiref.rst (original) +++ python/branches/py3k/Doc/distutils/apiref.rst Sun Jul 26 16:54:51 2009 @@ -1601,7 +1601,7 @@ +------------------+--------------------------------+---------+ Note that since *rstrip_ws* can strip the trailing newline, the semantics of - :meth:`readline` must differ from those of the builtin file object's + :meth:`readline` must differ from those of the built-in file object's :meth:`readline` method! In particular, :meth:`readline` returns ``None`` for end-of-file: an empty string might just be a blank line (or an all-whitespace line), if *rstrip_ws* is true but *skip_blanks* is not. @@ -1609,8 +1609,8 @@ .. method:: TextFile.open(filename) - Open a new file *filename*. This overrides any *file* or *filename* constructor - arguments. + Open a new file *filename*. This overrides any *file* or *filename* + constructor arguments. .. method:: TextFile.close() Modified: python/branches/py3k/Doc/extending/newtypes.rst ============================================================================== --- python/branches/py3k/Doc/extending/newtypes.rst (original) +++ python/branches/py3k/Doc/extending/newtypes.rst Sun Jul 26 16:54:51 2009 @@ -802,7 +802,7 @@ these :class:`PyTypeObject` structures between extension modules. In this example we will create a :class:`Shoddy` type that inherits from the -builtin :class:`list` type. The new type will be completely compatible with +built-in :class:`list` type. The new type will be completely compatible with regular lists, but will have an additional :meth:`increment` method that increases an internal counter. :: Modified: python/branches/py3k/Doc/glossary.rst ============================================================================== --- python/branches/py3k/Doc/glossary.rst (original) +++ python/branches/py3k/Doc/glossary.rst Sun Jul 26 16:54:51 2009 @@ -28,11 +28,11 @@ abstract base class Abstract Base Classes (abbreviated ABCs) complement :term:`duck-typing` by - providing a way to define interfaces when other techniques like :func:`hasattr` - would be clumsy. Python comes with many builtin ABCs for data structures - (in the :mod:`collections` module), numbers (in the :mod:`numbers` - module), and streams (in the :mod:`io` module). You can create your own - ABC with the :mod:`abc` module. + providing a way to define interfaces when other techniques like + :func:`hasattr` would be clumsy. Python comes with many built-in ABCs for + data structures (in the :mod:`collections` module), numbers (in the + :mod:`numbers` module), and streams (in the :mod:`io` module). You can + create your own ABC with the :mod:`abc` module. argument A value passed to a function or method, assigned to a named local @@ -83,7 +83,7 @@ expressed as a sum of a real part and an imaginary part. Imaginary numbers are real multiples of the imaginary unit (the square root of ``-1``), often written ``i`` in mathematics or ``j`` in - engineering. Python has builtin support for complex numbers, which are + engineering. Python has built-in support for complex numbers, which are written with this latter notation; the imaginary part is written with a ``j`` suffix, e.g., ``3+1j``. To get access to complex equivalents of the :mod:`math` module, use :mod:`cmath`. Use of complex numbers is a fairly @@ -305,7 +305,7 @@ define with an :meth:`__iter__` or :meth:`__getitem__` method. Iterables can be used in a :keyword:`for` loop and in many other places where a sequence is needed (:func:`zip`, :func:`map`, ...). When an iterable - object is passed as an argument to the builtin function :func:`iter`, it + object is passed as an argument to the built-in function :func:`iter`, it returns an iterator for the object. This iterator is good for one pass over the set of values. When using iterables, it is usually not necessary to call :func:`iter` or deal with iterator objects yourself. The ``for`` @@ -409,7 +409,7 @@ namespace The place where a variable is stored. Namespaces are implemented as - dictionaries. There are the local, global and builtin namespaces as well + dictionaries. There are the local, global and built-in namespaces as well as nested namespaces in objects (in methods). Namespaces support modularity by preventing naming conflicts. For instance, the functions :func:`builtins.open` and :func:`os.open` are distinguished by their Modified: python/branches/py3k/Doc/howto/doanddont.rst ============================================================================== --- python/branches/py3k/Doc/howto/doanddont.rst (original) +++ python/branches/py3k/Doc/howto/doanddont.rst Sun Jul 26 16:54:51 2009 @@ -228,7 +228,7 @@ More useful functions in :mod:`os.path`: :func:`basename`, :func:`dirname` and :func:`splitext`. -There are also many useful builtin functions people seem not to be aware of for +There are also many useful built-in functions people seem not to be aware of for some reason: :func:`min` and :func:`max` can find the minimum/maximum of any sequence with comparable semantics, for example, yet many people write their own :func:`max`/:func:`min`. Another highly useful function is Modified: python/branches/py3k/Doc/howto/urllib2.rst ============================================================================== --- python/branches/py3k/Doc/howto/urllib2.rst (original) +++ python/branches/py3k/Doc/howto/urllib2.rst Sun Jul 26 16:54:51 2009 @@ -182,10 +182,9 @@ Handling Exceptions =================== -*urlopen* raises :exc:`URLError` when it cannot handle a response (though as usual -with Python APIs, builtin exceptions such as -:exc:`ValueError`, :exc:`TypeError` etc. may also -be raised). +*urlopen* raises :exc:`URLError` when it cannot handle a response (though as +usual with Python APIs, built-in exceptions such as :exc:`ValueError`, +:exc:`TypeError` etc. may also be raised). :exc:`HTTPError` is the subclass of :exc:`URLError` raised in the specific case of HTTP URLs. Modified: python/branches/py3k/Doc/includes/sqlite3/text_factory.py ============================================================================== --- python/branches/py3k/Doc/includes/sqlite3/text_factory.py (original) +++ python/branches/py3k/Doc/includes/sqlite3/text_factory.py Sun Jul 26 16:54:51 2009 @@ -31,7 +31,7 @@ row = cur.fetchone() assert type(row[0]) == str -# sqlite3 offers a builtin optimized text_factory that will return bytestring +# sqlite3 offers a built-in optimized text_factory that will return bytestring # objects, if the data is in ASCII only, and otherwise return unicode objects con.text_factory = sqlite3.OptimizedUnicode cur.execute("select ?", (AUSTRIA,)) Modified: python/branches/py3k/Doc/library/2to3.rst ============================================================================== --- python/branches/py3k/Doc/library/2to3.rst (original) +++ python/branches/py3k/Doc/library/2to3.rst Sun Jul 26 16:54:51 2009 @@ -216,7 +216,7 @@ .. 2to3fixer:: itertools Changes usage of :func:`itertools.ifilter`, :func:`itertools.izip`, and - :func:`itertools.imap` to their builtin equivalents. + :func:`itertools.imap` to their built-in equivalents. :func:`itertools.ifilterfalse` is changed to :func:`itertools.filterfalse`. .. 2to3fixer:: long Modified: python/branches/py3k/Doc/library/__future__.rst ============================================================================== --- python/branches/py3k/Doc/library/__future__.rst (original) +++ python/branches/py3k/Doc/library/__future__.rst Sun Jul 26 16:54:51 2009 @@ -52,7 +52,7 @@ :meth:`getOptionalRelease` and :meth:`getMandatoryRelease`. *CompilerFlag* is the (bitfield) flag that should be passed in the fourth -argument to the builtin function :func:`compile` to enable the feature in +argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`compiler_flag` attribute on :class:`_Feature` instances. Modified: python/branches/py3k/Doc/library/ast.rst ============================================================================== --- python/branches/py3k/Doc/library/ast.rst (original) +++ python/branches/py3k/Doc/library/ast.rst Sun Jul 26 16:54:51 2009 @@ -16,7 +16,7 @@ grammar looks like. An abstract syntax tree can be generated by passing :data:`ast.PyCF_ONLY_AST` as -a flag to the :func:`compile` builtin function, or using the :func:`parse` +a flag to the :func:`compile` built-in function, or using the :func:`parse` helper provided in this module. The result will be a tree of objects whose classes all inherit from :class:`ast.AST`. An abstract syntax tree can be compiled into a Python code object using the built-in :func:`compile` function. Modified: python/branches/py3k/Doc/library/collections.rst ============================================================================== --- python/branches/py3k/Doc/library/collections.rst (original) +++ python/branches/py3k/Doc/library/collections.rst Sun Jul 26 16:54:51 2009 @@ -487,7 +487,7 @@ .. class:: defaultdict([default_factory[, ...]]) Returns a new dictionary-like object. :class:`defaultdict` is a subclass of the - builtin :class:`dict` class. It overrides one method and adds one writable + built-in :class:`dict` class. It overrides one method and adds one writable instance variable. The remaining functionality is the same as for the :class:`dict` class and is not documented here. Modified: python/branches/py3k/Doc/library/configparser.rst ============================================================================== --- python/branches/py3k/Doc/library/configparser.rst (original) +++ python/branches/py3k/Doc/library/configparser.rst Sun Jul 26 16:54:51 2009 @@ -50,7 +50,7 @@ constructor as a dictionary. Additional defaults may be passed into the :meth:`get` method which will override all others. -Sections are normally stored in a builtin dictionary. An alternative dictionary +Sections are normally stored in a built-in dictionary. An alternative dictionary type can be passed to the :class:`ConfigParser` constructor. For example, if a dictionary type is passed that sorts its keys, the sections will be sorted on write-back, as will be the keys within each section. Modified: python/branches/py3k/Doc/library/curses.rst ============================================================================== --- python/branches/py3k/Doc/library/curses.rst (original) +++ python/branches/py3k/Doc/library/curses.rst Sun Jul 26 16:54:51 2009 @@ -606,9 +606,9 @@ .. note:: A *character* means a C character (an ASCII code), rather then a Python - character (a string of length 1). (This note is true whenever the documentation - mentions a character.) The builtin :func:`ord` is handy for conveying strings to - codes. + character (a string of length 1). (This note is true whenever the + documentation mentions a character.) The built-in :func:`ord` is handy for + conveying strings to codes. Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any character previously painter at that location. By default, the character Modified: python/branches/py3k/Doc/library/gettext.rst ============================================================================== --- python/branches/py3k/Doc/library/gettext.rst (original) +++ python/branches/py3k/Doc/library/gettext.rst Sun Jul 26 16:54:51 2009 @@ -189,7 +189,7 @@ .. function:: install(domain, localedir=None, codeset=None, names=None) - This installs the function :func:`_` in Python's builtin namespace, based on + This installs the function :func:`_` in Python's builtins namespace, based on *domain*, *localedir*, and *codeset* which are passed to the function :func:`translation`. @@ -203,7 +203,7 @@ print(_('This string will be translated.')) For convenience, you want the :func:`_` function to be installed in Python's - builtin namespace, so it is easily accessible in all modules of your + builtins namespace, so it is easily accessible in all modules of your application. @@ -294,7 +294,7 @@ binding it to ``_``. If the *names* parameter is given, it must be a sequence containing the - names of functions you want to install in the builtin namespace in + names of functions you want to install in the builtins namespace in addition to :func:`_`. Supported names are ``'gettext'`` (bound to :meth:`self.gettext`), ``'ngettext'`` (bound to :meth:`self.ngettext`), ``'lgettext'`` and ``'lngettext'``. Modified: python/branches/py3k/Doc/library/heapq.rst ============================================================================== --- python/branches/py3k/Doc/library/heapq.rst (original) +++ python/branches/py3k/Doc/library/heapq.rst Sun Jul 26 16:54:51 2009 @@ -134,7 +134,7 @@ The latter two functions perform best for smaller values of *n*. For larger values, it is more efficient to use the :func:`sorted` function. Also, when -``n==1``, it is more efficient to use the builtin :func:`min` and :func:`max` +``n==1``, it is more efficient to use the built-in :func:`min` and :func:`max` functions. Modified: python/branches/py3k/Doc/library/io.rst ============================================================================== --- python/branches/py3k/Doc/library/io.rst (original) +++ python/branches/py3k/Doc/library/io.rst Sun Jul 26 16:54:51 2009 @@ -12,7 +12,7 @@ .. sectionauthor:: Benjamin Peterson The :mod:`io` module provides the Python interfaces to stream handling. The -builtin :func:`open` function is defined in this module. +built-in :func:`open` function is defined in this module. At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. It defines the basic interface to a stream. Note, however, that there is no Modified: python/branches/py3k/Doc/library/multiprocessing.rst ============================================================================== --- python/branches/py3k/Doc/library/multiprocessing.rst (original) +++ python/branches/py3k/Doc/library/multiprocessing.rst Sun Jul 26 16:54:51 2009 @@ -1554,9 +1554,9 @@ .. method:: apply(func[, args[, kwds]]) Call *func* with arguments *args* and keyword arguments *kwds*. It blocks - till the result is ready. Given this blocks - :meth:`apply_async` is better suited - for performing work in parallel. Additionally, the passed - in function is only executed in one of the workers of the pool. + till the result is ready. Given this blocks, :meth:`apply_async` is better + suited for performing work in parallel. Additionally, the passed in + function is only executed in one of the workers of the pool. .. method:: apply_async(func[, args[, kwds[, callback]]]) @@ -1569,7 +1569,7 @@ .. method:: map(func, iterable[, chunksize]) - A parallel equivalent of the :func:`map` builtin function (it supports only + A parallel equivalent of the :func:`map` built-in function (it supports only one *iterable* argument though). It blocks till the result is ready. This method chops the iterable into a number of chunks which it submits to Modified: python/branches/py3k/Doc/library/numbers.rst ============================================================================== --- python/branches/py3k/Doc/library/numbers.rst (original) +++ python/branches/py3k/Doc/library/numbers.rst Sun Jul 26 16:54:51 2009 @@ -22,7 +22,7 @@ .. class:: Complex Subclasses of this type describe complex numbers and include the operations - that work on the builtin :class:`complex` type. These are: conversions to + that work on the built-in :class:`complex` type. These are: conversions to :class:`complex` and :class:`bool`, :attr:`.real`, :attr:`.imag`, ``+``, ``-``, ``*``, ``/``, :func:`abs`, :meth:`conjugate`, ``==``, and ``!=``. All except ``-`` and ``!=`` are abstract. Modified: python/branches/py3k/Doc/library/pprint.rst ============================================================================== --- python/branches/py3k/Doc/library/pprint.rst (original) +++ python/branches/py3k/Doc/library/pprint.rst Sun Jul 26 16:54:51 2009 @@ -13,7 +13,7 @@ If the formatted structures include objects which are not fundamental Python types, the representation may not be loadable. This may be the case if objects such as files, sockets, classes, or instances are included, as well as many -other builtin objects which are not representable as Python constants. +other built-in objects which are not representable as Python constants. The formatted representation keeps objects on a single line if it can, and breaks them onto multiple lines if they don't fit within the allowed width. Modified: python/branches/py3k/Doc/library/sqlite3.rst ============================================================================== --- python/branches/py3k/Doc/library/sqlite3.rst (original) +++ python/branches/py3k/Doc/library/sqlite3.rst Sun Jul 26 16:54:51 2009 @@ -822,7 +822,7 @@ Accessing columns by name instead of by index ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -One useful feature of the :mod:`sqlite3` module is the builtin +One useful feature of the :mod:`sqlite3` module is the built-in :class:`sqlite3.Row` class designed to be used as a row factory. Rows wrapped with this class can be accessed both by index (like tuples) and Modified: python/branches/py3k/Doc/library/stdtypes.rst ============================================================================== --- python/branches/py3k/Doc/library/stdtypes.rst (original) +++ python/branches/py3k/Doc/library/stdtypes.rst Sun Jul 26 16:54:51 2009 @@ -1595,7 +1595,7 @@ order of insertion. Accordingly, sets do not support indexing, slicing, or other sequence-like behavior. -There are currently two builtin set types, :class:`set` and :class:`frozenset`. +There are currently two built-in set types, :class:`set` and :class:`frozenset`. The :class:`set` type is mutable --- the contents can be changed using methods like :meth:`add` and :meth:`remove`. Since it is mutable, it has no hash value and cannot be used as either a dictionary key or as an element of another set. Modified: python/branches/py3k/Doc/library/string.rst ============================================================================== --- python/branches/py3k/Doc/library/string.rst (original) +++ python/branches/py3k/Doc/library/string.rst Sun Jul 26 16:54:51 2009 @@ -287,7 +287,7 @@ "Format specifications" are used within replacement fields contained within a format string to define how individual values are presented (see -:ref:`formatstrings`.) They can also be passed directly to the builtin +:ref:`formatstrings`.) They can also be passed directly to the built-in :func:`format` function. Each formattable type may define how the format specification is to be interpreted. Modified: python/branches/py3k/Doc/library/sys.rst ============================================================================== --- python/branches/py3k/Doc/library/sys.rst (original) +++ python/branches/py3k/Doc/library/sys.rst Sun Jul 26 16:54:51 2009 @@ -738,7 +738,7 @@ ``'c_call'`` A C function is about to be called. This may be an extension function or - a builtin. *arg* is the C function object. + a built-in. *arg* is the C function object. ``'c_return'`` A C function has returned. *arg* is ``None``. Modified: python/branches/py3k/Doc/library/undoc.rst ============================================================================== --- python/branches/py3k/Doc/library/undoc.rst (original) +++ python/branches/py3k/Doc/library/undoc.rst Sun Jul 26 16:54:51 2009 @@ -25,4 +25,3 @@ :mod:`posixpath` --- Implementation of :mod:`os.path` on POSIX. - Modified: python/branches/py3k/Doc/library/weakref.rst ============================================================================== --- python/branches/py3k/Doc/library/weakref.rst (original) +++ python/branches/py3k/Doc/library/weakref.rst Sun Jul 26 16:54:51 2009 @@ -62,7 +62,7 @@ frozensets, file objects, :term:`generator`\s, type objects, sockets, arrays, deques, and regular expression pattern objects. -Several builtin types such as :class:`list` and :class:`dict` do not directly +Several built-in types such as :class:`list` and :class:`dict` do not directly support weak references but can add support through subclassing:: class Dict(dict): Modified: python/branches/py3k/Doc/library/winreg.rst ============================================================================== --- python/branches/py3k/Doc/library/winreg.rst (original) +++ python/branches/py3k/Doc/library/winreg.rst Sun Jul 26 16:54:51 2009 @@ -399,7 +399,7 @@ The object also support comparison semantics, so handle objects will compare true if they both reference the same underlying Windows handle value. -Handle objects can be converted to an integer (e.g., using the builtin +Handle objects can be converted to an integer (e.g., using the built-in :func:`int` function), in which case the underlying Windows handle value is returned. You can also use the :meth:`Detach` method to return the integer handle, and also disconnect the Windows handle from the handle object. Modified: python/branches/py3k/Doc/library/xmlrpc.client.rst ============================================================================== --- python/branches/py3k/Doc/library/xmlrpc.client.rst (original) +++ python/branches/py3k/Doc/library/xmlrpc.client.rst Sun Jul 26 16:54:51 2009 @@ -87,7 +87,7 @@ :exc:`ProtocolError` used to signal an error in the HTTP/HTTPS transport layer. Both :exc:`Fault` and :exc:`ProtocolError` derive from a base class called :exc:`Error`. Note that the xmlrpc client module currently does not marshal - instances of subclasses of builtin types. + instances of subclasses of built-in types. When passing strings, characters special to XML such as ``<``, ``>``, and ``&`` will be automatically escaped. However, it's the caller's responsibility to Modified: python/branches/py3k/Doc/library/zipimport.rst ============================================================================== --- python/branches/py3k/Doc/library/zipimport.rst (original) +++ python/branches/py3k/Doc/library/zipimport.rst Sun Jul 26 16:54:51 2009 @@ -10,7 +10,7 @@ This module adds the ability to import Python modules (:file:`\*.py`, :file:`\*.py[co]`) and packages from ZIP-format archives. It is usually not needed to use the :mod:`zipimport` module explicitly; it is automatically used -by the builtin :keyword:`import` mechanism for ``sys.path`` items that are paths +by the built-in :keyword:`import` mechanism for ``sys.path`` items that are paths to ZIP archives. Typically, ``sys.path`` is a list of directory names as strings. This module Modified: python/branches/py3k/Doc/reference/datamodel.rst ============================================================================== --- python/branches/py3k/Doc/reference/datamodel.rst (original) +++ python/branches/py3k/Doc/reference/datamodel.rst Sun Jul 26 16:54:51 2009 @@ -1304,7 +1304,7 @@ .. note:: This method may still be bypassed when looking up special methods as the - result of implicit invocation via language syntax or builtin functions. + result of implicit invocation via language syntax or built-in functions. See :ref:`special-lookup`. @@ -1696,12 +1696,12 @@ .. method:: object.__reversed__(self) - Called (if present) by the :func:`reversed` builtin to implement + Called (if present) by the :func:`reversed` built-in to implement reverse iteration. It should return a new iterator object that iterates over all the objects in the container in reverse order. If the :meth:`__reversed__` method is not provided, the :func:`reversed` - builtin will fall back to using the sequence protocol (:meth:`__len__` and + built-in will fall back to using the sequence protocol (:meth:`__len__` and :meth:`__getitem__`). Objects that support the sequence protocol should only provide :meth:`__reversed__` if they can provide an implementation that is more efficient than the one provided by :func:`reversed`. Modified: python/branches/py3k/Doc/reference/executionmodel.rst ============================================================================== --- python/branches/py3k/Doc/reference/executionmodel.rst (original) +++ python/branches/py3k/Doc/reference/executionmodel.rst Sun Jul 26 16:54:51 2009 @@ -112,8 +112,8 @@ specified in the statement refer to the binding of that name in the top-level namespace. Names are resolved in the top-level namespace by searching the global namespace, i.e. the namespace of the module containing the code block, -and the builtin namespace, the namespace of the module :mod:`builtins`. The -global namespace is searched first. If the name is not found there, the builtin +and the builtins namespace, the namespace of the module :mod:`builtins`. The +global namespace is searched first. If the name is not found there, the builtins namespace is searched. The global statement must precede all uses of the name. .. XXX document "nonlocal" semantics here Modified: python/branches/py3k/Doc/reference/expressions.rst ============================================================================== --- python/branches/py3k/Doc/reference/expressions.rst (original) +++ python/branches/py3k/Doc/reference/expressions.rst Sun Jul 26 16:54:51 2009 @@ -641,7 +641,7 @@ .. note:: - An implementation may provide builtin functions whose positional parameters do + An implementation may provide built-in functions whose positional parameters do not have names, even if they are 'named' for the purpose of documentation, and which therefore cannot be supplied by keyword. In CPython, this is the case for functions implemented in C that use :cfunc:`PyArg_ParseTuple` to parse their @@ -996,7 +996,7 @@ ``<``, ``>``, ``>=`` and ``<=`` operators raise a :exc:`TypeError` when comparing objects of different types that do not implement these operators for the given pair of types. You can control comparison behavior of objects of -non-builtin types by defining rich comparison methods like :meth:`__gt__`, +non-built-in types by defining rich comparison methods like :meth:`__gt__`, described in section :ref:`customization`. Comparison of objects of the same type depends on the type: @@ -1037,7 +1037,7 @@ which depend on total ordering. For example, :func:`min`, :func:`max`, and :func:`sorted` produce undefined results given a list of sets as inputs. -* Most other objects of builtin types compare unequal unless they are the same +* Most other objects of built-in types compare unequal unless they are the same object; the choice whether one object is considered smaller or larger than another one is made arbitrarily but consistently within one execution of a program. Modified: python/branches/py3k/Doc/reference/simple_stmts.rst ============================================================================== --- python/branches/py3k/Doc/reference/simple_stmts.rst (original) +++ python/branches/py3k/Doc/reference/simple_stmts.rst Sun Jul 26 16:54:51 2009 @@ -881,7 +881,7 @@ That is not a future statement; it's an ordinary import statement with no special semantics or syntax restrictions. -Code compiled by calls to the builtin functions :func:`exec` and :func:`compile` +Code compiled by calls to the built-in functions :func:`exec` and :func:`compile` that occur in a module :mod:`M` containing a future statement will, by default, use the new syntax or semantics associated with the future statement. This can be controlled by optional arguments to :func:`compile` --- see the documentation Modified: python/branches/py3k/Doc/using/cmdline.rst ============================================================================== --- python/branches/py3k/Doc/using/cmdline.rst (original) +++ python/branches/py3k/Doc/using/cmdline.rst Sun Jul 26 16:54:51 2009 @@ -86,7 +86,7 @@ .. note:: - This option cannot be used with builtin modules and extension modules + This option cannot be used with built-in modules and extension modules written in C, since they do not have Python module files. However, it can still be used for precompiled modules, even if the original source file is not available. Modified: python/branches/py3k/Doc/whatsnew/2.2.rst ============================================================================== --- python/branches/py3k/Doc/whatsnew/2.2.rst (original) +++ python/branches/py3k/Doc/whatsnew/2.2.rst Sun Jul 26 16:54:51 2009 @@ -1173,7 +1173,7 @@ can uncomment them. Gestalt and Internet Config modules are enabled by default. -* Keyword arguments passed to builtin functions that don't take them now cause a +* Keyword arguments passed to built-in functions that don't take them now cause a :exc:`TypeError` exception to be raised, with the message "*function* takes no keyword arguments". Modified: python/branches/py3k/Doc/whatsnew/2.6.rst ============================================================================== --- python/branches/py3k/Doc/whatsnew/2.6.rst (original) +++ python/branches/py3k/Doc/whatsnew/2.6.rst Sun Jul 26 16:54:51 2009 @@ -2823,7 +2823,7 @@ often used in web applications. For more information about JSON, see http://www.json.org. -:mod:`json` comes with support for decoding and encoding most builtin Python +:mod:`json` comes with support for decoding and encoding most built-in Python types. The following example encodes and decodes a dictionary:: >>> import json From python-checkins at python.org Sun Jul 26 17:02:42 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 15:02:42 -0000 Subject: [Python-checkins] r74213 - in python/branches/py3k: Doc/library/2to3.rst Doc/library/aifc.rst Doc/library/audioop.rst Doc/library/cgi.rst Doc/library/csv.rst Doc/library/curses.rst Doc/library/dbm.rst Doc/library/decimal.rst Doc/library/io.rst Doc/library/locale.rst Doc/library/logging.rst Doc/library/multiprocessing.rst Doc/library/optparse.rst Doc/library/os.rst Doc/library/ossaudiodev.rst Doc/library/pyclbr.rst Doc/library/reprlib.rst Doc/library/shelve.rst Doc/library/sunau.rst Doc/library/tempfile.rst Doc/library/threading.rst Doc/library/tkinter.rst Doc/library/wave.rst Doc/library/webbrowser.rst Message-ID: Author: georg.brandl Date: Sun Jul 26 17:02:41 2009 New Revision: 74213 Log: Merged revisions 74207 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74207 | georg.brandl | 2009-07-26 16:19:57 +0200 (So, 26 Jul 2009) | 1 line #6577: fix (hopefully) all links to builtin instead of module/class-specific objects. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/2to3.rst python/branches/py3k/Doc/library/aifc.rst python/branches/py3k/Doc/library/audioop.rst python/branches/py3k/Doc/library/cgi.rst python/branches/py3k/Doc/library/csv.rst python/branches/py3k/Doc/library/curses.rst python/branches/py3k/Doc/library/dbm.rst python/branches/py3k/Doc/library/decimal.rst python/branches/py3k/Doc/library/io.rst python/branches/py3k/Doc/library/locale.rst python/branches/py3k/Doc/library/logging.rst python/branches/py3k/Doc/library/multiprocessing.rst python/branches/py3k/Doc/library/optparse.rst python/branches/py3k/Doc/library/os.rst python/branches/py3k/Doc/library/ossaudiodev.rst python/branches/py3k/Doc/library/pyclbr.rst python/branches/py3k/Doc/library/reprlib.rst python/branches/py3k/Doc/library/shelve.rst python/branches/py3k/Doc/library/sunau.rst python/branches/py3k/Doc/library/tempfile.rst python/branches/py3k/Doc/library/threading.rst python/branches/py3k/Doc/library/tkinter.rst python/branches/py3k/Doc/library/wave.rst python/branches/py3k/Doc/library/webbrowser.rst Modified: python/branches/py3k/Doc/library/2to3.rst ============================================================================== --- python/branches/py3k/Doc/library/2to3.rst (original) +++ python/branches/py3k/Doc/library/2to3.rst Sun Jul 26 17:02:41 2009 @@ -246,8 +246,9 @@ .. 2to3fixer:: next - Converts the use of iterator's :meth:`next` methods to the :func:`next` - function. It also renames :meth:`next` methods to :meth:`~object.__next__`. + Converts the use of iterator's :meth:`~iterator.next` methods to the + :func:`next` function. It also renames :meth:`next` methods to + :meth:`~object.__next__`. .. 2to3fixer:: nonzero Modified: python/branches/py3k/Doc/library/aifc.rst ============================================================================== --- python/branches/py3k/Doc/library/aifc.rst (original) +++ python/branches/py3k/Doc/library/aifc.rst Sun Jul 26 17:02:41 2009 @@ -48,7 +48,7 @@ time how many samples you are going to write in total and use :meth:`writeframesraw` and :meth:`setnframes`. -Objects returned by :func:`open` when a file is opened for reading have the +Objects returned by :func:`.open` when a file is opened for reading have the following methods: @@ -133,7 +133,7 @@ Close the AIFF file. After calling this method, the object can no longer be used. -Objects returned by :func:`open` when a file is opened for writing have all the +Objects returned by :func:`.open` when a file is opened for writing have all the above methods, except for :meth:`readframes` and :meth:`setpos`. In addition the following methods exist. The :meth:`get\*` methods can only be called after the corresponding :meth:`set\*` methods have been called. Before the first Modified: python/branches/py3k/Doc/library/audioop.rst ============================================================================== --- python/branches/py3k/Doc/library/audioop.rst (original) +++ python/branches/py3k/Doc/library/audioop.rst Sun Jul 26 17:02:41 2009 @@ -222,7 +222,7 @@ u-LAW encoding always uses 8 bits samples, so *width* refers only to the sample width of the output fragment here. -Note that operations such as :func:`mul` or :func:`max` make no distinction +Note that operations such as :func:`.mul` or :func:`.max` make no distinction between mono and stereo fragments, i.e. all samples are treated equal. If this is a problem the stereo fragment should be split into two mono fragments first and recombined later. Here is an example of how to do that:: Modified: python/branches/py3k/Doc/library/cgi.rst ============================================================================== --- python/branches/py3k/Doc/library/cgi.rst (original) +++ python/branches/py3k/Doc/library/cgi.rst Sun Jul 26 17:02:41 2009 @@ -133,8 +133,8 @@ If a field represents an uploaded file, accessing the value via the :attr:`value` attribute or the :func:`getvalue` method reads the entire file in memory as a string. This may not be what you want. You can test for an uploaded -file by testing either the :attr:`filename` attribute or the :attr:`file` -attribute. You can then read the data at leisure from the :attr:`file` +file by testing either the :attr:`filename` attribute or the :attr:`!file` +attribute. You can then read the data at leisure from the :attr:`!file` attribute:: fileitem = form["userfile"] @@ -154,7 +154,7 @@ The file upload draft standard entertains the possibility of uploading multiple files from one field (using a recursive :mimetype:`multipart/\*` encoding). When this occurs, the item will be a dictionary-like :class:`FieldStorage` item. -This can be determined by testing its :attr:`type` attribute, which should be +This can be determined by testing its :attr:`!type` attribute, which should be :mimetype:`multipart/form-data` (or perhaps another MIME type matching :mimetype:`multipart/\*`). In this case, it can be iterated over recursively just like the top-level form object. @@ -162,7 +162,7 @@ When a form is submitted in the "old" format (as the query string or as a single data part of type :mimetype:`application/x-www-form-urlencoded`), the items will actually be instances of the class :class:`MiniFieldStorage`. In this case, the -:attr:`list`, :attr:`file`, and :attr:`filename` attributes are always ``None``. +:attr:`!list`, :attr:`!file`, and :attr:`filename` attributes are always ``None``. A form submitted via POST that also has a query string will contain both :class:`FieldStorage` and :class:`MiniFieldStorage` items. Modified: python/branches/py3k/Doc/library/csv.rst ============================================================================== --- python/branches/py3k/Doc/library/csv.rst (original) +++ python/branches/py3k/Doc/library/csv.rst Sun Jul 26 17:02:41 2009 @@ -50,7 +50,7 @@ Return a reader object which will iterate over lines in the given *csvfile*. *csvfile* can be any object which supports the :term:`iterator` protocol and returns a - string each time its :meth:`next` method is called --- file objects and list + string each time its :meth:`!next` method is called --- file objects and list objects are both suitable. If *csvfile* is a file object, it should be opened with ``newline=''``. [#]_ An optional *dialect* parameter can be given which is used to define a set of parameters Modified: python/branches/py3k/Doc/library/curses.rst ============================================================================== --- python/branches/py3k/Doc/library/curses.rst (original) +++ python/branches/py3k/Doc/library/curses.rst Sun Jul 26 17:02:41 2009 @@ -183,7 +183,7 @@ .. function:: filter() - The :func:`filter` routine, if used, must be called before :func:`initscr` is + The :func:`.filter` routine, if used, must be called before :func:`initscr` is called. The effect is that, during those calls, LINES is set to 1; the capabilities clear, cup, cud, cud1, cuu1, cuu, vpa are disabled; and the home string is set to the value of cr. The effect is that the cursor is confined to Modified: python/branches/py3k/Doc/library/dbm.rst ============================================================================== --- python/branches/py3k/Doc/library/dbm.rst (original) +++ python/branches/py3k/Doc/library/dbm.rst Sun Jul 26 17:02:41 2009 @@ -61,7 +61,7 @@ modified by the prevailing umask). -The object returned by :func:`open` supports most of the same functionality as +The object returned by :func:`.open` supports most of the same functionality as dictionaries; keys and their corresponding values can be stored, retrieved, and deleted, and the :keyword:`in` operator and the :meth:`keys` method are available. Key and values are always stored as bytes. This means that when Modified: python/branches/py3k/Doc/library/decimal.rst ============================================================================== --- python/branches/py3k/Doc/library/decimal.rst (original) +++ python/branches/py3k/Doc/library/decimal.rst Sun Jul 26 17:02:41 2009 @@ -584,7 +584,7 @@ .. method:: max_mag(other[, context]) - Similar to the :meth:`max` method, but the comparison is done using the + Similar to the :meth:`.max` method, but the comparison is done using the absolute values of the operands. .. method:: min(other[, context]) @@ -596,7 +596,7 @@ .. method:: min_mag(other[, context]) - Similar to the :meth:`min` method, but the comparison is done using the + Similar to the :meth:`.min` method, but the comparison is done using the absolute values of the operands. .. method:: next_minus([context]) Modified: python/branches/py3k/Doc/library/io.rst ============================================================================== --- python/branches/py3k/Doc/library/io.rst (original) +++ python/branches/py3k/Doc/library/io.rst Sun Jul 26 17:02:41 2009 @@ -39,7 +39,7 @@ stream for text. Argument names are not part of the specification, and only the arguments of -:func:`open` are intended to be used as keyword arguments. +:func:`.open` are intended to be used as keyword arguments. Module Interface @@ -48,7 +48,7 @@ .. data:: DEFAULT_BUFFER_SIZE An int containing the default buffer size used by the module's buffered I/O - classes. :func:`open` uses the file's blksize (as obtained by + classes. :func:`.open` uses the file's blksize (as obtained by :func:`os.stat`) if possible. .. function:: open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True) @@ -142,8 +142,8 @@ closed. If a filename is given *closefd* has no effect and must be ``True`` (the default). - The type of file object returned by the :func:`open` function depends on the - mode. When :func:`open` is used to open a file in a text mode (``'w'``, + The type of file object returned by the :func:`.open` function depends on the + mode. When :func:`.open` is used to open a file in a text mode (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass of :class:`TextIOBase` (specifically :class:`TextIOWrapper`). When used to open a file in a binary mode with buffering, the returned class is a subclass of @@ -256,7 +256,7 @@ most *limit* bytes will be read. The line terminator is always ``b'\n'`` for binary files; for text files, - the *newlines* argument to :func:`open` can be used to select the line + the *newlines* argument to :func:`.open` can be used to select the line terminator(s) recognized. .. method:: readlines(hint=-1) Modified: python/branches/py3k/Doc/library/locale.rst ============================================================================== --- python/branches/py3k/Doc/library/locale.rst (original) +++ python/branches/py3k/Doc/library/locale.rst Sun Jul 26 17:02:41 2009 @@ -432,8 +432,8 @@ .. data:: LC_NUMERIC - Locale category for formatting numbers. The functions :func:`format`, - :func:`atoi`, :func:`atof` and :func:`str` of the :mod:`locale` module are + Locale category for formatting numbers. The functions :func:`.format`, + :func:`atoi`, :func:`atof` and :func:`.str` of the :mod:`locale` module are affected by that category. All other numeric formatting operations are not affected. @@ -491,7 +491,7 @@ The only way to perform numeric operations according to the locale is to use the special functions defined by this module: :func:`atof`, :func:`atoi`, -:func:`format`, :func:`str`. +:func:`.format`, :func:`.str`. There is no way to perform case conversions and character classifications according to the locale. For (Unicode) text strings these are done according Modified: python/branches/py3k/Doc/library/logging.rst ============================================================================== --- python/branches/py3k/Doc/library/logging.rst (original) +++ python/branches/py3k/Doc/library/logging.rst Sun Jul 26 17:02:41 2009 @@ -998,7 +998,7 @@ Handles a record by passing it to all handlers associated with this logger and its ancestors (until a false value of *propagate* is found). This method is used for unpickled records received from a socket, as well as those created locally. - Logger-level filtering is applied using :meth:`filter`. + Logger-level filtering is applied using :meth:`~Logger.filter`. .. method:: Logger.makeRecord(name, lvl, fn, lno, msg, args, exc_info, func=None, extra=None) Modified: python/branches/py3k/Doc/library/multiprocessing.rst ============================================================================== --- python/branches/py3k/Doc/library/multiprocessing.rst (original) +++ python/branches/py3k/Doc/library/multiprocessing.rst Sun Jul 26 17:02:41 2009 @@ -1578,7 +1578,7 @@ .. method:: map_async(func, iterable[, chunksize[, callback]]) - A variant of the :meth:`map` method which returns a result object. + A variant of the :meth:`.map` method which returns a result object. If *callback* is specified then it should be a callable which accepts a single argument. When the result becomes ready *callback* is applied to @@ -1594,7 +1594,7 @@ make make the job complete **much** faster than using the default value of ``1``. - Also if *chunksize* is ``1`` then the :meth:`next` method of the iterator + Also if *chunksize* is ``1`` then the :meth:`!next` method of the iterator returned by the :meth:`imap` method has an optional *timeout* parameter: ``next(timeout)`` will raise :exc:`multiprocessing.TimeoutError` if the result cannot be returned within *timeout* seconds. Modified: python/branches/py3k/Doc/library/optparse.rst ============================================================================== --- python/branches/py3k/Doc/library/optparse.rst (original) +++ python/branches/py3k/Doc/library/optparse.rst Sun Jul 26 17:02:41 2009 @@ -282,7 +282,7 @@ * ``args``, the list of positional arguments leftover after parsing options This tutorial section only covers the four most important option attributes: -:attr:`action`, :attr:`type`, :attr:`dest` (destination), and :attr:`help`. Of +:attr:`action`, :attr:`!type`, :attr:`dest` (destination), and :attr:`help`. Of these, :attr:`action` is the most fundamental. @@ -829,7 +829,7 @@ print a usage message including all options and the documentation for them (If you don't supply an action, the default is ``store``. For this action, you -may also supply :attr:`type` and :attr:`dest` option attributes; see below.) +may also supply :attr:`!type` and :attr:`dest` option attributes; see below.) As you can see, most actions involve storing or updating a value somewhere. :mod:`optparse` always creates a special object for this, conventionally called @@ -860,7 +860,7 @@ options.filename = "foo" -The :attr:`type` and :attr:`dest` option attributes are almost as important as +The :attr:`!type` and :attr:`dest` option attributes are almost as important as :attr:`action`, but :attr:`action` is the only one that makes sense for *all* options. @@ -875,18 +875,18 @@ guide :mod:`optparse`'s behaviour; a few have required attributes, which you must specify for any option using that action. -* ``store`` [relevant: :attr:`type`, :attr:`dest`, ``nargs``, ``choices``] +* ``store`` [relevant: :attr:`!type`, :attr:`dest`, ``nargs``, ``choices``] The option must be followed by an argument, which is converted to a value - according to :attr:`type` and stored in :attr:`dest`. If ``nargs`` > 1, + according to :attr:`!type` and stored in :attr:`dest`. If ``nargs`` > 1, multiple arguments will be consumed from the command line; all will be converted - according to :attr:`type` and stored to :attr:`dest` as a tuple. See the + according to :attr:`!type` and stored to :attr:`dest` as a tuple. See the "Option types" section below. If ``choices`` is supplied (a list or tuple of strings), the type defaults to ``choice``. - If :attr:`type` is not supplied, it defaults to ``string``. + If :attr:`!type` is not supplied, it defaults to ``string``. If :attr:`dest` is not supplied, :mod:`optparse` derives a destination from the first long option string (e.g., ``"--foo-bar"`` implies ``foo_bar``). If there @@ -938,7 +938,7 @@ parser.add_option("--clobber", action="store_true", dest="clobber") parser.add_option("--no-clobber", action="store_false", dest="clobber") -* ``append`` [relevant: :attr:`type`, :attr:`dest`, ``nargs``, ``choices``] +* ``append`` [relevant: :attr:`!type`, :attr:`dest`, ``nargs``, ``choices``] The option must be followed by an argument, which is appended to the list in :attr:`dest`. If no default value for :attr:`dest` is supplied, an empty list @@ -946,7 +946,7 @@ the command-line. If ``nargs`` > 1, multiple arguments are consumed, and a tuple of length ``nargs`` is appended to :attr:`dest`. - The defaults for :attr:`type` and :attr:`dest` are the same as for the ``store`` + The defaults for :attr:`!type` and :attr:`dest` are the same as for the ``store`` action. Example:: @@ -988,7 +988,7 @@ options.verbosity += 1 -* ``callback`` [required: ``callback``; relevant: :attr:`type`, ``nargs``, +* ``callback`` [required: ``callback``; relevant: :attr:`!type`, ``nargs``, ``callback_args``, ``callback_kwargs``] Call the function specified by ``callback``, which is called as :: @@ -1061,7 +1061,7 @@ Determines :mod:`optparse`'s behaviour when this option is seen on the command line; the available options are documented above. -* :attr:`type` (default: ``"string"``) +* :attr:`!type` (default: ``"string"``) The argument type expected by this option (e.g., ``"string"`` or ``"int"``); the available option types are documented below. @@ -1079,7 +1079,7 @@ * ``nargs`` (default: 1) - How many arguments of type :attr:`type` should be consumed when this option is + How many arguments of type :attr:`!type` should be consumed when this option is seen. If > 1, :mod:`optparse` will store a tuple of values to :attr:`dest`. * ``const`` @@ -1410,15 +1410,15 @@ There are several other option attributes that you can supply when you define a callback option: -:attr:`type` +:attr:`!type` has its usual meaning: as with the ``store`` or ``append`` actions, it instructs - :mod:`optparse` to consume one argument and convert it to :attr:`type`. Rather + :mod:`optparse` to consume one argument and convert it to :attr:`!type`. Rather than storing the converted value(s) anywhere, though, :mod:`optparse` passes it to your callback function. ``nargs`` also has its usual meaning: if it is supplied and > 1, :mod:`optparse` will - consume ``nargs`` arguments, each of which must be convertible to :attr:`type`. + consume ``nargs`` arguments, each of which must be convertible to :attr:`!type`. It then passes a tuple of converted values to your callback. ``callback_args`` @@ -1450,8 +1450,8 @@ ``value`` is the argument to this option seen on the command-line. :mod:`optparse` will - only expect an argument if :attr:`type` is set; the type of ``value`` will be - the type implied by the option's type. If :attr:`type` for this option is + only expect an argument if :attr:`!type` is set; the type of ``value`` will be + the type implied by the option's type. If :attr:`!type` for this option is ``None`` (no argument expected), then ``value`` will be ``None``. If ``nargs`` > 1, ``value`` will be a tuple of values of the appropriate type. @@ -1578,7 +1578,7 @@ Things get slightly more interesting when you define callback options that take a fixed number of arguments. Specifying that a callback option takes arguments is similar to defining a ``store`` or ``append`` option: if you define -:attr:`type`, then the option takes one argument that must be convertible to +:attr:`!type`, then the option takes one argument that must be convertible to that type; if you further define ``nargs``, then the option takes ``nargs`` arguments. @@ -1757,7 +1757,7 @@ "typed" actions actions that take a value from the command line and expect it to be of a certain type; or rather, a string that can be converted to a certain type. These - options require a :attr:`type` attribute to the Option constructor. + options require a :attr:`!type` attribute to the Option constructor. These are overlapping sets: some default "store" actions are ``store``, ``store_const``, ``append``, and ``count``, while the default "typed" actions Modified: python/branches/py3k/Doc/library/os.rst ============================================================================== --- python/branches/py3k/Doc/library/os.rst (original) +++ python/branches/py3k/Doc/library/os.rst Sun Jul 26 17:02:41 2009 @@ -516,10 +516,10 @@ .. note:: - This function is intended for low-level I/O. For normal usage, use the built-in - function :func:`open`, which returns a "file object" with :meth:`~file.read` and - :meth:`~file.write` methods (and many more). To wrap a file descriptor in a "file - object", use :func:`fdopen`. + This function is intended for low-level I/O. For normal usage, use the + built-in function :func:`open`, which returns a "file object" with + :meth:`~file.read` and :meth:`~file.write` methods (and many more). To + wrap a file descriptor in a "file object", use :func:`fdopen`. .. function:: openpty() @@ -662,10 +662,10 @@ .. note:: - Using :func:`access` to check if a user is authorized to e.g. open a file before - actually doing so using :func:`open` creates a security hole, because the user - might exploit the short time interval between checking and opening the file to - manipulate it. + Using :func:`access` to check if a user is authorized to e.g. open a file + before actually doing so using :func:`open` creates a security hole, + because the user might exploit the short time interval between checking + and opening the file to manipulate it. .. note:: Modified: python/branches/py3k/Doc/library/ossaudiodev.rst ============================================================================== --- python/branches/py3k/Doc/library/ossaudiodev.rst (original) +++ python/branches/py3k/Doc/library/ossaudiodev.rst Sun Jul 26 17:02:41 2009 @@ -118,7 +118,7 @@ parameters at once. This is more convenient, but may not be as flexible in all cases. -The audio device objects returned by :func:`open` define the following methods +The audio device objects returned by :func:`.open` define the following methods and (read-only) attributes: Modified: python/branches/py3k/Doc/library/pyclbr.rst ============================================================================== --- python/branches/py3k/Doc/library/pyclbr.rst (original) +++ python/branches/py3k/Doc/library/pyclbr.rst Sun Jul 26 17:02:41 2009 @@ -78,7 +78,7 @@ .. attribute:: Class.lineno The line number of the ``class`` statement within the file named by - :attr:`file`. + :attr:`~Class.file`. .. _pyclbr-function-objects: @@ -109,5 +109,5 @@ .. attribute:: Function.lineno The line number of the ``def`` statement within the file named by - :attr:`file`. + :attr:`~Function.file`. Modified: python/branches/py3k/Doc/library/reprlib.rst ============================================================================== --- python/branches/py3k/Doc/library/reprlib.rst (original) +++ python/branches/py3k/Doc/library/reprlib.rst Sun Jul 26 17:02:41 2009 @@ -23,16 +23,17 @@ .. data:: aRepr - This is an instance of :class:`Repr` which is used to provide the :func:`repr` - function described below. Changing the attributes of this object will affect - the size limits used by :func:`repr` and the Python debugger. + This is an instance of :class:`Repr` which is used to provide the + :func:`.repr` function described below. Changing the attributes of this + object will affect the size limits used by :func:`.repr` and the Python + debugger. .. function:: repr(obj) - This is the :meth:`repr` method of ``aRepr``. It returns a string similar to - that returned by the built-in function of the same name, but with limits on - most sizes. + This is the :meth:`~Repr.repr` method of ``aRepr``. It returns a string + similar to that returned by the built-in function of the same name, but with + limits on most sizes. .. _repr-objects: @@ -92,7 +93,7 @@ .. method:: Repr.repr1(obj, level) - Recursive implementation used by :meth:`repr`. This uses the type of *obj* to + Recursive implementation used by :meth:`.repr`. This uses the type of *obj* to determine which formatting method to call, passing it *obj* and *level*. The type-specific methods should call :meth:`repr1` to perform recursive formatting, with ``level - 1`` for the value of *level* in the recursive call. Modified: python/branches/py3k/Doc/library/shelve.rst ============================================================================== --- python/branches/py3k/Doc/library/shelve.rst (original) +++ python/branches/py3k/Doc/library/shelve.rst Sun Jul 26 17:02:41 2009 @@ -101,7 +101,7 @@ .. class:: BsdDbShelf(dict[, protocol=None[, writeback=False]]) - A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`next`, + A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`!next`, :meth:`previous`, :meth:`last` and :meth:`set_location` which are available in the third-party :mod:`bsddb` module from `pybsddb `_ but not in other database @@ -117,7 +117,7 @@ A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like object. The underlying file will be opened using :func:`dbm.open`. By default, the file will be created and opened for both read and write. The - optional *flag* parameter has the same interpretation as for the :func:`open` + optional *flag* parameter has the same interpretation as for the :func:`.open` function. The optional *protocol* and *writeback* parameters have the same interpretation as for the :class:`Shelf` class. Modified: python/branches/py3k/Doc/library/sunau.rst ============================================================================== --- python/branches/py3k/Doc/library/sunau.rst (original) +++ python/branches/py3k/Doc/library/sunau.rst Sun Jul 26 17:02:41 2009 @@ -58,18 +58,18 @@ .. function:: openfp(file, mode) - A synonym for :func:`open`, maintained for backwards compatibility. + A synonym for :func:`.open`, maintained for backwards compatibility. -The :mod:`sunau` module defines the following exception: +The :mod:`sunau` module defines the following exception: .. exception:: Error An error raised when something is impossible because of Sun AU specs or implementation deficiency. -The :mod:`sunau` module defines the following data items: +The :mod:`sunau` module defines the following data items: .. data:: AUDIO_FILE_MAGIC @@ -104,7 +104,7 @@ AU_read Objects --------------- -AU_read objects, as returned by :func:`open` above, have the following methods: +AU_read objects, as returned by :func:`.open` above, have the following methods: .. method:: AU_read.close() @@ -197,7 +197,7 @@ AU_write Objects ---------------- -AU_write objects, as returned by :func:`open` above, have the following methods: +AU_write objects, as returned by :func:`.open` above, have the following methods: .. method:: AU_write.setnchannels(n) Modified: python/branches/py3k/Doc/library/tempfile.rst ============================================================================== --- python/branches/py3k/Doc/library/tempfile.rst (original) +++ python/branches/py3k/Doc/library/tempfile.rst Sun Jul 26 17:02:41 2009 @@ -48,7 +48,7 @@ The *dir*, *prefix* and *suffix* parameters are passed to :func:`mkstemp`. The returned object is a true file object on POSIX platforms. On other - platforms, it is a file-like object whose :attr:`file` attribute is the + platforms, it is a file-like object whose :attr:`!file` attribute is the underlying true file object. This file-like object can be used in a :keyword:`with` statement, just like a normal file. @@ -63,7 +63,7 @@ still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later). If *delete* is true (the default), the file is deleted as soon as it is closed. - The returned object is always a file-like object whose :attr:`file` + The returned object is always a file-like object whose :attr:`!file` attribute is the underlying true file object. This file-like object can be used in a :keyword:`with` statement, just like a normal file. Modified: python/branches/py3k/Doc/library/threading.rst ============================================================================== --- python/branches/py3k/Doc/library/threading.rst (original) +++ python/branches/py3k/Doc/library/threading.rst Sun Jul 26 17:02:41 2009 @@ -54,8 +54,9 @@ :noindex: A factory function that returns a new event object. An event manages a flag - that can be set to true with the :meth:`set` method and reset to false with the - :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. + that can be set to true with the :meth:`~Event.set` method and reset to false + with the :meth:`clear` method. The :meth:`wait` method blocks until the flag + is true. .. class:: local @@ -634,7 +635,7 @@ thread signals an event and other threads wait for it. An event object manages an internal flag that can be set to true with the -:meth:`set` method and reset to false with the :meth:`clear` method. The +:meth:`~Event.set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method blocks until the flag is true. @@ -655,7 +656,7 @@ .. method:: clear() Reset the internal flag to false. Subsequently, threads calling - :meth:`wait` will block until :meth:`set` is called to set the internal + :meth:`wait` will block until :meth:`.set` is called to set the internal flag to true again. .. method:: wait([timeout]) Modified: python/branches/py3k/Doc/library/tkinter.rst ============================================================================== --- python/branches/py3k/Doc/library/tkinter.rst (original) +++ python/branches/py3k/Doc/library/tkinter.rst Sun Jul 26 17:02:41 2009 @@ -511,7 +511,7 @@ There are many useful subclasses of Variable already defined: :class:`StringVar`, :class:`IntVar`, :class:`DoubleVar`, and :class:`BooleanVar`. To read the current value of such a variable, call the -:meth:`get` method on it, and to change its value you call the :meth:`set` +:meth:`get` method on it, and to change its value you call the :meth:`!set` method. If you follow this protocol, the widget will always track the value of the variable, with no further intervention on your part. @@ -652,7 +652,7 @@ ``"raised"``, ``"sunken"``, ``"flat"``, ``"groove"``, and ``"ridge"``. scrollcommand - This is almost always the :meth:`set` method of some scrollbar widget, but can + This is almost always the :meth:`!set` method of some scrollbar widget, but can be any widget method that takes a single argument. Refer to the file :file:`Demo/tkinter/matt/canvas-with-scrollbars.py` in the Python source distribution for an example. Modified: python/branches/py3k/Doc/library/wave.rst ============================================================================== --- python/branches/py3k/Doc/library/wave.rst (original) +++ python/branches/py3k/Doc/library/wave.rst Sun Jul 26 17:02:41 2009 @@ -33,7 +33,7 @@ .. function:: openfp(file, mode) - A synonym for :func:`open`, maintained for backwards compatibility. + A synonym for :func:`.open`, maintained for backwards compatibility. .. exception:: Error @@ -47,7 +47,7 @@ Wave_read Objects ----------------- -Wave_read objects, as returned by :func:`open`, have the following methods: +Wave_read objects, as returned by :func:`.open`, have the following methods: .. method:: Wave_read.close() @@ -134,7 +134,7 @@ Wave_write Objects ------------------ -Wave_write objects, as returned by :func:`open`, have the following methods: +Wave_write objects, as returned by :func:`.open`, have the following methods: .. method:: Wave_write.close() Modified: python/branches/py3k/Doc/library/webbrowser.rst ============================================================================== --- python/branches/py3k/Doc/library/webbrowser.rst (original) +++ python/branches/py3k/Doc/library/webbrowser.rst Sun Jul 26 17:02:41 2009 @@ -10,7 +10,7 @@ The :mod:`webbrowser` module provides a high-level interface to allow displaying Web-based documents to users. Under most circumstances, simply calling the -:func:`open` function from this module will do the right thing. +:func:`.open` function from this module will do the right thing. Under Unix, graphical browsers are preferred under X11, but text-mode browsers will be used if graphical browsers are not available or an X11 display isn't From python-checkins at python.org Sun Jul 26 17:03:49 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 26 Jul 2009 15:03:49 -0000 Subject: [Python-checkins] r74214 - in python/branches/py3k: Doc/library/re.rst Message-ID: Author: georg.brandl Date: Sun Jul 26 17:03:49 2009 New Revision: 74214 Log: Merged revisions 74205 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74205 | georg.brandl | 2009-07-26 15:36:39 +0200 (So, 26 Jul 2009) | 1 line #6576: fix cross-refs in re docs. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/re.rst Modified: python/branches/py3k/Doc/library/re.rst ============================================================================== --- python/branches/py3k/Doc/library/re.rst (original) +++ python/branches/py3k/Doc/library/re.rst Sun Jul 26 17:03:49 2009 @@ -221,7 +221,7 @@ flags are described in :ref:`contents-of-module-re`.) This is useful if you wish to include the flags as part of the regular expression, instead of passing a *flag* argument to the - :func:`compile` function. + :func:`re.compile` function. Note that the ``(?x)`` flag changes how the expression is parsed. It should be used first in the expression string, or after one or more whitespace characters. @@ -464,9 +464,9 @@ result = re.match(pattern, string) - but using :func:`compile` and saving the resulting regular expression object - for reuse is more efficient when the expression will be used several times - in a single program. + but using :func:`re.compile` and saving the resulting regular expression + object for reuse is more efficient when the expression will be used several + times in a single program. .. note:: @@ -564,7 +564,7 @@ .. note:: - If you want to locate a match anywhere in *string*, use :meth:`search` + If you want to locate a match anywhere in *string*, use :func:`search` instead. @@ -720,8 +720,8 @@ .. note:: - If you want to locate a match anywhere in *string*, use :meth:`search` - instead. + If you want to locate a match anywhere in *string*, use + :meth:`~RegexObject.search` instead. The optional second parameter *pos* gives an index in the string where the search is to start; it defaults to ``0``. This is not completely equivalent to @@ -750,7 +750,7 @@ is different from finding a zero-length match at some point in the string. The optional *pos* and *endpos* parameters have the same meaning as for the - :meth:`match` method. + :meth:`~RegexObject.match` method. .. method:: RegexObject.split(string[, maxsplit=0]) @@ -814,10 +814,10 @@ .. method:: MatchObject.expand(template) Return the string obtained by doing backslash substitution on the template - string *template*, as done by the :meth:`sub` method. Escapes such as ``\n`` are - converted to the appropriate characters, and numeric backreferences (``\1``, - ``\2``) and named backreferences (``\g<1>``, ``\g``) are replaced by the - contents of the corresponding group. + string *template*, as done by the :meth:`~RegexObject.sub` method. Escapes + such as ``\n`` are converted to the appropriate characters, and numeric + backreferences (``\1``, ``\2``) and named backreferences (``\g<1>``, + ``\g``) are replaced by the contents of the corresponding group. .. method:: MatchObject.group([group1, ...]) @@ -938,16 +938,16 @@ .. attribute:: MatchObject.pos - The value of *pos* which was passed to the :func:`search` or :func:`match` - method of the :class:`RegexObject`. This is the index into the string at which - the RE engine started looking for a match. + The value of *pos* which was passed to the :meth:`~RegexObject.search` or + :meth:`~RegexObject.match` method of the :class:`RegexObject`. This is the + index into the string at which the RE engine started looking for a match. .. attribute:: MatchObject.endpos - The value of *endpos* which was passed to the :func:`search` or :func:`match` - method of the :class:`RegexObject`. This is the index into the string beyond - which the RE engine will not go. + The value of *endpos* which was passed to the :meth:`~RegexObject.search` or + :meth:`~RegexObject.match` method of the :class:`RegexObject`. This is the + index into the string beyond which the RE engine will not go. .. attribute:: MatchObject.lastindex @@ -967,13 +967,15 @@ .. attribute:: MatchObject.re - The regular expression object whose :meth:`match` or :meth:`search` method - produced this :class:`MatchObject` instance. + The regular expression object whose :meth:`~RegexObject.match` or + :meth:`~RegexObject.search` method produced this :class:`MatchObject` + instance. .. attribute:: MatchObject.string - The string passed to :func:`match` or :func:`search`. + The string passed to :meth:`~RegexObject.match` or + :meth:`~RegexObject.search`. Examples @@ -1018,8 +1020,9 @@ >>> displaymatch(pair.match("354aa")) # Pair of aces. "" -To find out what card the pair consists of, one could use the :func:`group` -method of :class:`MatchObject` in the following manner: +To find out what card the pair consists of, one could use the +:meth:`~MatchObject.group` method of :class:`MatchObject` in the following +manner: .. doctest:: From python-checkins at python.org Sun Jul 26 23:11:47 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 26 Jul 2009 21:11:47 -0000 Subject: [Python-checkins] r74215 - python/branches/release26-maint/Lib/inspect.py Message-ID: Author: michael.foord Date: Sun Jul 26 23:11:42 2009 New Revision: 74215 Log: Issue 6581. Michael Foord Modified: python/branches/release26-maint/Lib/inspect.py Modified: python/branches/release26-maint/Lib/inspect.py ============================================================================== --- python/branches/release26-maint/Lib/inspect.py (original) +++ python/branches/release26-maint/Lib/inspect.py Sun Jul 26 23:11:42 2009 @@ -947,7 +947,10 @@ tb = tb.tb_next return framelist -currentframe = sys._getframe +if hasattr(sys, '_getframe'): + currentframe = sys._getframe +else: + currentframe = lambda _=None: None def stack(context=1): """Return a list of records for the stack above the caller's frame.""" From python-checkins at python.org Sun Jul 26 23:12:14 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 26 Jul 2009 21:12:14 -0000 Subject: [Python-checkins] r74216 - python/trunk/Lib/inspect.py Message-ID: Author: michael.foord Date: Sun Jul 26 23:12:14 2009 New Revision: 74216 Log: Issue 6581. Michael Foord Modified: python/trunk/Lib/inspect.py Modified: python/trunk/Lib/inspect.py ============================================================================== --- python/trunk/Lib/inspect.py (original) +++ python/trunk/Lib/inspect.py Sun Jul 26 23:12:14 2009 @@ -952,7 +952,10 @@ tb = tb.tb_next return framelist -currentframe = sys._getframe +if hasattr(sys, '_getframe'): + currentframe = sys._getframe +else: + currentframe = lambda _=None: None def stack(context=1): """Return a list of records for the stack above the caller's frame.""" From nnorwitz at gmail.com Sun Jul 26 23:57:11 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 26 Jul 2009 17:57:11 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (3) Message-ID: <20090726215711.GA10233@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 test_softspace leaked [0, -77, 0] references, sum=-77 Less important issues: ---------------------- test_asynchat leaked [0, 128, -128] references, sum=0 test_cmd_line leaked [0, 25, 0] references, sum=25 test_smtplib leaked [-88, 0, 3] references, sum=-85 test_socketserver leaked [0, 0, 77] references, sum=77 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, 0, -8] references, sum=-8 test_urllib2_localnet leaked [0, 283, -283] references, sum=0 test_xmlrpc leaked [0, 0, 85] references, sum=85 From python-checkins at python.org Mon Jul 27 00:23:04 2009 From: python-checkins at python.org (jack.diederich) Date: Sun, 26 Jul 2009 22:23:04 -0000 Subject: [Python-checkins] r74217 - in python/branches/py3k: Lib/telnetlib.py Lib/test/test_telnetlib.py Misc/ACKS Misc/NEWS Message-ID: Author: jack.diederich Date: Mon Jul 27 00:23:04 2009 New Revision: 74217 Log: - fix issue #6106, Telnet.process_rawq default handling of WILL/WONT/DO/DONT Modified: python/branches/py3k/Lib/telnetlib.py python/branches/py3k/Lib/test/test_telnetlib.py python/branches/py3k/Misc/ACKS python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/telnetlib.py ============================================================================== --- python/branches/py3k/Lib/telnetlib.py (original) +++ python/branches/py3k/Lib/telnetlib.py Mon Jul 27 00:23:04 2009 @@ -459,7 +459,7 @@ # unless we did a WILL/DO before. self.msg('IAC %d not recognized' % ord(c)) elif len(self.iacseq) == 2: - cmd = self.iacseq[1] + cmd = self.iacseq[1:2] self.iacseq = b'' opt = c if cmd in (DO, DONT): Modified: python/branches/py3k/Lib/test/test_telnetlib.py ============================================================================== --- python/branches/py3k/Lib/test/test_telnetlib.py (original) +++ python/branches/py3k/Lib/test/test_telnetlib.py Mon Jul 27 00:23:04 2009 @@ -3,6 +3,8 @@ import telnetlib import time import queue +import sys +import io from unittest import TestCase from test import support @@ -304,6 +306,20 @@ self.sb_seen += sb_data tl = telnetlib + +class TelnetDebuglevel(tl.Telnet): + ''' Telnet-alike that captures messages written to stdout when + debuglevel > 0 + ''' + _messages = '' + def msg(self, msg, *args): + orig_stdout = sys.stdout + sys.stdout = fake_stdout = io.StringIO() + tl.Telnet.msg(self, msg, *args) + self._messages += fake_stdout.getvalue() + sys.stdout = orig_stdout + return + class OptionTests(TestCase): setUp = _read_setUp tearDown = _read_tearDown @@ -363,6 +379,36 @@ self.assertEqual(b'', telnet.read_sb_data()) nego.sb_getter = None # break the nego => telnet cycle + def _test_debuglevel(self, data, expected_msg): + """ helper for testing debuglevel messages """ + self.setUp() + self.dataq.put(data) + telnet = TelnetDebuglevel(HOST, self.port) + telnet.set_debuglevel(1) + self.dataq.join() + txt = telnet.read_all() + self.assertTrue(expected_msg in telnet._messages, + msg=(telnet._messages, expected_msg)) + self.tearDown() + + def test_debuglevel(self): + # test all the various places that self.msg(...) is called + given_a_expect_b = [ + # Telnet.fill_rawq + (b'a', ": recv b''\n"), + # Telnet.process_rawq + (tl.IAC + bytes([88]), ": IAC 88 not recognized\n"), + (tl.IAC + tl.DO + bytes([1]), ": IAC DO 1\n"), + (tl.IAC + tl.DONT + bytes([1]), ": IAC DONT 1\n"), + (tl.IAC + tl.WILL + bytes([1]), ": IAC WILL 1\n"), + (tl.IAC + tl.WONT + bytes([1]), ": IAC WONT 1\n"), + # Telnet.write + # XXX, untested + ] + for a, b in given_a_expect_b: + self._test_debuglevel([a, EOF_sigil], b) + return + def test_main(verbose=None): support.run_unittest(GeneralTests, ReadTests, OptionTests) Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Mon Jul 27 00:23:04 2009 @@ -709,6 +709,7 @@ Ken Stox Dan Stromberg Daniel Stutzbach +Pal Subbiah Nathan Sullivan Mark Summerfield Hisao Suzuki Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Jul 27 00:23:04 2009 @@ -60,6 +60,9 @@ Library ------- +- Issue #6106: telnetlib.Telnet.process_rawq doesn't handle default WILL/WONT + DO/DONT correctly. + - Issue #1424152: Fix for http.client, urllib.request to support SSL while working through proxy. Original patch by Christopher Li, changes made by Senthil Kumaran From python-checkins at python.org Mon Jul 27 03:14:38 2009 From: python-checkins at python.org (r.david.murray) Date: Mon, 27 Jul 2009 01:14:38 -0000 Subject: [Python-checkins] r74218 - python/branches/release26-maint/Lib/test/test_os.py Message-ID: Author: r.david.murray Date: Mon Jul 27 03:14:38 2009 New Revision: 74218 Log: Remove unittest.SkipTest from backport of test for issue 6542. Modified: python/branches/release26-maint/Lib/test/test_os.py Modified: python/branches/release26-maint/Lib/test/test_os.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_os.py (original) +++ python/branches/release26-maint/Lib/test/test_os.py Mon Jul 27 03:14:38 2009 @@ -565,8 +565,9 @@ else: break if i < 2: - raise unittest.SkipTest( - "Unable to acquire a range of invalid file descriptors") + # Unable to acquire a range of invalid file descriptors, + # so skip the test (in 2.6+ this is a unittest.SkipTest). + return self.assertEqual(os.closerange(fd, fd + i-1), None) def test_dup2(self): From python-checkins at python.org Mon Jul 27 03:58:26 2009 From: python-checkins at python.org (eric.smith) Date: Mon, 27 Jul 2009 01:58:26 -0000 Subject: [Python-checkins] r74219 - python/trunk/Objects/stringlib/formatter.h Message-ID: Author: eric.smith Date: Mon Jul 27 03:58:25 2009 New Revision: 74219 Log: Sync trunk and py3k versions of string formatting. Will manually merge into py3k. Modified: python/trunk/Objects/stringlib/formatter.h Modified: python/trunk/Objects/stringlib/formatter.h ============================================================================== --- python/trunk/Objects/stringlib/formatter.h (original) +++ python/trunk/Objects/stringlib/formatter.h Mon Jul 27 03:58:25 2009 @@ -920,9 +920,12 @@ format the result. We take care of that later. */ type = 'g'; +#if PY_VERSION_HEX < 0x0301000 /* 'F' is the same as 'f', per the PEP */ + /* This is no longer the case in 3.x */ if (type == 'F') type = 'f'; +#endif val = PyFloat_AsDouble(value); if (val == -1.0 && PyErr_Occurred()) @@ -1114,9 +1117,12 @@ format the result. We take care of that later. */ type = 'g'; +#if PY_VERSION_HEX < 0x03010000 + /* This is no longer the case in 3.x */ /* 'F' is the same as 'f', per the PEP */ if (type == 'F') type = 'f'; +#endif if (precision < 0) precision = default_precision; From python-checkins at python.org Mon Jul 27 03:59:03 2009 From: python-checkins at python.org (eric.smith) Date: Mon, 27 Jul 2009 01:59:03 -0000 Subject: [Python-checkins] r74220 - python/branches/release26-maint Message-ID: Author: eric.smith Date: Mon Jul 27 03:59:02 2009 New Revision: 74220 Log: Blocked revisions 74219 via svnmerge ........ r74219 | eric.smith | 2009-07-26 21:58:25 -0400 (Sun, 26 Jul 2009) | 1 line Sync trunk and py3k versions of string formatting. Will manually merge into py3k. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Mon Jul 27 04:00:12 2009 From: python-checkins at python.org (eric.smith) Date: Mon, 27 Jul 2009 02:00:12 -0000 Subject: [Python-checkins] r74221 - python/branches/py3k Message-ID: Author: eric.smith Date: Mon Jul 27 04:00:11 2009 New Revision: 74221 Log: Blocked revisions 74219 via svnmerge ........ r74219 | eric.smith | 2009-07-26 21:58:25 -0400 (Sun, 26 Jul 2009) | 1 line Sync trunk and py3k versions of string formatting. Will manually merge into py3k. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Mon Jul 27 04:10:42 2009 From: python-checkins at python.org (eric.smith) Date: Mon, 27 Jul 2009 02:10:42 -0000 Subject: [Python-checkins] r74222 - python/branches/py3k/Objects/stringlib/formatter.h Message-ID: Author: eric.smith Date: Mon Jul 27 04:10:42 2009 New Revision: 74222 Log: Sync trunk and py3k versions of string formatting. Manual merge of r74219. Modified: python/branches/py3k/Objects/stringlib/formatter.h Modified: python/branches/py3k/Objects/stringlib/formatter.h ============================================================================== --- python/branches/py3k/Objects/stringlib/formatter.h (original) +++ python/branches/py3k/Objects/stringlib/formatter.h Mon Jul 27 04:10:42 2009 @@ -920,6 +920,13 @@ format the result. We take care of that later. */ type = 'g'; +#if PY_VERSION_HEX < 0x0301000 + /* 'F' is the same as 'f', per the PEP */ + /* This is no longer the case in 3.x */ + if (type == 'F') + type = 'f'; +#endif + val = PyFloat_AsDouble(value); if (val == -1.0 && PyErr_Occurred()) goto done; @@ -935,15 +942,8 @@ #if PY_VERSION_HEX < 0x03010000 /* 3.1 no longer converts large 'f' to 'g'. */ - if (fabs(val) >= 1e50) - switch (type) { - case 'f': - type = 'g'; - break; - case 'F': - type = 'G'; - break; - } + if ((type == 'f' || type == 'F') && fabs(val) >= 1e50) + type = 'g'; #endif /* Cast "type", because if we're in unicode we need to pass a @@ -1117,6 +1117,13 @@ format the result. We take care of that later. */ type = 'g'; +#if PY_VERSION_HEX < 0x03010000 + /* This is no longer the case in 3.x */ + /* 'F' is the same as 'f', per the PEP */ + if (type == 'F') + type = 'f'; +#endif + if (precision < 0) precision = default_precision; From python-checkins at python.org Mon Jul 27 04:12:11 2009 From: python-checkins at python.org (eric.smith) Date: Mon, 27 Jul 2009 02:12:11 -0000 Subject: [Python-checkins] r74223 - in python/branches/release31-maint: Objects/stringlib/formatter.h Message-ID: Author: eric.smith Date: Mon Jul 27 04:12:11 2009 New Revision: 74223 Log: Merged revisions 74222 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74222 | eric.smith | 2009-07-26 22:10:42 -0400 (Sun, 26 Jul 2009) | 1 line Sync trunk and py3k versions of string formatting. Manual merge of r74219. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Objects/stringlib/formatter.h Modified: python/branches/release31-maint/Objects/stringlib/formatter.h ============================================================================== --- python/branches/release31-maint/Objects/stringlib/formatter.h (original) +++ python/branches/release31-maint/Objects/stringlib/formatter.h Mon Jul 27 04:12:11 2009 @@ -920,6 +920,13 @@ format the result. We take care of that later. */ type = 'g'; +#if PY_VERSION_HEX < 0x0301000 + /* 'F' is the same as 'f', per the PEP */ + /* This is no longer the case in 3.x */ + if (type == 'F') + type = 'f'; +#endif + val = PyFloat_AsDouble(value); if (val == -1.0 && PyErr_Occurred()) goto done; @@ -935,15 +942,8 @@ #if PY_VERSION_HEX < 0x03010000 /* 3.1 no longer converts large 'f' to 'g'. */ - if (fabs(val) >= 1e50) - switch (type) { - case 'f': - type = 'g'; - break; - case 'F': - type = 'G'; - break; - } + if ((type == 'f' || type == 'F') && fabs(val) >= 1e50) + type = 'g'; #endif /* Cast "type", because if we're in unicode we need to pass a @@ -1117,6 +1117,13 @@ format the result. We take care of that later. */ type = 'g'; +#if PY_VERSION_HEX < 0x03010000 + /* This is no longer the case in 3.x */ + /* 'F' is the same as 'f', per the PEP */ + if (type == 'F') + type = 'f'; +#endif + if (precision < 0) precision = default_precision; From python-checkins at python.org Mon Jul 27 11:03:14 2009 From: python-checkins at python.org (jack.diederich) Date: Mon, 27 Jul 2009 09:03:14 -0000 Subject: [Python-checkins] r74224 - python/branches/py3k/Misc/ACKS Message-ID: Author: jack.diederich Date: Mon Jul 27 11:03:14 2009 New Revision: 74224 Log: - belated ACK for issue #6106 Modified: python/branches/py3k/Misc/ACKS Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Mon Jul 27 11:03:14 2009 @@ -803,6 +803,7 @@ Lars Wirzenius Chris Withers Stefan Witzel +Irek Wlizlo David Wolever Klaus-Juergen Wolf Dan Wolfe From nnorwitz at gmail.com Mon Jul 27 11:43:10 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Mon, 27 Jul 2009 05:43:10 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (5) Message-ID: <20090727094310.GA26875@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 test_softspace leaked [-91, 0, 0] references, sum=-91 test_ssl leaked [0, 0, -81] references, sum=-81 test_urllib2_localnet leaked [0, 0, 283] references, sum=283 Less important issues: ---------------------- test_asynchat leaked [0, 126, -126] references, sum=0 test_cmd_line leaked [50, 0, 0] references, sum=50 test_file2k leaked [80, -80, 0] references, sum=0 test_smtplib leaked [-159, 102, -102] references, sum=-159 test_socketserver leaked [0, 0, 91] references, sum=91 test_sys leaked [-21, -21, 0] references, sum=-42 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, 0, -8] references, sum=-8 From python-checkins at python.org Mon Jul 27 18:09:29 2009 From: python-checkins at python.org (kurt.kaiser) Date: Mon, 27 Jul 2009 16:09:29 -0000 Subject: [Python-checkins] r74225 - python/trunk/Misc/build.sh Message-ID: Author: kurt.kaiser Date: Mon Jul 27 18:09:28 2009 New Revision: 74225 Log: 1. Clean workspace more thoughly before build. 2. Add url of branch we are building to 'results' webpage. (url is now available in $repo_path, could be added to failure email.) 3. Adjust permissions to improve upload reliability. Modified: python/trunk/Misc/build.sh Modified: python/trunk/Misc/build.sh ============================================================================== --- python/trunk/Misc/build.sh (original) +++ python/trunk/Misc/build.sh Mon Jul 27 18:09:28 2009 @@ -4,9 +4,11 @@ ## does this: ## svn up ; ./configure ; make ; make test ; make install ; cd Doc ; make ## -## Logs are kept and rsync'ed to the host. If there are test failure(s), +## Logs are kept and rsync'ed to the webhost. If there are test failure(s), ## information about the failure(s) is mailed. ## +## The user must be a member of the webmaster group locally and on webhost. +## ## This script is run on the PSF's machine as user neal via crontab. ## ## Yes, this script would probably be easier in python, but then @@ -74,7 +76,8 @@ # test_compiler almost never finishes with the same number of refs # since it depends on other modules, skip it. # test_logging causes hangs, skip it. -LEAKY_SKIPS="-x test_compiler test_logging" +# KBK 21Apr09: test_httpservers causes hangs, skip for now. +LEAKY_SKIPS="-x test_compiler test_logging test_httpservers" # Change this flag to "yes" for old releases to only update/build the docs. BUILD_DISABLED="no" @@ -131,9 +134,14 @@ ## setup cd $DIR +make clobber /dev/null 2>&1 +cp -p Modules/Setup.dist Modules/Setup +# But maybe there was no Makefile - we are only building docs. Clear build: +rm -rf build/ mkdir -p build -rm -f $RESULT_FILE build/*.out rm -rf $INSTALL_DIR +## get the path we are building +repo_path=$(grep "url=" .svn/entries | sed -e s/\\W*url=// -e s/\"//g) ## create results file TITLE="Automated Python Build Results" @@ -151,6 +159,8 @@ echo " Hostname:`uname -n`" >> $RESULT_FILE echo " " >> $RESULT_FILE echo " Platform:`uname -srmpo`" >> $RESULT_FILE +echo " " >> $RESULT_FILE +echo " URL:$repo_path" >> $RESULT_FILE echo " " >> $RESULT_FILE echo "" >> $RESULT_FILE echo "
      " >> $RESULT_FILE @@ -221,7 +231,7 @@ start=`current_time` ## ensure that the reflog exists so the grep doesn't fail touch $REFLOG - $PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network,urlfetch $LEAKY_SKIPS >& build/$F + $PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network $LEAKY_SKIPS >& build/$F LEAK_PAT="($LEAKY_TESTS|sum=0)" NUM_FAILURES=`egrep -vc "$LEAK_PAT" $REFLOG` place_summary_first build/$F @@ -257,13 +267,13 @@ # which will definitely fail with a conflict. #CONFLICTED_FILE=commontex/boilerplate.tex #conflict_count=`grep -c "<<<" $CONFLICTED_FILE` -make clean conflict_count=0 if [ $conflict_count != 0 ]; then echo "Conflict detected in $CONFLICTED_FILE. Doc build skipped." > ../build/$F err=1 else - make checkout update html >& ../build/$F + make clean > ../build/$F 2>&1 + make checkout update html >> ../build/$F 2>&1 err=$? fi update_status "Making doc" "$F" $start @@ -277,6 +287,8 @@ echo "" >> $RESULT_FILE ## copy results +chgrp -R webmaster build/html +chmod -R g+w build/html rsync $RSYNC_OPTS build/html/* $REMOTE_SYSTEM:$REMOTE_DIR cd ../build rsync $RSYNC_OPTS index.html *.out $REMOTE_SYSTEM:$REMOTE_DIR/results/ From python-checkins at python.org Mon Jul 27 22:16:37 2009 From: python-checkins at python.org (raymond.hettinger) Date: Mon, 27 Jul 2009 20:16:37 -0000 Subject: [Python-checkins] r74226 - in python/branches/py3k: Lib/test/test_set.py Misc/NEWS Objects/setobject.c Message-ID: Author: raymond.hettinger Date: Mon Jul 27 22:16:37 2009 New Revision: 74226 Log: Issue 6573: Fix set.union() for cases where self is in the argument chain. Modified: python/branches/py3k/Lib/test/test_set.py python/branches/py3k/Misc/NEWS python/branches/py3k/Objects/setobject.c Modified: python/branches/py3k/Lib/test/test_set.py ============================================================================== --- python/branches/py3k/Lib/test/test_set.py (original) +++ python/branches/py3k/Lib/test/test_set.py Mon Jul 27 22:16:37 2009 @@ -82,6 +82,10 @@ self.assertEqual(self.thetype('abcba').union(C('ef')), set('abcef')) self.assertEqual(self.thetype('abcba').union(C('ef'), C('fg')), set('abcefg')) + # Issue #6573 + x = self.thetype() + self.assertEqual(x.union(set([1]), x, set([2])), self.thetype([1, 2])) + def test_or(self): i = self.s.union(self.otherword) self.assertEqual(self.s | set(self.otherword), i) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Jul 27 22:16:37 2009 @@ -14,6 +14,9 @@ - Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. +- Issue #6573: set.union() stopped processing inputs if an instance of self + occurred in the argument chain. + - Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set. Modified: python/branches/py3k/Objects/setobject.c ============================================================================== --- python/branches/py3k/Objects/setobject.c (original) +++ python/branches/py3k/Objects/setobject.c Mon Jul 27 22:16:37 2009 @@ -1187,7 +1187,7 @@ for (i=0 ; i Author: raymond.hettinger Date: Mon Jul 27 22:29:18 2009 New Revision: 74227 Log: Issue 6573: Fix set.union() for cases where self is in the argument chain. Modified: python/branches/release31-maint/Lib/test/test_set.py python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Objects/setobject.c Modified: python/branches/release31-maint/Lib/test/test_set.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_set.py (original) +++ python/branches/release31-maint/Lib/test/test_set.py Mon Jul 27 22:29:18 2009 @@ -82,6 +82,10 @@ self.assertEqual(self.thetype('abcba').union(C('ef')), set('abcef')) self.assertEqual(self.thetype('abcba').union(C('ef'), C('fg')), set('abcefg')) + # Issue #6573 + x = self.thetype() + self.assertEqual(x.union(set([1]), x, set([2])), self.thetype([1, 2])) + def test_or(self): i = self.s.union(self.otherword) self.assertEqual(self.s | set(self.otherword), i) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Mon Jul 27 22:29:18 2009 @@ -14,6 +14,9 @@ - Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. +- Issue #6573: set.union() stopped processing inputs if an instance of self + occurred in the argument chain. + - Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set. Modified: python/branches/release31-maint/Objects/setobject.c ============================================================================== --- python/branches/release31-maint/Objects/setobject.c (original) +++ python/branches/release31-maint/Objects/setobject.c Mon Jul 27 22:29:18 2009 @@ -1187,7 +1187,7 @@ for (i=0 ; i Author: raymond.hettinger Date: Mon Jul 27 22:32:04 2009 New Revision: 74228 Log: Issue 6573: Fix set.union() for cases where self is in the argument chain. Modified: python/trunk/Lib/test/test_set.py python/trunk/Misc/NEWS python/trunk/Objects/setobject.c Modified: python/trunk/Lib/test/test_set.py ============================================================================== --- python/trunk/Lib/test/test_set.py (original) +++ python/trunk/Lib/test/test_set.py Mon Jul 27 22:32:04 2009 @@ -81,6 +81,10 @@ self.assertEqual(self.thetype('abcba').union(C('ef')), set('abcef')) self.assertEqual(self.thetype('abcba').union(C('ef'), C('fg')), set('abcefg')) + # Issue #6573 + x = self.thetype() + self.assertEqual(x.union(set([1]), x, set([2])), self.thetype([1, 2])) + def test_or(self): i = self.s.union(self.otherword) self.assertEqual(self.s | set(self.otherword), i) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jul 27 22:32:04 2009 @@ -14,6 +14,9 @@ - Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. +- Issue #6573: set.union() stopped processing inputs if an instance of self + occurred in the argument chain. + - Issue #1616979: Added the cp720 (Arabic DOS) encoding. - Issue #6070: On posix platforms import no longer copies the execute bit Modified: python/trunk/Objects/setobject.c ============================================================================== --- python/trunk/Objects/setobject.c (original) +++ python/trunk/Objects/setobject.c Mon Jul 27 22:32:04 2009 @@ -1183,7 +1183,7 @@ for (i=0 ; i Author: raymond.hettinger Date: Mon Jul 27 22:33:25 2009 New Revision: 74229 Log: Issue 6573: Fix set.union() for cases where self is in the argument chain. Modified: python/branches/release26-maint/Lib/test/test_set.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Objects/setobject.c Modified: python/branches/release26-maint/Lib/test/test_set.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_set.py (original) +++ python/branches/release26-maint/Lib/test/test_set.py Mon Jul 27 22:33:25 2009 @@ -81,6 +81,10 @@ self.assertEqual(self.thetype('abcba').union(C('ef')), set('abcef')) self.assertEqual(self.thetype('abcba').union(C('ef'), C('fg')), set('abcefg')) + # Issue #6573 + x = self.thetype() + self.assertEqual(x.union(set([1]), x, set([2])), self.thetype([1, 2])) + def test_or(self): i = self.s.union(self.otherword) self.assertEqual(self.s | set(self.otherword), i) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Mon Jul 27 22:33:25 2009 @@ -14,6 +14,9 @@ - Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. +- Issue #6573: set.union() stopped processing inputs if an instance of self + occurred in the argument chain. + - Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set. Modified: python/branches/release26-maint/Objects/setobject.c ============================================================================== --- python/branches/release26-maint/Objects/setobject.c (original) +++ python/branches/release26-maint/Objects/setobject.c Mon Jul 27 22:33:25 2009 @@ -1183,7 +1183,7 @@ for (i=0 ; i More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 Less important issues: ---------------------- test_asynchat leaked [0, 130, -130] references, sum=0 test_file2k leaked [0, 0, 82] references, sum=82 test_popen2 leaked [-25, 29, -4] references, sum=0 test_smtplib leaked [82, 6, -88] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 From nnorwitz at gmail.com Tue Jul 28 11:43:05 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 28 Jul 2009 05:43:05 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (4) Message-ID: <20090728094305.GA25436@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 test_ssl leaked [0, 0, -420] references, sum=-420 test_urllib2_localnet leaked [-283, 0, 0] references, sum=-283 Less important issues: ---------------------- test_asynchat leaked [139, -139, 0] references, sum=0 test_file2k leaked [83, -83, 83] references, sum=83 test_smtplib leaked [91, -91, 88] references, sum=88 test_sys leaked [-21, 0, 42] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Tue Jul 28 18:12:40 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 16:12:40 -0000 Subject: [Python-checkins] r74230 - python/trunk/Doc/library/cmath.rst Message-ID: Author: mark.dickinson Date: Tue Jul 28 18:12:40 2009 New Revision: 74230 Log: Issue #6458: Reorganize cmath documentation into sections (similar to the way that the math documentation is organized); clarify section on conversions to and from polar coordinates. Modified: python/trunk/Doc/library/cmath.rst Modified: python/trunk/Doc/library/cmath.rst ============================================================================== --- python/trunk/Doc/library/cmath.rst (original) +++ python/trunk/Doc/library/cmath.rst Tue Jul 28 18:12:40 2009 @@ -23,100 +23,112 @@ support signed zeros the continuity is as specified below. -Complex coordinates -------------------- +Conversions to and from polar coordinates +----------------------------------------- -Complex numbers can be expressed by two important coordinate systems. -Python's :class:`complex` type uses rectangular coordinates where a number -on the complex plane is defined by two floats, the real part and the imaginary -part. - -Definition:: - - z = x + 1j * y - - x := z.real - y := z.imag - -In engineering the polar coordinate system is popular for complex numbers. In -polar coordinates a complex number is defined by the radius *r* and the phase -angle *phi*. The radius *r* is the absolute value of the complex, which can be -viewed as distance from (0, 0). The radius *r* is always 0 or a positive float. -The phase angle *phi* is the counter clockwise angle from the positive x axis, -e.g. *1* has the angle *0*, *1j* has the angle *?/2* and *-1* the angle *-?*. - -.. note:: - While :func:`phase` and func:`polar` return *+?* for a negative real they - may return *-?* for a complex with a very small negative imaginary - part, e.g. *-1-1E-300j*. +A Python complex number ``z`` is stored internally using *rectangular* +or *Cartesian* coordinates. It is completely determined by its *real +part* ``z.real`` and its *imaginary part* ``z.imag``. In other +words:: + + z == z.real + z.imag*1j + +*Polar coordinates* give an alternative way to represent a complex +number. In polar coordinates, a complex number *z* is defined by the +modulus *r* and the phase angle *phi*. The modulus *r* is the distance +from *z* to the origin, while the phase *phi* is the counterclockwise +angle from the positive x-axis to the line segment that joins the +origin to *z*. +The following functions can be used to convert from the native +rectangular coordinates to polar coordinates and back. -Definition:: - - z = r * exp(1j * phi) - z = r * cis(phi) +.. function:: phase(x) - r := abs(z) := sqrt(real(z)**2 + imag(z)**2) - phi := phase(z) := atan2(imag(z), real(z)) - cis(phi) := cos(phi) + 1j * sin(phi) + Return the phase of *x* (also known as the *argument* of *x*), as a + float. ``phase(x)`` is equivalent to ``math.atan2(x.imag, + x.real)``. The result lies in the range [-?, ?], and the branch + cut for this operation lies along the negative real axis, + continuous from above. On systems with support for signed zeros + (which includes most systems in current use), this means that the + sign of the result is the same as the sign of ``x.imag``, even when + ``x.imag`` is zero:: + + >>> phase(complex(-1.0, 0.0)) + 3.1415926535897931 + >>> phase(complex(-1.0, -0.0)) + -3.1415926535897931 + .. versionadded:: 2.6 -.. function:: phase(x) - Return phase, also known as the argument, of a complex. +.. note:: - .. versionadded:: 2.6 + The modulus (absolute value) of a complex number *x* can be + computed using the built-in :func:`abs` function. There is no + separate :mod:`cmath` module function for this operation. .. function:: polar(x) - Convert a :class:`complex` from rectangular coordinates to polar - coordinates. The function returns a tuple with the two elements - *r* and *phi*. *r* is the distance from 0 and *phi* the phase - angle. + Return the representation of *x* in polar coordinates. Returns a + pair ``(r, phi)`` where *r* is the modulus of *x* and phi is the + phase of *x*. ``polar(x)`` is equivalent to ``(abs(x), + phase(x))``. .. versionadded:: 2.6 .. function:: rect(r, phi) - Convert from polar coordinates to rectangular coordinates and return - a :class:`complex`. + Return the complex number *x* with polar coordinates *r* and *phi*. + Equivalent to ``r * (math.cos(phi) + math.sin(phi)*1j)``. .. versionadded:: 2.6 +Power and logarithmic functions +------------------------------- -cmath functions ---------------- +.. function:: exp(x) -.. function:: acos(x) + Return the exponential value ``e**x``. - Return the arc cosine of *x*. There are two branch cuts: One extends right from - 1 along the real axis to ?, continuous from below. The other extends left from - -1 along the real axis to -?, continuous from above. +.. function:: log(x[, base]) -.. function:: acosh(x) + Returns the logarithm of *x* to the given *base*. If the *base* is not + specified, returns the natural logarithm of *x*. There is one branch cut, from 0 + along the negative real axis to -?, continuous from above. - Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left - from 1 along the real axis to -?, continuous from above. + .. versionchanged:: 2.4 + *base* argument added. -.. function:: asin(x) +.. function:: log10(x) - Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. + Return the base-10 logarithm of *x*. This has the same branch cut as + :func:`log`. -.. function:: asinh(x) +.. function:: sqrt(x) - Return the hyperbolic arc sine of *x*. There are two branch cuts: - One extends from ``1j`` along the imaginary axis to ``?j``, - continuous from the right. The other extends from ``-1j`` along - the imaginary axis to ``-?j``, continuous from the left. + Return the square root of *x*. This has the same branch cut as :func:`log`. - .. versionchanged:: 2.6 - branch cuts moved to match those recommended by the C99 standard + +Trigonometric functions +----------------------- + +.. function:: acos(x) + + Return the arc cosine of *x*. There are two branch cuts: One extends right from + 1 along the real axis to ?, continuous from below. The other extends left from + -1 along the real axis to -?, continuous from above. + + +.. function:: asin(x) + + Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. .. function:: atan(x) @@ -130,88 +142,87 @@ direction of continuity of upper cut reversed -.. function:: atanh(x) - - Return the hyperbolic arc tangent of *x*. There are two branch cuts: One - extends from ``1`` along the real axis to ``?``, continuous from below. The - other extends from ``-1`` along the real axis to ``-?``, continuous from - above. - - .. versionchanged:: 2.6 - direction of continuity of right cut reversed - - .. function:: cos(x) Return the cosine of *x*. -.. function:: cosh(x) +.. function:: sin(x) - Return the hyperbolic cosine of *x*. + Return the sine of *x*. -.. function:: exp(x) +.. function:: tan(x) - Return the exponential value ``e**x``. + Return the tangent of *x*. -.. function:: isinf(x) +Hyperbolic functions +-------------------- - Return *True* if the real or the imaginary part of x is positive - or negative infinity. +.. function:: acosh(x) - .. versionadded:: 2.6 + Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left + from 1 along the real axis to -?, continuous from above. -.. function:: isnan(x) +.. function:: asinh(x) - Return *True* if the real or imaginary part of x is not a number (NaN). + Return the hyperbolic arc sine of *x*. There are two branch cuts: + One extends from ``1j`` along the imaginary axis to ``?j``, + continuous from the right. The other extends from ``-1j`` along + the imaginary axis to ``-?j``, continuous from the left. - .. versionadded:: 2.6 + .. versionchanged:: 2.6 + branch cuts moved to match those recommended by the C99 standard -.. function:: log(x[, base]) +.. function:: atanh(x) - Returns the logarithm of *x* to the given *base*. If the *base* is not - specified, returns the natural logarithm of *x*. There is one branch cut, from 0 - along the negative real axis to -?, continuous from above. + Return the hyperbolic arc tangent of *x*. There are two branch cuts: One + extends from ``1`` along the real axis to ``?``, continuous from below. The + other extends from ``-1`` along the real axis to ``-?``, continuous from + above. - .. versionchanged:: 2.4 - *base* argument added. + .. versionchanged:: 2.6 + direction of continuity of right cut reversed -.. function:: log10(x) +.. function:: cosh(x) - Return the base-10 logarithm of *x*. This has the same branch cut as - :func:`log`. + Return the hyperbolic cosine of *x*. -.. function:: sin(x) +.. function:: sinh(x) - Return the sine of *x*. + Return the hyperbolic sine of *x*. -.. function:: sinh(x) +.. function:: tanh(x) - Return the hyperbolic sine of *x*. + Return the hyperbolic tangent of *x*. -.. function:: sqrt(x) +Classification functions +------------------------ - Return the square root of *x*. This has the same branch cut as :func:`log`. +.. function:: isinf(x) + Return *True* if the real or the imaginary part of x is positive + or negative infinity. -.. function:: tan(x) + .. versionadded:: 2.6 - Return the tangent of *x*. +.. function:: isnan(x) -.. function:: tanh(x) + Return *True* if the real or imaginary part of x is not a number (NaN). + + .. versionadded:: 2.6 - Return the hyperbolic tangent of *x*. -The module also defines two mathematical constants: +Constants +--------- .. data:: pi From python-checkins at python.org Tue Jul 28 18:15:26 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 16:15:26 -0000 Subject: [Python-checkins] r74231 - in python/branches/release26-maint: Doc/library/cmath.rst Message-ID: Author: mark.dickinson Date: Tue Jul 28 18:15:25 2009 New Revision: 74231 Log: Merged revisions 74184,74230 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74184 | georg.brandl | 2009-07-23 08:08:58 +0100 (Thu, 23 Jul 2009) | 1 line #6548: dont suggest existence of real and imag functions in cmath. ........ r74230 | mark.dickinson | 2009-07-28 17:12:40 +0100 (Tue, 28 Jul 2009) | 4 lines Issue #6458: Reorganize cmath documentation into sections (similar to the way that the math documentation is organized); clarify section on conversions to and from polar coordinates. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/cmath.rst Modified: python/branches/release26-maint/Doc/library/cmath.rst ============================================================================== --- python/branches/release26-maint/Doc/library/cmath.rst (original) +++ python/branches/release26-maint/Doc/library/cmath.rst Tue Jul 28 18:15:25 2009 @@ -23,100 +23,112 @@ support signed zeros the continuity is as specified below. -Complex coordinates -------------------- +Conversions to and from polar coordinates +----------------------------------------- -Complex numbers can be expressed by two important coordinate systems. -Python's :class:`complex` type uses rectangular coordinates where a number -on the complex plain is defined by two floats, the real part and the imaginary -part. - -Definition:: - - z = x + 1j * y - - x := real(z) - y := imag(z) - -In engineering the polar coordinate system is popular for complex numbers. In -polar coordinates a complex number is defined by the radius *r* and the phase -angle *phi*. The radius *r* is the absolute value of the complex, which can be -viewed as distance from (0, 0). The radius *r* is always 0 or a positive float. -The phase angle *phi* is the counter clockwise angle from the positive x axis, -e.g. *1* has the angle *0*, *1j* has the angle *?/2* and *-1* the angle *-?*. - -.. note:: - While :func:`phase` and func:`polar` return *+?* for a negative real they - may return *-?* for a complex with a very small negative imaginary - part, e.g. *-1-1E-300j*. +A Python complex number ``z`` is stored internally using *rectangular* +or *Cartesian* coordinates. It is completely determined by its *real +part* ``z.real`` and its *imaginary part* ``z.imag``. In other +words:: + + z == z.real + z.imag*1j + +*Polar coordinates* give an alternative way to represent a complex +number. In polar coordinates, a complex number *z* is defined by the +modulus *r* and the phase angle *phi*. The modulus *r* is the distance +from *z* to the origin, while the phase *phi* is the counterclockwise +angle from the positive x-axis to the line segment that joins the +origin to *z*. +The following functions can be used to convert from the native +rectangular coordinates to polar coordinates and back. -Definition:: - - z = r * exp(1j * phi) - z = r * cis(phi) +.. function:: phase(x) - r := abs(z) := sqrt(real(z)**2 + imag(z)**2) - phi := phase(z) := atan2(imag(z), real(z)) - cis(phi) := cos(phi) + 1j * sin(phi) + Return the phase of *x* (also known as the *argument* of *x*), as a + float. ``phase(x)`` is equivalent to ``math.atan2(x.imag, + x.real)``. The result lies in the range [-?, ?], and the branch + cut for this operation lies along the negative real axis, + continuous from above. On systems with support for signed zeros + (which includes most systems in current use), this means that the + sign of the result is the same as the sign of ``x.imag``, even when + ``x.imag`` is zero:: + + >>> phase(complex(-1.0, 0.0)) + 3.1415926535897931 + >>> phase(complex(-1.0, -0.0)) + -3.1415926535897931 + .. versionadded:: 2.6 -.. function:: phase(x) - Return phase, also known as the argument, of a complex. +.. note:: - .. versionadded:: 2.6 + The modulus (absolute value) of a complex number *x* can be + computed using the built-in :func:`abs` function. There is no + separate :mod:`cmath` module function for this operation. .. function:: polar(x) - Convert a :class:`complex` from rectangular coordinates to polar - coordinates. The function returns a tuple with the two elements - *r* and *phi*. *r* is the distance from 0 and *phi* the phase - angle. + Return the representation of *x* in polar coordinates. Returns a + pair ``(r, phi)`` where *r* is the modulus of *x* and phi is the + phase of *x*. ``polar(x)`` is equivalent to ``(abs(x), + phase(x))``. .. versionadded:: 2.6 .. function:: rect(r, phi) - Convert from polar coordinates to rectangular coordinates and return - a :class:`complex`. + Return the complex number *x* with polar coordinates *r* and *phi*. + Equivalent to ``r * (math.cos(phi) + math.sin(phi)*1j)``. .. versionadded:: 2.6 +Power and logarithmic functions +------------------------------- -cmath functions ---------------- +.. function:: exp(x) -.. function:: acos(x) + Return the exponential value ``e**x``. - Return the arc cosine of *x*. There are two branch cuts: One extends right from - 1 along the real axis to ?, continuous from below. The other extends left from - -1 along the real axis to -?, continuous from above. +.. function:: log(x[, base]) -.. function:: acosh(x) + Returns the logarithm of *x* to the given *base*. If the *base* is not + specified, returns the natural logarithm of *x*. There is one branch cut, from 0 + along the negative real axis to -?, continuous from above. - Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left - from 1 along the real axis to -?, continuous from above. + .. versionchanged:: 2.4 + *base* argument added. -.. function:: asin(x) +.. function:: log10(x) - Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. + Return the base-10 logarithm of *x*. This has the same branch cut as + :func:`log`. -.. function:: asinh(x) +.. function:: sqrt(x) - Return the hyperbolic arc sine of *x*. There are two branch cuts: - One extends from ``1j`` along the imaginary axis to ``?j``, - continuous from the right. The other extends from ``-1j`` along - the imaginary axis to ``-?j``, continuous from the left. + Return the square root of *x*. This has the same branch cut as :func:`log`. - .. versionchanged:: 2.6 - branch cuts moved to match those recommended by the C99 standard + +Trigonometric functions +----------------------- + +.. function:: acos(x) + + Return the arc cosine of *x*. There are two branch cuts: One extends right from + 1 along the real axis to ?, continuous from below. The other extends left from + -1 along the real axis to -?, continuous from above. + + +.. function:: asin(x) + + Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. .. function:: atan(x) @@ -130,93 +142,92 @@ direction of continuity of upper cut reversed -.. function:: atanh(x) - - Return the hyperbolic arc tangent of *x*. There are two branch cuts: One - extends from ``1`` along the real axis to ``?``, continuous from below. The - other extends from ``-1`` along the real axis to ``-?``, continuous from - above. - - .. versionchanged:: 2.6 - direction of continuity of right cut reversed - - .. function:: cos(x) Return the cosine of *x*. -.. function:: cosh(x) +.. function:: sin(x) - Return the hyperbolic cosine of *x*. + Return the sine of *x*. -.. function:: exp(x) +.. function:: tan(x) - Return the exponential value ``e**x``. + Return the tangent of *x*. -.. function:: isinf(x) +Hyperbolic functions +-------------------- - Return *True* if the real or the imaginary part of x is positive - or negative infinity. +.. function:: acosh(x) - .. versionadded:: 2.6 + Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left + from 1 along the real axis to -?, continuous from above. -.. function:: isnan(x) +.. function:: asinh(x) - Return *True* if the real or imaginary part of x is not a number (NaN). + Return the hyperbolic arc sine of *x*. There are two branch cuts: + One extends from ``1j`` along the imaginary axis to ``?j``, + continuous from the right. The other extends from ``-1j`` along + the imaginary axis to ``-?j``, continuous from the left. - .. versionadded:: 2.6 + .. versionchanged:: 2.6 + branch cuts moved to match those recommended by the C99 standard -.. function:: log(x[, base]) +.. function:: atanh(x) - Returns the logarithm of *x* to the given *base*. If the *base* is not - specified, returns the natural logarithm of *x*. There is one branch cut, from 0 - along the negative real axis to -?, continuous from above. + Return the hyperbolic arc tangent of *x*. There are two branch cuts: One + extends from ``1`` along the real axis to ``?``, continuous from below. The + other extends from ``-1`` along the real axis to ``-?``, continuous from + above. - .. versionchanged:: 2.4 - *base* argument added. + .. versionchanged:: 2.6 + direction of continuity of right cut reversed -.. function:: log10(x) +.. function:: cosh(x) - Return the base-10 logarithm of *x*. This has the same branch cut as - :func:`log`. + Return the hyperbolic cosine of *x*. -.. function:: sin(x) +.. function:: sinh(x) - Return the sine of *x*. + Return the hyperbolic sine of *x*. -.. function:: sinh(x) +.. function:: tanh(x) - Return the hyperbolic sine of *x*. + Return the hyperbolic tangent of *x*. -.. function:: sqrt(x) +Classification functions +------------------------ - Return the square root of *x*. This has the same branch cut as :func:`log`. +.. function:: isinf(x) + Return *True* if the real or the imaginary part of x is positive + or negative infinity. -.. function:: tan(x) + .. versionadded:: 2.6 - Return the tangent of *x*. +.. function:: isnan(x) -.. function:: tanh(x) + Return *True* if the real or imaginary part of x is not a number (NaN). + + .. versionadded:: 2.6 - Return the hyperbolic tangent of *x*. -The module also defines two mathematical constants: +Constants +--------- .. data:: pi - The mathematical constant *pi*, as a float. + The mathematical constant *?*, as a float. .. data:: e From python-checkins at python.org Tue Jul 28 18:31:03 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 16:31:03 -0000 Subject: [Python-checkins] r74232 - in python/branches/py3k: Doc/library/cmath.rst Message-ID: Author: mark.dickinson Date: Tue Jul 28 18:31:03 2009 New Revision: 74232 Log: Merged revisions 74184,74230 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74184 | georg.brandl | 2009-07-23 08:08:58 +0100 (Thu, 23 Jul 2009) | 1 line #6548: dont suggest existence of real and imag functions in cmath. ........ r74230 | mark.dickinson | 2009-07-28 17:12:40 +0100 (Tue, 28 Jul 2009) | 4 lines Issue #6458: Reorganize cmath documentation into sections (similar to the way that the math documentation is organized); clarify section on conversions to and from polar coordinates. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/cmath.rst Modified: python/branches/py3k/Doc/library/cmath.rst ============================================================================== --- python/branches/py3k/Doc/library/cmath.rst (original) +++ python/branches/py3k/Doc/library/cmath.rst Tue Jul 28 18:31:03 2009 @@ -22,91 +22,106 @@ support signed zeros the continuity is as specified below. -Complex coordinates -------------------- +Conversions to and from polar coordinates +----------------------------------------- + +A Python complex number ``z`` is stored internally using *rectangular* +or *Cartesian* coordinates. It is completely determined by its *real +part* ``z.real`` and its *imaginary part* ``z.imag``. In other +words:: + + z == z.real + z.imag*1j + +*Polar coordinates* give an alternative way to represent a complex +number. In polar coordinates, a complex number *z* is defined by the +modulus *r* and the phase angle *phi*. The modulus *r* is the distance +from *z* to the origin, while the phase *phi* is the counterclockwise +angle from the positive x-axis to the line segment that joins the +origin to *z*. + +The following functions can be used to convert from the native +rectangular coordinates to polar coordinates and back. + +.. function:: phase(x) + + Return the phase of *x* (also known as the *argument* of *x*), as a + float. ``phase(x)`` is equivalent to ``math.atan2(x.imag, + x.real)``. The result lies in the range [-?, ?], and the branch + cut for this operation lies along the negative real axis, + continuous from above. On systems with support for signed zeros + (which includes most systems in current use), this means that the + sign of the result is the same as the sign of ``x.imag``, even when + ``x.imag`` is zero:: + + >>> phase(complex(-1.0, 0.0)) + 3.141592653589793 + >>> phase(complex(-1.0, -0.0)) + -3.141592653589793 -Complex numbers can be expressed by two important coordinate systems. -Python's :class:`complex` type uses rectangular coordinates where a number -on the complex plain is defined by two floats, the real part and the imaginary -part. - -Definition:: - - z = x + 1j * y - - x := real(z) - y := imag(z) - -In engineering the polar coordinate system is popular for complex numbers. In -polar coordinates a complex number is defined by the radius *r* and the phase -angle *phi*. The radius *r* is the absolute value of the complex, which can be -viewed as distance from (0, 0). The radius *r* is always 0 or a positive float. -The phase angle *phi* is the counter clockwise angle from the positive x axis, -e.g. *1* has the angle *0*, *1j* has the angle *?/2* and *-1* the angle *-?*. .. note:: - While :func:`phase` and func:`polar` return *+?* for a negative real they - may return *-?* for a complex with a very small negative imaginary - part, e.g. *-1-1E-300j*. + The modulus (absolute value) of a complex number *x* can be + computed using the built-in :func:`abs` function. There is no + separate :mod:`cmath` module function for this operation. -Definition:: - z = r * exp(1j * phi) - z = r * cis(phi) +.. function:: polar(x) - r := abs(z) := sqrt(real(z)**2 + imag(z)**2) - phi := phase(z) := atan2(imag(z), real(z)) - cis(phi) := cos(phi) + 1j * sin(phi) + Return the representation of *x* in polar coordinates. Returns a + pair ``(r, phi)`` where *r* is the modulus of *x* and phi is the + phase of *x*. ``polar(x)`` is equivalent to ``(abs(x), + phase(x))``. -.. function:: phase(x) +.. function:: rect(r, phi) - Return phase, also known as the argument, of a complex. + Return the complex number *x* with polar coordinates *r* and *phi*. + Equivalent to ``r * (math.cos(phi) + math.sin(phi)*1j)``. -.. function:: polar(x) +Power and logarithmic functions +------------------------------- - Convert a :class:`complex` from rectangular coordinates to polar - coordinates. The function returns a tuple with the two elements - *r* and *phi*. *r* is the distance from 0 and *phi* the phase - angle. +.. function:: exp(x) + Return the exponential value ``e**x``. -.. function:: rect(r, phi) - Convert from polar coordinates to rectangular coordinates and return - a :class:`complex`. +.. function:: log(x[, base]) + Returns the logarithm of *x* to the given *base*. If the *base* is not + specified, returns the natural logarithm of *x*. There is one branch cut, from 0 + along the negative real axis to -?, continuous from above. + .. versionchanged:: 2.4 + *base* argument added. -cmath functions ---------------- -.. function:: acos(x) +.. function:: log10(x) - Return the arc cosine of *x*. There are two branch cuts: One extends right from - 1 along the real axis to ?, continuous from below. The other extends left from - -1 along the real axis to -?, continuous from above. + Return the base-10 logarithm of *x*. This has the same branch cut as + :func:`log`. -.. function:: acosh(x) +.. function:: sqrt(x) - Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left - from 1 along the real axis to -?, continuous from above. + Return the square root of *x*. This has the same branch cut as :func:`log`. -.. function:: asin(x) +Trigonometric functions +----------------------- - Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. +.. function:: acos(x) + Return the arc cosine of *x*. There are two branch cuts: One extends right from + 1 along the real axis to ?, continuous from below. The other extends left from + -1 along the real axis to -?, continuous from above. -.. function:: asinh(x) - Return the hyperbolic arc sine of *x*. There are two branch cuts: - One extends from ``1j`` along the imaginary axis to ``?j``, - continuous from the right. The other extends from ``-1j`` along - the imaginary axis to ``-?j``, continuous from the left. +.. function:: asin(x) + + Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. .. function:: atan(x) @@ -117,56 +132,49 @@ from the left. -.. function:: atanh(x) - - Return the hyperbolic arc tangent of *x*. There are two branch cuts: One - extends from ``1`` along the real axis to ``?``, continuous from below. The - other extends from ``-1`` along the real axis to ``-?``, continuous from - above. - - .. function:: cos(x) Return the cosine of *x*. -.. function:: cosh(x) - - Return the hyperbolic cosine of *x*. - +.. function:: sin(x) -.. function:: exp(x) + Return the sine of *x*. - Return the exponential value ``e**x``. +.. function:: tan(x) -.. function:: isinf(x) + Return the tangent of *x*. - Return *True* if the real or the imaginary part of x is positive - or negative infinity. +Hyperbolic functions +-------------------- -.. function:: isnan(x) +.. function:: acosh(x) - Return *True* if the real or imaginary part of x is not a number (NaN). + Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left + from 1 along the real axis to -?, continuous from above. -.. function:: log(x[, base]) +.. function:: asinh(x) - Returns the logarithm of *x* to the given *base*. If the *base* is not - specified, returns the natural logarithm of *x*. There is one branch cut, from 0 - along the negative real axis to -?, continuous from above. + Return the hyperbolic arc sine of *x*. There are two branch cuts: + One extends from ``1j`` along the imaginary axis to ``?j``, + continuous from the right. The other extends from ``-1j`` along + the imaginary axis to ``-?j``, continuous from the left. -.. function:: log10(x) +.. function:: atanh(x) - Return the base-10 logarithm of *x*. This has the same branch cut as - :func:`log`. + Return the hyperbolic arc tangent of *x*. There are two branch cuts: One + extends from ``1`` along the real axis to ``?``, continuous from below. The + other extends from ``-1`` along the real axis to ``-?``, continuous from + above. -.. function:: sin(x) +.. function:: cosh(x) - Return the sine of *x*. + Return the hyperbolic cosine of *x*. .. function:: sinh(x) @@ -174,26 +182,32 @@ Return the hyperbolic sine of *x*. -.. function:: sqrt(x) +.. function:: tanh(x) - Return the square root of *x*. This has the same branch cut as :func:`log`. + Return the hyperbolic tangent of *x*. -.. function:: tan(x) +Classification functions +------------------------ - Return the tangent of *x*. +.. function:: isinf(x) + Return *True* if the real or the imaginary part of x is positive + or negative infinity. -.. function:: tanh(x) - Return the hyperbolic tangent of *x*. +.. function:: isnan(x) + + Return *True* if the real or imaginary part of x is not a number (NaN). + -The module also defines two mathematical constants: +Constants +--------- .. data:: pi - The mathematical constant *pi*, as a float. + The mathematical constant *?*, as a float. .. data:: e From python-checkins at python.org Tue Jul 28 18:32:57 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 16:32:57 -0000 Subject: [Python-checkins] r74233 - in python/branches/release31-maint: Doc/library/cmath.rst Message-ID: Author: mark.dickinson Date: Tue Jul 28 18:32:56 2009 New Revision: 74233 Log: Merged revisions 74232 via svnmerge from svn+ssh://pythondev at www.python.org/python/branches/py3k ................ r74232 | mark.dickinson | 2009-07-28 17:31:03 +0100 (Tue, 28 Jul 2009) | 15 lines Merged revisions 74184,74230 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74184 | georg.brandl | 2009-07-23 08:08:58 +0100 (Thu, 23 Jul 2009) | 1 line #6548: dont suggest existence of real and imag functions in cmath. ........ r74230 | mark.dickinson | 2009-07-28 17:12:40 +0100 (Tue, 28 Jul 2009) | 4 lines Issue #6458: Reorganize cmath documentation into sections (similar to the way that the math documentation is organized); clarify section on conversions to and from polar coordinates. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/cmath.rst Modified: python/branches/release31-maint/Doc/library/cmath.rst ============================================================================== --- python/branches/release31-maint/Doc/library/cmath.rst (original) +++ python/branches/release31-maint/Doc/library/cmath.rst Tue Jul 28 18:32:56 2009 @@ -22,91 +22,106 @@ support signed zeros the continuity is as specified below. -Complex coordinates -------------------- +Conversions to and from polar coordinates +----------------------------------------- + +A Python complex number ``z`` is stored internally using *rectangular* +or *Cartesian* coordinates. It is completely determined by its *real +part* ``z.real`` and its *imaginary part* ``z.imag``. In other +words:: + + z == z.real + z.imag*1j + +*Polar coordinates* give an alternative way to represent a complex +number. In polar coordinates, a complex number *z* is defined by the +modulus *r* and the phase angle *phi*. The modulus *r* is the distance +from *z* to the origin, while the phase *phi* is the counterclockwise +angle from the positive x-axis to the line segment that joins the +origin to *z*. + +The following functions can be used to convert from the native +rectangular coordinates to polar coordinates and back. + +.. function:: phase(x) + + Return the phase of *x* (also known as the *argument* of *x*), as a + float. ``phase(x)`` is equivalent to ``math.atan2(x.imag, + x.real)``. The result lies in the range [-?, ?], and the branch + cut for this operation lies along the negative real axis, + continuous from above. On systems with support for signed zeros + (which includes most systems in current use), this means that the + sign of the result is the same as the sign of ``x.imag``, even when + ``x.imag`` is zero:: + + >>> phase(complex(-1.0, 0.0)) + 3.141592653589793 + >>> phase(complex(-1.0, -0.0)) + -3.141592653589793 -Complex numbers can be expressed by two important coordinate systems. -Python's :class:`complex` type uses rectangular coordinates where a number -on the complex plain is defined by two floats, the real part and the imaginary -part. - -Definition:: - - z = x + 1j * y - - x := real(z) - y := imag(z) - -In engineering the polar coordinate system is popular for complex numbers. In -polar coordinates a complex number is defined by the radius *r* and the phase -angle *phi*. The radius *r* is the absolute value of the complex, which can be -viewed as distance from (0, 0). The radius *r* is always 0 or a positive float. -The phase angle *phi* is the counter clockwise angle from the positive x axis, -e.g. *1* has the angle *0*, *1j* has the angle *?/2* and *-1* the angle *-?*. .. note:: - While :func:`phase` and func:`polar` return *+?* for a negative real they - may return *-?* for a complex with a very small negative imaginary - part, e.g. *-1-1E-300j*. + The modulus (absolute value) of a complex number *x* can be + computed using the built-in :func:`abs` function. There is no + separate :mod:`cmath` module function for this operation. -Definition:: - z = r * exp(1j * phi) - z = r * cis(phi) +.. function:: polar(x) - r := abs(z) := sqrt(real(z)**2 + imag(z)**2) - phi := phase(z) := atan2(imag(z), real(z)) - cis(phi) := cos(phi) + 1j * sin(phi) + Return the representation of *x* in polar coordinates. Returns a + pair ``(r, phi)`` where *r* is the modulus of *x* and phi is the + phase of *x*. ``polar(x)`` is equivalent to ``(abs(x), + phase(x))``. -.. function:: phase(x) +.. function:: rect(r, phi) - Return phase, also known as the argument, of a complex. + Return the complex number *x* with polar coordinates *r* and *phi*. + Equivalent to ``r * (math.cos(phi) + math.sin(phi)*1j)``. -.. function:: polar(x) +Power and logarithmic functions +------------------------------- - Convert a :class:`complex` from rectangular coordinates to polar - coordinates. The function returns a tuple with the two elements - *r* and *phi*. *r* is the distance from 0 and *phi* the phase - angle. +.. function:: exp(x) + Return the exponential value ``e**x``. -.. function:: rect(r, phi) - Convert from polar coordinates to rectangular coordinates and return - a :class:`complex`. +.. function:: log(x[, base]) + Returns the logarithm of *x* to the given *base*. If the *base* is not + specified, returns the natural logarithm of *x*. There is one branch cut, from 0 + along the negative real axis to -?, continuous from above. + .. versionchanged:: 2.4 + *base* argument added. -cmath functions ---------------- -.. function:: acos(x) +.. function:: log10(x) - Return the arc cosine of *x*. There are two branch cuts: One extends right from - 1 along the real axis to ?, continuous from below. The other extends left from - -1 along the real axis to -?, continuous from above. + Return the base-10 logarithm of *x*. This has the same branch cut as + :func:`log`. -.. function:: acosh(x) +.. function:: sqrt(x) - Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left - from 1 along the real axis to -?, continuous from above. + Return the square root of *x*. This has the same branch cut as :func:`log`. -.. function:: asin(x) +Trigonometric functions +----------------------- - Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. +.. function:: acos(x) + Return the arc cosine of *x*. There are two branch cuts: One extends right from + 1 along the real axis to ?, continuous from below. The other extends left from + -1 along the real axis to -?, continuous from above. -.. function:: asinh(x) - Return the hyperbolic arc sine of *x*. There are two branch cuts: - One extends from ``1j`` along the imaginary axis to ``?j``, - continuous from the right. The other extends from ``-1j`` along - the imaginary axis to ``-?j``, continuous from the left. +.. function:: asin(x) + + Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. .. function:: atan(x) @@ -117,56 +132,49 @@ from the left. -.. function:: atanh(x) - - Return the hyperbolic arc tangent of *x*. There are two branch cuts: One - extends from ``1`` along the real axis to ``?``, continuous from below. The - other extends from ``-1`` along the real axis to ``-?``, continuous from - above. - - .. function:: cos(x) Return the cosine of *x*. -.. function:: cosh(x) - - Return the hyperbolic cosine of *x*. - +.. function:: sin(x) -.. function:: exp(x) + Return the sine of *x*. - Return the exponential value ``e**x``. +.. function:: tan(x) -.. function:: isinf(x) + Return the tangent of *x*. - Return *True* if the real or the imaginary part of x is positive - or negative infinity. +Hyperbolic functions +-------------------- -.. function:: isnan(x) +.. function:: acosh(x) - Return *True* if the real or imaginary part of x is not a number (NaN). + Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left + from 1 along the real axis to -?, continuous from above. -.. function:: log(x[, base]) +.. function:: asinh(x) - Returns the logarithm of *x* to the given *base*. If the *base* is not - specified, returns the natural logarithm of *x*. There is one branch cut, from 0 - along the negative real axis to -?, continuous from above. + Return the hyperbolic arc sine of *x*. There are two branch cuts: + One extends from ``1j`` along the imaginary axis to ``?j``, + continuous from the right. The other extends from ``-1j`` along + the imaginary axis to ``-?j``, continuous from the left. -.. function:: log10(x) +.. function:: atanh(x) - Return the base-10 logarithm of *x*. This has the same branch cut as - :func:`log`. + Return the hyperbolic arc tangent of *x*. There are two branch cuts: One + extends from ``1`` along the real axis to ``?``, continuous from below. The + other extends from ``-1`` along the real axis to ``-?``, continuous from + above. -.. function:: sin(x) +.. function:: cosh(x) - Return the sine of *x*. + Return the hyperbolic cosine of *x*. .. function:: sinh(x) @@ -174,26 +182,32 @@ Return the hyperbolic sine of *x*. -.. function:: sqrt(x) +.. function:: tanh(x) - Return the square root of *x*. This has the same branch cut as :func:`log`. + Return the hyperbolic tangent of *x*. -.. function:: tan(x) +Classification functions +------------------------ - Return the tangent of *x*. +.. function:: isinf(x) + Return *True* if the real or the imaginary part of x is positive + or negative infinity. -.. function:: tanh(x) - Return the hyperbolic tangent of *x*. +.. function:: isnan(x) + + Return *True* if the real or imaginary part of x is not a number (NaN). + -The module also defines two mathematical constants: +Constants +--------- .. data:: pi - The mathematical constant *pi*, as a float. + The mathematical constant *?*, as a float. .. data:: e From python-checkins at python.org Tue Jul 28 18:45:13 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 16:45:13 -0000 Subject: [Python-checkins] r74234 - python/trunk/Doc/library/cmath.rst Message-ID: Author: mark.dickinson Date: Tue Jul 28 18:45:13 2009 New Revision: 74234 Log: Remove leading blank line from cmath.rst Modified: python/trunk/Doc/library/cmath.rst Modified: python/trunk/Doc/library/cmath.rst ============================================================================== --- python/trunk/Doc/library/cmath.rst (original) +++ python/trunk/Doc/library/cmath.rst Tue Jul 28 18:45:13 2009 @@ -1,4 +1,3 @@ - :mod:`cmath` --- Mathematical functions for complex numbers =========================================================== From python-checkins at python.org Tue Jul 28 18:46:13 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 16:46:13 -0000 Subject: [Python-checkins] r74235 - in python/branches/release26-maint: Doc/library/cmath.rst Message-ID: Author: mark.dickinson Date: Tue Jul 28 18:46:13 2009 New Revision: 74235 Log: Merged revisions 74234 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74234 | mark.dickinson | 2009-07-28 17:45:13 +0100 (Tue, 28 Jul 2009) | 1 line Remove leading blank line from cmath.rst ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/cmath.rst Modified: python/branches/release26-maint/Doc/library/cmath.rst ============================================================================== --- python/branches/release26-maint/Doc/library/cmath.rst (original) +++ python/branches/release26-maint/Doc/library/cmath.rst Tue Jul 28 18:46:13 2009 @@ -1,4 +1,3 @@ - :mod:`cmath` --- Mathematical functions for complex numbers =========================================================== From python-checkins at python.org Tue Jul 28 18:46:53 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 16:46:53 -0000 Subject: [Python-checkins] r74236 - python/branches/py3k Message-ID: Author: mark.dickinson Date: Tue Jul 28 18:46:53 2009 New Revision: 74236 Log: Blocked revisions 74234 via svnmerge ........ r74234 | mark.dickinson | 2009-07-28 17:45:13 +0100 (Tue, 28 Jul 2009) | 1 line Remove leading blank line from cmath.rst ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Tue Jul 28 19:22:37 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 17:22:37 -0000 Subject: [Python-checkins] r74237 - in python/branches/py3k: Doc/library/re.rst Lib/test/test_re.py Misc/NEWS Modules/_sre.c Message-ID: Author: mark.dickinson Date: Tue Jul 28 19:22:36 2009 New Revision: 74237 Log: Issue #6561: '\d' in a regular expression should match only Unicode character category [Nd], not [No]. Modified: python/branches/py3k/Doc/library/re.rst python/branches/py3k/Lib/test/test_re.py python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/_sre.c Modified: python/branches/py3k/Doc/library/re.rst ============================================================================== --- python/branches/py3k/Doc/library/re.rst (original) +++ python/branches/py3k/Doc/library/re.rst Tue Jul 28 19:22:36 2009 @@ -338,11 +338,12 @@ ``\d`` For Unicode (str) patterns: - Matches any Unicode digit (which includes ``[0-9]``, and also many - other digit characters). If the :const:`ASCII` flag is used only - ``[0-9]`` is matched (but the flag affects the entire regular - expression, so in such cases using an explicit ``[0-9]`` may be a - better choice). + Matches any Unicode decimal digit (that is, any character in + Unicode character category [Nd]). This includes ``[0-9]``, and + also many other digit characters. If the :const:`ASCII` flag is + used only ``[0-9]`` is matched (but the flag affects the entire + regular expression, so in such cases using an explicit ``[0-9]`` + may be a better choice). For 8-bit (bytes) patterns: Matches any decimal digit; this is equivalent to ``[0-9]``. Modified: python/branches/py3k/Lib/test/test_re.py ============================================================================== --- python/branches/py3k/Lib/test/test_re.py (original) +++ python/branches/py3k/Lib/test/test_re.py Tue Jul 28 19:22:36 2009 @@ -605,6 +605,27 @@ self.assertEqual(next(iter).span(), (4, 4)) self.assertRaises(StopIteration, next, iter) + def test_bug_6561(self): + # '\d' should match characters in Unicode category 'Nd' + # (Number, Decimal Digit), but not those in 'Nl' (Number, + # Letter) or 'No' (Number, Other). + decimal_digits = [ + '\u0037', # '\N{DIGIT SEVEN}', category 'Nd' + '\u0e58', # '\N{THAI DIGIT SIX}', category 'Nd' + '\uff10', # '\N{FULLWIDTH DIGIT ZERO}', category 'Nd' + ] + for x in decimal_digits: + self.assertEqual(re.match('^\d$', x).group(0), x) + + not_decimal_digits = [ + '\u2165', # '\N{ROMAN NUMERAL SIX}', category 'Nl' + '\u3039', # '\N{HANGZHOU NUMERAL TWENTY}', category 'Nl' + '\u2082', # '\N{SUBSCRIPT TWO}', category 'No' + '\u32b4', # '\N{CIRCLED NUMBER THIRTY NINE}', category 'No' + ] + for x in not_decimal_digits: + self.assertIsNone(re.match('^\d$', x)) + def test_empty_array(self): # SF buf 1647541 import array Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Tue Jul 28 19:22:36 2009 @@ -108,6 +108,10 @@ Extension Modules ----------------- +- Issue #6561: '\d' in a regex now matches only characters with + Unicode category 'Nd' (Number, Decimal Digit). Previously it also + matched characters with category 'No'. + - Issue #4509: Array objects are no longer modified after an operation failing due to the resize restriction in-place when the object has exported buffers. Modified: python/branches/py3k/Modules/_sre.c ============================================================================== --- python/branches/py3k/Modules/_sre.c (original) +++ python/branches/py3k/Modules/_sre.c Tue Jul 28 19:22:36 2009 @@ -168,7 +168,7 @@ #if defined(HAVE_UNICODE) -#define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDIGIT((Py_UNICODE)(ch)) +#define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDECIMAL((Py_UNICODE)(ch)) #define SRE_UNI_IS_SPACE(ch) Py_UNICODE_ISSPACE((Py_UNICODE)(ch)) #define SRE_UNI_IS_LINEBREAK(ch) Py_UNICODE_ISLINEBREAK((Py_UNICODE)(ch)) #define SRE_UNI_IS_ALNUM(ch) Py_UNICODE_ISALNUM((Py_UNICODE)(ch)) From python-checkins at python.org Tue Jul 28 19:23:01 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 17:23:01 -0000 Subject: [Python-checkins] r74238 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Tue Jul 28 19:23:01 2009 New Revision: 74238 Log: Blocked revisions 74237 via svnmerge ........ r74237 | mark.dickinson | 2009-07-28 18:22:36 +0100 (Tue, 28 Jul 2009) | 3 lines Issue #6561: '\d' in a regular expression should match only Unicode character category [Nd], not [No]. ........ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Tue Jul 28 20:55:33 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 28 Jul 2009 18:55:33 -0000 Subject: [Python-checkins] r74239 - python/trunk/Doc/library/urllib.rst Message-ID: Author: georg.brandl Date: Tue Jul 28 20:55:32 2009 New Revision: 74239 Log: Clarify quote_plus() usage. Modified: python/trunk/Doc/library/urllib.rst Modified: python/trunk/Doc/library/urllib.rst ============================================================================== --- python/trunk/Doc/library/urllib.rst (original) +++ python/trunk/Doc/library/urllib.rst Tue Jul 28 20:55:32 2009 @@ -213,8 +213,9 @@ .. function:: quote_plus(string[, safe]) Like :func:`quote`, but also replaces spaces by plus signs, as required for - quoting HTML form values. Plus signs in the original string are escaped unless - they are included in *safe*. It also does not have *safe* default to ``'/'``. + quoting HTML form values when building up a query string to go into a URL. + Plus signs in the original string are escaped unless they are included in + *safe*. It also does not have *safe* default to ``'/'``. .. function:: unquote(string) From python-checkins at python.org Tue Jul 28 22:35:04 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 20:35:04 -0000 Subject: [Python-checkins] r74240 - in python/trunk: Doc/library/re.rst Lib/test/test_re.py Misc/NEWS Modules/_sre.c Message-ID: Author: mark.dickinson Date: Tue Jul 28 22:35:03 2009 New Revision: 74240 Log: Issue #6561: '\d' regular expression should not match characters of category [No]; only those of category [Nd]. (Backport of r74237 from py3k.) Modified: python/trunk/Doc/library/re.rst python/trunk/Lib/test/test_re.py python/trunk/Misc/NEWS python/trunk/Modules/_sre.c Modified: python/trunk/Doc/library/re.rst ============================================================================== --- python/trunk/Doc/library/re.rst (original) +++ python/trunk/Doc/library/re.rst Tue Jul 28 22:35:03 2009 @@ -332,7 +332,8 @@ ``\d`` When the :const:`UNICODE` flag is not specified, matches any decimal digit; this is equivalent to the set ``[0-9]``. With :const:`UNICODE`, it will match - whatever is classified as a digit in the Unicode character properties database. + whatever is classified as a decimal digit in the Unicode character properties + database. ``\D`` When the :const:`UNICODE` flag is not specified, matches any non-digit Modified: python/trunk/Lib/test/test_re.py ============================================================================== --- python/trunk/Lib/test/test_re.py (original) +++ python/trunk/Lib/test/test_re.py Tue Jul 28 22:35:03 2009 @@ -636,6 +636,27 @@ self.assertEqual(iter.next().span(), (4, 4)) self.assertRaises(StopIteration, iter.next) + def test_bug_6561(self): + # '\d' should match characters in Unicode category 'Nd' + # (Number, Decimal Digit), but not those in 'Nl' (Number, + # Letter) or 'No' (Number, Other). + decimal_digits = [ + u'\u0037', # '\N{DIGIT SEVEN}', category 'Nd' + u'\u0e58', # '\N{THAI DIGIT SIX}', category 'Nd' + u'\uff10', # '\N{FULLWIDTH DIGIT ZERO}', category 'Nd' + ] + for x in decimal_digits: + self.assertEqual(re.match('^\d$', x, re.UNICODE).group(0), x) + + not_decimal_digits = [ + u'\u2165', # '\N{ROMAN NUMERAL SIX}', category 'Nl' + u'\u3039', # '\N{HANGZHOU NUMERAL TWENTY}', category 'Nl' + u'\u2082', # '\N{SUBSCRIPT TWO}', category 'No' + u'\u32b4', # '\N{CIRCLED NUMBER THIRTY NINE}', category 'No' + ] + for x in not_decimal_digits: + self.assertIsNone(re.match('^\d$', x, re.UNICODE)) + def test_empty_array(self): # SF buf 1647541 import array Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Tue Jul 28 22:35:03 2009 @@ -1205,6 +1205,10 @@ Extension Modules ----------------- +- Issue #6561: '\d' in a regex now matches only characters with + Unicode category 'Nd' (Number, Decimal Digit). Previously it also + matched characters with category 'No'. + - Issue #1523: Remove deprecated overflow wrapping for struct.pack with an integer format code ('bBhHiIlLqQ'). Packing an out-of-range integer now consistently raises struct.error. Modified: python/trunk/Modules/_sre.c ============================================================================== --- python/trunk/Modules/_sre.c (original) +++ python/trunk/Modules/_sre.c Tue Jul 28 22:35:03 2009 @@ -172,7 +172,7 @@ #if defined(HAVE_UNICODE) -#define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDIGIT((Py_UNICODE)(ch)) +#define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDECIMAL((Py_UNICODE)(ch)) #define SRE_UNI_IS_SPACE(ch) Py_UNICODE_ISSPACE((Py_UNICODE)(ch)) #define SRE_UNI_IS_LINEBREAK(ch) Py_UNICODE_ISLINEBREAK((Py_UNICODE)(ch)) #define SRE_UNI_IS_ALNUM(ch) Py_UNICODE_ISALNUM((Py_UNICODE)(ch)) From python-checkins at python.org Tue Jul 28 22:35:56 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 20:35:56 -0000 Subject: [Python-checkins] r74241 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Tue Jul 28 22:35:55 2009 New Revision: 74241 Log: Blocked revisions 74240 via svnmerge ........ r74240 | mark.dickinson | 2009-07-28 21:35:03 +0100 (Tue, 28 Jul 2009) | 4 lines Issue #6561: '\d' regular expression should not match characters of category [No]; only those of category [Nd]. (Backport of r74237 from py3k.) ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Tue Jul 28 22:36:23 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 28 Jul 2009 20:36:23 -0000 Subject: [Python-checkins] r74242 - python/branches/py3k Message-ID: Author: mark.dickinson Date: Tue Jul 28 22:36:23 2009 New Revision: 74242 Log: Blocked revisions 74240 via svnmerge ........ r74240 | mark.dickinson | 2009-07-28 21:35:03 +0100 (Tue, 28 Jul 2009) | 4 lines Issue #6561: '\d' regular expression should not match characters of category [No]; only those of category [Nd]. (Backport of r74237 from py3k.) ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Tue Jul 28 22:47:55 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 28 Jul 2009 20:47:55 -0000 Subject: [Python-checkins] r74243 - python/trunk/Lib/test/regrtest.py Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 28 22:47:55 2009 New Revision: 74243 Log: "Fix" for the refleak report: the ABC classes are now in the _pyio module Modified: python/trunk/Lib/test/regrtest.py Modified: python/trunk/Lib/test/regrtest.py ============================================================================== --- python/trunk/Lib/test/regrtest.py (original) +++ python/trunk/Lib/test/regrtest.py Tue Jul 28 22:47:55 2009 @@ -746,7 +746,7 @@ False if the test didn't leak references; True if we detected refleaks. """ # This code is hackish and inelegant, but it seems to do the job. - import copy_reg, _abcoll, io + import copy_reg, _abcoll, _pyio if not hasattr(sys, 'gettotalrefcount'): raise Exception("Tracking reference leaks requires a debug build " @@ -757,7 +757,7 @@ ps = copy_reg.dispatch_table.copy() pic = sys.path_importer_cache.copy() abcs = {} - modules = _abcoll, io + modules = _abcoll, _pyio for abc in [getattr(mod, a) for mod in modules for a in mod.__all__]: # XXX isinstance(abc, ABCMeta) leads to infinite recursion if not hasattr(abc, '_abc_registry'): From python-checkins at python.org Tue Jul 28 23:32:43 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 28 Jul 2009 21:32:43 -0000 Subject: [Python-checkins] r74244 - python/branches/py3k Message-ID: Author: amaury.forgeotdarc Date: Tue Jul 28 23:32:43 2009 New Revision: 74244 Log: Blocked revisions 74243 via svnmerge ........ r74243 | amaury.forgeotdarc | 2009-07-28 22:47:55 +0200 (mar., 28 juil. 2009) | 2 lines "Fix" for the refleak report: the ABC classes are now in the _pyio module ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Jul 29 00:15:30 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 28 Jul 2009 22:15:30 -0000 Subject: [Python-checkins] r74245 - in python/trunk: Lib/test/test_zipfile.py Lib/zipfile.py Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Wed Jul 29 00:15:30 2009 New Revision: 74245 Log: #6511: ZipFile will now raise BadZipfile when opening an empty or tiny file, like it does for larger invalid files. Modified: python/trunk/Lib/test/test_zipfile.py python/trunk/Lib/zipfile.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/test/test_zipfile.py ============================================================================== --- python/trunk/Lib/test/test_zipfile.py (original) +++ python/trunk/Lib/test/test_zipfile.py Wed Jul 29 00:15:30 2009 @@ -703,6 +703,16 @@ # quickly. self.assertRaises(IOError, zipfile.ZipFile, TESTFN) + def test_empty_file_raises_BadZipFile(self): + f = open(TESTFN, 'w') + f.close() + self.assertRaises(zipfile.BadZipfile, zipfile.ZipFile, TESTFN) + + f = open(TESTFN, 'w') + f.write("short file") + f.close() + self.assertRaises(zipfile.BadZipfile, zipfile.ZipFile, TESTFN) + def test_closed_zip_raises_RuntimeError(self): # Verify that testzip() doesn't swallow inappropriate exceptions. data = StringIO() Modified: python/trunk/Lib/zipfile.py ============================================================================== --- python/trunk/Lib/zipfile.py (original) +++ python/trunk/Lib/zipfile.py Wed Jul 29 00:15:30 2009 @@ -198,7 +198,10 @@ # Check to see if this is ZIP file with no archive comment (the # "end of central directory" structure should be the last item in the # file if this is the case). - fpin.seek(-sizeEndCentDir, 2) + try: + fpin.seek(-sizeEndCentDir, 2) + except IOError: + return None data = fpin.read() if data[0:4] == stringEndArchive and data[-2:] == "\000\000": # the signature is correct and there's no comment, unpack structure Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Jul 29 00:15:30 2009 @@ -354,6 +354,9 @@ Library ------- +- Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when + opening an empty or very small file. + - Issue #6553: Fixed a crash in cPickle.load(), when given a file-like object containing incomplete data. From python-checkins at python.org Wed Jul 29 00:18:58 2009 From: python-checkins at python.org (amaury.forgeotdarc) Date: Tue, 28 Jul 2009 22:18:58 -0000 Subject: [Python-checkins] r74246 - in python/branches/py3k: Lib/test/test_zipfile.py Lib/zipfile.py Misc/NEWS Message-ID: Author: amaury.forgeotdarc Date: Wed Jul 29 00:18:57 2009 New Revision: 74246 Log: Merged revisions 74245 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74245 | amaury.forgeotdarc | 2009-07-29 00:15:30 +0200 (mer., 29 juil. 2009) | 3 lines #6511: ZipFile will now raise BadZipfile when opening an empty or tiny file, like it does for larger invalid files. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_zipfile.py python/branches/py3k/Lib/zipfile.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/test/test_zipfile.py ============================================================================== --- python/branches/py3k/Lib/test/test_zipfile.py (original) +++ python/branches/py3k/Lib/test/test_zipfile.py Wed Jul 29 00:18:57 2009 @@ -701,6 +701,16 @@ # quickly. self.assertRaises(IOError, zipfile.ZipFile, TESTFN) + def test_empty_file_raises_BadZipFile(self): + f = open(TESTFN, 'w') + f.close() + self.assertRaises(zipfile.BadZipfile, zipfile.ZipFile, TESTFN) + + f = open(TESTFN, 'w') + f.write("short file") + f.close() + self.assertRaises(zipfile.BadZipfile, zipfile.ZipFile, TESTFN) + def test_closed_zip_raises_RuntimeError(self): # Verify that testzip() doesn't swallow inappropriate exceptions. data = io.BytesIO() Modified: python/branches/py3k/Lib/zipfile.py ============================================================================== --- python/branches/py3k/Lib/zipfile.py (original) +++ python/branches/py3k/Lib/zipfile.py Wed Jul 29 00:18:57 2009 @@ -200,7 +200,10 @@ # Check to see if this is ZIP file with no archive comment (the # "end of central directory" structure should be the last item in the # file if this is the case). - fpin.seek(-sizeEndCentDir, 2) + try: + fpin.seek(-sizeEndCentDir, 2) + except IOError: + return None data = fpin.read() if data[0:4] == stringEndArchive and data[-2:] == b"\000\000": # the signature is correct and there's no comment, unpack structure Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Jul 29 00:18:57 2009 @@ -956,7 +956,10 @@ Library ------- -- Issue #6545: Removed assert statements in distutils.Extension, so the +- Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when + opening an empty or very small file. + +- Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O. - unittest has been split up into a package. All old names should still work. From nnorwitz at gmail.com Wed Jul 29 00:23:38 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 28 Jul 2009 18:23:38 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (3) Message-ID: <20090728222338.GA20371@python.psfb.org> More important issues: ---------------------- test_io leaked [237, 237, 237] references, sum=711 test_memoryio leaked [267, 267, 267] references, sum=801 test_ssl leaked [-81, 420, 0] references, sum=339 Less important issues: ---------------------- test_smtplib leaked [0, -88, 88] references, sum=0 test_sys leaked [0, 42, 0] references, sum=42 test_threading leaked [48, 48, 48] references, sum=144 test_urllib2_localnet leaked [277, -277, 0] references, sum=0 From python-checkins at python.org Wed Jul 29 09:27:13 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 07:27:13 -0000 Subject: [Python-checkins] r74247 - in python/branches/py3k: Doc/library/urllib.parse.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 09:27:08 2009 New Revision: 74247 Log: Merged revisions 74239 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74239 | georg.brandl | 2009-07-28 18:55:32 +0000 (Di, 28 Jul 2009) | 1 line Clarify quote_plus() usage. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/urllib.parse.rst Modified: python/branches/py3k/Doc/library/urllib.parse.rst ============================================================================== --- python/branches/py3k/Doc/library/urllib.parse.rst (original) +++ python/branches/py3k/Doc/library/urllib.parse.rst Wed Jul 29 09:27:08 2009 @@ -249,9 +249,9 @@ .. function:: quote_plus(string[, safe[, encoding[, errors]]]) Like :func:`quote`, but also replace spaces by plus signs, as required for - quoting HTML form values. Plus signs in the original string are escaped - unless they are included in *safe*. It also does not have *safe* default to - ``'/'``. + quoting HTML form values when building up a query string to go into a URL. + Plus signs in the original string are escaped unless they are included in + *safe*. It also does not have *safe* default to ``'/'``. Example: ``quote_plus('/El Ni?o/')`` yields ``'%2FEl+Ni%C3%B1o%2F'``. From python-checkins at python.org Wed Jul 29 16:09:04 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 29 Jul 2009 14:09:04 -0000 Subject: [Python-checkins] r74248 - python/branches/release26-maint Message-ID: Author: r.david.murray Date: Wed Jul 29 16:09:03 2009 New Revision: 74248 Log: Recorded merge of revisions 74228 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk Merged in r74229. ........ r74228 | raymond.hettinger | 2009-07-27 16:32:04 -0400 (Mon, 27 Jul 2009) | 1 line Issue 6573: Fix set.union() for cases where self is in the argument chain. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Wed Jul 29 16:12:23 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 29 Jul 2009 14:12:23 -0000 Subject: [Python-checkins] r74249 - python/branches/py3k Message-ID: Author: r.david.murray Date: Wed Jul 29 16:12:23 2009 New Revision: 74249 Log: Recorded merge of revisions 74228 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk Applied in r74226. ........ r74228 | raymond.hettinger | 2009-07-27 16:32:04 -0400 (Mon, 27 Jul 2009) | 1 line Issue 6573: Fix set.union() for cases where self is in the argument chain. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Jul 29 16:16:04 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 29 Jul 2009 14:16:04 -0000 Subject: [Python-checkins] r74250 - python/branches/release31-maint Message-ID: Author: r.david.murray Date: Wed Jul 29 16:16:04 2009 New Revision: 74250 Log: Recorded merge of revisions 74226,74249 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74226 | raymond.hettinger | 2009-07-27 16:16:37 -0400 (Mon, 27 Jul 2009) | 1 line Issue 6573: Fix set.union() for cases where self is in the argument chain. ................ r74249 | r.david.murray | 2009-07-29 10:12:23 -0400 (Wed, 29 Jul 2009) | 11 lines Recorded merge of revisions 74228 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk Applied in r74226. ........ r74228 | raymond.hettinger | 2009-07-27 16:32:04 -0400 (Mon, 27 Jul 2009) | 1 line Issue 6573: Fix set.union() for cases where self is in the argument chain. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Wed Jul 29 17:40:31 2009 From: python-checkins at python.org (r.david.murray) Date: Wed, 29 Jul 2009 15:40:31 -0000 Subject: [Python-checkins] r74251 - in python/branches/release31-maint: Doc/library/multiprocessing.rst Lib/multiprocessing/process.py Lib/test/test_multiprocessing.py Misc/ACKS Misc/NEWS Message-ID: Author: r.david.murray Date: Wed Jul 29 17:40:30 2009 New Revision: 74251 Log: Merged revisions 74063 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k NB: the news item for r73708 seems to have inadvertently been included in a different, unrelated merge set (r74055). I restored it here. ................ r74063 | alexandre.vassalotti | 2009-07-17 08:07:01 -0400 (Fri, 17 Jul 2009) | 17 lines Merged revisions 73694,73708,73738 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r73694 | jesse.noller | 2009-06-29 14:24:26 -0400 (Mon, 29 Jun 2009) | 1 line Issue 5740: multiprocessing.connection.* authkey fixes ........ r73708 | jesse.noller | 2009-06-30 13:11:52 -0400 (Tue, 30 Jun 2009) | 1 line Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes ........ r73738 | r.david.murray | 2009-06-30 22:49:10 -0400 (Tue, 30 Jun 2009) | 2 lines Make punctuation prettier and break up run-on sentence. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/multiprocessing.rst python/branches/release31-maint/Lib/multiprocessing/process.py python/branches/release31-maint/Lib/test/test_multiprocessing.py python/branches/release31-maint/Misc/ACKS python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Doc/library/multiprocessing.rst ============================================================================== --- python/branches/release31-maint/Doc/library/multiprocessing.rst (original) +++ python/branches/release31-maint/Doc/library/multiprocessing.rst Wed Jul 29 17:40:30 2009 @@ -1713,7 +1713,7 @@ generally be omitted since it can usually be inferred from the format of *address*. (See :ref:`multiprocessing-address-formats`) - If *authentication* is ``True`` or *authkey* is a string then digest + If *authenticate* is ``True`` or *authkey* is a string then digest authentication is used. The key used for authentication will be either *authkey* or ``current_process().authkey)`` if *authkey* is ``None``. If authentication fails then :exc:`AuthenticationError` is raised. See @@ -1755,7 +1755,7 @@ If *authkey* is ``None`` and *authenticate* is ``True`` then ``current_process().authkey`` is used as the authentication key. If - *authkey* is ``None`` and *authentication* is ``False`` then no + *authkey* is ``None`` and *authenticate* is ``False`` then no authentication is done. If authentication fails then :exc:`AuthenticationError` is raised. See :ref:`multiprocessing-auth-keys`. @@ -2097,6 +2097,38 @@ for i in range(10): Process(target=f, args=(lock,)).start() +Beware replacing sys.stdin with a "file like object" + + :mod:`multiprocessing` originally unconditionally called:: + + os.close(sys.stdin.fileno()) + + in the :meth:`multiprocessing.Process._bootstrap` method --- this resulted + in issues with processes-in-processes. This has been changed to:: + + sys.stdin.close() + sys.stdin = open(os.devnull) + + Which solves the fundamental issue of processes colliding with each other + resulting in a bad file descriptor error, but introduces a potential danger + to applications which replace :func:`sys.stdin` with a "file-like object" + with output buffering. This danger is that if multiple processes call + :func:`close()` on this file-like object, it could result in the same + data being flushed to the object multiple times, resulting in corruption. + + If you write a file-like object and implement your own caching, you can + make it fork-safe by storing the pid whenever you append to the cache, + and discarding the cache when the pid changes. For example:: + + @property + def cache(self): + pid = os.getpid() + if pid != self._pid: + self._pid = pid + self._cache = [] + return self._cache + + For more information, see :issue:`5155`, :issue:`5313` and :issue:`5331` Windows ~~~~~~~ Modified: python/branches/release31-maint/Lib/multiprocessing/process.py ============================================================================== --- python/branches/release31-maint/Lib/multiprocessing/process.py (original) +++ python/branches/release31-maint/Lib/multiprocessing/process.py Wed Jul 29 17:40:30 2009 @@ -221,7 +221,8 @@ self._counter = itertools.count(1) if sys.stdin is not None: try: - os.close(sys.stdin.fileno()) + sys.stdin.close() + sys.stdin = open(os.devnull) except (OSError, ValueError): pass _current_process = self Modified: python/branches/release31-maint/Lib/test/test_multiprocessing.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_multiprocessing.py (original) +++ python/branches/release31-maint/Lib/test/test_multiprocessing.py Wed Jul 29 17:40:30 2009 @@ -8,6 +8,7 @@ import threading import queue as pyqueue import time +import io import sys import os import gc @@ -1862,7 +1863,74 @@ p.join() self.assertEqual(self.ns.test, 1) -testcases_other = [OtherTest, TestInvalidHandle, TestInitializers] +# +# Issue 5155, 5313, 5331: Test process in processes +# Verifies os.close(sys.stdin.fileno) vs. sys.stdin.close() behavior +# + +def _ThisSubProcess(q): + try: + item = q.get(block=False) + except pyqueue.Empty: + pass + +def _TestProcess(q): + queue = multiprocessing.Queue() + subProc = multiprocessing.Process(target=_ThisSubProcess, args=(queue,)) + subProc.start() + subProc.join() + +def _afunc(x): + return x*x + +def pool_in_process(): + pool = multiprocessing.Pool(processes=4) + x = pool.map(_afunc, [1, 2, 3, 4, 5, 6, 7]) + +class _file_like(object): + def __init__(self, delegate): + self._delegate = delegate + self._pid = None + + @property + def cache(self): + pid = os.getpid() + # There are no race conditions since fork keeps only the running thread + if pid != self._pid: + self._pid = pid + self._cache = [] + return self._cache + + def write(self, data): + self.cache.append(data) + + def flush(self): + self._delegate.write(''.join(self.cache)) + self._cache = [] + +class TestStdinBadfiledescriptor(unittest.TestCase): + + def test_queue_in_process(self): + queue = multiprocessing.Queue() + proc = multiprocessing.Process(target=_TestProcess, args=(queue,)) + proc.start() + proc.join() + + def test_pool_in_process(self): + p = multiprocessing.Process(target=pool_in_process) + p.start() + p.join() + + def test_flushing(self): + sio = io.StringIO() + flike = _file_like(sio) + flike.write('foo') + proc = multiprocessing.Process(target=lambda: flike.flush()) + flike.flush() + assert sio.getvalue() == 'foo' + +testcases_other = [OtherTest, TestInvalidHandle, TestInitializers, + TestStdinBadfiledescriptor] # # Modified: python/branches/release31-maint/Misc/ACKS ============================================================================== --- python/branches/release31-maint/Misc/ACKS (original) +++ python/branches/release31-maint/Misc/ACKS Wed Jul 29 17:40:30 2009 @@ -45,6 +45,7 @@ Ulf Bartelt Nick Bastin Jeff Bauer +Mike Bayer Michael R Bax Anthony Baxter Samuel L. Bayer @@ -184,6 +185,7 @@ Dean Draayer John DuBois Paul Dubois +Graham Dumpleton Quinn Dunkan Robin Dunn Luke Dunstan @@ -556,6 +558,7 @@ Santiago Peres?n Mark Perrego Trevor Perrin +Gabriel de Perthuis Tim Peters Benjamin Peterson Chris Petrilli Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Wed Jul 29 17:40:30 2009 @@ -42,6 +42,10 @@ Library ------- +- Issues #5155, #5313, #5331: multiprocessing.Process._bootstrap was + unconditionally calling "os.close(sys.stdin.fileno())" resulting in file + descriptor errors + - Issue #1424152: Fix for http.client, urllib.request to support SSL while working through proxy. Original patch by Christopher Li, changes made by Senthil Kumaran From python-checkins at python.org Wed Jul 29 18:06:32 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 16:06:32 -0000 Subject: [Python-checkins] r74252 - python/trunk/Doc/library/gettext.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 18:06:31 2009 New Revision: 74252 Log: #6593: fix link targets. Modified: python/trunk/Doc/library/gettext.rst Modified: python/trunk/Doc/library/gettext.rst ============================================================================== --- python/trunk/Doc/library/gettext.rst (original) +++ python/trunk/Doc/library/gettext.rst Wed Jul 29 18:06:31 2009 @@ -208,10 +208,10 @@ This installs the function :func:`_` in Python's builtins namespace, based on *domain*, *localedir*, and *codeset* which are passed to the function :func:`translation`. The *unicode* flag is passed to the resulting translation - object's :meth:`install` method. + object's :meth:`~NullTranslations.install` method. For the *names* parameter, please see the description of the translation - object's :meth:`install` method. + object's :meth:`~NullTranslations.install` method. As seen below, you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the :func:`_` From python-checkins at python.org Wed Jul 29 18:09:18 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 16:09:18 -0000 Subject: [Python-checkins] r74253 - python/trunk/Doc/library/socket.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 18:09:17 2009 New Revision: 74253 Log: #6591: add reference to ioctl in fcntl module for platforms other than Windows. Modified: python/trunk/Doc/library/socket.rst Modified: python/trunk/Doc/library/socket.rst ============================================================================== --- python/trunk/Doc/library/socket.rst (original) +++ python/trunk/Doc/library/socket.rst Wed Jul 29 18:09:17 2009 @@ -599,6 +599,9 @@ The :meth:`ioctl` method is a limited interface to the WSAIoctl system interface. Please refer to the MSDN documentation for more information. + On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl` + functions may be used; they accept a socket object as their first argument. + .. versionadded:: 2.6 From python-checkins at python.org Wed Jul 29 18:14:16 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 16:14:16 -0000 Subject: [Python-checkins] r74254 - python/branches/py3k/Doc/library/os.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 18:14:16 2009 New Revision: 74254 Log: #6586: fix return/argument type doc for os.read() and os.write(). Modified: python/branches/py3k/Doc/library/os.rst Modified: python/branches/py3k/Doc/library/os.rst ============================================================================== --- python/branches/py3k/Doc/library/os.rst (original) +++ python/branches/py3k/Doc/library/os.rst Wed Jul 29 18:14:16 2009 @@ -540,9 +540,9 @@ .. function:: read(fd, n) - Read at most *n* bytes from file descriptor *fd*. Return a string containing the + Read at most *n* bytes from file descriptor *fd*. Return a bytestring containing the bytes read. If the end of the file referred to by *fd* has been reached, an - empty string is returned. Availability: Unix, Windows. + empty bytes object is returned. Availability: Unix, Windows. .. note:: @@ -574,8 +574,8 @@ .. function:: write(fd, str) - Write the string *str* to file descriptor *fd*. Return the number of bytes - actually written. Availability: Unix, Windows. + Write the bytestring in *str* to file descriptor *fd*. Return the number of + bytes actually written. Availability: Unix, Windows. .. note:: From python-checkins at python.org Wed Jul 29 18:15:51 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 16:15:51 -0000 Subject: [Python-checkins] r74255 - python/branches/release30-maint/Doc/tools/sphinxext/layout.html Message-ID: Author: georg.brandl Date: Wed Jul 29 18:15:50 2009 New Revision: 74255 Log: Add "out of service" notice to 3.0 docs. Modified: python/branches/release30-maint/Doc/tools/sphinxext/layout.html Modified: python/branches/release30-maint/Doc/tools/sphinxext/layout.html ============================================================================== --- python/branches/release30-maint/Doc/tools/sphinxext/layout.html (original) +++ python/branches/release30-maint/Doc/tools/sphinxext/layout.html Wed Jul 29 18:15:50 2009 @@ -1,4 +1,13 @@ {% extends "!layout.html" %} +{% block header %} + +{% endblock %} {% block rootrellink %}
    • From python-checkins at python.org Wed Jul 29 18:32:30 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 16:32:30 -0000 Subject: [Python-checkins] r74256 - python/trunk/Doc/c-api/typeobj.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 18:32:30 2009 New Revision: 74256 Log: #6336: Add nb_divide. Modified: python/trunk/Doc/c-api/typeobj.rst Modified: python/trunk/Doc/c-api/typeobj.rst ============================================================================== --- python/trunk/Doc/c-api/typeobj.rst (original) +++ python/trunk/Doc/c-api/typeobj.rst Wed Jul 29 18:32:30 2009 @@ -1160,6 +1160,7 @@ binaryfunc nb_add; binaryfunc nb_subtract; binaryfunc nb_multiply; + binaryfunc nb_divide; binaryfunc nb_remainder; binaryfunc nb_divmod; ternaryfunc nb_power; From python-checkins at python.org Wed Jul 29 18:33:19 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 16:33:19 -0000 Subject: [Python-checkins] r74257 - python/branches/py3k Message-ID: Author: georg.brandl Date: Wed Jul 29 18:33:19 2009 New Revision: 74257 Log: Blocked revisions 74256 via svnmerge ........ r74256 | georg.brandl | 2009-07-29 16:32:30 +0000 (Mi, 29 Jul 2009) | 1 line #6336: Add nb_divide. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Jul 29 18:57:06 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 16:57:06 -0000 Subject: [Python-checkins] r74258 - python/trunk/Doc/tutorial/interactive.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 18:57:05 2009 New Revision: 74258 Log: Add a link to readline, and mention IPython and bpython. Modified: python/trunk/Doc/tutorial/interactive.rst Modified: python/trunk/Doc/tutorial/interactive.rst ============================================================================== --- python/trunk/Doc/tutorial/interactive.rst (original) +++ python/trunk/Doc/tutorial/interactive.rst Wed Jul 29 18:57:05 2009 @@ -6,8 +6,8 @@ Some versions of the Python interpreter support editing of the current input line and history substitution, similar to facilities found in the Korn shell and -the GNU Bash shell. This is implemented using the *GNU Readline* library, which -supports Emacs-style and vi-style editing. This library has its own +the GNU Bash shell. This is implemented using the `GNU Readline`_ library, +which supports Emacs-style and vi-style editing. This library has its own documentation which I won't duplicate here; however, the basics are easily explained. The interactive editing and history described here are optionally available in the Unix and Cygwin versions of the interpreter. @@ -148,8 +148,8 @@ .. _tut-commentary: -Commentary -========== +Alternatives to the Interactive Interpreter +=========================================== This facility is an enormous step forward compared to earlier versions of the interpreter; however, some wishes are left: It would be nice if the proper @@ -158,6 +158,12 @@ symbol table. A command to check (or even suggest) matching parentheses, quotes, etc., would also be useful. +One alternative enhanced interactive interpreter that has been around for quite +some time is `IPython`_, which features tab completion, object exploration and +advanced history management. It can also be thoroughly customized and embedded +into other applications. Another similar enhanced interactive environment is +`bpython`_. + .. rubric:: Footnotes @@ -165,3 +171,7 @@ :envvar:`PYTHONSTARTUP` environment variable when you start an interactive interpreter. + +.. _GNU Readline: http://tiswww.case.edu/php/chet/readline/rltop.html +.. _IPython: http://ipython.scipy.org/ +.. _bpython: http://www.bpython-interpreter.org/ From python-checkins at python.org Wed Jul 29 19:07:22 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 17:07:22 -0000 Subject: [Python-checkins] r74259 - in python/trunk/Doc/tutorial: modules.rst stdlib2.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 19:07:21 2009 New Revision: 74259 Log: Fix some markup and small factual glitches found by M. Markert. Modified: python/trunk/Doc/tutorial/modules.rst python/trunk/Doc/tutorial/stdlib2.rst Modified: python/trunk/Doc/tutorial/modules.rst ============================================================================== --- python/trunk/Doc/tutorial/modules.rst (original) +++ python/trunk/Doc/tutorial/modules.rst Wed Jul 29 19:07:21 2009 @@ -446,14 +446,14 @@ submodules are present in the package, and imports them all. Unfortunately, this operation does not work very well on Windows platforms, where the filesystem does not always have accurate information about the case of a -filename! On these platforms, there is no guaranteed way to know whether a file +filename. On these platforms, there is no guaranteed way to know whether a file :file:`ECHO.PY` should be imported as a module :mod:`echo`, :mod:`Echo` or :mod:`ECHO`. (For example, Windows 95 has the annoying practice of showing all file names with a capitalized first letter.) The DOS 8+3 filename restriction adds another interesting problem for long module names. The only solution is for the package author to provide an explicit index of the -package. The import statement uses the following convention: if a package's +package. The :keyword:`import` statement uses the following convention: if a package's :file:`__init__.py` code defines a list named ``__all__``, it is taken to be the list of module names that should be imported when ``from package import *`` is encountered. It is up to the package author to keep this list up-to-date when a @@ -474,16 +474,16 @@ 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 submodules of the package that were explicitly loaded by -previous import statements. Consider this code:: +previous :keyword:`import` statements. Consider this code:: import sound.effects.echo import sound.effects.surround from sound.effects import * -In this example, the echo and surround modules are imported in the current -namespace because they are defined in the :mod:`sound.effects` package when the -``from...import`` statement is executed. (This also works when ``__all__`` is -defined.) +In this example, the :mod:`echo` and :mod:`surround` modules are imported in the +current namespace because they are defined in the :mod:`sound.effects` package +when the ``from...import`` statement is executed. (This also works when +``__all__`` is defined.) Note that in general the practice of importing ``*`` from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to @@ -546,5 +546,6 @@ .. rubric:: Footnotes .. [#] In fact function definitions are also 'statements' that are 'executed'; the - execution enters the function name in the module's global symbol table. + execution of a module-level function enters the function name in the module's + global symbol table. Modified: python/trunk/Doc/tutorial/stdlib2.rst ============================================================================== --- python/trunk/Doc/tutorial/stdlib2.rst (original) +++ python/trunk/Doc/tutorial/stdlib2.rst Wed Jul 29 19:07:21 2009 @@ -347,12 +347,15 @@ The :mod:`decimal` module offers a :class:`Decimal` datatype for decimal floating point arithmetic. Compared to the built-in :class:`float` -implementation of binary floating point, the new class is especially helpful for -financial applications and other uses which require exact decimal -representation, control over precision, control over rounding to meet legal or -regulatory requirements, tracking of significant decimal places, or for -applications where the user expects the results to match calculations done by -hand. +implementation of binary floating point, the class is especially helpful for + +* financial applications and other uses which require exact decimal + representation, +* control over precision, +* control over rounding to meet legal or regulatory requirements, +* tracking of significant decimal places, or +* applications where the user expects the results to match calculations done by + hand. For example, calculating a 5% tax on a 70 cent phone charge gives different results in decimal floating point and binary floating point. The difference From python-checkins at python.org Wed Jul 29 19:15:20 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 17:15:20 -0000 Subject: [Python-checkins] r74260 - python/trunk/Doc/tutorial/inputoutput.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 19:15:20 2009 New Revision: 74260 Log: Fix a few markup glitches. Modified: python/trunk/Doc/tutorial/inputoutput.rst Modified: python/trunk/Doc/tutorial/inputoutput.rst ============================================================================== --- python/trunk/Doc/tutorial/inputoutput.rst (original) +++ python/trunk/Doc/tutorial/inputoutput.rst Wed Jul 29 19:15:20 2009 @@ -127,16 +127,17 @@ We are the knights who say "Ni!" The brackets and characters within them (called format fields) are replaced with -the objects passed into the format method. The number in the brackets refers to -the position of the object passed into the format method. :: +the objects passed into the :meth:`~str.format` method. The number in the +brackets refers to the position of the object passed into the +:meth:`~str.format` method. :: >>> print '{0} and {1}'.format('spam', 'eggs') spam and eggs >>> print '{1} and {0}'.format('spam', 'eggs') eggs and spam -If keyword arguments are used in the format method, their values are referred to -by using the name of the argument. :: +If keyword arguments are used in the :meth:`~str.format` method, their values +are referred to by using the name of the argument. :: >>> print 'This {food} is {adjective}.'.format( ... food='spam', adjective='absolutely horrible') @@ -157,7 +158,7 @@ The value of PI is approximately 3.142. Passing an integer after the ``':'`` will cause that field to be a minimum -number of characters wide. This is useful for making tables pretty.:: +number of characters wide. This is useful for making tables pretty. :: >>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 7678} >>> for name, phone in table.items(): @@ -178,7 +179,7 @@ Jack: 4098; Sjoerd: 4127; Dcab: 8637678 This could also be done by passing the table as keyword arguments with the '**' -notation.:: +notation. :: >>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678} >>> print 'Jack: {Jack:d}; Sjoerd: {Sjoerd:d}; Dcab: {Dcab:d}'.format(**table) @@ -356,9 +357,9 @@ >>> f.closed True -File objects have some additional methods, such as :meth:`isatty` and -:meth:`truncate` which are less frequently used; consult the Library Reference -for a complete guide to file objects. +File objects have some additional methods, such as :meth:`~file.isatty` and +:meth:`~file.truncate` which are less frequently used; consult the Library +Reference for a complete guide to file objects. .. _tut-pickle: From python-checkins at python.org Wed Jul 29 19:50:25 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 29 Jul 2009 17:50:25 -0000 Subject: [Python-checkins] r74261 - python/trunk/Doc/tutorial/classes.rst Message-ID: Author: georg.brandl Date: Wed Jul 29 19:50:25 2009 New Revision: 74261 Log: Rewrite the section about classes a bit; mostly tidbits, and a larger update to the section about "private" variables to reflect the Pythonic consensus better. Modified: python/trunk/Doc/tutorial/classes.rst Modified: python/trunk/Doc/tutorial/classes.rst ============================================================================== --- python/trunk/Doc/tutorial/classes.rst (original) +++ python/trunk/Doc/tutorial/classes.rst Wed Jul 29 19:50:25 2009 @@ -12,43 +12,40 @@ are retained with full power, however: the class inheritance mechanism allows multiple base classes, a derived class can override any methods of its base class or classes, and a method can call the method of a base class with the same -name. Objects can contain an arbitrary amount of private data. +name. Objects can contain an arbitrary amount of data. In C++ terminology, all class members (including the data members) are *public*, -and all member functions are *virtual*. There are no special constructors or -destructors. As in Modula-3, there are no shorthands for referencing the -object's members from its methods: the method function is declared with an -explicit first argument representing the object, which is provided implicitly by -the call. As in Smalltalk, classes themselves are objects, albeit in the wider -sense of the word: in Python, all data types are objects. This provides -semantics for importing and renaming. Unlike C++ and Modula-3, built-in types -can be used as base classes for extension by the user. Also, like in C++ but -unlike in Modula-3, most built-in operators with special syntax (arithmetic +and all member functions are *virtual*. As in Modula-3, there are no shorthands +for referencing the object's members from its methods: the method function is +declared with an explicit first argument representing the object, which is +provided implicitly by the call. As in Smalltalk, classes themselves are +objects. This provides semantics for importing and renaming. Unlike C++ and +Modula-3, built-in types can be used as base classes for extension by the user. +Also, like in C++, most built-in operators with special syntax (arithmetic operators, subscripting etc.) can be redefined for class instances. +(Lacking universally accepted terminology to talk about classes, I will make +occasional use of Smalltalk and C++ terms. I would use Modula-3 terms, since +its object-oriented semantics are closer to those of Python than C++, but I +expect that few readers have heard of it.) -.. _tut-terminology: -A Word About Terminology -======================== +.. _tut-object: -Lacking universally accepted terminology to talk about classes, I will make -occasional use of Smalltalk and C++ terms. (I would use Modula-3 terms, since -its object-oriented semantics are closer to those of Python than C++, but I -expect that few readers have heard of it.) +A Word About Names and Objects +============================== Objects have individuality, and multiple names (in multiple scopes) can be bound to the same object. This is known as aliasing in other languages. This is usually not appreciated on a first glance at Python, and can be safely ignored when dealing with immutable basic types (numbers, strings, tuples). However, -aliasing has an (intended!) effect on the semantics of Python code involving -mutable objects such as lists, dictionaries, and most types representing -entities outside the program (files, windows, etc.). This is usually used to -the benefit of the program, since aliases behave like pointers in some respects. -For example, passing an object is cheap since only a pointer is passed by the -implementation; and if a function modifies an object passed as an argument, the -caller will see the change --- this eliminates the need for two different -argument passing mechanisms as in Pascal. +aliasing has a possibly surprising effect on the semantics of Python code +involving mutable objects such as lists, dictionaries, and most other types. +This is usually used to the benefit of the program, since aliases behave like +pointers in some respects. For example, passing an object is cheap since only a +pointer is passed by the implementation; and if a function modifies an object +passed as an argument, the caller will see the change --- this eliminates the +need for two different argument passing mechanisms as in Pascal. .. _tut-scopes: @@ -72,7 +69,7 @@ a function invocation. In a sense the set of attributes of an object also form a namespace. The important thing to know about namespaces is that there is absolutely no relation between names in different namespaces; for instance, two -different modules may both define a function "maximize" without confusion --- +different modules may both define a function ``maximize`` without confusion --- users of the modules must prefix it with the module name. By the way, I use the word *attribute* for any name following a dot --- for @@ -111,11 +108,13 @@ Although scopes are determined statically, they are used dynamically. At any time during execution, there are at least three nested scopes whose namespaces -are directly accessible: the innermost scope, which is searched first, contains -the local names; the namespaces of any enclosing functions, which are searched -starting with the nearest enclosing scope; the middle scope, searched next, -contains the current module's global names; and the outermost scope (searched -last) is the namespace containing built-in names. +are directly accessible: + +* the innermost scope, which is searched first, contains the local names +* the scopes of any enclosing functions, which are searched starting with the + nearest enclosing scope, contains non-local, but also non-global names +* the next-to-last scope contains the current module's global names +* the outermost scope (searched last) is the namespace containing built-in names If a name is declared global, then all references and assignments go directly to the middle scope containing the module's global names. Otherwise, all variables @@ -136,15 +135,15 @@ time, so don't rely on dynamic name resolution! (In fact, local variables are already determined statically.) -A special quirk of Python is that -- if no :keyword:`global` -statement is in effect -- assignments to names always go -into the innermost scope. Assignments do not copy data --- they just bind names -to objects. The same is true for deletions: the statement ``del x`` removes the -binding of ``x`` from the namespace referenced by the local scope. In fact, all -operations that introduce new names use the local scope: in particular, import -statements and function definitions bind the module or function name in the -local scope. (The :keyword:`global` statement can be used to indicate that -particular variables live in the global scope.) +A special quirk of Python is that -- if no :keyword:`global` statement is in +effect -- assignments to names always go into the innermost scope. Assignments +do not copy data --- they just bind names to objects. The same is true for +deletions: the statement ``del x`` removes the binding of ``x`` from the +namespace referenced by the local scope. In fact, all operations that introduce +new names use the local scope: in particular, :keyword:`import` statements and +function definitions bind the module or function name in the local scope. (The +:keyword:`global` statement can be used to indicate that particular variables +live in the global scope.) .. _tut-firstclasses: @@ -372,9 +371,9 @@ Often, the first argument of a method is called ``self``. This is nothing more than a convention: the name ``self`` has absolutely no special meaning to -Python. (Note, however, that by not following the convention your code may be +Python. Note, however, that by not following the convention your code may be less readable to other Python programmers, and it is also conceivable that a -*class browser* program might be written that relies upon such a convention.) +*class browser* program might be written that relies upon such a convention. Any function object that is a class attribute defines a method for instances of that class. It is not necessary that the function definition is textually @@ -410,13 +409,13 @@ Methods may reference global names in the same way as ordinary functions. The global scope associated with a method is the module containing the class -definition. (The class itself is never used as a global scope!) While one +definition. (The class itself is never used as a global scope.) While one rarely encounters a good reason for using global data in a method, there are many legitimate uses of the global scope: for one thing, functions and modules imported into the global scope can be used by methods, as well as functions and classes defined in it. Usually, the class containing the method is itself defined in this global scope, and in the next section we'll find some good -reasons why a method would want to reference its own class! +reasons why a method would want to reference its own class. Each value is an object, and therefore has a *class* (also called its *type*). It is stored as ``object.__class__``. @@ -467,12 +466,12 @@ simply replace the base class method of the same name. There is a simple way to call the base class method directly: just call ``BaseClassName.methodname(self, arguments)``. This is occasionally useful to clients as well. (Note that this -only works if the base class is defined or imported directly in the global +only works if the base class is accessible as ``BaseClassName`` in the global scope.) Python has two built-in functions that work with inheritance: -* Use :func:`isinstance` to check an object's type: ``isinstance(obj, int)`` +* Use :func:`isinstance` to check an instance's type: ``isinstance(obj, int)`` will be ``True`` only if ``obj.__class__`` is :class:`int` or some class derived from :class:`int`. @@ -537,26 +536,28 @@ Private Variables ================= -There is limited support for class-private identifiers. Any identifier of the -form ``__spam`` (at least two leading underscores, at most one trailing -underscore) is textually replaced with ``_classname__spam``, where ``classname`` -is the current class name with leading underscore(s) stripped. This mangling is -done without regard to the syntactic position of the identifier, so it can be -used to define class-private instance and class variables, methods, variables -stored in globals, and even variables stored in instances. private to this class -on instances of *other* classes. Truncation may occur when the mangled name -would be longer than 255 characters. Outside classes, or when the class name -consists of only underscores, no mangling occurs. - -Name mangling is intended to give classes an easy way to define "private" -instance variables and methods, without having to worry about instance variables -defined by derived classes, or mucking with instance variables by code outside -the class. Note that the mangling rules are designed mostly to avoid accidents; -it still is possible for a determined soul to access or modify a variable that -is considered private. This can even be useful in special circumstances, such -as in the debugger, and that's one reason why this loophole is not closed. -(Buglet: derivation of a class with the same name as the base class makes use of -private variables of the base class possible.) +"Private" instance variables that cannot be accessed except from inside an +object, don't exist in Python. However, there is a convention that is followed +by most Python code: a name prefixed with an underscore (e.g. ``_spam``) should +be treated as a non-public part of the API (whether it is a function, a method +or a data member). It should be considered an implementation detail and subject +to change without notice. + +Since there is a valid use-case for class-private members (namely to avoid name +clashes of names with names defined by subclasses), there is limited support for +such a mechanism, called :dfn:`name mangling`. Any identifier of the form +``__spam`` (at least two leading underscores, at most one trailing underscore) +is textually replaced with ``_classname__spam``, where ``classname`` is the +current class name with leading underscore(s) stripped. This mangling is done +without regard to the syntactic position of the identifier, so it can be used to +define class-private instance and class variables, methods, variables stored in +globals, and even variables stored in instances. Truncation may occur when the +mangled name would be longer than 255 characters. Outside classes, or when the +class name consists of only underscores, no mangling occurs. + +Note that the mangling rules are designed mostly to avoid accidents; it still is +possible to access or modify a variable that is considered private. This can +even be useful in special circumstances, such as in the debugger. Notice that code passed to ``exec``, ``eval()`` or ``execfile()`` does not consider the classname of the invoking class to be the current class; this is @@ -609,7 +610,7 @@ User-defined exceptions are identified by classes as well. Using this mechanism it is possible to create extensible hierarchies of exceptions. -There are two new valid (semantic) forms for the raise statement:: +There are two new valid (semantic) forms for the :keyword:`raise` statement:: raise Class, instance @@ -620,10 +621,10 @@ raise instance.__class__, instance -A class in an except clause is compatible with an exception if it is the same -class or a base class thereof (but not the other way around --- an except clause -listing a derived class is not compatible with a base class). For example, the -following code will print B, C, D in that order:: +A class in an :keyword:`except` clause is compatible with an exception if it is +the same class or a base class thereof (but not the other way around --- an +except clause listing a derived class is not compatible with a base class). For +example, the following code will print B, C, D in that order:: class B: pass From python-checkins at python.org Wed Jul 29 21:54:40 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 29 Jul 2009 19:54:40 -0000 Subject: [Python-checkins] r74262 - in python/branches/py3k: Doc/c-api/arg.rst Doc/c-api/float.rst Doc/c-api/method.rst Doc/c-api/sys.rst Doc/c-api/tuple.rst Doc/c-api/type.rst Doc/c-api/unicode.rst Doc/library/2to3.rst Doc/library/gettext.rst Doc/library/socket.rst Doc/library/stdtypes.rst Doc/library/warnings.rst Doc/library/webbrowser.rst Doc/library/xml.etree.elementtree.rst Doc/tutorial/classes.rst Doc/tutorial/inputoutput.rst Doc/tutorial/interactive.rst Doc/tutorial/modules.rst Doc/tutorial/stdlib2.rst Message-ID: Author: alexandre.vassalotti Date: Wed Jul 29 21:54:39 2009 New Revision: 74262 Log: Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74074 | georg.brandl | 2009-07-18 05:03:10 -0400 (Sat, 18 Jul 2009) | 1 line #6513: fix example code: warning categories are classes, not instances. ........ r74077 | georg.brandl | 2009-07-18 05:43:40 -0400 (Sat, 18 Jul 2009) | 1 line #6489: fix an ambiguity in getiterator() documentation. ........ r74111 | benjamin.peterson | 2009-07-20 09:30:10 -0400 (Mon, 20 Jul 2009) | 1 line remove docs for deprecated -p option ........ r74188 | benjamin.peterson | 2009-07-23 10:25:31 -0400 (Thu, 23 Jul 2009) | 1 line use bools ........ r74192 | georg.brandl | 2009-07-24 12:28:38 -0400 (Fri, 24 Jul 2009) | 1 line Fix arg types of et#. ........ r74193 | georg.brandl | 2009-07-24 12:46:38 -0400 (Fri, 24 Jul 2009) | 1 line Dont put "void" in signature for nullary functions. ........ r74200 | georg.brandl | 2009-07-25 09:02:15 -0400 (Sat, 25 Jul 2009) | 1 line #6571: add index entries for more operators. ........ r74252 | georg.brandl | 2009-07-29 12:06:31 -0400 (Wed, 29 Jul 2009) | 1 line #6593: fix link targets. ........ r74253 | georg.brandl | 2009-07-29 12:09:17 -0400 (Wed, 29 Jul 2009) | 1 line #6591: add reference to ioctl in fcntl module for platforms other than Windows. ........ r74258 | georg.brandl | 2009-07-29 12:57:05 -0400 (Wed, 29 Jul 2009) | 1 line Add a link to readline, and mention IPython and bpython. ........ r74259 | georg.brandl | 2009-07-29 13:07:21 -0400 (Wed, 29 Jul 2009) | 1 line Fix some markup and small factual glitches found by M. Markert. ........ r74260 | georg.brandl | 2009-07-29 13:15:20 -0400 (Wed, 29 Jul 2009) | 1 line Fix a few markup glitches. ........ r74261 | georg.brandl | 2009-07-29 13:50:25 -0400 (Wed, 29 Jul 2009) | 1 line Rewrite the section about classes a bit; mostly tidbits, and a larger update to the section about "private" variables to reflect the Pythonic consensus better. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/c-api/arg.rst python/branches/py3k/Doc/c-api/float.rst python/branches/py3k/Doc/c-api/method.rst python/branches/py3k/Doc/c-api/sys.rst python/branches/py3k/Doc/c-api/tuple.rst python/branches/py3k/Doc/c-api/type.rst python/branches/py3k/Doc/c-api/unicode.rst python/branches/py3k/Doc/library/2to3.rst python/branches/py3k/Doc/library/gettext.rst python/branches/py3k/Doc/library/socket.rst python/branches/py3k/Doc/library/stdtypes.rst python/branches/py3k/Doc/library/warnings.rst python/branches/py3k/Doc/library/webbrowser.rst python/branches/py3k/Doc/library/xml.etree.elementtree.rst python/branches/py3k/Doc/tutorial/classes.rst python/branches/py3k/Doc/tutorial/inputoutput.rst python/branches/py3k/Doc/tutorial/interactive.rst python/branches/py3k/Doc/tutorial/modules.rst python/branches/py3k/Doc/tutorial/stdlib2.rst Modified: python/branches/py3k/Doc/c-api/arg.rst ============================================================================== --- python/branches/py3k/Doc/c-api/arg.rst (original) +++ python/branches/py3k/Doc/c-api/arg.rst Wed Jul 29 21:54:39 2009 @@ -160,7 +160,7 @@ In both cases, *\*buffer_length* is set to the length of the encoded data without the trailing NUL byte. -``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer] +``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length] Same as ``es#`` except that string objects are passed through without recoding them. Instead, the implementation assumes that the string object uses the encoding passed in as parameter. Modified: python/branches/py3k/Doc/c-api/float.rst ============================================================================== --- python/branches/py3k/Doc/c-api/float.rst (original) +++ python/branches/py3k/Doc/c-api/float.rst Wed Jul 29 21:54:39 2009 @@ -64,16 +64,16 @@ around the header file :file:`float.h`. -.. cfunction:: double PyFloat_GetMax(void) +.. cfunction:: double PyFloat_GetMax() Return the maximum representable finite float *DBL_MAX* as C :ctype:`double`. -.. cfunction:: double PyFloat_GetMin(void) +.. cfunction:: double PyFloat_GetMin() Return the minimum normalized positive float *DBL_MIN* as C :ctype:`double`. -.. cfunction:: int PyFloat_ClearFreeList(void) +.. cfunction:: int PyFloat_ClearFreeList() Clear the float free list. Return the number of items that could not be freed. Modified: python/branches/py3k/Doc/c-api/method.rst ============================================================================== --- python/branches/py3k/Doc/c-api/method.rst (original) +++ python/branches/py3k/Doc/c-api/method.rst Wed Jul 29 21:54:39 2009 @@ -94,7 +94,7 @@ Macro version of :cfunc:`PyMethod_Self` which avoids error checking. -.. cfunction:: int PyMethod_ClearFreeList(void) +.. cfunction:: int PyMethod_ClearFreeList() Clear the free list. Return the total number of freed items. Modified: python/branches/py3k/Doc/c-api/sys.rst ============================================================================== --- python/branches/py3k/Doc/c-api/sys.rst (original) +++ python/branches/py3k/Doc/c-api/sys.rst Wed Jul 29 21:54:39 2009 @@ -73,7 +73,7 @@ case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` on error. -.. cfunction:: void PySys_ResetWarnOptions(void) +.. cfunction:: void PySys_ResetWarnOptions() Reset :data:`sys.warnoptions` to an empty list. Modified: python/branches/py3k/Doc/c-api/tuple.rst ============================================================================== --- python/branches/py3k/Doc/c-api/tuple.rst (original) +++ python/branches/py3k/Doc/c-api/tuple.rst Wed Jul 29 21:54:39 2009 @@ -107,6 +107,6 @@ raises :exc:`MemoryError` or :exc:`SystemError`. -.. cfunction:: int PyTuple_ClearFreeList(void) +.. cfunction:: int PyTuple_ClearFreeList() Clear the free list. Return the total number of freed items. Modified: python/branches/py3k/Doc/c-api/type.rst ============================================================================== --- python/branches/py3k/Doc/c-api/type.rst (original) +++ python/branches/py3k/Doc/c-api/type.rst Wed Jul 29 21:54:39 2009 @@ -33,7 +33,7 @@ standard type object. Return false in all other cases. -.. cfunction:: unsigned int PyType_ClearCache(void) +.. cfunction:: unsigned int PyType_ClearCache() Clear the internal lookup cache. Return the current version tag. Modified: python/branches/py3k/Doc/c-api/unicode.rst ============================================================================== --- python/branches/py3k/Doc/c-api/unicode.rst (original) +++ python/branches/py3k/Doc/c-api/unicode.rst Wed Jul 29 21:54:39 2009 @@ -84,10 +84,11 @@ :ctype:`PyUnicodeObject` (not checked). -.. cfunction:: int PyUnicode_ClearFreeList(void) +.. cfunction:: int PyUnicode_ClearFreeList() Clear the free list. Return the total number of freed items. + Unicode provides many different character properties. The most often needed ones are available through these macros which are mapped to C functions depending on the Python configuration. Modified: python/branches/py3k/Doc/library/2to3.rst ============================================================================== --- python/branches/py3k/Doc/library/2to3.rst (original) +++ python/branches/py3k/Doc/library/2to3.rst Wed Jul 29 21:54:39 2009 @@ -86,13 +86,6 @@ The :option:`-v` option enables output of more information on the translation process. -When the :option:`-p` is passed, the :2to3fixer:`print` fixer ``print`` as a -function instead of a statement. This is useful when ``from __future__ import -print_function`` is being used. If this option is not given, the print fixer -will surround print calls in an extra set of parentheses because it cannot -differentiate between the print statement with parentheses (such as ``print -("a" + "b" + "c")``) and a true function call. - .. _2to3-fixers: Modified: python/branches/py3k/Doc/library/gettext.rst ============================================================================== --- python/branches/py3k/Doc/library/gettext.rst (original) +++ python/branches/py3k/Doc/library/gettext.rst Wed Jul 29 21:54:39 2009 @@ -194,7 +194,7 @@ :func:`translation`. For the *names* parameter, please see the description of the translation - object's :meth:`install` method. + object's :meth:`~NullTranslations.install` method. As seen below, you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the :func:`_` Modified: python/branches/py3k/Doc/library/socket.rst ============================================================================== --- python/branches/py3k/Doc/library/socket.rst (original) +++ python/branches/py3k/Doc/library/socket.rst Wed Jul 29 21:54:39 2009 @@ -555,6 +555,8 @@ The :meth:`ioctl` method is a limited interface to the WSAIoctl system interface. Please refer to the MSDN documentation for more information. + On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl` + functions may be used; they accept a socket object as their first argument. .. method:: socket.listen(backlog) Modified: python/branches/py3k/Doc/library/stdtypes.rst ============================================================================== --- python/branches/py3k/Doc/library/stdtypes.rst (original) +++ python/branches/py3k/Doc/library/stdtypes.rst Wed Jul 29 21:54:39 2009 @@ -120,25 +120,24 @@ Comparisons =========== -.. index:: pair: chaining; comparisons - -There are eight comparison operations in Python. They all have the same -priority (which is higher than that of the Boolean operations). Comparisons can -be chained arbitrarily; for example, ``x < y <= z`` is equivalent to ``x < y and -y <= z``, except that *y* is evaluated only once (but in both cases *z* is not -evaluated at all when ``x < y`` is found to be false). - .. index:: + pair: chaining; comparisons pair: operator; comparison operator: == operator: < - operator: > operator: <= + operator: > operator: >= operator: != operator: is operator: is not +There are eight comparison operations in Python. They all have the same +priority (which is higher than that of the Boolean operations). Comparisons can +be chained arbitrarily; for example, ``x < y <= z`` is equivalent to ``x < y and +y <= z``, except that *y* is evaluated only once (but in both cases *z* is not +evaluated at all when ``x < y`` is found to be false). + This table summarizes the comparison operations: +------------+-------------------------+ @@ -248,6 +247,13 @@ builtin: int builtin: float builtin: complex + operator: + + operator: - + operator: * + operator: / + operator: // + operator: % + operator: ** Python fully supports mixed arithmetic: when a binary arithmetic operator has operands of different numeric types, the operand with the "narrower" type is @@ -368,7 +374,15 @@ Bit-string Operations on Integer Types -------------------------------------- -.. _bit-string-operations: +.. index:: + triple: operations on; integer; types + pair: bit-string; operations + pair: shifting; operations + pair: masking; operations + operator: ^ + operator: & + operator: << + operator: >> Integers support additional operations that make sense only for bit-strings. Negative numbers are treated as their 2's complement value (this assumes a @@ -400,12 +414,6 @@ | ``~x`` | the bits of *x* inverted | | +------------+--------------------------------+----------+ -.. index:: - triple: operations on; integer; types - pair: bit-string; operations - pair: shifting; operations - pair: masking; operations - Notes: (1) Modified: python/branches/py3k/Doc/library/warnings.rst ============================================================================== --- python/branches/py3k/Doc/library/warnings.rst (original) +++ python/branches/py3k/Doc/library/warnings.rst Wed Jul 29 21:54:39 2009 @@ -206,7 +206,7 @@ fxn() # Verify some things assert len(w) == 1 - assert isinstance(w[-1].category, DeprecationWarning) + assert issubclass(w[-1].category, DeprecationWarning) assert "deprecated" in str(w[-1].message) One can also cause all warnings to be exceptions by using ``error`` instead of Modified: python/branches/py3k/Doc/library/webbrowser.rst ============================================================================== --- python/branches/py3k/Doc/library/webbrowser.rst (original) +++ python/branches/py3k/Doc/library/webbrowser.rst Wed Jul 29 21:54:39 2009 @@ -46,14 +46,14 @@ The following functions are defined: -.. function:: open(url[, new=0[, autoraise=1]]) +.. function:: open(url[, new=0[, autoraise=True]]) - Display *url* using the default browser. If *new* is 0, the *url* is opened in - the same browser window if possible. If *new* is 1, a new browser window is - opened if possible. If *new* is 2, a new browser page ("tab") is opened if - possible. If *autoraise* is true, the window is raised if possible (note that - under many window managers this will occur regardless of the setting of this - variable). + Display *url* using the default browser. If *new* is 0, the *url* is opened + in the same browser window if possible. If *new* is 1, a new browser window + is opened if possible. If *new* is 2, a new browser page ("tab") is opened + if possible. If *autoraise* is ``True``, the window is raised if possible + (note that under many window managers this will occur regardless of the + setting of this variable). Note that on some platforms, trying to open a filename using this function, may work and start the operating system's associated program. However, this @@ -175,7 +175,7 @@ module-level convenience functions: -.. method:: controller.open(url[, new[, autoraise=1]]) +.. method:: controller.open(url[, new[, autoraise=True]]) Display *url* using the browser handled by this controller. If *new* is 1, a new browser window is opened if possible. If *new* is 2, a new browser page ("tab") Modified: python/branches/py3k/Doc/library/xml.etree.elementtree.rst ============================================================================== --- python/branches/py3k/Doc/library/xml.etree.elementtree.rst (original) +++ python/branches/py3k/Doc/library/xml.etree.elementtree.rst Wed Jul 29 21:54:39 2009 @@ -262,9 +262,9 @@ .. method:: Element.getiterator([tag=None]) Creates a tree iterator with the current element as the root. The iterator - iterates over this element and all elements below it that match the given tag. - If tag is ``None`` or ``'*'`` then all elements are iterated over. Returns an - iterable that provides element objects in document (depth first) order. + iterates over this element and all elements below it, in document (depth first) + order. If *tag* is not ``None`` or ``'*'``, only elements whose tag equals + *tag* are returned from the iterator. .. method:: Element.insert(index, element) Modified: python/branches/py3k/Doc/tutorial/classes.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/classes.rst (original) +++ python/branches/py3k/Doc/tutorial/classes.rst Wed Jul 29 21:54:39 2009 @@ -12,44 +12,41 @@ are retained with full power, however: the class inheritance mechanism allows multiple base classes, a derived class can override any methods of its base class or classes, and a method can call the method of a base class with the same -name. Objects can contain an arbitrary amount of private data. +name. Objects can contain an arbitrary amount of data. In C++ terminology, normally class members (including the data members) are *public* (except see below :ref:`tut-private`), -and all member functions are *virtual*. There are no special constructors or -destructors. As in Modula-3, there are no shorthands for referencing the -object's members from its methods: the method function is declared with an -explicit first argument representing the object, which is provided implicitly by -the call. As in Smalltalk, classes themselves are objects, albeit in the wider -sense of the word: in Python, all data types are objects. This provides -semantics for importing and renaming. Unlike C++ and Modula-3, built-in types -can be used as base classes for extension by the user. Also, like in C++ but -unlike in Modula-3, most built-in operators with special syntax (arithmetic +and all member functions are *virtual*. As in Modula-3, there are no shorthands +for referencing the object's members from its methods: the method function is +declared with an explicit first argument representing the object, which is +provided implicitly by the call. As in Smalltalk, classes themselves are +objects. This provides semantics for importing and renaming. Unlike C++ and +Modula-3, built-in types can be used as base classes for extension by the user. +Also, like in C++, most built-in operators with special syntax (arithmetic operators, subscripting etc.) can be redefined for class instances. +(Lacking universally accepted terminology to talk about classes, I will make +occasional use of Smalltalk and C++ terms. I would use Modula-3 terms, since +its object-oriented semantics are closer to those of Python than C++, but I +expect that few readers have heard of it.) -.. _tut-terminology: -A Word About Terminology -======================== +.. _tut-object: -Lacking universally accepted terminology to talk about classes, I will make -occasional use of Smalltalk and C++ terms. (I would use Modula-3 terms, since -its object-oriented semantics are closer to those of Python than C++, but I -expect that few readers have heard of it.) +A Word About Names and Objects +============================== Objects have individuality, and multiple names (in multiple scopes) can be bound to the same object. This is known as aliasing in other languages. This is usually not appreciated on a first glance at Python, and can be safely ignored when dealing with immutable basic types (numbers, strings, tuples). However, -aliasing has an (intended!) effect on the semantics of Python code involving -mutable objects such as lists, dictionaries, and most types representing -entities outside the program (files, windows, etc.). This is usually used to -the benefit of the program, since aliases behave like pointers in some respects. -For example, passing an object is cheap since only a pointer is passed by the -implementation; and if a function modifies an object passed as an argument, the -caller will see the change --- this eliminates the need for two different -argument passing mechanisms as in Pascal. +aliasing has a possibly surprising effect on the semantics of Python code +involving mutable objects such as lists, dictionaries, and most other types. +This is usually used to the benefit of the program, since aliases behave like +pointers in some respects. For example, passing an object is cheap since only a +pointer is passed by the implementation; and if a function modifies an object +passed as an argument, the caller will see the change --- this eliminates the +need for two different argument passing mechanisms as in Pascal. .. _tut-scopes: @@ -73,7 +70,7 @@ a function invocation. In a sense the set of attributes of an object also form a namespace. The important thing to know about namespaces is that there is absolutely no relation between names in different namespaces; for instance, two -different modules may both define a function "maximize" without confusion --- +different modules may both define a function ``maximize`` without confusion --- users of the modules must prefix it with the module name. By the way, I use the word *attribute* for any name following a dot --- for @@ -112,11 +109,13 @@ Although scopes are determined statically, they are used dynamically. At any time during execution, there are at least three nested scopes whose namespaces -are directly accessible: the innermost scope, which is searched first, contains -the local names; the namespaces of any enclosing functions, which are searched -starting with the nearest enclosing scope; the middle scope, searched next, -contains the current module's global names; and the outermost scope (searched -last) is the namespace containing built-in names. +are directly accessible: + +* the innermost scope, which is searched first, contains the local names +* the scopes of any enclosing functions, which are searched starting with the + nearest enclosing scope, contains non-local, but also non-global names +* the next-to-last scope contains the current module's global names +* the outermost scope (searched last) is the namespace containing built-in names If a name is declared global, then all references and assignments go directly to the middle scope containing the module's global names. To rebind variables @@ -138,15 +137,15 @@ time, so don't rely on dynamic name resolution! (In fact, local variables are already determined statically.) -A special quirk of Python is that -- if no :keyword:`global` or -:keyword:`nonlocal` statement is in effect -- assignments to names always go -into the innermost scope. Assignments do not copy data --- they just bind names -to objects. The same is true for deletions: the statement ``del x`` removes the -binding of ``x`` from the namespace referenced by the local scope. In fact, all -operations that introduce new names use the local scope: in particular, import -statements and function definitions bind the module or function name in the -local scope. (The :keyword:`global` statement can be used to indicate that -particular variables live in the global scope.) +A special quirk of Python is that -- if no :keyword:`global` statement is in +effect -- assignments to names always go into the innermost scope. Assignments +do not copy data --- they just bind names to objects. The same is true for +deletions: the statement ``del x`` removes the binding of ``x`` from the +namespace referenced by the local scope. In fact, all operations that introduce +new names use the local scope: in particular, :keyword:`import` statements and +function definitions bind the module or function name in the local scope. (The +:keyword:`global` statement can be used to indicate that particular variables +live in the global scope.) The :keyword:`global` statement can be used to indicate that particular variables live in the global scope and should be rebound there; the @@ -424,9 +423,9 @@ Often, the first argument of a method is called ``self``. This is nothing more than a convention: the name ``self`` has absolutely no special meaning to -Python. (Note, however, that by not following the convention your code may be +Python. Note, however, that by not following the convention your code may be less readable to other Python programmers, and it is also conceivable that a -*class browser* program might be written that relies upon such a convention.) +*class browser* program might be written that relies upon such a convention. Any function object that is a class attribute defines a method for instances of that class. It is not necessary that the function definition is textually @@ -462,13 +461,13 @@ Methods may reference global names in the same way as ordinary functions. The global scope associated with a method is the module containing the class -definition. (The class itself is never used as a global scope!) While one +definition. (The class itself is never used as a global scope.) While one rarely encounters a good reason for using global data in a method, there are many legitimate uses of the global scope: for one thing, functions and modules imported into the global scope can be used by methods, as well as functions and classes defined in it. Usually, the class containing the method is itself defined in this global scope, and in the next section we'll find some good -reasons why a method would want to reference its own class! +reasons why a method would want to reference its own class. Each value is an object, and therefore has a *class* (also called its *type*). It is stored as ``object.__class__``. @@ -519,12 +518,12 @@ simply replace the base class method of the same name. There is a simple way to call the base class method directly: just call ``BaseClassName.methodname(self, arguments)``. This is occasionally useful to clients as well. (Note that this -only works if the base class is defined or imported directly in the global +only works if the base class is accessible as ``BaseClassName`` in the global scope.) Python has two built-in functions that work with inheritance: -* Use :func:`isinstance` to check an object's type: ``isinstance(obj, int)`` +* Use :func:`isinstance` to check an instance's type: ``isinstance(obj, int)`` will be ``True`` only if ``obj.__class__`` is :class:`int` or some class derived from :class:`int`. @@ -582,28 +581,30 @@ Private Variables ================= -There is limited support for class-private identifiers. Any identifier of the -form ``__spam`` (at least two leading underscores, at most one trailing -underscore) is textually replaced with ``_classname__spam``, where ``classname`` -is the current class name with leading underscore(s) stripped. This mangling is -done without regard to the syntactic position of the identifier, so it can be -used to define class-private instance and class variables, methods, variables -stored in globals, and even variables stored in instances. private to this class -on instances of *other* classes. Truncation may occur when the mangled name -would be longer than 255 characters. Outside classes, or when the class name -consists of only underscores, no mangling occurs. - -Name mangling is intended to give classes an easy way to define "private" -instance variables and methods, without having to worry about instance variables -defined by derived classes, or mucking with instance variables by code outside -the class. Note that the mangling rules are designed mostly to avoid accidents; -it still is possible for a determined soul to access or modify a variable that -is considered private. This can even be useful in special circumstances, such -as in the debugger, and that's one reason why this loophole is not closed. -(Buglet: derivation of a class with the same name as the base class makes use of -private variables of the base class possible.) +"Private" instance variables that cannot be accessed except from inside an +object, don't exist in Python. However, there is a convention that is followed +by most Python code: a name prefixed with an underscore (e.g. ``_spam``) should +be treated as a non-public part of the API (whether it is a function, a method +or a data member). It should be considered an implementation detail and subject +to change without notice. + +Since there is a valid use-case for class-private members (namely to avoid name +clashes of names with names defined by subclasses), there is limited support for +such a mechanism, called :dfn:`name mangling`. Any identifier of the form +``__spam`` (at least two leading underscores, at most one trailing underscore) +is textually replaced with ``_classname__spam``, where ``classname`` is the +current class name with leading underscore(s) stripped. This mangling is done +without regard to the syntactic position of the identifier, so it can be used to +define class-private instance and class variables, methods, variables stored in +globals, and even variables stored in instances. Truncation may occur when the +mangled name would be longer than 255 characters. Outside classes, or when the +class name consists of only underscores, no mangling occurs. + +Note that the mangling rules are designed mostly to avoid accidents; it still is +possible to access or modify a variable that is considered private. This can +even be useful in special circumstances, such as in the debugger. -Notice that code passed to ``exec()`` or ``eval()`` does not +Notice that code passed to ``exec()``, ``eval()`` or ``execfile()`` does not consider the classname of the invoking class to be the current class; this is similar to the effect of the ``global`` statement, the effect of which is likewise restricted to code that is byte-compiled together. The same @@ -654,7 +655,7 @@ User-defined exceptions are identified by classes as well. Using this mechanism it is possible to create extensible hierarchies of exceptions. -There are two valid (semantic) forms for the raise statement:: +There are two new valid (semantic) forms for the :keyword:`raise` statement:: raise Class @@ -665,10 +666,10 @@ raise Class() -A class in an except clause is compatible with an exception if it is the same -class or a base class thereof (but not the other way around --- an except clause -listing a derived class is not compatible with a base class). For example, the -following code will print B, C, D in that order:: +A class in an :keyword:`except` clause is compatible with an exception if it is +the same class or a base class thereof (but not the other way around --- an +except clause listing a derived class is not compatible with a base class). For +example, the following code will print B, C, D in that order:: class B(Exception): pass Modified: python/branches/py3k/Doc/tutorial/inputoutput.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/inputoutput.rst (original) +++ python/branches/py3k/Doc/tutorial/inputoutput.rst Wed Jul 29 21:54:39 2009 @@ -130,16 +130,17 @@ We are the knights who say "Ni!" The brackets and characters within them (called format fields) are replaced with -the objects passed into the format method. The number in the brackets refers to -the position of the object passed into the format method. :: +the objects passed into the :meth:`~str.format` method. The number in the +brackets refers to the position of the object passed into the +:meth:`~str.format` method. :: >>> print('{0} and {1}'.format('spam', 'eggs')) spam and eggs >>> print('{1} and {0}'.format('spam', 'eggs')) eggs and spam -If keyword arguments are used in the format method, their values are referred to -by using the name of the argument. :: +If keyword arguments are used in the :meth:`~str.format` method, their values +are referred to by using the name of the argument. :: >>> print('This {food} is {adjective}.'.format( ... food='spam', adjective='absolutely horrible')) @@ -160,7 +161,7 @@ The value of PI is approximately 3.142. Passing an integer after the ``':'`` will cause that field to be a minimum -number of characters wide. This is useful for making tables pretty.:: +number of characters wide. This is useful for making tables pretty. :: >>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 7678} >>> for name, phone in table.items(): @@ -181,7 +182,7 @@ Jack: 4098; Sjoerd: 4127; Dcab: 8637678 This could also be done by passing the table as keyword arguments with the '**' -notation.:: +notation. :: >>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678} >>> print('Jack: {Jack:d}; Sjoerd: {Sjoerd:d}; Dcab: {Dcab:d}'.format(**table)) @@ -374,9 +375,9 @@ >>> f.closed True -File objects have some additional methods, such as :meth:`isatty` and -:meth:`truncate` which are less frequently used; consult the Library Reference -for a complete guide to file objects. +File objects have some additional methods, such as :meth:`~file.isatty` and +:meth:`~file.truncate` which are less frequently used; consult the Library +Reference for a complete guide to file objects. .. _tut-pickle: Modified: python/branches/py3k/Doc/tutorial/interactive.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/interactive.rst (original) +++ python/branches/py3k/Doc/tutorial/interactive.rst Wed Jul 29 21:54:39 2009 @@ -6,8 +6,8 @@ Some versions of the Python interpreter support editing of the current input line and history substitution, similar to facilities found in the Korn shell and -the GNU Bash shell. This is implemented using the *GNU Readline* library, which -supports Emacs-style and vi-style editing. This library has its own +the GNU Bash shell. This is implemented using the `GNU Readline`_ library, +which supports Emacs-style and vi-style editing. This library has its own documentation which I won't duplicate here; however, the basics are easily explained. The interactive editing and history described here are optionally available in the Unix and Cygwin versions of the interpreter. @@ -148,8 +148,8 @@ .. _tut-commentary: -Commentary -========== +Alternatives to the Interactive Interpreter +=========================================== This facility is an enormous step forward compared to earlier versions of the interpreter; however, some wishes are left: It would be nice if the proper @@ -158,8 +158,12 @@ symbol table. A command to check (or even suggest) matching parentheses, quotes, etc., would also be useful. -.. % - Do we mention IPython? DUBOIS +One alternative enhanced interactive interpreter that has been around for quite +some time is `IPython`_, which features tab completion, object exploration and +advanced history management. It can also be thoroughly customized and embedded +into other applications. Another similar enhanced interactive environment is +`bpython`_. + .. rubric:: Footnotes @@ -167,3 +171,7 @@ :envvar:`PYTHONSTARTUP` environment variable when you start an interactive interpreter. + +.. _GNU Readline: http://tiswww.case.edu/php/chet/readline/rltop.html +.. _IPython: http://ipython.scipy.org/ +.. _bpython: http://www.bpython-interpreter.org/ Modified: python/branches/py3k/Doc/tutorial/modules.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/modules.rst (original) +++ python/branches/py3k/Doc/tutorial/modules.rst Wed Jul 29 21:54:39 2009 @@ -448,14 +448,14 @@ submodules are present in the package, and imports them all. Unfortunately, this operation does not work very well on Windows platforms, where the filesystem does not always have accurate information about the case of a -filename! On these platforms, there is no guaranteed way to know whether a file +filename. On these platforms, there is no guaranteed way to know whether a file :file:`ECHO.PY` should be imported as a module :mod:`echo`, :mod:`Echo` or :mod:`ECHO`. (For example, Windows 95 has the annoying practice of showing all file names with a capitalized first letter.) The DOS 8+3 filename restriction adds another interesting problem for long module names. The only solution is for the package author to provide an explicit index of the -package. The import statement uses the following convention: if a package's +package. The :keyword:`import` statement uses the following convention: if a package's :file:`__init__.py` code defines a list named ``__all__``, it is taken to be the list of module names that should be imported when ``from package import *`` is encountered. It is up to the package author to keep this list up-to-date when a @@ -476,16 +476,16 @@ 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 submodules of the package that were explicitly loaded by -previous import statements. Consider this code:: +previous :keyword:`import` statements. Consider this code:: import sound.effects.echo import sound.effects.surround from sound.effects import * -In this example, the echo and surround modules are imported in the current -namespace because they are defined in the :mod:`sound.effects` package when the -``from...import`` statement is executed. (This also works when ``__all__`` is -defined.) +In this example, the :mod:`echo` and :mod:`surround` modules are imported in the +current namespace because they are defined in the :mod:`sound.effects` package +when the ``from...import`` statement is executed. (This also works when +``__all__`` is defined.) Note that in general the practice of importing ``*`` from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to @@ -537,5 +537,6 @@ .. rubric:: Footnotes .. [#] In fact function definitions are also 'statements' that are 'executed'; the - execution enters the function name in the module's global symbol table. + execution of a module-level function enters the function name in the module's + global symbol table. Modified: python/branches/py3k/Doc/tutorial/stdlib2.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/stdlib2.rst (original) +++ python/branches/py3k/Doc/tutorial/stdlib2.rst Wed Jul 29 21:54:39 2009 @@ -347,12 +347,15 @@ The :mod:`decimal` module offers a :class:`Decimal` datatype for decimal floating point arithmetic. Compared to the built-in :class:`float` -implementation of binary floating point, the new class is especially helpful for -financial applications and other uses which require exact decimal -representation, control over precision, control over rounding to meet legal or -regulatory requirements, tracking of significant decimal places, or for -applications where the user expects the results to match calculations done by -hand. +implementation of binary floating point, the class is especially helpful for + +* financial applications and other uses which require exact decimal + representation, +* control over precision, +* control over rounding to meet legal or regulatory requirements, +* tracking of significant decimal places, or +* applications where the user expects the results to match calculations done by + hand. For example, calculating a 5% tax on a 70 cent phone charge gives different results in decimal floating point and binary floating point. The difference From python-checkins at python.org Wed Jul 29 22:00:39 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 29 Jul 2009 20:00:39 -0000 Subject: [Python-checkins] r74263 - python/branches/py3k Message-ID: Author: alexandre.vassalotti Date: Wed Jul 29 22:00:39 2009 New Revision: 74263 Log: Blocked revisions 74134,74147 via svnmerge ........ r74134 | thomas.heller | 2009-07-21 02:27:14 -0400 (Tue, 21 Jul 2009) | 3 lines Issue #6493: Fix a ctypes problem setting bitfields more than 31 bits wide. ........ r74147 | thomas.heller | 2009-07-21 15:04:02 -0400 (Tue, 21 Jul 2009) | 1 line Revert rev 74134, as it does not completely fixx issue #6493. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Jul 29 22:12:15 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Wed, 29 Jul 2009 20:12:15 -0000 Subject: [Python-checkins] r74264 - in python/branches/py3k: Doc/tutorial/inputoutput.rst Lib/inspect.py Lib/webbrowser.py Misc/build.sh Objects/dictobject.c Python/import.c Message-ID: Author: alexandre.vassalotti Date: Wed Jul 29 22:12:15 2009 New Revision: 74264 Log: Merged revisions 74075,74187,74197,74201,74216,74225 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74075 | georg.brandl | 2009-07-18 05:06:31 -0400 (Sat, 18 Jul 2009) | 1 line #6505: fix typos. ........ r74187 | benjamin.peterson | 2009-07-23 10:19:08 -0400 (Thu, 23 Jul 2009) | 1 line use bools for autoraise ........ r74197 | benjamin.peterson | 2009-07-24 22:03:48 -0400 (Fri, 24 Jul 2009) | 1 line clarify ........ r74201 | amaury.forgeotdarc | 2009-07-25 12:22:06 -0400 (Sat, 25 Jul 2009) | 2 lines Better name a variable: 'buf' seems to imply a mutable buffer. ........ r74216 | michael.foord | 2009-07-26 17:12:14 -0400 (Sun, 26 Jul 2009) | 1 line Issue 6581. Michael Foord ........ r74225 | kurt.kaiser | 2009-07-27 12:09:28 -0400 (Mon, 27 Jul 2009) | 5 lines 1. Clean workspace more thoughly before build. 2. Add url of branch we are building to 'results' webpage. (url is now available in $repo_path, could be added to failure email.) 3. Adjust permissions to improve upload reliability. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/tutorial/inputoutput.rst python/branches/py3k/Lib/inspect.py python/branches/py3k/Lib/webbrowser.py python/branches/py3k/Misc/build.sh python/branches/py3k/Objects/dictobject.c python/branches/py3k/Python/import.c Modified: python/branches/py3k/Doc/tutorial/inputoutput.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/inputoutput.rst (original) +++ python/branches/py3k/Doc/tutorial/inputoutput.rst Wed Jul 29 22:12:15 2009 @@ -152,9 +152,9 @@ other='Georg')) The story of Bill, Manfred, and Georg. -An optional ``':'`` and format specifier can follow the field name. This also +An optional ``':'`` and format specifier can follow the field name. This allows greater control over how the value is formatted. The following example -truncates the Pi to three places after the decimal. +truncates Pi to three places after the decimal. >>> import math >>> print('The value of PI is approximately {0:.3f}.'.format(math.pi)) @@ -208,8 +208,8 @@ The value of PI is approximately 3.142. Since :meth:`str.format` is quite new, a lot of Python code still uses the ``%`` -operator. However, because this old style of formatting will eventually removed -from the language :meth:`str.format` should generally be used. +operator. However, because this old style of formatting will eventually be +removed from the language, :meth:`str.format` should generally be used. More information can be found in the :ref:`old-string-formatting` section. Modified: python/branches/py3k/Lib/inspect.py ============================================================================== --- python/branches/py3k/Lib/inspect.py (original) +++ python/branches/py3k/Lib/inspect.py Wed Jul 29 22:12:15 2009 @@ -994,7 +994,10 @@ tb = tb.tb_next return framelist -currentframe = sys._getframe +if hasattr(sys, '_getframe'): + currentframe = sys._getframe +else: + currentframe = lambda _=None: None def stack(context=1): """Return a list of records for the stack above the caller's frame.""" Modified: python/branches/py3k/Lib/webbrowser.py ============================================================================== --- python/branches/py3k/Lib/webbrowser.py (original) +++ python/branches/py3k/Lib/webbrowser.py Wed Jul 29 22:12:15 2009 @@ -56,7 +56,7 @@ # It is recommended one does "import webbrowser" and uses webbrowser.open(url) # instead of "from webbrowser import *". -def open(url, new=0, autoraise=1): +def open(url, new=0, autoraise=True): for name in _tryorder: browser = get(name) if browser.open(url, new, autoraise): @@ -145,7 +145,7 @@ self.name = name self.basename = name - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): raise NotImplementedError def open_new(self, url): @@ -169,7 +169,7 @@ self.args = name[1:] self.basename = os.path.basename(self.name) - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] try: @@ -186,7 +186,7 @@ """Class for all browsers which are to be started in the background.""" - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] try: @@ -217,7 +217,7 @@ raise_opt = [] if remote and self.raise_opts: # use autoraise argument only for remote invocation - autoraise = int(bool(autoraise)) + autoraise = int(autoraise) opt = self.raise_opts[autoraise] if opt: raise_opt = [opt] @@ -257,7 +257,7 @@ else: return not p.wait() - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): if new == 0: action = self.remote_action elif new == 1: @@ -341,7 +341,7 @@ for more information on the Konqueror remote-control interface. """ - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): # XXX Currently I know no way to prevent KFM from opening a new win. if new == 2: action = "newTab" @@ -429,7 +429,7 @@ s.close() return 1 - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): if new: ok = self._remote("LOADNEW " + url) else: @@ -512,7 +512,7 @@ if sys.platform[:3] == "win": class WindowsDefault(BaseBrowser): - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): try: os.startfile(url) except WindowsError: @@ -546,7 +546,7 @@ pass else: class InternetConfig(BaseBrowser): - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): ic.launchurl(url) return True # Any way to get status? @@ -567,7 +567,7 @@ def __init__(self, name): self.name = name - def open(self, url, new=0, autoraise=1): + def open(self, url, new=0, autoraise=True): assert "'" not in url # hack for local urls if not ':' in url: Modified: python/branches/py3k/Misc/build.sh ============================================================================== --- python/branches/py3k/Misc/build.sh (original) +++ python/branches/py3k/Misc/build.sh Wed Jul 29 22:12:15 2009 @@ -4,9 +4,11 @@ ## does this: ## svn up ; ./configure ; make ; make test ; make install ; cd Doc ; make ## -## Logs are kept and rsync'ed to the host. If there are test failure(s), +## Logs are kept and rsync'ed to the webhost. If there are test failure(s), ## information about the failure(s) is mailed. ## +## The user must be a member of the webmaster group locally and on webhost. +## ## This script is run on the PSF's machine as user neal via crontab. ## ## Yes, this script would probably be easier in python, but then @@ -76,7 +78,8 @@ # Skip these tests altogether when looking for leaks. These tests # do not need to be stored above in LEAKY_TESTS too. # test_logging causes hangs, skip it. -LEAKY_SKIPS="-x test_logging $_ALWAYS_SKIP" +# KBK 21Apr09: test_httpservers causes hangs, skip for now. +LEAKY_SKIPS="-x test_compiler test_logging test_httpservers" # Change this flag to "yes" for old releases to only update/build the docs. BUILD_DISABLED="no" @@ -133,9 +136,14 @@ ## setup cd $DIR +make clobber /dev/null 2>&1 +cp -p Modules/Setup.dist Modules/Setup +# But maybe there was no Makefile - we are only building docs. Clear build: +rm -rf build/ mkdir -p build -rm -f $RESULT_FILE build/*.out rm -rf $INSTALL_DIR +## get the path we are building +repo_path=$(grep "url=" .svn/entries | sed -e s/\\W*url=// -e s/\"//g) ## create results file TITLE="Automated Python Build Results" @@ -153,6 +161,8 @@ echo " Hostname:`uname -n`" >> $RESULT_FILE echo " " >> $RESULT_FILE echo " Platform:`uname -srmpo`" >> $RESULT_FILE +echo " " >> $RESULT_FILE +echo " URL:$repo_path" >> $RESULT_FILE echo " " >> $RESULT_FILE echo "" >> $RESULT_FILE echo "
        " >> $RESULT_FILE @@ -223,7 +233,7 @@ start=`current_time` ## ensure that the reflog exists so the grep doesn't fail touch $REFLOG - $PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network,urlfetch $LEAKY_SKIPS >& build/$F + $PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network $LEAKY_SKIPS >& build/$F LEAK_PAT="($LEAKY_TESTS|sum=0)" NUM_FAILURES=`egrep -vc "$LEAK_PAT" $REFLOG` place_summary_first build/$F @@ -259,13 +269,13 @@ # which will definitely fail with a conflict. #CONFLICTED_FILE=commontex/boilerplate.tex #conflict_count=`grep -c "<<<" $CONFLICTED_FILE` -make clean conflict_count=0 if [ $conflict_count != 0 ]; then echo "Conflict detected in $CONFLICTED_FILE. Doc build skipped." > ../build/$F err=1 else - make checkout update html >& ../build/$F + make clean > ../build/$F 2>&1 + make checkout update html >> ../build/$F 2>&1 err=$? fi update_status "Making doc" "$F" $start @@ -279,6 +289,8 @@ echo "" >> $RESULT_FILE ## copy results +chgrp -R webmaster build/html +chmod -R g+w build/html rsync $RSYNC_OPTS build/html/* $REMOTE_SYSTEM:$REMOTE_DIR cd ../build rsync $RSYNC_OPTS index.html *.out $REMOTE_SYSTEM:$REMOTE_DIR/results/ Modified: python/branches/py3k/Objects/dictobject.c ============================================================================== --- python/branches/py3k/Objects/dictobject.c (original) +++ python/branches/py3k/Objects/dictobject.c Wed Jul 29 22:12:15 2009 @@ -718,7 +718,7 @@ running "python -Wi" for an example related to string interning. Let's just hope that no exception occurs then... This must be _PyThreadState_Current and not PyThreadState_GET() because in debug - mode, it complains if tstate is NULL. */ + mode, the latter complains if tstate is NULL. */ tstate = _PyThreadState_Current; if (tstate != NULL && tstate->curexc_type != NULL) { /* preserve the existing exception */ Modified: python/branches/py3k/Python/import.c ============================================================================== --- python/branches/py3k/Python/import.c (original) +++ python/branches/py3k/Python/import.c Wed Jul 29 22:12:15 2009 @@ -1783,7 +1783,7 @@ its module object WITH INCREMENTED REFERENCE COUNT */ static PyObject * -load_module(char *name, FILE *fp, char *buf, int type, PyObject *loader) +load_module(char *name, FILE *fp, char *pathname, int type, PyObject *loader) { PyObject *modules; PyObject *m; @@ -1804,27 +1804,27 @@ switch (type) { case PY_SOURCE: - m = load_source_module(name, buf, fp); + m = load_source_module(name, pathname, fp); break; case PY_COMPILED: - m = load_compiled_module(name, buf, fp); + m = load_compiled_module(name, pathname, fp); break; #ifdef HAVE_DYNAMIC_LOADING case C_EXTENSION: - m = _PyImport_LoadDynamicModule(name, buf, fp); + m = _PyImport_LoadDynamicModule(name, pathname, fp); break; #endif case PKG_DIRECTORY: - m = load_package(name, buf); + m = load_package(name, pathname); break; case C_BUILTIN: case PY_FROZEN: - if (buf != NULL && buf[0] != '\0') - name = buf; + if (pathname != NULL && pathname[0] != '\0') + name = pathname; if (type == C_BUILTIN) err = init_builtin(name); else From python-checkins at python.org Thu Jul 30 12:00:15 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 30 Jul 2009 10:00:15 -0000 Subject: [Python-checkins] r74265 - python/trunk/Doc/library/fractions.rst Message-ID: Author: mark.dickinson Date: Thu Jul 30 12:00:10 2009 New Revision: 74265 Log: Documentation fix for change introduced in r71832 Modified: python/trunk/Doc/library/fractions.rst Modified: python/trunk/Doc/library/fractions.rst ============================================================================== --- python/trunk/Doc/library/fractions.rst (original) +++ python/trunk/Doc/library/fractions.rst Thu Jul 30 12:00:10 2009 @@ -20,7 +20,7 @@ Fraction(string) The first version requires that *numerator* and *denominator* are - instances of :class:`numbers.Integral` and returns a new + instances of :class:`numbers.Rational` and returns a new :class:`Fraction` instance with value ``numerator/denominator``. If *denominator* is :const:`0`, it raises a :exc:`ZeroDivisionError`. The second version requires that From python-checkins at python.org Thu Jul 30 12:00:52 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 30 Jul 2009 10:00:52 -0000 Subject: [Python-checkins] r74266 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Thu Jul 30 12:00:52 2009 New Revision: 74266 Log: Blocked revisions 74265 via svnmerge ........ r74265 | mark.dickinson | 2009-07-30 11:00:10 +0100 (Thu, 30 Jul 2009) | 1 line Documentation fix for change introduced in r71832 ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Thu Jul 30 12:02:09 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 30 Jul 2009 10:02:09 -0000 Subject: [Python-checkins] r74267 - in python/branches/py3k: Doc/library/fractions.rst Message-ID: Author: mark.dickinson Date: Thu Jul 30 12:02:09 2009 New Revision: 74267 Log: Merged revisions 74265 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74265 | mark.dickinson | 2009-07-30 11:00:10 +0100 (Thu, 30 Jul 2009) | 1 line Documentation fix for change introduced in r71832 ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/fractions.rst Modified: python/branches/py3k/Doc/library/fractions.rst ============================================================================== --- python/branches/py3k/Doc/library/fractions.rst (original) +++ python/branches/py3k/Doc/library/fractions.rst Thu Jul 30 12:02:09 2009 @@ -18,7 +18,7 @@ Fraction(string) The first version requires that *numerator* and *denominator* are - instances of :class:`numbers.Integral` and returns a new + instances of :class:`numbers.Rational` and returns a new :class:`Fraction` instance with value ``numerator/denominator``. If *denominator* is :const:`0`, it raises a :exc:`ZeroDivisionError`. The second version requires that From python-checkins at python.org Thu Jul 30 12:03:32 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 30 Jul 2009 10:03:32 -0000 Subject: [Python-checkins] r74268 - in python/branches/release31-maint: Doc/library/fractions.rst Message-ID: Author: mark.dickinson Date: Thu Jul 30 12:03:32 2009 New Revision: 74268 Log: Merged revisions 74267 via svnmerge from svn+ssh://pythondev at www.python.org/python/branches/py3k ................ r74267 | mark.dickinson | 2009-07-30 11:02:09 +0100 (Thu, 30 Jul 2009) | 9 lines Merged revisions 74265 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74265 | mark.dickinson | 2009-07-30 11:00:10 +0100 (Thu, 30 Jul 2009) | 1 line Documentation fix for change introduced in r71832 ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/fractions.rst Modified: python/branches/release31-maint/Doc/library/fractions.rst ============================================================================== --- python/branches/release31-maint/Doc/library/fractions.rst (original) +++ python/branches/release31-maint/Doc/library/fractions.rst Thu Jul 30 12:03:32 2009 @@ -18,7 +18,7 @@ Fraction(string) The first version requires that *numerator* and *denominator* are - instances of :class:`numbers.Integral` and returns a new + instances of :class:`numbers.Rational` and returns a new :class:`Fraction` instance with value ``numerator/denominator``. If *denominator* is :const:`0`, it raises a :exc:`ZeroDivisionError`. The second version requires that From python-checkins at python.org Thu Jul 30 15:39:45 2009 From: python-checkins at python.org (eric.smith) Date: Thu, 30 Jul 2009 13:39:45 -0000 Subject: [Python-checkins] r74269 - python/trunk/Objects/stringlib/formatter.h Message-ID: Author: eric.smith Date: Thu Jul 30 15:39:44 2009 New Revision: 74269 Log: Issue 6330: Fix --enable-unicode=ucs4. Modified: python/trunk/Objects/stringlib/formatter.h Modified: python/trunk/Objects/stringlib/formatter.h ============================================================================== --- python/trunk/Objects/stringlib/formatter.h (original) +++ python/trunk/Objects/stringlib/formatter.h Thu Jul 30 15:39:44 2009 @@ -32,7 +32,7 @@ PyErr_Format(PyExc_ValueError, "Unknown format code '%c' " "for object of type '%.200s'", - presentation_type, + (char)presentation_type, type_name); #if STRINGLIB_IS_UNICODE else @@ -44,6 +44,24 @@ #endif } +static void +invalid_comma_type(STRINGLIB_CHAR presentation_type) +{ +#if STRINGLIB_IS_UNICODE + /* See comment in unknown_presentation_type */ + if (presentation_type > 32 && presentation_type < 128) +#endif + PyErr_Format(PyExc_ValueError, + "Cannot specify ',' with '%c'.", + (char)presentation_type); +#if STRINGLIB_IS_UNICODE + else + PyErr_Format(PyExc_ValueError, + "Cannot specify ',' with '\\x%x'.", + (unsigned int)presentation_type); +#endif +} + /* get_integer consumes 0 or more decimal digit characters from an input string, updates *result with the corresponding positive @@ -253,8 +271,7 @@ /* These are allowed. See PEP 378.*/ break; default: - PyErr_Format(PyExc_ValueError, - "Cannot specify ',' with '%c'.", format->type); + invalid_comma_type(format->type); return 0; } } From python-checkins at python.org Thu Jul 30 15:41:42 2009 From: python-checkins at python.org (eric.smith) Date: Thu, 30 Jul 2009 13:41:42 -0000 Subject: [Python-checkins] r74270 - python/branches/release26-maint Message-ID: Author: eric.smith Date: Thu Jul 30 15:41:41 2009 New Revision: 74270 Log: Blocked revisions 74269 via svnmerge ........ r74269 | eric.smith | 2009-07-30 09:39:44 -0400 (Thu, 30 Jul 2009) | 1 line Issue 6330: Fix --enable-unicode=ucs4. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Thu Jul 30 15:43:08 2009 From: python-checkins at python.org (eric.smith) Date: Thu, 30 Jul 2009 13:43:08 -0000 Subject: [Python-checkins] r74271 - in python/branches/py3k: Objects/stringlib/formatter.h Message-ID: Author: eric.smith Date: Thu Jul 30 15:43:08 2009 New Revision: 74271 Log: Merged revisions 74269 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74269 | eric.smith | 2009-07-30 09:39:44 -0400 (Thu, 30 Jul 2009) | 1 line Issue 6330: Fix --enable-unicode=ucs4. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Objects/stringlib/formatter.h Modified: python/branches/py3k/Objects/stringlib/formatter.h ============================================================================== --- python/branches/py3k/Objects/stringlib/formatter.h (original) +++ python/branches/py3k/Objects/stringlib/formatter.h Thu Jul 30 15:43:08 2009 @@ -32,7 +32,7 @@ PyErr_Format(PyExc_ValueError, "Unknown format code '%c' " "for object of type '%.200s'", - presentation_type, + (char)presentation_type, type_name); #if STRINGLIB_IS_UNICODE else @@ -44,6 +44,24 @@ #endif } +static void +invalid_comma_type(STRINGLIB_CHAR presentation_type) +{ +#if STRINGLIB_IS_UNICODE + /* See comment in unknown_presentation_type */ + if (presentation_type > 32 && presentation_type < 128) +#endif + PyErr_Format(PyExc_ValueError, + "Cannot specify ',' with '%c'.", + (char)presentation_type); +#if STRINGLIB_IS_UNICODE + else + PyErr_Format(PyExc_ValueError, + "Cannot specify ',' with '\\x%x'.", + (unsigned int)presentation_type); +#endif +} + /* get_integer consumes 0 or more decimal digit characters from an input string, updates *result with the corresponding positive @@ -253,8 +271,7 @@ /* These are allowed. See PEP 378.*/ break; default: - PyErr_Format(PyExc_ValueError, - "Cannot specify ',' with '%c'.", format->type); + invalid_comma_type(format->type); return 0; } } From python-checkins at python.org Thu Jul 30 15:46:39 2009 From: python-checkins at python.org (eric.smith) Date: Thu, 30 Jul 2009 13:46:39 -0000 Subject: [Python-checkins] r74272 - python/branches/release31-maint Message-ID: Author: eric.smith Date: Thu Jul 30 15:46:39 2009 New Revision: 74272 Log: Blocked revisions 74271 via svnmerge ................ r74271 | eric.smith | 2009-07-30 09:43:08 -0400 (Thu, 30 Jul 2009) | 9 lines Merged revisions 74269 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74269 | eric.smith | 2009-07-30 09:39:44 -0400 (Thu, 30 Jul 2009) | 1 line Issue 6330: Fix --enable-unicode=ucs4. ........ ................ Modified: python/branches/release31-maint/ (props changed) From nnorwitz at gmail.com Thu Jul 30 23:43:03 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 30 Jul 2009 17:43:03 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090730214303.GA15964@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 0, 26] references, sum=26 test_urllib2_localnet leaked [-280, 0, 0] references, sum=-280 Less important issues: ---------------------- test_asynchat leaked [-126, 0, 0] references, sum=-126 test_cmd_line leaked [50, 0, 0] references, sum=50 test_file2k leaked [-84, 77, -77] references, sum=-84 test_smtplib leaked [-278, 0, 0] references, sum=-278 test_socketserver leaked [-69, 0, 0] references, sum=-69 test_sys leaked [-21, 42, -21] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Fri Jul 31 22:21:08 2009 From: python-checkins at python.org (raymond.hettinger) Date: Fri, 31 Jul 2009 20:21:08 -0000 Subject: [Python-checkins] r74273 - python/branches/release26-maint/Lib/heapq.py Message-ID: Author: raymond.hettinger Date: Fri Jul 31 22:21:08 2009 New Revision: 74273 Log: Fix typo (already fixed in 2.7). Modified: python/branches/release26-maint/Lib/heapq.py Modified: python/branches/release26-maint/Lib/heapq.py ============================================================================== --- python/branches/release26-maint/Lib/heapq.py (original) +++ python/branches/release26-maint/Lib/heapq.py Fri Jul 31 22:21:08 2009 @@ -195,7 +195,7 @@ heapify(result) _heappushpop = heappushpop for elem in it: - heappushpop(result, elem) + _heappushpop(result, elem) result.sort(reverse=True) return result From JMckown at healthmarkets.com Thu Jul 30 21:05:25 2009 From: JMckown at healthmarkets.com (McKown, John) Date: Thu, 30 Jul 2009 14:05:25 -0500 Subject: [Python-checkins] r65971 - python/trunk/Lib/lib-tk/Tkinter.py Message-ID: I have never done anything like this before, so please excuse my ignorance if I am doing something that I shouldn't. But there appears to be a bug in Tkinter.py in the delete function in revision r65971, defined starting in line 2660. The line in question is line 2670 and looks like: if (num_index1 is not None) and (num_index2 is not None): This line gets a message in PySolFC like: TypeError: argument of type 'NoneType' is not iterable If have fixed this in my case by adding the phrase "and (self._tclCommands is not None)" to the line. if (num_index1 is not None) and (num_index2 is not None) and (self._tclCommands is not None): John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mckown at healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -------------- next part -------------- An HTML attachment was scrubbed... URL: